[PATCH v2 1/3] usb: gadget: net2280: Fix overrun of OUT messages

2019-03-18 Thread Guido Kiener
The OUT endpoint normally blocks (NAK) subsequent packets when a short packet was received and returns an incomplete queue entry to the gadget driver. Thereby the gadget driver can detect a short packet when reading queue entries with a length that is not equal to a multiple of packet size. The st

[PATCH v2 3/3] usb: gadget: net2272: Fix net2272_dequeue()

2019-03-18 Thread Guido Kiener
Restore the status of ep->stopped in function net2272_dequeue(). When the given request is not found in the endpoint queue the function returns -EINVAL without restoring the state of ep->stopped. Thus the endpoint keeps blocked and does not transfer any data anymore. This fix is only compile-test

[PATCH v2 2/3] usb: gadget: net2280: Fix net2280_dequeue()

2019-03-18 Thread Guido Kiener
When a request must be dequeued with net2280_dequeue() e.g. due to a device clear action and the same request is finished by the function scan_dma_completions() then the function net2280_dequeue() does not find the request in the following search loop and returns the error -EINVAL without restoring

Fwd: Add/remove USB gadget functions without UDC unbind

2019-03-18 Thread rostokus
I am working on adding USB mass storage functionality to embedded device and I need to determine if device is connected to USB host or power-only source (like powerbank). When connected to host, device must stop using mass storage partition (LUN) and unmount it. When disconnected, device must mount

[PATCH] usb: dwc2: gadget: Increase descriptors count for ISOC's

2019-03-18 Thread Minas Harutyunyan
Some function drivers queueing more than 128 ISOC requests at a time. To avoid "descriptor chain full" cases, increasing descriptors count from MAX_DMA_DESC_NUM_GENERIC to MAX_DMA_DESC_NUM_HS_ISOC for ISOC's only. Signed-off-by: Minas Harutyunyan --- drivers/usb/dwc2/gadget.c | 27 ++

Re: REGRESSION: usb: dwc2: gadget: Add scatter-gather mode

2019-03-18 Thread Minas Harutyunyan
Hi Andrzej, On 3/15/2019 3:32 PM, Andrzej Pietrasiewicz wrote: > Hi again, > > sorry for long lines. Reformatted now. > > Hi Minas, > > > W dniu 12.03.2019 o 08:54, Minas Harutyunyan pisze: >> Hi, >> >> SB CV MSC tests failed starting from Test Case 6 with BNA interrupt on >> ep1in. It's first

RE: [PATCH v3 1/2] dt-bindings: usb: add documentation for typec switch via GPIO

2019-03-18 Thread Jun Li
> -Original Message- > From: Hans de Goede > Sent: 2019年3月11日 19:12 > To: Jun Li ; robh...@kernel.org; > heikki.kroge...@linux.intel.com > Cc: gre...@linuxfoundation.org; andy.shevche...@gmail.com; > linux-usb@vger.kernel.org; devicet...@vger.kernel.org; dl-linux-imx > > Subject: Re: [

RE: [PATCH v3 1/2] dt-bindings: usb: add documentation for typec switch via GPIO

2019-03-18 Thread Jun Li
> -Original Message- > From: Rob Herring > Sent: 2019年3月12日 22:45 > To: Jun Li > Cc: heikki.kroge...@linux.intel.com; gre...@linuxfoundation.org; > hdego...@redhat.com; andy.shevche...@gmail.com; linux-usb@vger.kernel.org; > devicet...@vger.kernel.org; dl-linux-imx > Subject: Re: [PATC

RE: [PATCH v3 1/2] dt-bindings: usb: add documentation for typec switch via GPIO

2019-03-18 Thread Jun Li
> -Original Message- > From: Heikki Krogerus > Sent: 2019年3月13日 17:36 > To: Rob Herring > Cc: Jun Li ; gre...@linuxfoundation.org; hdego...@redhat.com; > andy.shevche...@gmail.com; linux-usb@vger.kernel.org; > devicet...@vger.kernel.org; dl-linux-imx > Subject: Re: [PATCH v3 1/2] dt-bi

Re: g_dbgp + u_serial: WARNING when unloading g_dbgp module

2019-03-18 Thread Alan Stern
On Mon, 18 Mar 2019, Felipe Balbi wrote: > Hi, > > Randy Dunlap writes: > > Linux v5.0-11053-gebc551f2b8f9 of March 12, on x86_64: > > > > with > > CONFIG_USB_G_DBGP=m > > # CONFIG_USB_G_DBGP_PRINTK is not set > > CONFIG_USB_G_DBGP_SERIAL=y > > CONFIG_USB_U_SERIAL=m > > > > Loading g_dbgp module

Re: g_dbgp + u_serial: WARNING when unloading g_dbgp module

2019-03-18 Thread Felipe Balbi
Hi, Alan Stern writes: >> Randy Dunlap writes: >> > Linux v5.0-11053-gebc551f2b8f9 of March 12, on x86_64: >> > >> > with >> > CONFIG_USB_G_DBGP=m >> > # CONFIG_USB_G_DBGP_PRINTK is not set >> > CONFIG_USB_G_DBGP_SERIAL=y >> > CONFIG_USB_U_SERIAL=m >> > >> > Loading g_dbgp module and then unloa

Re: PROBLEM: HUAWEI E3531 HSPA+ USB Stick "please report the device ID to the Linux USB developers"

2019-03-18 Thread Dan Williams
On Sun, 2019-03-17 at 14:25 +0100, Peter Schüller wrote: > [1.] One line summary of the problem: > > Plugging in HUAWEI E3531 USB Modem causes "report the device ID to > the > Linux USB developers" and device can only be used with a workaround [removing netdev list...] With the modem plugged in,

Re: g_dbgp + u_serial: WARNING when unloading g_dbgp module

2019-03-18 Thread Alan Stern
On Mon, 18 Mar 2019, Felipe Balbi wrote: > > The spec says: > > > > All Debug Devices, with the exception of fixed address devices, > > must implement all required standard commands in the core > > device framework. > > > > But that refers to standard _commands_, not standard _descri

Re: [PATCH v2 1/3] usb: gadget: net2280: Fix overrun of OUT messages

2019-03-18 Thread Alan Stern
On Mon, 18 Mar 2019, Guido Kiener wrote: > The OUT endpoint normally blocks (NAK) subsequent packets when a > short packet was received and returns an incomplete queue entry to > the gadget driver. Thereby the gadget driver can detect a short packet > when reading queue entries with a length that

Re: [PATCH v2 2/3] usb: gadget: net2280: Fix net2280_dequeue()

2019-03-18 Thread Alan Stern
On Mon, 18 Mar 2019, Guido Kiener wrote: > When a request must be dequeued with net2280_dequeue() e.g. due > to a device clear action and the same request is finished by the > function scan_dma_completions() then the function net2280_dequeue() > does not find the request in the following search lo

Re: USB bug

2019-03-18 Thread Alan Stern
Adding Mathias, since this appears to be an xHCI problem. On Sun, 17 Mar 2019, Harutyun Khachatryan wrote: > Dear Alan Stern, > > I am extremely sorry for late response, I have just checking all > possible kernel versions. I have checked kernel versions > 4.11,4.13,4.15,4.19,5.0. I can say tha

Re: PROBLEM: HUAWEI E3531 HSPA+ USB Stick "please report the device ID to the Linux USB developers"

2019-03-18 Thread Peter Schüller
[corrected email of Kai-Heng Feng] Am Mo., 18. März 2019 um 15:39 Uhr schrieb Dan Williams : > [removing netdev list...] > > With the modem plugged in, could you grab the output of: > > lsusb -v -d 12d1:14dc The output is on STDERR Couldn't open device, some information will be missing and on S

Re: PROBLEM: HUAWEI E3531 HSPA+ USB Stick "please report the device ID to the Linux USB developers"

2019-03-18 Thread Dan Williams
On Mon, 2019-03-18 at 18:50 +0100, Peter Schüller wrote: > [corrected email of Kai-Heng Feng] > > Am Mo., 18. März 2019 um 15:39 Uhr schrieb Dan Williams < > d...@redhat.com>: > > [removing netdev list...] > > > > With the modem plugged in, could you grab the output of: > > > > lsusb -v -d 12d1:

Re: PROBLEM: HUAWEI E3531 HSPA+ USB Stick "please report the device ID to the Linux USB developers"

2019-03-18 Thread Bjørn Mork
Peter Schüller writes: > [corrected email of Kai-Heng Feng] > > Am Mo., 18. März 2019 um 15:39 Uhr schrieb Dan Williams : >> [removing netdev list...] >> >> With the modem plugged in, could you grab the output of: >> >> lsusb -v -d 12d1:14dc > > The output is on STDERR > > Couldn't open device, s

[PATCH 1/4] usb: Convert xhci-mem to XArray

2019-03-18 Thread Matthew Wilcox
The XArray API is a better fit for xhci than the radix tree API was, to the point where we can remove the wrappers around the radix tree and just call the XArray APIs directly. Signed-off-by: Matthew Wilcox --- drivers/usb/host/xhci-mem.c | 86 + drivers/usb/h

[PATCH 3/4] usb: Convert usb_bus_idr to XArray

2019-03-18 Thread Matthew Wilcox
Remove the usb_bus_idr_lock as it doesn't appear to be protecting anything more than the built-in XArray lock does. Signed-off-by: Matthew Wilcox --- drivers/usb/core/devices.c | 10 +++-- drivers/usb/core/hcd.c | 40 - drivers/usb/core/usb.c

[PATCH 4/4] usb/serial: Convert serial_minors to XArray

2019-03-18 Thread Matthew Wilcox
Signed-off-by: Matthew Wilcox --- drivers/usb/serial/usb-serial.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index 7e89efbf2c28..ad8b9cb17ca5 100644 --- a/drivers/usb/serial/usb-seri

[PATCH 2/4] cdc-acm: Convert acm_minors to XArray

2019-03-18 Thread Matthew Wilcox
Signed-off-by: Matthew Wilcox --- drivers/usb/class/cdc-acm.c | 33 ++--- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index 739f8960811a..28eb9a898b4a 100644 --- a/drivers/usb/class/cdc-acm.c

Re: [PATCH v2 1/3] usb: gadget: net2280: Fix overrun of OUT messages

2019-03-18 Thread guido
Zitat von Alan Stern : On Mon, 18 Mar 2019, Guido Kiener wrote: The OUT endpoint normally blocks (NAK) subsequent packets when a short packet was received and returns an incomplete queue entry to the gadget driver. Thereby the gadget driver can detect a short packet when reading queue entrie

Re: [PATCH 4/4] usb/serial: Convert serial_minors to XArray

2019-03-18 Thread Greg KH
On Mon, Mar 18, 2019 at 02:17:13PM -0700, Matthew Wilcox wrote: > Signed-off-by: Matthew Wilcox > --- > drivers/usb/serial/usb-serial.c | 21 ++--- > 1 file changed, 10 insertions(+), 11 deletions(-) I really do not like taking patches without any changelog text at all :(