[PATCH net 3/3] r8152: don't enable napi before rx ready

2015-07-23 Thread Hayes Wang
Adjust napi_disable() and napi_enable() to avoid r8152_poll() start working before rx ready. Otherwise, it may have race condition for rx_agg. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/usb/r8152.c b

[PATCH net 0/3] r8152: issues fix

2015-07-23 Thread Hayes Wang
These patches are used to fix issues. Hayes Wang (3): r8152: fix the issue about U1/U2 r8152: fix remote wakeup r8152: don't enable napi before rx ready drivers/net/usb/r8152.c | 103 1 file changed, 60 insertions(+), 43 deletions(-) -- 2.

[PATCH net 1/3] r8152: fix the issue about U1/U2

2015-07-23 Thread Hayes Wang
- Disable U1/U2 during initialization. - Disable lpm when linking is on, and enable it when linking is off. - Disable U1/U2 when enabling runtime suspend. It is possible to let hw stop working, if the U1/U2 request occurs during some situations. The patch is used to avoid it. Signed-off-by: Hayes

[PATCH net 2/3] r8152: fix remote wakeup

2015-07-23 Thread Hayes Wang
Set needs_remote_wakeup only when the device supports it. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index e3a0110..eff1f25 100644 --- a/drivers/net/usb/r8152.c +++

Re: [PATCH net 2/3] r8152: fix remote wakeup

2015-07-23 Thread Oliver Neukum
On Thu, 2015-07-23 at 15:09 +0800, Hayes Wang wrote: > Set needs_remote_wakeup only when the device supports it. > > Signed-off-by: Hayes Wang > --- > drivers/net/usb/r8152.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r81

Re: Several races in "usbnet" module (kernel 4.1.x)

2015-07-23 Thread Oliver Neukum
On Wed, 2015-07-22 at 21:33 +0300, Eugene Shatokhin wrote: > The following part is not necessary, I think. usbnet_bh() does not > touch > EVENT_NO_RUNTIME_PM bit explicitly and these bit operations are > atomic > w.r.t. each other. > > > + mpn |= !test_and_clear_bit(EVENT_NO_RUNTIME_PM, &dev

Re: [Xen-devel] [Patch V4 1/3] usb: Add Xen pvUSB protocol description

2015-07-23 Thread David Vrabel
On 23/07/15 07:46, Juergen Gross wrote: > On 07/23/2015 06:36 AM, Greg KH wrote: >> On Thu, Jul 23, 2015 at 06:04:39AM +0200, Juergen Gross wrote: >>> On 07/23/2015 01:46 AM, Greg KH wrote: On Tue, Jun 23, 2015 at 08:53:23AM +0200, Juergen Gross wrote: > Add the definition of pvUSB protoco

Re: [Xen-devel] [Patch V4 1/3] usb: Add Xen pvUSB protocol description

2015-07-23 Thread David Vrabel
On 23/06/15 07:53, Juergen Gross wrote: > Add the definition of pvUSB protocol used between the pvUSB frontend in > a Xen domU and the pvUSB backend in a Xen driver domain (usually Dom0). > > This header was originally provided by Fujitsu for Xen based on Linux > 2.6.18. > > Changes are: > - adap

Re: Several races in "usbnet" module (kernel 4.1.x)

2015-07-23 Thread Oliver Neukum
On Mon, 2015-07-20 at 21:13 +0300, Eugene Shatokhin wrote: > [Race #5] > > Race on dev->rx_urb_size. I reproduced it a similar way as the races > #2 > and #3 (changing MTU while downloading files). > > dev->rx_urb_size is written to here: > #0 usbnet_change_mtu (usbnet.c:392) > dev->rx_

Re: [PATCH v2 1/1] usb: gadget: f_uac2: finalize wMaxPacketSize according to bandwidth

2015-07-23 Thread Peter Chen
On Thu, Jul 23, 2015 at 08:11:11AM +0200, Daniel Mack wrote: > On 07/23/2015 03:00 AM, Peter Chen wrote: > >> That detail is merely about completeness. The code that calculates the > >> > value of wMaxPacketSize should take into account what is configured in > >> > bInterval of the endpoint, so if

Re: [Patch V4 2/3] usb: Introduce Xen pvUSB frontend (xen hcd)

2015-07-23 Thread David Vrabel
On 23/06/15 07:53, Juergen Gross wrote: > Introduces the Xen pvUSB frontend. With pvUSB it is possible for a Xen > domU to communicate with a USB device assigned to that domU. The > communication is all done via the pvUSB backend in a driver domain > (usually Dom0) which is owner of the physical de

RE: [PATCH net 2/3] r8152: fix remote wakeup

2015-07-23 Thread Hayes Wang
> Hi, > > this is most likely wrong. Usbcore does check for a device's ability to > do remote wakeup and will block a runtime suspend if it detects that > a remote wakeup would be required but the device cannot deliver. > (static int autosuspend_check()) > > So by removing the flag in the probe()

[PATCH 2/3] drivers: usb: dwc3: Add adjust_frame_length_quirk

2015-07-23 Thread Nikhil Badola
Add adjust_frame_length_quirk for writing to fladj register which adjusts (micro)frame length to value provided by "snps,configure-fladj" property thus avoiding USB 2.0 devices to time-out over a longer run Signed-off-by: Nikhil Badola --- drivers/usb/dwc3/core.c | 12 drivers/usb/d

Re: [PATCH v2 1/1] usb: gadget: f_uac2: finalize wMaxPacketSize according to bandwidth

2015-07-23 Thread Daniel Mack
On 07/23/2015 10:35 AM, Peter Chen wrote: > Assume the interval for each packet is 2ms, the rate is 192 kbytes > for both FS & HS: > uac2->p_interval = 2000; > uac2->p_pktsize = 192 kbytes / 2000 = 96 bytes > > And the uac2->p_pktsize is real usb packet length, it means hardware > would expect the

[RFC] USB: Fix persist resume of some USB 2.0 devices

2015-07-23 Thread Vasudevan, Krishna PrasathX K
Hi, This mail is for RFC regarding the persist resume of some USB 2.0 devices, Problem Summary: Problem has been observed for some USB 2.0 devices while resuming from sleep. When the USB “persist” feature is enabled through sysfs it is expected to retain its previous mount point across sleep a

Re: [PATCH net 2/3] r8152: fix remote wakeup

2015-07-23 Thread Oliver Neukum
On Thu, 2015-07-23 at 09:55 +, Hayes Wang wrote: > > Hi, > > > > this is most likely wrong. Usbcore does check for a device's ability to > > do remote wakeup and will block a runtime suspend if it detects that > > a remote wakeup would be required but the device cannot deliver. > > (static int

Re: [PATCH v2] USB: sierra: add 1199:68AB device ID

2015-07-23 Thread Dirk Behme
Hi Johan, On 20.07.2015 11:24, Johan Hovold wrote: [ +CC: Bjørn and Dan ] On Mon, Jul 20, 2015 at 08:14:19AM +0200, Dirk Behme wrote: Add support for the Sierra Wireless AR8550 device with USB descriptor 0x1199, 0x68AB. For this, lsusb reports: Thanks for the patch. This modem business is a

Re: [PATCH v2] USB: sierra: add 1199:68AB device ID

2015-07-23 Thread Johan Hovold
On Thu, Jul 23, 2015 at 12:31:55PM +0200, Dirk Behme wrote: > Hi Johan, > > On 20.07.2015 11:24, Johan Hovold wrote: > > [ +CC: Bjørn and Dan ] > > > > On Mon, Jul 20, 2015 at 08:14:19AM +0200, Dirk Behme wrote: > >> Add support for the Sierra Wireless AR8550 device with > >> USB descriptor 0x1199

Re: [PATCH v8 3/4] USB: io_ti: Add firmware image sanity checks

2015-07-23 Thread Sergei Shtylyov
Hello. On 7/22/2015 9:56 PM, Peter E. Berger wrote: From: "Peter E. Berger" Do what we can to verify that the driver's firmware image is valid (before attempting to download it to the Edgeport) by adding a new function, check_fw_sanity(), and a call to it in in download_fw(). Note: It lo

Re: Re: [PATCH v3]USB:OHCI: BugFix:Proper handling of ed_rm_list to handle race condition between usb_kill_urb() and finish_unlinks()

2015-07-23 Thread AMAN DEEP
Dear Greg Sorry for your inconvience. > >This patch doesn't apply to my tree, can you please refresh the patch >agasint 4.2-rc3 and resend it so that I can apply it? > I will resend a new patch against 4.2-rc3 version. >Also, please try to fix your email client to not send base64 patches, >that

RE: [PATCH net 2/3] r8152: fix remote wakeup

2015-07-23 Thread Hayes Wang
Oliver Neukum [mailto:oneu...@suse.com] [...] > If the device does not support remote wakeup and the driver enables it, > runtime > power management will be switched off. > That is the current state and it means that devices which don't support remote > wakeup cannot do runtime power management at

Re: Several races in "usbnet" module (kernel 4.1.x)

2015-07-23 Thread Eugene Shatokhin
23.07.2015 12:43, Oliver Neukum пишет: On Mon, 2015-07-20 at 21:13 +0300, Eugene Shatokhin wrote: [Race #5] Race on dev->rx_urb_size. I reproduced it a similar way as the races #2 and #3 (changing MTU while downloading files). dev->rx_urb_size is written to here: #0 usbnet_change_mtu (usbnet.

[PATCH] usb/gadget: make composite gadget meet usb compliance for vbus draw

2015-07-23 Thread Du, Changbin
>From 0a8e0d63a9887735c6782d7b0c15c2c1fdf1952a Mon Sep 17 00:00:00 2001 From: "Du, Changbin" Date: Thu, 23 Jul 2015 20:08:04 +0800 Subject: [PATCH] usb/gadget: make composite gadget meet usb compliance for vbus draw USB-IF compliance requirement limits the vbus current according to current state

[PATCH v3]USB:OHCI: BugFix:Proper handling of ed_rm_list to handle race condition between usb_kill_urb() and finish_unlinks()

2015-07-23 Thread AMAN DEEP
There is a race condition between finish_unlinks->finish_urb() function and usb_kill_urb() in ohci controller case. The finish_urb calls spin_unlock(&ohci->lock) before usb_hcd_giveback_urb() function call, then if during this time, usb_kill_urb is called for another endpoint, then new

Re: [PATCH v2] USB: sierra: add 1199:68AB device ID

2015-07-23 Thread Dirk Behme
On 23.07.2015 12:36, Johan Hovold wrote: On Thu, Jul 23, 2015 at 12:31:55PM +0200, Dirk Behme wrote: Hi Johan, On 20.07.2015 11:24, Johan Hovold wrote: [ +CC: Bjørn and Dan ] On Mon, Jul 20, 2015 at 08:14:19AM +0200, Dirk Behme wrote: Add support for the Sierra Wireless AR8550 device with US

Re: [PATCH v2] USB: pl2303: Rewrite pl2303_encode_baud_rate_divisor

2015-07-23 Thread Johan Hovold
On Wed, Jul 15, 2015 at 01:35:58PM +0200, Michał Pecio wrote: > > This commit fixes the following issues: > > 1. The 9th bit of buf was believed to be the LSB of divisor's > exponent, but the hardware interprets it as MSB (9th bit) of the > mantissa. The exponent is actually one bit shorter and a

[PATCH 0/2] hid & printer fixes

2015-07-23 Thread Andrzej Pietrasiewicz
Users should not be able to create more function instances than minor numbers allocated for the functions. The problem is in hid and printer functions. This short series fixes it by enforcing the maximum number of function directories created. Andrzej Pietrasiewicz (2): usb: gadget: f_hid: actua

[PATCH 1/2] usb: gadget: f_hid: actually limit the number of instances

2015-07-23 Thread Andrzej Pietrasiewicz
There is a predefined maximum number of hid instances, currently 4. A chrdev region is allocated accordingly, but with configfs the user can create as many hid function directories as they like. To make the number of hid instances consistent with the number of allocated minors, the limit is enforce

[PATCH 2/2] usb: gadget: f_printer: actually limit the number of instances

2015-07-23 Thread Andrzej Pietrasiewicz
There is a predefined maximum number of printer instances, currently 4. A chrdev region is allocated accordingly, but with configfs the user can create as many printer function directories as they like. To make the number of printer instances consistent with the number of allocated minors, the lim

Re: [PATCH v2] USB: pl2303: Rewrite pl2303_encode_baud_rate_divisor

2015-07-23 Thread Michał Pecio
> > + u32 baseline, mantissa, exponent; > > Please keep these as unsigned int. What's the reason for that? u32 is the exact width needed to perform these computations, while unsigned int is something a bit unspecified. > > + /* Calculate and return the exact baud rate. */ > > + baud = (ba

Re: [PATCH] usb/gadget: make composite gadget meet usb compliance for vbus draw

2015-07-23 Thread Andrzej Pietrasiewicz
Hi Changbin, (I assume I address your name properly, if not please excuse) W dniu 23.07.2015 o 14:34, Du, Changbin pisze: From 0a8e0d63a9887735c6782d7b0c15c2c1fdf1952a Mon Sep 17 00:00:00 2001 void composite_disconnect(struct usb_gadget *gadget) { struct usb_composite_dev

Re: [PATCH v3 42/46] usb: gadget: move ep_matches() from epautoconf to udc-core

2015-07-23 Thread Felipe Balbi
Hi, On Thu, Jul 23, 2015 at 06:40:40AM +0200, Petr Cvek wrote: > Hello, > > Is this: > > case USB_ENDPOINT_XFER_INT: > /* Bulk endpoints handle interrupt transfers, >* except the toggle-quirky iso-synch kind >*/ > if (!ep->caps.ty

Re: [PATCH 2/3] drivers: usb: dwc3: Add adjust_frame_length_quirk

2015-07-23 Thread Felipe Balbi
Hi, On Thu, Jul 23, 2015 at 03:41:35PM +0530, Nikhil Badola wrote: > Add adjust_frame_length_quirk for writing to fladj register > which adjusts (micro)frame length to value provided by > "snps,configure-fladj" property thus avoiding USB 2.0 devices > to time-out over a longer run > > Signed-off-

Re: [PATCH 2/3] drivers: usb: dwc3: Add adjust_frame_length_quirk

2015-07-23 Thread Felipe Balbi
Hi again, On Thu, Jul 23, 2015 at 09:55:32AM -0500, Felipe Balbi wrote: > > diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h > > index 0447788..b7a5119 100644 > > --- a/drivers/usb/dwc3/core.h > > +++ b/drivers/usb/dwc3/core.h > > @@ -124,6 +124,7 @@ > > #define DWC3_GEVNTCOUNT(n) (

Re: [PATCH v2] USB: pl2303: Rewrite pl2303_encode_baud_rate_divisor

2015-07-23 Thread Johan Hovold
On Thu, Jul 23, 2015 at 04:21:36PM +0200, Michał Pecio wrote: > > > > + u32 baseline, mantissa, exponent; > > > > Please keep these as unsigned int. > What's the reason for that? u32 is the exact width needed to perform > these computations, while unsigned int is something a bit unspecified. Bec

GPIO support for Silicon Labs cp210x USB serial

2015-07-23 Thread John D. Blair
Dear USB devs, I have a question regarding GPIO support for the Silicon Labs cp210x USB serial driver. Silicon Labs provides GPIOs on the CP210x USB serial hardware. Silicon Labs also supplies a version of the cp210x driver which provides ioctl() support allowing control of these GPIOs. Support

Re: GPIO support for Silicon Labs cp210x USB serial

2015-07-23 Thread Greg KH
On Thu, Jul 23, 2015 at 08:39:41AM -0700, John D. Blair wrote: > Dear USB devs, > > I have a question regarding GPIO support for the Silicon Labs cp210x USB > serial driver. > > Silicon Labs provides GPIOs on the CP210x USB serial hardware. Silicon > Labs also supplies a version of the cp210x dri

Re: GPIO support for Silicon Labs cp210x USB serial

2015-07-23 Thread Johan Hovold
On Thu, Jul 23, 2015 at 08:39:41AM -0700, John D. Blair wrote: > Silicon Labs provides GPIOs on the CP210x USB serial hardware. Silicon > Labs also supplies a version of the cp210x driver which provides ioctl() > support allowing control of these GPIOs. > > Support of the ioctl() requires adding

Re: [PATCH] da8xx musb: add device tree support

2015-07-23 Thread Felipe Balbi
Hi, On Thu, Jul 23, 2015 at 04:19:06PM +, Andrew Holcomb wrote: > Attached is a patch that adds device tree support to the da8xx musb driver. > The current driver expects a board file to setup the platform device and > perform the initialization. With this patch all of the setup is done thr

[PATCH] da8xx musb: add device tree support

2015-07-23 Thread Andrew Holcomb
Trying this again as plain text... sorry about that. Attached is a patch that adds device tree support to the da8xx musb driver. The current driver expects a board file to setup the platform device and perform the initialization. With this patch all of the setup is done through the device tree

Re: [PATCH] da8xx musb: add device tree support

2015-07-23 Thread Felipe Balbi
On Thu, Jul 23, 2015 at 04:43:55PM +, Andrew Holcomb wrote: > Trying this again as plain text... sorry about that. > > Attached is a patch that adds device tree support to the da8xx musb driver. > The current driver expects a board file to setup the platform device and > perform the initial

Re: [PATCH v2] USB: sierra: add 1199:68AB device ID

2015-07-23 Thread Johan Hovold
On Thu, Jul 23, 2015 at 02:58:03PM +0200, Dirk Behme wrote: > On 23.07.2015 12:36, Johan Hovold wrote: > > On Thu, Jul 23, 2015 at 12:31:55PM +0200, Dirk Behme wrote: > >> Hi Johan, > >> > >> On 20.07.2015 11:24, Johan Hovold wrote: > >>> [ +CC: Bjørn and Dan ] > >>> > >>> On Mon, Jul 20, 2015 at 0

[PATCH] usb: gadget: mass_storage: Use static array for luns

2015-07-23 Thread Krzysztof Opasiak
This patch replace dynamicly allocated luns array with static one. This simplifies the code of mass storage function and modules. Signed-off-by: Krzysztof Opasiak Acked-by: Michal Nazarewicz --- drivers/usb/gadget/function/f_mass_storage.c | 127 ++- drivers/usb/gadget/f

Re: [PATCH] usb: ulpi: call put_device if device_register fails

2015-07-23 Thread Greg Kroah-Hartman
On Thu, Jul 23, 2015 at 12:02:40AM -0500, Felipe Balbi wrote: > Hi, > > On Wed, Jul 22, 2015 at 08:14:46PM -0700, Greg Kroah-Hartman wrote: > > On Wed, Jul 22, 2015 at 09:04:40PM -0500, Felipe Balbi wrote: > > > On Wed, Jul 22, 2015 at 02:39:34PM -0700, Greg Kroah-Hartman wrote: > > > > On Tue, Ju

Re: [PATCH 1/2] usb: gadget: f_hid: actually limit the number of instances

2015-07-23 Thread Sergei Shtylyov
Hello. On 07/23/2015 05:11 PM, Andrzej Pietrasiewicz wrote: There is a predefined maximum number of hid instances, currently 4. A chrdev region is allocated accordingly, but with configfs the user can create as many hid function directories as they like. To make the number of hid instances cons

Re: [RFC] USB: Fix persist resume of some USB 2.0 devices

2015-07-23 Thread Greg KH
On Thu, Jul 23, 2015 at 10:17:38AM +, Vasudevan, Krishna PrasathX K wrote: > Hi, > > This mail is for RFC regarding the persist resume of some USB 2.0 devices, > > Problem Summary: Problem has been observed for some USB 2.0 devices while > resuming from sleep. When the USB “persist” feature

Re: [Patch V4 1/3] usb: Add Xen pvUSB protocol description

2015-07-23 Thread Greg KH
On Thu, Jul 23, 2015 at 08:46:17AM +0200, Juergen Gross wrote: > On 07/23/2015 06:36 AM, Greg KH wrote: > >On Thu, Jul 23, 2015 at 06:04:39AM +0200, Juergen Gross wrote: > >>On 07/23/2015 01:46 AM, Greg KH wrote: > >>>On Tue, Jun 23, 2015 at 08:53:23AM +0200, Juergen Gross wrote: > Add the defi

Re: [PATCH] da8xx musb: add device tree support

2015-07-23 Thread Sergei Shtylyov
Hello. I'm the author of the da8xx.c file you're patching. :-) On 07/23/2015 07:43 PM, Andrew Holcomb wrote: Trying this again as plain text... sorry about that. Please place such comments under the --- tear line (that goes after signoff), else they end up in the patch change log and

Re: [PATCH V2 1/4] usb: gadget: udc: bdc: Fix a driver crash on disconnect

2015-07-23 Thread Alan Cooper
On Wed, Jul 22, 2015 at 10:03 PM, Felipe Balbi wrote: > Hi, > > On Wed, Jul 22, 2015 at 06:27:29PM -0400, Alan Cooper wrote: >> On Wed, Jul 22, 2015 at 5:29 PM, Felipe Balbi wrote: >> > On Wed, Jul 22, 2015 at 04:26:57PM -0500, Felipe Balbi wrote: >> >> On Wed, Jul 22, 2015 at 04:58:07PM -0400, A

Re: [PATCH v3 42/46] usb: gadget: move ep_matches() from epautoconf to udc-core

2015-07-23 Thread Alan Stern
On Thu, 23 Jul 2015, Petr Cvek wrote: > Hello, > > Is this: > > case USB_ENDPOINT_XFER_INT: > /* Bulk endpoints handle interrupt transfers, >* except the toggle-quirky iso-synch kind >*/ > if (!ep->caps.type_int && !ep->caps.type_

Re: [PATCH V2 1/4] usb: gadget: udc: bdc: Fix a driver crash on disconnect

2015-07-23 Thread Felipe Balbi
On Thu, Jul 23, 2015 at 03:23:26PM -0400, Alan Cooper wrote: > On Wed, Jul 22, 2015 at 10:03 PM, Felipe Balbi wrote: > > Hi, > > > > On Wed, Jul 22, 2015 at 06:27:29PM -0400, Alan Cooper wrote: > >> On Wed, Jul 22, 2015 at 5:29 PM, Felipe Balbi wrote: > >> > On Wed, Jul 22, 2015 at 04:26:57PM -05

Re: [PATCH v2 1/1] usb: gadget: f_uac2: finalize wMaxPacketSize according to bandwidth

2015-07-23 Thread Alan Stern
On Thu, 23 Jul 2015, Peter Chen wrote: > Assume the interval for each packet is 2ms, the rate is 192 kbytes > for both FS & HS: > uac2->p_interval = 2000; > uac2->p_pktsize = 192 kbytes / 2000 = 96 bytes It's important to keep track of the units. Intervals are measures of time, and they use unit

Re: [PATCH] usb: ulpi: call put_device if device_register fails

2015-07-23 Thread Felipe Balbi
Hi, On Thu, Jul 23, 2015 at 11:00:29AM -0700, Greg Kroah-Hartman wrote: > On Thu, Jul 23, 2015 at 12:02:40AM -0500, Felipe Balbi wrote: > > Hi, > > > > On Wed, Jul 22, 2015 at 08:14:46PM -0700, Greg Kroah-Hartman wrote: > > > On Wed, Jul 22, 2015 at 09:04:40PM -0500, Felipe Balbi wrote: > > > > O

Re: [RFC] USB: Fix persist resume of some USB 2.0 devices

2015-07-23 Thread Alan Stern
Please tell your email client to wrap lines of text after 72 columns or so. On Thu, 23 Jul 2015, Vasudevan, Krishna PrasathX K wrote: > Hi, > > This mail is for RFC regarding the persist resume of some USB 2.0 devices, > > Problem Summary: Problem has been observed for some USB 2.0 devices > w

Re: Multiple drives on JMS56x-based sata-usb docking station.

2015-07-23 Thread Alan Stern
On Thu, 23 Jul 2015, Giulio Bernardi wrote: > Here is the output of usbmon - collected with "usbmon" program. The output > seems > the same of cat /sys/kernel/debug/usb/usbmon/0u with slightly more readable > timestamps and shortened addresses so I used that. This trace shows the uas driver wa

Re: [PATCH] usb: ulpi: call put_device if device_register fails

2015-07-23 Thread Greg Kroah-Hartman
On Thu, Jul 23, 2015 at 03:08:08PM -0500, Felipe Balbi wrote: > > I don't like fixes like this because no one now has any pressure to fix > > it "properly". Are you doing that work? If not, who is? > > Heikki is author, I'd expect him to fix it up. We can also revert the > fix if you prefer, I'm

Re: [PATCH v2 1/1] usb: gadget: f_uac2: finalize wMaxPacketSize according to bandwidth

2015-07-23 Thread Daniel Mack
On 07/23/2015 03:00 AM, Peter Chen wrote: > Thanks, it is correct. But looking the code at afunc_set_alt: > the method of calculating uac2->p_pktsize seems incorrect, it > may need to change like below: Ok, sorry. I just read the code again an figured you're right here, this needs fixing. It doesn

Re: [Xen-devel] [Patch V4 1/3] usb: Add Xen pvUSB protocol description

2015-07-23 Thread Pasi Kärkkäinen
On Thu, Jul 23, 2015 at 12:08:01PM -0700, Greg KH wrote: > > Somewhere that people can refer to that describes this public-facing API > that "must not ever be broken or changed". If you want to put it in a > documentation file, or a .h file, I don't care. > > > >>It is used e.g. in SUSE's xen ke

Re: GPIO support for Silicon Labs cp210x USB serial

2015-07-23 Thread John D. Blair
On Thu, 2015-07-23 at 18:00 +0200, Johan Hovold wrote: > The short answer is that we do not want custom driver ioctls. Any gpio > implementation needs to based on gpiolib, which provides a > standardised > interface. > I understand. We will evaluate and decide if the work is worth it for us to do

Re: [PATCH 1/1] Avoid usb reset crashes by making tty_io cdevs truly dynamic

2015-07-23 Thread Greg KH
On Tue, May 19, 2015 at 04:06:53PM +0100, Richard Watts wrote: > Avoid usb reset crashes by making tty_io cdevs truly dynamic What USB reset crashes are you referring to here? > > Signed-off-by: Richard Watts > Reported-by: Duncan Mackintosh > --- > drivers/tty/tty_io.c | 24 +++

Re: [PATCH 1/1] Avoid usb reset crashes by making tty_io cdevs truly dynamic

2015-07-23 Thread Richard Watts
Hi, Sure - sorry, my description was a little .. basic. So, I have a client who was having problems with machines hanging in the field. Very rare, associated with a h/w change that introduced more cores. Kernel dumps implied that the timer list was getting corrupted. This configuration of ma

Re: [Patch V4 1/3] usb: Add Xen pvUSB protocol description

2015-07-23 Thread Juergen Gross
On 07/23/2015 09:08 PM, Greg KH wrote: On Thu, Jul 23, 2015 at 08:46:17AM +0200, Juergen Gross wrote: On 07/23/2015 06:36 AM, Greg KH wrote: On Thu, Jul 23, 2015 at 06:04:39AM +0200, Juergen Gross wrote: On 07/23/2015 01:46 AM, Greg KH wrote: On Tue, Jun 23, 2015 at 08:53:23AM +0200, Juergen

RE: [PATCH v2 1/1] usb: gadget: f_uac2: finalize wMaxPacketSize according to bandwidth

2015-07-23 Thread Peter Chen
> > > @@ -1176,15 +1188,16 @@ afunc_set_alt(struct usb_function *fn, unsigned > intf, unsigned alt) > > factor = 1000; > > } else { > > ep_desc = &hs_epin_desc; > > - factor = 125; > > + f

RE: [PATCH] usb/gadget: make composite gadget meet usb compliance for vbus draw

2015-07-23 Thread Du, Changbin
Thanks, Pietrasiewicz. > From: Andrzej Pietrasiewicz [mailto:andrze...@samsung.com] > W dniu 23.07.2015 o 14:34, Du, Changbin pisze: > >>From 0a8e0d63a9887735c6782d7b0c15c2c1fdf1952a Mon Sep 17 00:00:00 > > void composite_disconnect(struct usb_gadget *gadget) > > { > > struct usb_composite_

[PATCH net v2 1/3] r8152: fix the issue about U1/U2

2015-07-23 Thread Hayes Wang
- Disable U1/U2 during initialization. - Disable lpm when linking is on, and enable it when linking is off. - Disable U1/U2 when enabling runtime suspend. It is possible to let hw stop working, if the U1/U2 request occurs during some situations. The patch is used to avoid it. Signed-off-by: Hayes

[PATCH net v2 3/3] r8152: don't enable napi before rx ready

2015-07-23 Thread Hayes Wang
Adjust napi_disable() and napi_enable() to avoid r8152_poll() start working before rx ready. Otherwise, it may have race condition for rx_agg. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/usb/r8152.c b

[PATCH net v2 2/3] r8152: fix wakeup settings

2015-07-23 Thread Hayes Wang
Avoid the driver to enable WOL if the device doesn't support it. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 28 ++-- 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index e3a0110..d537c30 100644

[PATCH net v2 0/3] r8152: issues fix

2015-07-23 Thread Hayes Wang
v2: Replace patch #2 with "r8152: fix wakeup settings". v1: These patches are used to fix issues. Hayes Wang (3): r8152: fix the issue about U1/U2 - r8152: fix remote wakeup + r8152: fix wakeup settings r8152: don't enable napi before rx ready drivers/net/usb/r8152.c | 103 +++

[PATCH v2 6/6] usb: dwc3: ep0: handle non maxpacket aligned transfers > 512

2015-07-23 Thread Kishon Vijay Abraham I
Use chained TRB mechanism to handle non maxpacket aligned transfers greater than bounce buffer size. With this the first TRB will be programmed to receive 'ALIGN(ur->length - maxp, maxp)' data and the second TRB will be programmed to receive the remaining data using bounce buffer. Signed-off-by: K

[PATCH v2 5/6] usb: dwc3: ep0: Add chained TRB support

2015-07-23 Thread Kishon Vijay Abraham I
Add chained TRB support to ep0. Now TRB's can be chained just by invoking _dwc3_ep0_start_trans_ with 'chain' parameter set to true. Signed-off-by: Kishon Vijay Abraham I --- drivers/usb/dwc3/ep0.c| 16 +--- drivers/usb/dwc3/gadget.c |2 +- 2 files changed, 14 insertions(+)

[PATCH v2 2/6] usb: dwc3: ep0: use _roundup_ to calculate the transfer size

2015-07-23 Thread Kishon Vijay Abraham I
No functional change. Used _roundup_ macro to calculate the transfer size aligned to maxpacket in dwc3_ep0_complete_data. It also makes it similar to how transfer size is calculated in __dwc3_ep0_do_control_data. Signed-off-by: Kishon Vijay Abraham I --- drivers/usb/dwc3/ep0.c |4 +--- 1 fi

[PATCH v2 1/6] usb: dwc3: ep0: Fix mem corruption on OUT transfers of more than 512 bytes

2015-07-23 Thread Kishon Vijay Abraham I
DWC3 uses bounce buffer to handle non max packet aligned OUT transfers and the size of bounce buffer is 512 bytes. However if the host initiates OUT transfers of size more than 512 bytes (and non max packet aligned), the driver throws a WARN dump but still programs the TRB to receive more than 512

[PATCH v2 3/6] usb: dwc3: ep0: preparation for handling non maxpacket aligned transfers > 512

2015-07-23 Thread Kishon Vijay Abraham I
No functional change. This is in preparation for handling non maxpacket aligned transfers greater than bounce buffer size. This is basically to avoid code duplication when using chained TRB transfers to handle non maxpacket aligned transfers greater than bounce buffer size. Signed-off-by: Kishon V

[PATCH v2 4/6] usb: dwc3; ep0: Modify _dwc3_ep0_start_trans_ API to take 'chain' parameter

2015-07-23 Thread Kishon Vijay Abraham I
No functional change. Added a new parameter in _dwc3_ep0_start_trans_ to indicate whether the TRB is a chained TRB or last TRB. This is in preparation for adding chained TRB support for ep0. Signed-off-by: Kishon Vijay Abraham I --- drivers/usb/dwc3/ep0.c | 15 --- 1 file changed,

[PATCH v2 0/6] usb: dwc3: handle non maxpacket aligned transfers > 512

2015-07-23 Thread Kishon Vijay Abraham I
Patch series first fixes memory corruption and then adds support to handle non maxpacket aligned transfers. Patch series adds support to handle non maxpacket aligned transfers greater than bounce buffer size (512). It first adds chained TRB support and then uses it to handle non maxpacket aligned

[PATCH 0/4] Show CP210x part number in sysfs

2015-07-23 Thread Petr Tesarik
The cp210x driver can be used for several devices (CP2101/2/3/4). It is sometimes useful to know the actual part number, because there are slight differences in their capabilities. The first two patches are cleanups and not necessary to implement the feature. I can send them in a separate patch se

[PATCH 2/4] cp210x: Unify code for set/get config control messages

2015-07-23 Thread Petr Tesarik
From: Petr Tesarik There is a lot of overlap between the two functions (e.g. calculation of the buffer size), so this removes a bit of code duplication, but most importantly, a more generic function can be easily reused for other message types. Signed-off-by: Petr Tesarik --- drivers/usb/seria

[PATCH 4/4] cp210x: Expose the part number in sysfs

2015-07-23 Thread Petr Tesarik
From: Petr Tesarik Make it possible to read the cp210x part number from userspace by making it a sysfs attribute. Signed-off-by: Petr Tesarik --- drivers/usb/serial/cp210x.c | 21 - 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/drivers/usb/serial/cp210x.c b/

[RESEND PATCH v2 1/6] usb: dwc3: ep0: Fix mem corruption on OUT transfers of more than 512 bytes

2015-07-23 Thread Kishon Vijay Abraham I
DWC3 uses bounce buffer to handle non max packet aligned OUT transfers and the size of bounce buffer is 512 bytes. However if the host initiates OUT transfers of size more than 512 bytes (and non max packet aligned), the driver throws a WARN dump but still programs the TRB to receive more than 512

[PATCH 1/4] cp210x: Replace USB magic numbers with symbolic names

2015-07-23 Thread Petr Tesarik
From: Petr Tesarik The request type is in fact made of three fields that already have symbolic constants. While I was rewriting those lines, I also converted the pre-processor defines into an enum, so they are seen by debuggers. Signed-off-by: Petr Tesarik --- drivers/usb/serial/cp210x.c | 14

[PATCH 3/4] cp210x: Store part number

2015-07-23 Thread Petr Tesarik
From: Petr Tesarik Query and store the CP210x part number. Signed-off-by: Petr Tesarik --- drivers/usb/serial/cp210x.c | 20 1 file changed, 20 insertions(+) diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c index 69f03b6..dbfc722 100644 --- a/drivers