Re: [PATCH/RESEND v15 1/10] usb: Add usb_endpoint_descriptor to be part of the struct usb_ep

2011-06-09 Thread Felipe Balbi
Hi,

On Mon, Jun 06, 2011 at 02:40:45PM +0300, Tatyana Brokhman wrote:
 Change usb_ep_enable() prototype to use endpoint descriptor from usb_ep.
 This optimization spares the FDs from saving the endpoint chosen
 descriptor. This optimization is not full though. To fully exploit this
 change one needs to update all the UDCs as well since in the current
 implementation each of them saves the endpoint descriptor in it's
 internal (and extended) endpoint structure.
 
 Signed-off-by: Tatyana Brokhman tlin...@codeaurora.org

now that I look at this patch carefully, won't this break all gadget
drivers ? I mean, if I apply this patch, all gadget drivers will be
using descriptor from struct usb_ep, but noone is actually assigning
that pointer.

A better approach would be to:

(a) add the field to struct usb_ep
(b) make each controller assign that pointer while still keeping the
last one (keep the old interface too, make one patch per
controller)
(c) make each gadget/function driver use the new interface (one patch
per driver)
(d) remove the old interface from all controller (one patch for all of
them)

-- 
balbi


signature.asc
Description: Digital signature


Re: [PATCH/RESEND v15 1/10] usb: Add usb_endpoint_descriptor to be part of the struct usb_ep

2011-06-09 Thread Felipe Balbi
Hi again,

On Thu, Jun 09, 2011 at 11:32:10AM +0300, Felipe Balbi wrote:
 On Mon, Jun 06, 2011 at 02:40:45PM +0300, Tatyana Brokhman wrote:
  Change usb_ep_enable() prototype to use endpoint descriptor from usb_ep.
  This optimization spares the FDs from saving the endpoint chosen
  descriptor. This optimization is not full though. To fully exploit this
  change one needs to update all the UDCs as well since in the current
  implementation each of them saves the endpoint descriptor in it's
  internal (and extended) endpoint structure.
  
  Signed-off-by: Tatyana Brokhman tlin...@codeaurora.org
 
 now that I look at this patch carefully, won't this break all gadget
 drivers ? I mean, if I apply this patch, all gadget drivers will be
 using descriptor from struct usb_ep, but noone is actually assigning
 that pointer.

actually, I was wrong. The gadget driver is setting it, not the
controller anymore. I'll take this series in.

-- 
balbi


signature.asc
Description: Digital signature


Re: [PATCH/RESEND v15 2/10] usb: Configure endpoint according to gadget speed.

2011-06-09 Thread Felipe Balbi
On Mon, Jun 06, 2011 at 02:40:46PM +0300, Tatyana Brokhman wrote:
 Add config_ep_by_speed() to configure the endpoint according to the gadget
 speed. Using this function will spare the FDs from handling the endpoint
 chosen descriptor.
 
 Signed-off-by: Tatyana Brokhman tlin...@codeaurora.org

applied to gadget branch, thanks

-- 
balbi


signature.asc
Description: Digital signature


Re: [PATCH/RESEND v15 5/10] usb: coding style fix

2011-06-09 Thread Felipe Balbi
On Mon, Jun 06, 2011 at 02:40:49PM +0300, Tatyana Brokhman wrote:
 Signed-off-by: Tatyana Brokhman tlin...@codeaurora.org

applied to gadget branch, thanks

-- 
balbi


signature.asc
Description: Digital signature


Re: [PATCH/RESEND v15 7/10] usb:gadget: Add SuperSpeed support to the Gadget Framework

2011-06-09 Thread Felipe Balbi
On Mon, Jun 06, 2011 at 02:40:51PM +0300, Tatyana Brokhman wrote:
 This patch adds the SuperSpeed functionality to the gadget framework.
 Support for new SuperSpeed BOS descriptor was added.
 Support for SET_FEATURE and GET_STATUS requests in SuperSpeed mode was
 added.
 
 Signed-off-by: Tatyana Brokhman tlin...@codeaurora.org

applied to gadget branch, thanks

-- 
balbi


signature.asc
Description: Digital signature


Re: [PATCH/RESEND v15 8/10] usb:dummy_hcd: use the shared_hcd infrastructure

2011-06-09 Thread Felipe Balbi
On Mon, Jun 06, 2011 at 02:40:52PM +0300, Tatyana Brokhman wrote:
 This patch is a preparation for adding SuperSpeed support to dummy hcd.
 It takes the master side fields out of the struct dummy to a separate
 structure. The init process was also modified to resemble the way it is
 done by xHCI.
 
 Signed-off-by: Tatyana Brokhman tlin...@codeaurora.org

applied to gadget branch, thanks

-- 
balbi


signature.asc
Description: Digital signature


Re: [PATCH] msm: timer: compensate for timer shift in msm_read_timer_count

2011-06-09 Thread Daniel Walker
On Wed, 2011-06-08 at 20:44 -0700, Jeff Ohlstein wrote:
 Some msm targets have timers whose lower bits are unreliable. So, we
 present our timers as lower frequency than they actually are, and ignore
 the bottom 5 bits on such targets. This compensation was erroneously
 removed from the msm_read_timer_count function, so restore it.
 
 This was broken by 94790ec25 msm: timer: SMP timer support for msm.
 
 Change-Id: I8c56bdf82629638748ccf352118ea664f967b87d

Drop this Change-ID ..

 Signed-off-by: Jeff Ohlstein johls...@codeaurora.org
 ---
  arch/arm/mach-msm/timer.c |2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
 
 diff --git a/arch/arm/mach-msm/timer.c b/arch/arm/mach-msm/timer.c
 index 38b95e9..b3579fe 100644
 --- a/arch/arm/mach-msm/timer.c
 +++ b/arch/arm/mach-msm/timer.c
 @@ -100,7 +100,7 @@ static cycle_t msm_read_timer_count(struct clocksource 
 *cs)
  {
   struct msm_clock *clk = container_of(cs, struct msm_clock, clocksource);
  
 - return readl(clk-global_counter);
 + return readl(clk-global_counter)  clk-shift;
  }

Could you comment in the code with something explaining what the shift
is doing.

Daniel

--
To unsubscribe from this list: send the line unsubscribe linux-arm-msm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2] usb:dummy_hcd: Force FS device connection according to module parameter

2011-06-09 Thread Tatyana Brokhman
This patch adds a new module parameter to dummy_hcd: is_high_speed
When set to false the connected device will be forced to operate in FS
mode. The default of this parameter is true.

Signed-off-by: Tatyana Brokhman tlin...@codeaurora.org

---
 drivers/usb/gadget/dummy_hcd.c |   20 +++-
 1 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/drivers/usb/gadget/dummy_hcd.c b/drivers/usb/gadget/dummy_hcd.c
index f0cdd13..cb1e0fa 100644
--- a/drivers/usb/gadget/dummy_hcd.c
+++ b/drivers/usb/gadget/dummy_hcd.c
@@ -72,13 +72,17 @@ MODULE_LICENSE (GPL);
 
 struct dummy_hcd_module_parameters {
bool is_super_speed;
+   bool is_high_speed;
 };
 
 static struct dummy_hcd_module_parameters mod_data = {
-   .is_super_speed = false
+   .is_super_speed = false,
+   .is_high_speed = true,
 };
 module_param_named(is_super_speed, mod_data.is_super_speed, bool, S_IRUGO);
 MODULE_PARM_DESC(is_super_speed, true to simulate SuperSpeed connection);
+module_param_named(is_high_speed, mod_data.is_high_speed, bool, S_IRUGO);
+MODULE_PARM_DESC(is_high_speed, true to simulate HighSpeed connection);
 /*-*/
 
 /* gadget side driver data structres */
@@ -904,12 +908,15 @@ usb_gadget_probe_driver(struct usb_gadget_driver *driver,
dum-gadget.ep0 = dum-ep [0].ep;
if (mod_data.is_super_speed)
dum-gadget.speed = driver-speed;
-   else
+   else if (mod_data.is_high_speed)
dum-gadget.speed = min((u8)USB_SPEED_HIGH, (u8)driver-speed);
+   else
+   dum-gadget.speed = USB_SPEED_FULL;
if (dum-gadget.speed  driver-speed)
-   dev_dbg(udc_dev(dum), This device can perform faster if
-  you connect it to a 
- SupeSpeed port...\n);
+   dev_dbg(udc_dev(dum), This device can perform faster
+if you connect it to a %s port...\n,
+   (driver-speed == USB_SPEED_SUPER ?
+SuperSpeed : HighSpeed));
 
if (dum-gadget.speed == USB_SPEED_SUPER) {
for (i = 0; i  DUMMY_ENDPOINTS; i++)
@@ -2417,6 +2424,9 @@ static int __init init (void)
if (usb_disabled ())
return -ENODEV;
 
+   if (!mod_data.is_high_speed  mod_data.is_super_speed)
+   return -EINVAL;
+
the_hcd_pdev = platform_device_alloc(driver_name, -1);
if (!the_hcd_pdev)
return retval;
-- 
1.7.3.3

--
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
--
To unsubscribe from this list: send the line unsubscribe linux-arm-msm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/3] net: msm_ipc: Add user-space support for MSM_IPC Router

2011-06-09 Thread Karthikeyan Ramasubramanian

On 6/9/2011 1:11 AM, David Miller wrote:


There is no reason to create a whole new socket address family, use
genetlink instead.
--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


The prospect of using NETLINK sockets was investigated and it seems to 
be supporting the communication between user-space and kernel-space 
processes.


One of the requirements/goals for this MSM_IPC Router is to enable the 
communication between the processes running on different processors  
OSes, and the addressing mechanism of NETLINK sockets is insufficient to 
address the processes running in different processors and OSes.


We also have the requirements of built-in name service, remote process's 
status detection, location transparency etc. That is the reason for this 
home-grown solution with a requirement for new socket address family.


Please let me know if you need any other information.

Thanks and Regards,
Karthik.

--
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
--
To unsubscribe from this list: send the line unsubscribe linux-arm-msm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2] usb:dummy_hcd: Force FS device connection according to module parameter

2011-06-09 Thread Alan Stern
On Thu, 9 Jun 2011, Tatyana Brokhman wrote:

 This patch adds a new module parameter to dummy_hcd: is_high_speed
 When set to false the connected device will be forced to operate in FS
 mode. The default of this parameter is true.

...

 @@ -904,12 +908,15 @@ usb_gadget_probe_driver(struct usb_gadget_driver 
 *driver,
   dum-gadget.ep0 = dum-ep [0].ep;
   if (mod_data.is_super_speed)
   dum-gadget.speed = driver-speed;
 - else
 + else if (mod_data.is_high_speed)
   dum-gadget.speed = min((u8)USB_SPEED_HIGH, (u8)driver-speed);

Use min_t().

 + else
 + dum-gadget.speed = USB_SPEED_FULL;
   if (dum-gadget.speed  driver-speed)
 - dev_dbg(udc_dev(dum), This device can perform faster if
 -you connect it to a 
 -   SupeSpeed port...\n);
 + dev_dbg(udc_dev(dum), This device can perform faster
 +  if you connect it to a %s port...\n,
 + (driver-speed == USB_SPEED_SUPER ?
 +  SuperSpeed : HighSpeed));
  
   if (dum-gadget.speed == USB_SPEED_SUPER) {
   for (i = 0; i  DUMMY_ENDPOINTS; i++)
 @@ -2417,6 +2424,9 @@ static int __init init (void)
   if (usb_disabled ())
   return -ENODEV;
  
 + if (!mod_data.is_high_speed  mod_data.is_super_speed)
 + return -EINVAL;

Print an error message in the log so that the user will know why the 
failure occurred.

Alan Stern

--
To unsubscribe from this list: send the line unsubscribe linux-arm-msm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/3] net: msm_ipc: Add user-space support for MSM_IPC Router

2011-06-09 Thread Bryan Huntsman
On 06/09/2011 01:15 PM, Arnd Bergmann wrote:
 I can see some good use cases for having a socket to do IPC between OS
 images that have a shared memory interconnect. What I see as most
 problematic is to have it defined in a way that is tightly connected
 to specific hardware from one vendor. If the protocol was defined
 in a way that is useful for communication between virtual machines
 (e.g. on top of virtio) and tranparent PCI bridges, it would probably
 be much more acceptable.
 
   Arnd

Yeah, we're trying to figure out the best way to do socket-based
communication between various images within a SoC.  I was thinking that
some kind of registration scheme would be necessary for the new AF to
support different SoCs and communication mechanisms.  We'll take a look
at ways to have a generic implementation.  Thanks.

- Bryan

-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
--
To unsubscribe from this list: send the line unsubscribe linux-arm-msm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH v2] usb:dummy_hcd: Force FS device connection according to module parameter

2011-06-09 Thread Tanya Brokhman
  @@ -904,12 +908,15 @@ usb_gadget_probe_driver(struct
 usb_gadget_driver *driver,
  dum-gadget.ep0 = dum-ep [0].ep;
  if (mod_data.is_super_speed)
  dum-gadget.speed = driver-speed;
  -   else
  +   else if (mod_data.is_high_speed)
  dum-gadget.speed = min((u8)USB_SPEED_HIGH, (u8)driver-
 speed);
 
 Use min_t().

Ok, will update.

 
  +   else
  +   dum-gadget.speed = USB_SPEED_FULL;
  if (dum-gadget.speed  driver-speed)
  -   dev_dbg(udc_dev(dum), This device can perform faster if
  -  you connect it to a 
  - SupeSpeed port...\n);
  +   dev_dbg(udc_dev(dum), This device can perform faster
  +if you connect it to a %s port...\n,
  +   (driver-speed == USB_SPEED_SUPER ?
  +SuperSpeed : HighSpeed));
 
  if (dum-gadget.speed == USB_SPEED_SUPER) {
  for (i = 0; i  DUMMY_ENDPOINTS; i++)
  @@ -2417,6 +2424,9 @@ static int __init init (void)
  if (usb_disabled ())
  return -ENODEV;
 
  +   if (!mod_data.is_high_speed  mod_data.is_super_speed)
  +   return -EINVAL;
 
 Print an error message in the log so that the user will know why the
 failure occurred.
 

But when the module fails to load the message sais that it's invalid
parameter (or something like that). That's why I thought it will be enough. 
You mean to add something that explains WHY these values are wrong?


Thanks,
Tanya Brokhman
---
Sent by an consultant of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.




--
To unsubscribe from this list: send the line unsubscribe linux-arm-msm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH v2] usb:dummy_hcd: Force FS device connection according to module parameter

2011-06-09 Thread Alan Stern
On Thu, 9 Jun 2011, Tanya Brokhman wrote:

   + if (!mod_data.is_high_speed  mod_data.is_super_speed)
   + return -EINVAL;
  
  Print an error message in the log so that the user will know why the
  failure occurred.
  
 
 But when the module fails to load the message sais that it's invalid
 parameter (or something like that). That's why I thought it will be enough. 

Oh yes, that's true.

 You mean to add something that explains WHY these values are wrong?

That's what I had in mind.  But invalid parameter is probably good 
enough, since these are the _only_ parameters.  :-)  So this part is 
okay as it stands.

Alan Stern

--
To unsubscribe from this list: send the line unsubscribe linux-arm-msm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] msm: timer: compensate for timer shift in msm_read_timer_count

2011-06-09 Thread David Brown
On Thu, Jun 09 2011, Daniel Walker wrote:

 diff --git a/arch/arm/mach-msm/timer.c b/arch/arm/mach-msm/timer.c
 index 38b95e9..b3579fe 100644
 --- a/arch/arm/mach-msm/timer.c
 +++ b/arch/arm/mach-msm/timer.c
 @@ -100,7 +100,7 @@ static cycle_t msm_read_timer_count(struct clocksource 
 *cs)
  {
  struct msm_clock *clk = container_of(cs, struct msm_clock, clocksource);
  
 -return readl(clk-global_counter);
 +return readl(clk-global_counter)  clk-shift;
  }

 Could you comment in the code with something explaining what the shift
 is doing.

Probably best to describe this near msm_clock's definition (or
MSM_DGT_SHIFT), since it is a bit unclear what these values are.
A good (but short) description of how the shifts and even why.

The comment shouldn't be in the function body (CodingStyle, chapter 8).

David

-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
--
To unsubscribe from this list: send the line unsubscribe linux-arm-msm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html