Re: [PATCH v2 2/3] USB: ehci-tegra: fix inefficient copy of unaligned buffers

2015-04-23 Thread Alan Stern
On Thu, 23 Apr 2015, Johan Hovold wrote:

 Make sure only to copy any actual data rather than the whole buffer,
 when releasing the temporary buffer used for unaligned non-isochronous
 transfers.
 
 Compile-tested only.
 
 Signed-off-by: Johan Hovold jo...@kernel.org
 ---
  drivers/usb/host/ehci-tegra.c | 12 +---
  1 file changed, 9 insertions(+), 3 deletions(-)
 
 diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c
 index ff9af29b4e9f..4031b372008e 100644
 --- a/drivers/usb/host/ehci-tegra.c
 +++ b/drivers/usb/host/ehci-tegra.c
 @@ -304,6 +304,7 @@ struct dma_aligned_buffer {
  static void free_dma_aligned_buffer(struct urb *urb)
  {
   struct dma_aligned_buffer *temp;
 + size_t length;
  
   if (!(urb-transfer_flags  URB_ALIGNED_TEMP_BUFFER))
   return;
 @@ -311,9 +312,14 @@ static void free_dma_aligned_buffer(struct urb *urb)
   temp = container_of(urb-transfer_buffer,
   struct dma_aligned_buffer, data);
  
 - if (usb_urb_dir_in(urb))
 - memcpy(temp-old_xfer_buffer, temp-data,
 -urb-transfer_buffer_length);
 + if (usb_urb_dir_in(urb)) {
 + if (usb_pipeisoc(urb-pipe))
 + length = urb-transfer_buffer_length;
 + else
 + length = urb-actual_length;
 +
 + memcpy(temp-old_xfer_buffer, temp-data, length);
 + }
   urb-transfer_buffer = temp-old_xfer_buffer;
   kfree(temp-kmalloc_ptr);

Acked-by: Alan Stern st...@rowland.harvard.edu

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


Re: [PATCHv3 0/4] add devm_of_phy_get_by_index and update platform drivers

2015-04-23 Thread Alan Stern
On Wed, 22 Apr 2015, Arun Ramamurthy wrote:

 This patch set adds a new API to get phy by index when multiple 
 phys are present. This patch is based on discussion with Arnd Bergmann
 about dt bindings for multiple phys.
 
 History:
 v1:
 - Removed null pointers on Dmitry's suggestion
 - Improved documentation in commit messages
 - Exported new phy api
 v2:
 - EHCI and OHCI platform Kconfigs select Generic Phy
   to fix build errors in certain configs.
 v3:
 - Made GENERIC_PHY an invisible option so 
 that other configs can select it
 - Added stubs for devm_of_phy_get_by_index
 - Reformated code
 
 Arun Ramamurthy (4):
   phy: phy-core: Make GENERIC_PHY an invisible option
   phy: core: Add devm_of_phy_get_by_index to phy-core
   usb: ehci-platform: Use devm_of_phy_get_by_index
   usb: ohci-platform: Use devm_of_phy_get_by_index

For patches 3 and 4:

Acked-by: Alan Stern st...@rowland.harvard.edu

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


Re: Video transfer hangs with cx231xx deivce on ASM1042A USB 3.0 Host Controller

2015-04-23 Thread Rodrigo Severo
On Mon, Apr 13, 2015 at 10:15 AM, Mathias Nyman
mathias.ny...@linux.intel.com wrote:
 Hi

 On 08.04.2015 20:45, Rodrigo Severo wrote:

 At that time I even tested enabling XHCI_TRUST_TX_LENGTH quirk for the
 ASM1042A USB 3.0 Host Controller which eliminated the warnings on my
 logs but didn't solve the hang issues.

 Can you add xhci debugging and post the output before the hang.

 Enable xhci debugging with:
 echo -n 'module xhci_hcd =p'  /sys/kernel/debug/dynamic_debug/control

Im not sure my first message with the log uncompressed. Now I'm
sending it with the log compressed.

I hope this is better.


Regards,

Rodrigo


xhci-hang.log.gz
Description: GNU Zip compressed data


Re: [PATCH v2 2/3] USB: ehci-tegra: fix inefficient copy of unaligned buffers

2015-04-23 Thread Frans Klaver
On Thu, Apr 23, 2015 at 4:06 PM, Johan Hovold jo...@kernel.org wrote:
 Make sure only to copy any actual data rather than the whole buffer,
 when releasing the temporary buffer used for unaligned non-isochronous
 transfers.

 Compile-tested only.

 Signed-off-by: Johan Hovold jo...@kernel.org
 ---
  drivers/usb/host/ehci-tegra.c | 12 +---
  1 file changed, 9 insertions(+), 3 deletions(-)

 diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c
 index ff9af29b4e9f..4031b372008e 100644
 --- a/drivers/usb/host/ehci-tegra.c
 +++ b/drivers/usb/host/ehci-tegra.c
 @@ -304,6 +304,7 @@ struct dma_aligned_buffer {
  static void free_dma_aligned_buffer(struct urb *urb)
  {
 struct dma_aligned_buffer *temp;
 +   size_t length;

 if (!(urb-transfer_flags  URB_ALIGNED_TEMP_BUFFER))
 return;
 @@ -311,9 +312,14 @@ static void free_dma_aligned_buffer(struct urb *urb)
 temp = container_of(urb-transfer_buffer,
 struct dma_aligned_buffer, data);

 -   if (usb_urb_dir_in(urb))
 -   memcpy(temp-old_xfer_buffer, temp-data,
 -  urb-transfer_buffer_length);
 +   if (usb_urb_dir_in(urb)) {
 +   if (usb_pipeisoc(urb-pipe))
 +   length = urb-transfer_buffer_length;
 +   else
 +   length = urb-actual_length;
 +
 +   memcpy(temp-old_xfer_buffer, temp-data, length);
 +   }
 urb-transfer_buffer = temp-old_xfer_buffer;
 kfree(temp-kmalloc_ptr);

Out of curiosity: any reason not to declare that length variable
inside this new compound?

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


Re: Video transfer hangs with cx231xx deivce on ASM1042A USB 3.0 Host Controller

2015-04-23 Thread Rodrigo Severo
On Mon, Apr 13, 2015 at 10:15 AM, Mathias Nyman
mathias.ny...@linux.intel.com wrote:
 Hi

 On 08.04.2015 20:45, Rodrigo Severo wrote:

 When connecting cx231xx video grab devices (which are USB 2.0
 themselves) on ASMedia ASM1042A USB 3.0 Host Controllers the video
 capture process hangs after a few minutes. Besides hanging my log is
 flowed with the following warning:

 Does this only happend with the ASMedia ASM1042A xHCI controller?
 Can you reproduce it with a xHCI controller from another vendor?

I've just tested with another 3.0 xhci host, an PCI-e board Renesas
Technology Corp. uPD720202 USB 3.0 Host Controller, with ID 1912:0015.

When I started capturing video with the video grabber connected to
this xhci host the messages where like the ones I received with the
ASMedia 1042A. Lots of:

xhci_hcd :06:00.0: WARN Successful completion on short TX: needs
XHCI_TRUST_TX_LENGTH quirk?

But when the video grab hanged it presented the message below once:

Apr 23 10:54:31 video-teste kernel: [  158.931156] xhci_hcd
:06:00.0: ERROR Transfer event TRB DMA ptr not part of current TD
ep_index 8 comp_code 1

And them flooded my log with the messages below at a rate of tens per second:

Apr 23 10:54:31 video-teste kernel: [  158.931252] xhci_hcd
:06:00.0: Looking for event-dma b9af9250 trb-start
b9af9260 trb-end b9af9260 seg-start b9af9000
seg-end b9af93f0
Apr 23 10:54:31 video-teste kernel: [  158.936148] xhci_hcd
:06:00.0: ERROR Transfer event TRB DMA ptr not part of current TD
ep_index 8 comp_code 1

Do you need xhci debugging from this board also?


Regards,

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


Re: default value of power/wakeup

2015-04-23 Thread Alan Stern
On Thu, 23 Apr 2015, Tom Yan wrote:

 I'm not saying that the kernel shouldn't initialize the attributes or
 have a default. But it should only set the default when the attribute
 is initialized (It doesn't even matter to me whether it's enabled or
 disabled).
 
 It's just there should not be further manipulation from the kernel
 (e.g. device_set_wakeup_enable) afterwards because
 1. it's brings inconsistency because the function is adopted per driver
 2. it's a user preference and responsibilty
 3. third it prevent udev to apply a rule properly (regression / bug)
 
 P.S. Alan for my case, I don't need a patch for logitech-dj, I just
 need to remove device_set_enable_wakeup from hid_core.c, then I can
 enable or disable the attribute with a udev rule happily for both
 devices.

I understand that.  But removing device_set_enable_wakeup from
hid_core.c would annoy a lot of people.  Linus would probably decide
that it was a regression and would put the function call back in.

Alan Stern

--
To unsubscribe from this list: send the line unsubscribe linux-usb 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: don't build PCI quirks if USB support isn't configured

2015-04-23 Thread Alan Stern
On Thu, 23 Apr 2015, Tal Shorer wrote:

 Why is drivers/usb/Makefile even read when CONFIG_USB is not set?

CONFIG_USB means that the kernel will support host-side USB.  But 
drivers/usb and the directories underneath it also contain drivers for 
peripheral-side USB.  Therefore the Makefiles in those directories must 
be read even when CONFIG_USB is not set.

On the other hand, it would make sense to skip drivers/usb/Makefile 
when CONFIG_USB_SUPPORT is not set.  But that would have to be a 
separate patch.

 Won't it make more sense to throw the line
 obj-$(CONFIG_PCI) += usb/
 from drivers/Makfile?

All of the existing lines referencing usb/ could be replaced by a 
single line depending on CONFIG_USB_SUPPORT.

Alan Stern

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


Re: default value of power/wakeup

2015-04-23 Thread Tom Yan
I know. Honestly I never expect it to be fixed. I just want to draw
some attention so that people can be aware of this problem (some may
be suffering from this without understand what's going on). Though I
did  filed a bug report on bugzilla some time ago to request making
this function a no-op (sounds outrageous doesn't it). Hope that
something will be done for this one day anyway.

On 23 April 2015 at 22:40, Alan Stern st...@rowland.harvard.edu wrote:
 On Thu, 23 Apr 2015, Tom Yan wrote:

 I'm not saying that the kernel shouldn't initialize the attributes or
 have a default. But it should only set the default when the attribute
 is initialized (It doesn't even matter to me whether it's enabled or
 disabled).

 It's just there should not be further manipulation from the kernel
 (e.g. device_set_wakeup_enable) afterwards because
 1. it's brings inconsistency because the function is adopted per driver
 2. it's a user preference and responsibilty
 3. third it prevent udev to apply a rule properly (regression / bug)

 P.S. Alan for my case, I don't need a patch for logitech-dj, I just
 need to remove device_set_enable_wakeup from hid_core.c, then I can
 enable or disable the attribute with a udev rule happily for both
 devices.

 I understand that.  But removing device_set_enable_wakeup from
 hid_core.c would annoy a lot of people.  Linus would probably decide
 that it was a regression and would put the function call back in.

 Alan Stern

--
To unsubscribe from this list: send the line unsubscribe linux-usb 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 2/3] USB: ehci-tegra: fix inefficient copy of unaligned buffers

2015-04-23 Thread Johan Hovold
On Thu, Apr 23, 2015 at 04:31:51PM +0200, Frans Klaver wrote:
 On Thu, Apr 23, 2015 at 4:06 PM, Johan Hovold jo...@kernel.org wrote:

   static void free_dma_aligned_buffer(struct urb *urb)
   {
  struct dma_aligned_buffer *temp;
  +   size_t length;
 
  if (!(urb-transfer_flags  URB_ALIGNED_TEMP_BUFFER))
  return;
  @@ -311,9 +312,14 @@ static void free_dma_aligned_buffer(struct urb *urb)
  temp = container_of(urb-transfer_buffer,
  struct dma_aligned_buffer, data);
 
  -   if (usb_urb_dir_in(urb))
  -   memcpy(temp-old_xfer_buffer, temp-data,
  -  urb-transfer_buffer_length);
  +   if (usb_urb_dir_in(urb)) {
  +   if (usb_pipeisoc(urb-pipe))
  +   length = urb-transfer_buffer_length;
  +   else
  +   length = urb-actual_length;
  +
  +   memcpy(temp-old_xfer_buffer, temp-data, length);
  +   }
  urb-transfer_buffer = temp-old_xfer_buffer;
  kfree(temp-kmalloc_ptr);
 
 Out of curiosity: any reason not to declare that length variable
 inside this new compound?

Just my style preference.

Johan
--
To unsubscribe from this list: send the line unsubscribe linux-usb 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 11/11] usbip: USB over WebSocket

2015-04-23 Thread Steve Calfee
If you are looking for a good C websockets library, gpl etc try:

https://libwebsockets.org/trac/libwebsockets


I used it in a project and was very pleased with how it worked and the
support where it is hosted.


Regards, Steve

On Wed, Apr 22, 2015 at 11:52 PM, fx IWATA NOBUO
nobuo.iw...@fujixerox.co.jp wrote:
 Hi Bjørn

 This cannot possibly be necessary.  Pointing to the toplevel COPYING
 file should be more than enough, if anything at all.

 And BTW, the same goes for the tools/usb/usbip/COPYING that seems to
 have snuck in somehow.  I also wonder a bit about the AUTHORS file
 both
 places.  We have git and MAINTAINERS for such things, don't we?

 I will remove from v3.

  --- /dev/null
  +++ b/tools/usb/usbip/websocket/configure.ac
  @@ -0,0 +1,61 @@
  +dnl Process this file with autoconf to produce a configure script.
  +
  +AC_PREREQ(2.59)
  +AC_INIT([usbip-utils], [1.1.1], [linux-usb@vger.kernel.org])
  +AC_DEFINE([USBIP_VERSION], [0x0111], [binary-coded decimal
 version
 number])

 This should either use the upper level definitions or have its own
 namespace.  Defining the same symbols at different levels is a recipe
 for confusion.  In fact, you are already out of sync with the
 definitions in tools/usb/usbip/configure.ac

 Sorry for my carelessness.
 I will use own AC_INIT() in v3 and remove AC_DEFINE([USBIP_VERSION])
 from v3.

  Implementation of this patch depends on Poco C++
  (http://pocoproject.org/).

 Really?  Is that OK?

 Yuck. Any reason this cannot be written in C?

 I couldn't find good C library which supports both server and client.
 I intended other implementation may be stored under 'websocket'
 directory next to 'poco'.

 Thank you for your comments,

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


[BUG] xhci_hcd: no USB3 SuperSpeed on IvyBridge Macbook

2015-04-23 Thread Chris Bainbridge
Hardware: IvyBridge Macbook (Panther Point PCH), 2 external USB3 ports
Verified in kernels: 4.0.0+ (1fc1499), Debian 3.16.4

All USB3 devices appear as USB2 high-speed (480mbps) rather than USB3
super-speed (5000mbps).

usb1 and usb2 are the XHCI USB3 buses. usb3 and usb4 are the EHCI USB2 buses
(the EHCI buses are connected to laptop internal devices, not the external 
ports).

# lspci | grep USB
00:14.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family 
USB xHCI Host Controller (rev 04)
00:1a.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family 
USB Enhanced Host Controller #2 (rev 04)
00:1d.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family 
USB Enhanced Host Controller #1 (rev 04)

dmesg, may be significant:
can't derive routing for PCI INT A
PCI INT A: no GSI

[1.089819] xhci_hcd :00:14.0: can't derive routing for PCI INT A
[1.089825] xhci_hcd :00:14.0: PCI INT A: no GSI
[1.089858] xhci_hcd :00:14.0: xHCI Host Controller
[1.089910] xhci_hcd :00:14.0: new USB bus registered, assigned bus 
number 1
[1.090011] xhci_hcd :00:14.0: hcc params 0x20007181 hci version 0x100 
quirks 0xb930
[1.090025] xhci_hcd :00:14.0: cache line size of 256 is not supported
[1.090151] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[1.090156] usb usb1: New USB device strings: Mfr=3, Product=2, 
SerialNumber=1
[1.090162] usb usb1: Product: xHCI Host Controller
[1.090165] usb usb1: Manufacturer: Linux 4.0.0+ xhci-hcd
[1.090169] usb usb1: SerialNumber: :00:14.0
[1.090291] hub 1-0:1.0: USB hub found
[1.090315] hub 1-0:1.0: 4 ports detected
[1.090524] xhci_hcd :00:14.0: xHCI Host Controller
[1.090561] xhci_hcd :00:14.0: new USB bus registered, assigned bus 
number 2
[1.090663] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003
[1.090667] usb usb2: New USB device strings: Mfr=3, Product=2, 
SerialNumber=1
[1.090672] usb usb2: Product: xHCI Host Controller
[1.090676] usb usb2: Manufacturer: Linux 4.0.0+ xhci-hcd
[1.090679] usb usb2: SerialNumber: :00:14.0
[1.090789] hub 2-0:1.0: USB hub found
[1.090808] hub 2-0:1.0: 4 ports detected

Why is usb1 reported as a 480mbit 2.0 root hub?
Why are no devices connected to the 5000M usb2 bus?

# cat /sys/bus/usb/devices/usb1/speed 
480
# cat /sys/bus/usb/devices/usb1/idProduct 
0002
# cat /sys/bus/usb/devices/usb2/speed 
5000
# cat /sys/bus/usb/devices/usb2/idProduct 
0003

# lsusb | grep 'Device 001'
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

With USB3 config:
   USB3 port - USB3 ethernet
   USB3 port - USB3 hub - USB3 flash drive
 - USB3 hard drive

All USB3 devices appear on bus1 as 480mbps:

# lsusb -t
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/8p, 480M
|__ Port 8: Dev 3, If 0, Class=Hub, Driver=hub/2p, 480M
|__ Port 1: Dev 4, If 0, Class=Hub, Driver=hub/3p, 12M
|__ Port 1: Dev 6, If 0, Class=Human Interface Device, 
Driver=usbhid, 12M
|__ Port 2: Dev 7, If 0, Class=Human Interface Device, 
Driver=usbhid, 12M
|__ Port 3: Dev 8, If 0, Class=Vendor Specific Class, Driver=, 
12M
|__ Port 3: Dev 8, If 1, Class=Wireless, Driver=, 12M
|__ Port 3: Dev 8, If 2, Class=Vendor Specific Class, Driver=, 
12M
|__ Port 3: Dev 8, If 3, Class=Application Specific Interface, 
Driver=, 12M
|__ Port 2: Dev 5, If 0, Class=Human Interface Device, 
Driver=usbhid, 12M
|__ Port 2: Dev 5, If 1, Class=Human Interface Device, 
Driver=usbhid, 12M
|__ Port 2: Dev 5, If 2, Class=Human Interface Device, 
Driver=bcm5974, 12M
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/6p, 480M
|__ Port 1: Dev 3, If 0, Class=Video, Driver=, 480M
|__ Port 1: Dev 3, If 1, Class=Video, Driver=, 480M
|__ Port 1: Dev 3, If 2, Class=Vendor Specific Class, Driver=, 480M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 480M
|__ Port 1: Dev 13, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 1: Dev 15, If 0, Class=Vendor Specific Class, 
Driver=ax88179_178a, 480M
|__ Port 3: Dev 3, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 1: Dev 16, If 0, Class=Mass Storage, Driver=usb-storage, 480M
|__ Port 2: Dev 5, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 4: Dev 7, If 0, Class=Human Interface Device, 
Driver=usbhid, 1.5M
|__ Port 3: 

Re: [PATCH] usb: dwc3: gadget: call gadget driver's -suspend/-resume

2015-04-23 Thread David Cohen
Hi Greg,

On Fri, Apr 17, 2015 at 09:42:57PM +0200, Greg KH wrote:
 On Fri, Apr 17, 2015 at 11:41:56AM -0700, David Cohen wrote:
  From: Felipe Balbi ba...@ti.com
  
  When going into bus suspend/resume we _must_
  call gadget driver's -suspend/-resume callbacks
  accordingly. This patch implements that very feature
  which has been missing forever.
  
  Cc: sta...@vger.kernel.org # 3.14
  Signed-off-by: Felipe Balbi ba...@ti.com
  Signed-off-by: David Cohen david.a.co...@linux.intel.com
  ---
  
  Hi,
  
  This patch was introduced on v3.15.
  But the issue it fixes already existed on v3.14 and v3.14 is a long term
  support version.
  I propose to backport it over there as well.
 
 What is the git commit id of the patch in Linus's tree?

Sorry for the missing info. As Felipe replied, this is the commit:
Upstream commit bc5ba2e0b829c9397f96df1191c7d2319ebc36d9

I'm resending it to fix the commit message and add a second patch as
well.

Br, David

 
 thanks,
 
 greg k-h
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 0/2] usb: dwc3: gadget driver's bug fix

2015-04-23 Thread David Cohen
Hi,

The following patches were merged on kernel = v3.15 but the issue they fix
exists on v3.14 too.
We are currently seeing BC1.2 compliance test failure on some Intel devices
supported by v3.14 LTS kernel. The issue is fixed by this series.
So, I propose to add these to stable.

Br, David
---

Dan Carpenter (1):
  usb: dwc3: gadget: cut and paste fixups in suspend/resume

Felipe Balbi (1):
  usb: dwc3: gadget: call gadget driver's -suspend/-resume

 drivers/usb/dwc3/gadget.c | 35 +++
 1 file changed, 35 insertions(+)

-- 
2.1.4

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


Re: [BUG] xhci_hcd: no USB3 SuperSpeed on IvyBridge Macbook

2015-04-23 Thread Greg KH
On Thu, Apr 23, 2015 at 09:50:14PM +0100, Chris Bainbridge wrote:
 Hardware: IvyBridge Macbook (Panther Point PCH), 2 external USB3 ports
 Verified in kernels: 4.0.0+ (1fc1499), Debian 3.16.4
 
 All USB3 devices appear as USB2 high-speed (480mbps) rather than USB3
 super-speed (5000mbps).

Are you sure you actually have a device that runs at that speed?  A USB
3 device can run at low speed and still be USB 3 compliant (backwards
compatibility issues ensure this.)

 Booting with nothing plugged in to the USB3 ports and then plugging in a 
 single
 Sandisk Extreme USB3 flash drive shows the same behaviour, no super-speed.
 The drive is capable of SuperSpeed:
 
 # lsusb -v -d 0781:5580 | grep peed
   SuperSpeed USB Device Capability:
 wSpeedsSupported   0x000e
   Device can operate at Full Speed (12Mbps)
   Device can operate at High Speed (480Mbps)
   Device can operate at SuperSpeed (5Gbps)
   Lowest fully-functional device speed is Full Speed (12Mbps)

That's interesting, does it show up as a SuperSpeed device plugged into
any other machine?

thanks,

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


Re: [PATCH] usb: dwc3: gadget: call gadget driver's -suspend/-resume

2015-04-23 Thread David Cohen
Hi Felipe,

On Fri, Apr 17, 2015 at 02:43:27PM -0500, Felipe Balbi wrote:
 On Fri, Apr 17, 2015 at 11:41:56AM -0700, David Cohen wrote:
  From: Felipe Balbi ba...@ti.com
 
 missing the required:
 
 [ Upstream commit bc5ba2e0b829c9397f96df1191c7d2319ebc36d9 ]
 
  
  When going into bus suspend/resume we _must_
  call gadget driver's -suspend/-resume callbacks
  accordingly. This patch implements that very feature
  which has been missing forever.
  
  Cc: sta...@vger.kernel.org # 3.14
  Signed-off-by: Felipe Balbi ba...@ti.com
  Signed-off-by: David Cohen david.a.co...@linux.intel.com
  ---
  
  Hi,
  
  This patch was introduced on v3.15.
  But the issue it fixes already existed on v3.14 and v3.14 is a long term
  support version.
 
 Can you show me a log of this breaking anywhere ? Why do you consider
 this a bug fix ? What sort of drawbacks did you notice ?

We're seeing BC1.2 compliance test failure. I borrowed this info from
the bug report :)

1. BC1.2 compliance testing - SDP2.0
---
1. On Connect to active Host (Expected result: 100mA to 500mA):
   Actual result 100mA to 500mA

2. On Host Suspend (ER: Fall back to 0mA):
   not falling back to 0mA, remains at 500mA

3. On Connect to Suspended Host (ER: 100mA to 0mA):
   cable-props shown as 100mA, which means drawing a current of 100mA from
   Suspended Host

4. On making Host active (ER: 500mA):
   500mA

 
  I propose to backport it over there as well.
  
  BR, David
  ---
  
   drivers/usb/dwc3/gadget.c | 35 +++
   1 file changed, 35 insertions(+)
  
  diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
  index 8f6738d46b14..1bb752736c32 100644
  --- a/drivers/usb/dwc3/gadget.c
  +++ b/drivers/usb/dwc3/gadget.c
  @@ -2012,6 +2012,24 @@ static void dwc3_disconnect_gadget(struct dwc3 *dwc)
  }
   }
   
  +static void dwc3_suspend_gadget(struct dwc3 *dwc)
  +{
  +   if (dwc-gadget_driver  dwc-gadget_driver-disconnect) {
 
 you also need Dan Carperter's commit which fixes this cut  paste error.
 That's commit 73a30bfc0d526db899033165db6f95c427e70505

Thanks. I'll add that to my next try.

Br, David
--
To unsubscribe from this list: send the line unsubscribe linux-usb 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 2/3] USB: ehci-tegra: fix inefficient copy of unaligned buffers

2015-04-23 Thread Stephen Warren

On 04/23/2015 08:06 AM, Johan Hovold wrote:

Make sure only to copy any actual data rather than the whole buffer,
when releasing the temporary buffer used for unaligned non-isochronous
transfers.

Compile-tested only.


Tested-by: Stephen Warren swar...@nvidia.com

(Tested a USB network device attached to Jetson TK1, with a large 
download, and ping packets of various sizes from another host)

--
To unsubscribe from this list: send the line unsubscribe linux-usb 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 1/1] usb: dwc3: gadget: cut and paste fixups in suspend/resume

2015-04-23 Thread David Cohen
Hi,

Please ignore this patch. It was sent by mistake :(
My apologies.

Br, David

On Thu, Apr 23, 2015 at 04:00:52PM -0700, David Cohen wrote:
 From: Dan Carpenter dan.carpen...@oracle.com
 
 commit 73a30bfc0d526db899033165db6f95c427e70505 upstream.
 
 These were cut and paste from the -disconnect function.
 
 Fixes commit 30d577b9bcc4 ('usb: dwc3: gadget: call gadget driver's
 -suspend/-resume')
 
 Cc: sta...@vger.kernel.org # 3.14
 Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
 Signed-off-by: Felipe Balbi ba...@ti.com
 Signed-off-by: David Cohen david.a.co...@linux.intel.com
 ---
  drivers/usb/dwc3/gadget.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
 index 1bb752736c32..9c803259b97c 100644
 --- a/drivers/usb/dwc3/gadget.c
 +++ b/drivers/usb/dwc3/gadget.c
 @@ -2014,7 +2014,7 @@ static void dwc3_disconnect_gadget(struct dwc3 *dwc)
  
  static void dwc3_suspend_gadget(struct dwc3 *dwc)
  {
 - if (dwc-gadget_driver  dwc-gadget_driver-disconnect) {
 + if (dwc-gadget_driver  dwc-gadget_driver-suspend) {
   spin_unlock(dwc-lock);
   dwc-gadget_driver-suspend(dwc-gadget);
   spin_lock(dwc-lock);
 @@ -2023,7 +2023,7 @@ static void dwc3_suspend_gadget(struct dwc3 *dwc)
  
  static void dwc3_resume_gadget(struct dwc3 *dwc)
  {
 - if (dwc-gadget_driver  dwc-gadget_driver-disconnect) {
 + if (dwc-gadget_driver  dwc-gadget_driver-resume) {
   spin_unlock(dwc-lock);
   dwc-gadget_driver-resume(dwc-gadget);
   spin_lock(dwc-lock);
 -- 
 2.1.4
 
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 1/2] usb: dwc3: gadget: call gadget driver's -suspend/-resume

2015-04-23 Thread David Cohen
From: Felipe Balbi ba...@ti.com

commit bc5ba2e0b829c9397f96df1191c7d2319ebc36d9 upstream.

When going into bus suspend/resume we _must_
call gadget driver's -suspend/-resume callbacks
accordingly. This patch implements that very feature
which has been missing forever.

Cc: sta...@vger.kernel.org # 3.14
Signed-off-by: Felipe Balbi ba...@ti.com
Signed-off-by: David Cohen david.a.co...@linux.intel.com
---
 drivers/usb/dwc3/gadget.c | 35 +++
 1 file changed, 35 insertions(+)

diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 8f6738d46b14..1bb752736c32 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -2012,6 +2012,24 @@ static void dwc3_disconnect_gadget(struct dwc3 *dwc)
}
 }
 
+static void dwc3_suspend_gadget(struct dwc3 *dwc)
+{
+   if (dwc-gadget_driver  dwc-gadget_driver-disconnect) {
+   spin_unlock(dwc-lock);
+   dwc-gadget_driver-suspend(dwc-gadget);
+   spin_lock(dwc-lock);
+   }
+}
+
+static void dwc3_resume_gadget(struct dwc3 *dwc)
+{
+   if (dwc-gadget_driver  dwc-gadget_driver-disconnect) {
+   spin_unlock(dwc-lock);
+   dwc-gadget_driver-resume(dwc-gadget);
+   spin_lock(dwc-lock);
+   }
+}
+
 static void dwc3_stop_active_transfer(struct dwc3 *dwc, u32 epnum)
 {
struct dwc3_ep *dep;
@@ -2391,6 +2409,23 @@ static void dwc3_gadget_linksts_change_interrupt(struct 
dwc3 *dwc,
 
dwc-link_state = next;
 
+   switch (next) {
+   case DWC3_LINK_STATE_U1:
+   if (dwc-speed == USB_SPEED_SUPER)
+   dwc3_suspend_gadget(dwc);
+   break;
+   case DWC3_LINK_STATE_U2:
+   case DWC3_LINK_STATE_U3:
+   dwc3_suspend_gadget(dwc);
+   break;
+   case DWC3_LINK_STATE_RESUME:
+   dwc3_resume_gadget(dwc);
+   break;
+   default:
+   /* do nothing */
+   break;
+   }
+
dev_vdbg(dwc-dev, %s link %d\n, __func__, dwc-link_state);
 }
 
-- 
2.1.4

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


[PATCH v2 1/1] usb: dwc3: gadget: cut and paste fixups in suspend/resume

2015-04-23 Thread David Cohen
From: Dan Carpenter dan.carpen...@oracle.com

commit 73a30bfc0d526db899033165db6f95c427e70505 upstream.

These were cut and paste from the -disconnect function.

Fixes commit 30d577b9bcc4 ('usb: dwc3: gadget: call gadget driver's
-suspend/-resume')

Cc: sta...@vger.kernel.org # 3.14
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
Signed-off-by: Felipe Balbi ba...@ti.com
Signed-off-by: David Cohen david.a.co...@linux.intel.com
---
 drivers/usb/dwc3/gadget.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 1bb752736c32..9c803259b97c 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -2014,7 +2014,7 @@ static void dwc3_disconnect_gadget(struct dwc3 *dwc)
 
 static void dwc3_suspend_gadget(struct dwc3 *dwc)
 {
-   if (dwc-gadget_driver  dwc-gadget_driver-disconnect) {
+   if (dwc-gadget_driver  dwc-gadget_driver-suspend) {
spin_unlock(dwc-lock);
dwc-gadget_driver-suspend(dwc-gadget);
spin_lock(dwc-lock);
@@ -2023,7 +2023,7 @@ static void dwc3_suspend_gadget(struct dwc3 *dwc)
 
 static void dwc3_resume_gadget(struct dwc3 *dwc)
 {
-   if (dwc-gadget_driver  dwc-gadget_driver-disconnect) {
+   if (dwc-gadget_driver  dwc-gadget_driver-resume) {
spin_unlock(dwc-lock);
dwc-gadget_driver-resume(dwc-gadget);
spin_lock(dwc-lock);
-- 
2.1.4

--
To unsubscribe from this list: send the line unsubscribe linux-usb 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 1/1] usb: dwc3: gadget: cut and paste fixups in suspend/resume

2015-04-23 Thread David Cohen
And this one too :(
Please, consider only the X/2 patches.

BR, David

On Thu, Apr 23, 2015 at 03:59:26PM -0700, David Cohen wrote:
 From: Dan Carpenter dan.carpen...@oracle.com
 
 commit 73a30bfc0d526db899033165db6f95c427e70505 upstream.
 
 These were cut and paste from the -disconnect function.
 
 Fixes commit 30d577b9bcc4 ('usb: dwc3: gadget: call gadget driver's
 -suspend/-resume')
 
 Cc: sta...@vger.kernel.org # 3.14
 Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
 Signed-off-by: Felipe Balbi ba...@ti.com
 Signed-off-by: David Cohen david.a.co...@linux.intel.com
 ---
  drivers/usb/dwc3/gadget.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
 index 1bb752736c32..9c803259b97c 100644
 --- a/drivers/usb/dwc3/gadget.c
 +++ b/drivers/usb/dwc3/gadget.c
 @@ -2014,7 +2014,7 @@ static void dwc3_disconnect_gadget(struct dwc3 *dwc)
  
  static void dwc3_suspend_gadget(struct dwc3 *dwc)
  {
 - if (dwc-gadget_driver  dwc-gadget_driver-disconnect) {
 + if (dwc-gadget_driver  dwc-gadget_driver-suspend) {
   spin_unlock(dwc-lock);
   dwc-gadget_driver-suspend(dwc-gadget);
   spin_lock(dwc-lock);
 @@ -2023,7 +2023,7 @@ static void dwc3_suspend_gadget(struct dwc3 *dwc)
  
  static void dwc3_resume_gadget(struct dwc3 *dwc)
  {
 - if (dwc-gadget_driver  dwc-gadget_driver-disconnect) {
 + if (dwc-gadget_driver  dwc-gadget_driver-resume) {
   spin_unlock(dwc-lock);
   dwc-gadget_driver-resume(dwc-gadget);
   spin_lock(dwc-lock);
 -- 
 2.1.4
 
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] usb: image: mdc800: fixed various style issues

2015-04-23 Thread Jason Eastman
Fixed several style issues with: comments, function perenthesis,
indentation, and conditional braces

Signed-off-by: Jason Eastman eastman.jason.li...@gmail.com
---
 drivers/usb/image/mdc800.c |  769 +++-
 1 file changed, 336 insertions(+), 433 deletions(-)

diff --git a/drivers/usb/image/mdc800.c b/drivers/usb/image/mdc800.c
index 5cf2633..c9b9ec0 100644
--- a/drivers/usb/image/mdc800.c
+++ b/drivers/usb/image/mdc800.c
@@ -29,19 +29,19 @@
  * mknod /dev/mustek c 180 32
  *
  * The driver supports only one camera.
- * 
+ *
  * Fix: mdc800 used sleep_on and slept with io_lock held.
  * Converted sleep_on to waitqueues with schedule_timeout and made io_lock
  * a semaphore from a spinlock.
  * by Oliver Neukum oli...@neukum.name
  * (02/12/2001)
- * 
+ *
  * Identify version on module load.
  * (08/04/2001) gb
  *
  * version 0.7.5
  * Fixed potential SMP races with Spinlocks.
- * Thanks to Oliver Neukum oli...@neukum.name who 
+ * Thanks to Oliver Neukum oli...@neukum.name who
  * noticed the race conditions.
  * (30/10/2000)
  *
@@ -108,7 +108,7 @@
 #define DRIVER_DESC USB Driver for Mustek MDC800 Digital Camera
 
 /* Vendor and Product Information */
-#define MDC800_VENDOR_ID   0x055f
+#define MDC800_VENDOR_ID   0x055f
 #define MDC800_PRODUCT_ID  0xa800
 
 /* Timeouts (msec) */
@@ -116,7 +116,7 @@
 #define TO_DOWNLOAD_GET_BUSY   1500
 #define TO_WRITE_GET_READY 1000
 #define TO_DEFAULT_COMMAND 5000
-#define TO_READ_FROM_IRQ   TO_DEFAULT_COMMAND
+#define TO_READ_FROM_IRQ   TO_DEFAULT_COMMAND
 #define TO_GET_READY   TO_DEFAULT_COMMAND
 
 /* Minor Number of the device (create with mknod /dev/mustek c 180 32) */
@@ -134,124 +134,119 @@ typedef enum {
 
 
 /* Data for the driver */
-struct mdc800_data
-{
-   struct usb_device * dev;// Device Data
-   mdc800_statestate;
+struct mdc800_data {
+   struct usb_device   *dev;   /* Device Data */
+   mdc800_statestate;
 
unsigned intendpoint [4];
 
-   struct urb *irq_urb;
+   struct urb  *irq_urb;
wait_queue_head_t   irq_wait;
int irq_woken;
-   char*   irq_urb_buffer;
+   char*irq_urb_buffer;
 
-   int camera_busy;  // is camera busy ?
-   int camera_request_ready; // Status to synchronize 
with irq
-   charcamera_response [8];  // last Bytes send after 
busy
+   int camera_busy;  /* is camera busy ? */
+   int camera_request_ready; /* Status to synchronize 
with irq */
+   charcamera_response[8];  /* last Bytes send after 
busy */
 
-   struct urb *write_urb;
-   char*   write_urb_buffer;
+   struct urb  *write_urb;
+   char*write_urb_buffer;
wait_queue_head_t   write_wait;
int written;
 
 
-   struct urb *download_urb;
-   char*   download_urb_buffer;
+   struct urb  *download_urb;
+   char*download_urb_buffer;
wait_queue_head_t   download_wait;
int downloaded;
-   int download_left;  // Bytes left to 
download ?
+   int download_left;  /* Bytes left to 
download ? */
 
 
/* Device Data */
-   charout [64];   // Answer Buffer
-   int out_ptr;// Index to the first not 
readen byte
-   int out_count;  // Bytes in the buffer
+   charout[64];/* Answer Buffer */
+   int out_ptr;/* Index to the first not 
readen byte */
+   int out_count;  /* Bytes in the buffer */
 
-   int open;   // Camera device open ?
-   struct mutexio_lock;// IO -lock
+   int open;   /* Camera device open ? */
+   struct mutexio_lock;/* IO -lock */
 
-   charin [8]; // Command Input Buffer
-   int in_count;
+   charin[8];  /* Command Input Buffer */
+   int in_count;
 
-   int pic_index;  // Cache for the Imagesize (-1 
for nothing cached )
+   int pic_index;  /* Cache for the Imagesize (-1 
for nothing cached ) */
int pic_len;
int minor;
 };
 
 
 /* Specification of the Endpoints */
-static 

Re: [BUG] xhci_hcd: no USB3 SuperSpeed on IvyBridge Macbook

2015-04-23 Thread Chris Bainbridge
On 23 April 2015 at 21:59, Greg KH gre...@linuxfoundation.org wrote:
 On Thu, Apr 23, 2015 at 09:50:14PM +0100, Chris Bainbridge wrote:
 Hardware: IvyBridge Macbook (Panther Point PCH), 2 external USB3 ports
 Verified in kernels: 4.0.0+ (1fc1499), Debian 3.16.4

 All USB3 devices appear as USB2 high-speed (480mbps) rather than USB3
 super-speed (5000mbps).

 Are you sure you actually have a device that runs at that speed?  A USB
 3 device can run at low speed and still be USB 3 compliant (backwards
 compatibility issues ensure this.)

Sorry, stupid mistake, please ignore bug report... I used some tiny
USB extension cables to save plugging directly in to the laptop and
did not realise that they cause the port to downgrade to USB2 (I had
thought a device would still appear on the USB3 bus in this case, just
with slower speed). It might be an idea to log a warning when a
SuperSpeed capable device is connected to a USB2 port/bus like this.
All the USB3 devices are now connected to bus2 with speed 5000M. There
is still another error initialising the VIA USB hub which I will
investigate and report later.
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 2/2] usb: dwc3: gadget: cut and paste fixups in suspend/resume

2015-04-23 Thread David Cohen
From: Dan Carpenter dan.carpen...@oracle.com

commit 73a30bfc0d526db899033165db6f95c427e70505 upstream.

These were cut and paste from the -disconnect function.

Fixes commit 30d577b9bcc4 ('usb: dwc3: gadget: call gadget driver's
-suspend/-resume')

Cc: sta...@vger.kernel.org # 3.14
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
Signed-off-by: Felipe Balbi ba...@ti.com
Signed-off-by: David Cohen david.a.co...@linux.intel.com
---
 drivers/usb/dwc3/gadget.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 1bb752736c32..9c803259b97c 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -2014,7 +2014,7 @@ static void dwc3_disconnect_gadget(struct dwc3 *dwc)
 
 static void dwc3_suspend_gadget(struct dwc3 *dwc)
 {
-   if (dwc-gadget_driver  dwc-gadget_driver-disconnect) {
+   if (dwc-gadget_driver  dwc-gadget_driver-suspend) {
spin_unlock(dwc-lock);
dwc-gadget_driver-suspend(dwc-gadget);
spin_lock(dwc-lock);
@@ -2023,7 +2023,7 @@ static void dwc3_suspend_gadget(struct dwc3 *dwc)
 
 static void dwc3_resume_gadget(struct dwc3 *dwc)
 {
-   if (dwc-gadget_driver  dwc-gadget_driver-disconnect) {
+   if (dwc-gadget_driver  dwc-gadget_driver-resume) {
spin_unlock(dwc-lock);
dwc-gadget_driver-resume(dwc-gadget);
spin_lock(dwc-lock);
-- 
2.1.4

--
To unsubscribe from this list: send the line unsubscribe linux-usb 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 11/11] usbip: USB over WebSocket

2015-04-23 Thread fx IWATA NOBUO
Hi Steve,

 If you are looking for a good C websockets library, gpl etc try:
 https://libwebsockets.org/trac/libwebsockets
 I used it in a project and was very pleased with how it worked and 
 the support where it is hosted.

I checked libwebsockets ago but I misunderstood it doesn't support 
client.
I will try it later.

Thank you,

n.iwata
//
N�r��yb�X��ǧv�^�)޺{.n�+{��^n�r���z���h����G���h�(�階�ݢj���m��z�ޖ���f���h���~�m�

[PATCH v2 0/3] USB: fix inefficient copy of unaligned buffers

2015-04-23 Thread Johan Hovold
These patches (for 4.1) make sure that only the received data is copied
from the temporary buffers used for unaligned transfers.

I discovered this when debugging an issue where the Beaglebone Black
would lock up on disconnect.

Turns out it was related to the transfer_buffers not being properly
aligned, causing musb to use temporary buffers for the transfers. On
transfer errors (e.g. during disconnect), the full buffer content was
still being copied, something which would alter timings enough to
prevent the disconnect from being detected and processed.

The first patch in the series works around the problem in that
particular set up, but obviously does not solve the underlying issue,
which needs to be analysed further.

I also included a corresponding patch for ehci-tegra that has been
compile tested only.

Note that the octeon-hcd driver in staging, which also uses temporary
buffers for unaligned transfers, was broken for isochronous transfers.
The third patch fixes that, but is also untested due to lack of
hardware.

Johan


v2:
 - Make sure to copy the full buffer for isochronous transfers, in which
   case the received data is not necessarily contiguous (thanks Alan).
 - Drop stable tags as this is really just an optimisation.


Johan Hovold (3):
  USB: musb: fix inefficient copy of unaligned buffers
  USB: ehci-tegra: fix inefficient copy of unaligned buffers
  staging: octeon-usb: fix unaligned isochronous transfers

 drivers/staging/octeon-usb/octeon-hcd.c | 12 +---
 drivers/usb/host/ehci-tegra.c   | 12 +---
 drivers/usb/musb/musb_host.c|  9 +++--
 3 files changed, 25 insertions(+), 8 deletions(-)

-- 
2.0.5

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


[PATCH v2 2/3] USB: ehci-tegra: fix inefficient copy of unaligned buffers

2015-04-23 Thread Johan Hovold
Make sure only to copy any actual data rather than the whole buffer,
when releasing the temporary buffer used for unaligned non-isochronous
transfers.

Compile-tested only.

Signed-off-by: Johan Hovold jo...@kernel.org
---
 drivers/usb/host/ehci-tegra.c | 12 +---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c
index ff9af29b4e9f..4031b372008e 100644
--- a/drivers/usb/host/ehci-tegra.c
+++ b/drivers/usb/host/ehci-tegra.c
@@ -304,6 +304,7 @@ struct dma_aligned_buffer {
 static void free_dma_aligned_buffer(struct urb *urb)
 {
struct dma_aligned_buffer *temp;
+   size_t length;
 
if (!(urb-transfer_flags  URB_ALIGNED_TEMP_BUFFER))
return;
@@ -311,9 +312,14 @@ static void free_dma_aligned_buffer(struct urb *urb)
temp = container_of(urb-transfer_buffer,
struct dma_aligned_buffer, data);
 
-   if (usb_urb_dir_in(urb))
-   memcpy(temp-old_xfer_buffer, temp-data,
-  urb-transfer_buffer_length);
+   if (usb_urb_dir_in(urb)) {
+   if (usb_pipeisoc(urb-pipe))
+   length = urb-transfer_buffer_length;
+   else
+   length = urb-actual_length;
+
+   memcpy(temp-old_xfer_buffer, temp-data, length);
+   }
urb-transfer_buffer = temp-old_xfer_buffer;
kfree(temp-kmalloc_ptr);
 
-- 
2.0.5

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


[PATCH v2 1/3] USB: musb: fix inefficient copy of unaligned buffers

2015-04-23 Thread Johan Hovold
Make sure only to copy any actual data rather than the whole buffer,
when releasing the temporary buffer used for unaligned non-isochronous
transfers.

Signed-off-by: Johan Hovold jo...@kernel.org
---
 drivers/usb/musb/musb_host.c | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c
index c3d5fc9dfb5b..e1fb5d885c18 100644
--- a/drivers/usb/musb/musb_host.c
+++ b/drivers/usb/musb/musb_host.c
@@ -2512,6 +2512,7 @@ static void musb_free_temp_buffer(struct urb *urb)
 {
enum dma_data_direction dir;
struct musb_temp_buffer *temp;
+   size_t length;
 
if (!(urb-transfer_flags  URB_ALIGNED_TEMP_BUFFER))
return;
@@ -2522,8 +2523,12 @@ static void musb_free_temp_buffer(struct urb *urb)
data);
 
if (dir == DMA_FROM_DEVICE) {
-   memcpy(temp-old_xfer_buffer, temp-data,
-  urb-transfer_buffer_length);
+   if (usb_pipeisoc(urb-pipe))
+   length = urb-transfer_buffer_length;
+   else
+   length = urb-actual_length;
+
+   memcpy(temp-old_xfer_buffer, temp-data, length);
}
urb-transfer_buffer = temp-old_xfer_buffer;
kfree(temp-kmalloc_ptr);
-- 
2.0.5

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


[PATCH v2 3/3] staging: octeon-usb: fix unaligned isochronous transfers

2015-04-23 Thread Johan Hovold
Make sure to copy the whole transfer buffer when releasing the temporary
buffer used for unaligned isochronous transfers as the data is not
necessarily contiguous in that case.

Signed-off-by: Johan Hovold jo...@kernel.org
---
 drivers/staging/octeon-usb/octeon-hcd.c | 12 +---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/octeon-usb/octeon-hcd.c 
b/drivers/staging/octeon-usb/octeon-hcd.c
index 1daeb3125a1f..e03873c343b1 100644
--- a/drivers/staging/octeon-usb/octeon-hcd.c
+++ b/drivers/staging/octeon-usb/octeon-hcd.c
@@ -509,15 +509,21 @@ static int octeon_alloc_temp_buffer(struct urb *urb, 
gfp_t mem_flags)
 static void octeon_free_temp_buffer(struct urb *urb)
 {
struct octeon_temp_buffer *temp;
+   size_t length;
 
if (!(urb-transfer_flags  URB_ALIGNED_TEMP_BUFFER))
return;
 
temp = container_of(urb-transfer_buffer, struct octeon_temp_buffer,
data);
-   if (usb_urb_dir_in(urb))
-   memcpy(temp-orig_buffer, urb-transfer_buffer,
-  urb-actual_length);
+   if (usb_urb_dir_in(urb)) {
+   if (usb_pipeisoc(urb-pipe))
+   length = urb-transfer_buffer_length;
+   else
+   length = urb-actual_length;
+
+   memcpy(temp-orig_buffer, urb-transfer_buffer, length);
+   }
urb-transfer_buffer = temp-orig_buffer;
urb-transfer_flags = ~URB_ALIGNED_TEMP_BUFFER;
kfree(temp-temp_buffer);
-- 
2.0.5

--
To unsubscribe from this list: send the line unsubscribe linux-usb 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 11/11] usbip: USB over WebSocket

2015-04-23 Thread fx IWATA NOBUO
Hi Bjørn

 This cannot possibly be necessary.  Pointing to the toplevel COPYING
 file should be more than enough, if anything at all.
 
 And BTW, the same goes for the tools/usb/usbip/COPYING that seems to
 have snuck in somehow.  I also wonder a bit about the AUTHORS file 
both
 places.  We have git and MAINTAINERS for such things, don't we?

I will remove from v3.

  --- /dev/null
  +++ b/tools/usb/usbip/websocket/configure.ac
  @@ -0,0 +1,61 @@
  +dnl Process this file with autoconf to produce a configure script.
  +
  +AC_PREREQ(2.59)
  +AC_INIT([usbip-utils], [1.1.1], [linux-usb@vger.kernel.org])
  +AC_DEFINE([USBIP_VERSION], [0x0111], [binary-coded decimal 
version
 number])
 
 This should either use the upper level definitions or have its own
 namespace.  Defining the same symbols at different levels is a recipe
 for confusion.  In fact, you are already out of sync with the
 definitions in tools/usb/usbip/configure.ac

Sorry for my carelessness.
I will use own AC_INIT() in v3 and remove AC_DEFINE([USBIP_VERSION]) 
from v3.

  Implementation of this patch depends on Poco C++
  (http://pocoproject.org/).
 
 Really?  Is that OK?
 
 Yuck. Any reason this cannot be written in C?

I couldn't find good C library which supports both server and client.
I intended other implementation may be stored under 'websocket' 
directory next to 'poco'.

Thank you for your comments,

n.iwata
//
N�r��yb�X��ǧv�^�)޺{.n�+{��^n�r���z���h����G���h�(�階�ݢj���m��z�ޖ���f���h���~�m�

RE: [PATCH v2 05/11] usbip: tools for userspace URBs transmission

2015-04-23 Thread fx IWATA NOBUO
  +#include ../../../../include/uapi/linux/usbip_ux.h
 So you can just refer this as linux/usbip_ux.h

I will fix in v3.

Thank you,

n.iwata
//


RE: [PATCH v2 01/11] usbip: exporting devices

2015-04-23 Thread fx IWATA NOBUO
Hi Valentina,

 * I noticed in some places you've used labels such as err0 and err1.
 Please replace them with something more relevant to their 
 functionality,
 such as what you're cleaning up after. There are examples of this 
 both in
 USB/IP code and throughout the kernel.

I will fix all in v3.

 * when calling open_hc_device(), you're using magic constants - 0 and 
 1.
 Define them as constants with meaningful names.

I will fix in v3.

Thanks,

n.iwata
//


Re: [RFC][PATCH v2 00/13] USB: OTG/DRD Core functionality

2015-04-23 Thread Roger Quadros
On 23/04/15 04:52, Peter Chen wrote:
 On Wed, Apr 22, 2015 at 03:42:32PM +0300, Roger Quadros wrote:
 So we will have a separate drd fsm file, and the CONFIG_USB_OTG
 and CONFIG_USB_OTG_FSM are not needed to be defined, right?


 for drd case CONFIG_USB_OTG_FSM is definitely not needed.
 I'm not sure if we can operate dual-role without CONFIG_USB_OTG.
 I was thinking of combining the OTG core functionality 
 (drivers/usb/common/usb-otg.c)
 with CONFIG_USB_OTG.

 
 Ok, let's choose CONFIG_USB_OTG for both drd and usb fsm case.
 And we need to patch for hcd that only hnp supported hcd needs
 to request otg descriptor, etc.

Agreed. It makes things much simpler.

 
 For yesterday's back-compatible old otg device, we can add otg
 features to these drivers, the current behavior for these drivers
 is: if CONFIG_USB_OTG is defined, it is an otg device, we can just
 keep the behavior unchanging. If these drivers need to use OTG framework
 in future, it needs to update its platform data or dts.

Right.

 
 So, I prefer:
 
 - For switching the role through the ID pin devices, we doesn't need any otg
 features, so no otg dts properties are needed.(expect dr_mode = otg)
 - For adp/srp/hnp supported devices, we need (partial) otg features, and
 the fsm (hardware or software) are needed, we need some otg dts
 properties we discussed before.

Agreed.

I will try to incorporate these points in v3 of this series.

cheers,
-roger
 
 

 static const struct usb_descriptor_header *otg_desc_20[] = {
 (struct usb_descriptor_header *) (struct usb_otg_descriptor_20){
 .bLength =  sizeof(struct usb_otg_descriptor_20),
 .bDescriptorType =  USB_DT_OTG,

 /*
  * REVISIT SRP-only hardware is possible, although
  * it would not be called OTG ...
  */
 .bmAttributes = USB_OTG_SRP | USB_OTG_HNP,
 .bcdOTG =   cpu_to_le16(0x0200),
 },
 NULL,
 };

 instead of hardcoding bmAttributes field, it must be obtained from the
 appropriate data structure that was set by the controller driver
 by reading DT and OTG hardware info.


 During bind process:

 if (gadget_is_otg_13(c-cdev-gadget))
 c-descriptors = otg_desc_13;
 else if (gadget_is_otg_20(c-cdev-gadget))
 c-descriptors = otg_desc_20;

 Probably a helper utitily can do the necessary checks and build the
 otg descriptor for us.
  usb_otg_get_descriptor(c-descriptors);

 e.g. for OTG3.0 we have a new flag USB_OTG_RSP, and this helper
 can be upgraded in the future.
 
 ok, it is the implementation detail.
 

--
To unsubscribe from this list: send the line unsubscribe linux-usb 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 02/11] usbip: readme and manuals about exporting devices

2015-04-23 Thread fx IWATA NOBUO
 I see various parameters, such as --busid, followed by an = sign.
 This looks like a thing thoughout the manual.
 Although this syntax works as well, I think we should be consistent 
 and not include =.
 I, personally, prefer having --busid busid instead of 
 --busid=busid.

I agree. I checked other section 1 and 8 manual pages and they don't 
use '='.
In v3, I will replace '=' with ' ' including used in original.

Thanks,

n.iwata
//
N�r��yb�X��ǧv�^�)޺{.n�+{��^n�r���z���h����G���h�(�階�ݢj���m��z�ޖ���f���h���~�m�

Unhandled IRQ 16 from ehci_hcd makes mouse unusable

2015-04-23 Thread Kynn Jones
NB: This is an updated version of
https://bugzilla.kernel.org/show_bug.cgi?id=97131.  I'm reposting here by the
request of that bug's assignee.

In this update I've added the output of some more diagnostic commands (at the
end of the post).  The list of diagnostic commands run is now this:

$ cat /proc/version
$ /usr/lib/linux-kbuild-3.2/scripts/ver_linux
$ cat /proc/cpuinfo
$ cat /proc/modules
$ cat /proc/ioports
$ cat /proc/iomem
$ lspci -vvv
$ lspci -nn
$ cat /proc/scsi/scsi
$ lsusb -v
$ dmesg
$ cat /etc/rc.local
$ cat /proc/interrupts
$ dpkg -l | grep $(uname -r)



DESCRIPTION
===

My new computer (Dell Precision T1700) works fine until the system
goes to sleep for the first time after booting.  After waking, the
cursor on the screen lags so much behind the physical motion of the
mouse that the latter is basically unusable.  This mouse malfunction
persists until the system is rebooted.

The only new log messages I see when I bring the system back from its
first post-boot sleep is this (both in /var/log/kern.log and
/var/log/syslog, and part of it also in /var/log/messages):

Apr 22 09:21:00 capitan kernel: [   67.832836] irq 16: nobody
cared (try booting with the irqpoll option)
Apr 22 09:21:00 capitan kernel: [   67.832848] Pid: 0, comm:
swapper/0 Not tainted 3.2.0-4-amd64 #1 Debian 3.2.65-1+deb7u2
Apr 22 09:21:00 capitan kernel: [   67.832853] Call Trace:
Apr 22 09:21:00 capitan kernel: [   67.832856]  IRQ
[81092ddd] ? __report_bad_irq+0x2c/0xb5
Apr 22 09:21:00 capitan kernel: [   67.832878]
[810931e2] ? note_interrupt+0x1b8/0x23a
Apr 22 09:21:00 capitan kernel: [   67.832886]
[81091554] ? handle_irq_event_percpu+0x15f/0x17d
Apr 22 09:21:00 capitan kernel: [   67.832893]
[810915a6] ? handle_irq_event+0x34/0x52
Apr 22 09:21:00 capitan kernel: [   67.832903]
[8106c305] ? arch_local_irq_save+0x11/0x17
Apr 22 09:21:00 capitan kernel: [   67.832911]
[81093959] ? handle_fasteoi_irq+0x7c/0xaf
Apr 22 09:21:00 capitan kernel: [   67.832921]
[8100fa51] ? handle_irq+0x1d/0x21
Apr 22 09:21:00 capitan kernel: [   67.832929]
[8100f62a] ? do_IRQ+0x42/0x98
Apr 22 09:21:00 capitan kernel: [   67.832939]
[813511ae] ? common_interrupt+0x6e/0x6e
Apr 22 09:21:00 capitan kernel: [   67.832943]  EOI
[81024404] ? lapic_next_event+0xe/0x13
Apr 22 09:21:00 capitan kernel: [   67.832977]
[a01dc35b] ? arch_local_irq_enable+0x7/0x8 [processor]
Apr 22 09:21:00 capitan kernel: [   67.832991]
[a01dd0b3] ? acpi_idle_enter_c1+0x8d/0xb3 [processor]
Apr 22 09:21:00 capitan kernel: [   67.833002]
[8127180d] ? cpuidle_idle_call+0xec/0x179
Apr 22 09:21:00 capitan kernel: [   67.833010]
[8100d242] ? cpu_idle+0xa5/0xf2
Apr 22 09:21:00 capitan kernel: [   67.833020]
[816aab3b] ? start_kernel+0x3bd/0x3c8
Apr 22 09:21:00 capitan kernel: [   67.833029]
[816aa140] ? early_idt_handlers+0x140/0x140
Apr 22 09:21:00 capitan kernel: [   67.833037]
[816aa3c4] ? x86_64_start_kernel+0x104/0x111
Apr 22 09:21:00 capitan kernel: [   67.833041] handlers:
Apr 22 09:21:00 capitan kernel: [   67.833059]
[a00a9216] usb_hcd_irq
Apr 22 09:21:00 capitan kernel: [   67.833067]
[a0295cbd] azx_interrupt
Apr 22 09:21:00 capitan kernel: [   67.833072] Disabling IRQ #16


I figure that it is the disabling of IRQ #16 (last line) that is
responsible for the subsequent malfunctioning of the mouse.

The driver associated with this interrupt is

# grep '^ 16:' /proc/interrupts
 16:   1211  0  0  0
IR-IO-APIC-fasteoi   ehci_hcd:usb1

(When I first looked into this problem, the IRQ 16 line was actually
like this:

# grep '^ 16:' /proc/interrupts
 16:   1210  0  0  0
IR-IO-APIC-fasteoi   ehci_hcd:usb1, snd_hda_intel

Since snd_hda_intel was being loaded twice at boot time (e.g. it
showed up also in the line for IRQ 45), I tried to fix the problem
with the mouse by disabling this instance of snd_hda_intel.  For
details, see the content of my /etc/rc.local file further below.  As
it turned out, even though snd_hda_intel no longer appears in the IRQ
16 line, the unhandled IRQ 16 error keeps happening, and the problem
with the mouse persists.)



A few more observations, for what they're worth:

1. I don't see this problem at all if I reboot the machine into
   Windows 7 (mouse works the same before and after sleep).

2. the mouse does not seem to be the source of the problem, because the
   both the unhandled interrupt and the subsequent problems with the
   mouse occur even if I:

 1. disconnect the mouse;
 2. reboot the machine (into 

Re: g_ncm.ko: delayed response for lsusb command

2015-04-23 Thread Greg KH
On Thu, Apr 23, 2015 at 10:07:35AM +0530, Niranjan H Y wrote:
 Hello Everyone,
 
 I'm newbie to driver development  have a question on CDC NCM gadget driver.
 
 When I load the module g_ncm.ko on the target board
 and execute lsusb on host, there is some delay in response.
 (about 5-10 seconds)
 
 However, if I trim the string as shown below (in code changes),
 lsusb responds quickly. I was wondering if anyone could help
 me understand the reason for this behavior.
 
 I'm looking at  kernel version 3.0.35.
 https://github.com/boundarydevices/linux-imx6/blob/boundary-imx_3.0.35_4.1.0/drivers/usb/gadget/f_ncm.c#L341

3.0 is really old and obsolete, have you tried a modern, newer kernel?

Also, run usbmon on the host and see where the delay is, that should
give you an idea of what is going on.

thanks,

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


Re: [PATCHv3 0/4] add devm_of_phy_get_by_index and update platform drivers

2015-04-23 Thread Hans de Goede

Hi,

On 23-04-15 01:04, Arun Ramamurthy wrote:

This patch set adds a new API to get phy by index when multiple
phys are present. This patch is based on discussion with Arnd Bergmann
about dt bindings for multiple phys.

History:
v1:
 - Removed null pointers on Dmitry's suggestion
 - Improved documentation in commit messages
 - Exported new phy api
v2:
 - EHCI and OHCI platform Kconfigs select Generic Phy
   to fix build errors in certain configs.
v3:
 - Made GENERIC_PHY an invisible option so
 that other configs can select it
 - Added stubs for devm_of_phy_get_by_index
 - Reformated code

Arun Ramamurthy (4):
   phy: phy-core: Make GENERIC_PHY an invisible option
   phy: core: Add devm_of_phy_get_by_index to phy-core
   usb: ehci-platform: Use devm_of_phy_get_by_index
   usb: ohci-platform: Use devm_of_phy_get_by_index

  Documentation/phy.txt |  7 +++-
  drivers/ata/Kconfig   |  1 -
  drivers/media/platform/exynos4-is/Kconfig |  2 +-
  drivers/phy/Kconfig   |  4 +-
  drivers/phy/phy-core.c| 32 ++
  drivers/usb/host/Kconfig  |  4 +-
  drivers/usb/host/ehci-platform.c  | 69 +++
  drivers/usb/host/ohci-platform.c  | 69 +++
  drivers/video/fbdev/exynos/Kconfig|  2 +-
  include/linux/phy/phy.h   |  8 
  10 files changed, 100 insertions(+), 98 deletions(-)



Patch set looks good to me:

Acked-by: Hans de Goede hdego...@redhat.com

Regards,

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


Re: Unhandled IRQ 16 from ehci_hcd makes mouse unusable

2015-04-23 Thread Greg KH
On Thu, Apr 23, 2015 at 09:10:04AM -0400, Kynn Jones wrote:
 NB: This is an updated version of
 https://bugzilla.kernel.org/show_bug.cgi?id=97131.  I'm reposting here by the
 request of that bug's assignee.
 
 In this update I've added the output of some more diagnostic commands (at the
 end of the post).  The list of diagnostic commands run is now this:
 
 $ cat /proc/version

You are using the 3.2.0 kernel, which is _very_ old, and there's nothing
we can do about this from a community point of view.

Can you try 4.0 and see if that solves this issue?  Lots of things have
changed since the very old 3.2 release.

thanks,

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


[PATCH v2 1/1] usb: dwc3: gadget: cut and paste fixups in suspend/resume

2015-04-23 Thread David Cohen
From: Dan Carpenter dan.carpen...@oracle.com

commit 73a30bfc0d526db899033165db6f95c427e70505 upstream.

These were cut and paste from the -disconnect function.

Fixes commit 30d577b9bcc4 ('usb: dwc3: gadget: call gadget driver's
-suspend/-resume')

Cc: sta...@vger.kernel.org # 3.14
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
Signed-off-by: Felipe Balbi ba...@ti.com
Signed-off-by: David Cohen david.a.co...@linux.intel.com
---
 drivers/usb/dwc3/gadget.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 1bb752736c32..9c803259b97c 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -2014,7 +2014,7 @@ static void dwc3_disconnect_gadget(struct dwc3 *dwc)
 
 static void dwc3_suspend_gadget(struct dwc3 *dwc)
 {
-   if (dwc-gadget_driver  dwc-gadget_driver-disconnect) {
+   if (dwc-gadget_driver  dwc-gadget_driver-suspend) {
spin_unlock(dwc-lock);
dwc-gadget_driver-suspend(dwc-gadget);
spin_lock(dwc-lock);
@@ -2023,7 +2023,7 @@ static void dwc3_suspend_gadget(struct dwc3 *dwc)
 
 static void dwc3_resume_gadget(struct dwc3 *dwc)
 {
-   if (dwc-gadget_driver  dwc-gadget_driver-disconnect) {
+   if (dwc-gadget_driver  dwc-gadget_driver-resume) {
spin_unlock(dwc-lock);
dwc-gadget_driver-resume(dwc-gadget);
spin_lock(dwc-lock);
-- 
2.1.4

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