Re: [PATCH 1/4] usb: xhci: add Immediate Data Transfer support

2019-05-09 Thread Nicolas Saenz Julienne
Hi Matthias, thanks for spending the time debugging this :) On Thu, 2019-05-09 at 18:10 +0300, Mathias Nyman wrote: > Got the logs off list, thanks > > The "Buffer" data in Control transfer Data stage look suspicious. > > grep "flags I:" trace_fail | grep Data > kworker/0:2-124 [000] d..1

Re: [PATCH 1/4] usb: xhci: add Immediate Data Transfer support

2019-05-09 Thread Nicolas Saenz Julienne
On Thu, 2019-05-09 at 14:40 +0300, Mathias Nyman wrote: > On 9.5.2019 13.32, Marek Szyprowski wrote: > > Dear All, > > > > On 2019-04-26 15:23, Mathias Nyman wrote: > > > From: Nicolas Saenz Julienne > > > > > > Immediate data transfers (IDT) allo

Re: Do usb_submit_urb() memory allocation errors really exist in the wild?

2019-02-26 Thread Nicolas Saenz Julienne
Hi Greg, On Tue, 2019-02-26 at 13:14 +0100, Greg KH wrote: > On Tue, Feb 26, 2019 at 01:09:30PM +0100, Nicolas Saenz Julienne wrote: > > Hi, > > as I'm sure most of you are aware of, every URB submission triggers a small > > memory allocation in the host controller. >

Do usb_submit_urb() memory allocation errors really exist in the wild?

2019-02-26 Thread Nicolas Saenz Julienne
Hi, as I'm sure most of you are aware of, every URB submission triggers a small memory allocation in the host controller. On top of that it might be run in atomic context. This has always seemed to me as a possible source of very hard to reproduce and potentially nasty issues. For example I'm think

[PATCH] usb: xhci: add Immediate Data Transfer support

2019-02-19 Thread Nicolas Saenz Julienne
y. Signed-off-by: Nicolas Saenz Julienne --- drivers/usb/host/xhci-ring.c | 12 drivers/usb/host/xhci.c | 16 drivers/usb/host/xhci.h | 17 + 3 files changed, 45 insertions(+) diff --git a/drivers/usb/host/xhci-ring.c b/drivers/

Re: [RFC v2] usb: xhci: add Immediate Data Transfer support

2019-02-06 Thread Nicolas Saenz Julienne
Hi Felipe, thanks for the review! On Wed, 2019-02-06 at 08:35 +0200, Felipe Balbi wrote: > Hi, > > Nicolas Saenz Julienne writes: > > diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c > > index 40fa25c4d041..a4efbe62a1a3 100644 > > --- a/d

[RFC v2] usb: xhci: add Immediate Data Transfer support

2019-02-05 Thread Nicolas Saenz Julienne
us ones. I can't seem to find a device that'll perform transfers with such small packet sizes. The implementation takes into account that the 8 byte buffers provided by the URB will never cross a 64KB boundary. Signed-off-by: Nicolas Saenz Julienne --- Chages since first RFC: -

Re: [RFC] usb: xhci: add Immediate Data Transfers support

2019-02-01 Thread Nicolas Saenz Julienne
Hi Felipe, thanks for the review :) On Fri, 2019-02-01 at 15:31 +0200, Felipe Balbi wrote: > Hi, > > Nicolas Saenz Julienne writes: > > Immediate data transfers (IDT) allow the HCD to copy small chunks of > > data (up to 8bits) directly into its output trans

[RFC] usb: xhci: add Immediate Data Transfers support

2019-02-01 Thread Nicolas Saenz Julienne
er and by controlling the leds on an XBOX controller. There where no disruptions on the rest of USB devices attached on the system. Signed-off-by: Nicolas Saenz Julienne --- drivers/usb/host/xhci-ring.c | 6 ++ drivers/usb/host/xhci.c | 37 drivers/

[PATCH v4] usb: hub: add retry routine after intr URB submit error

2019-01-08 Thread Nicolas Saenz Julienne
ected. As some USB subsystems already take care of this issue, the implementation was inspired from usbhid/hid_core.c's. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Oliver Neukum --- v4: - Add Oliver's Reviewed-by - Make timeout calculation simpler v3: As per Oliver&#x

[PATCH] xhci: fix 'broken_suspend' placement in struct xchi_hcd

2018-12-17 Thread Nicolas Saenz Julienne
workaround CSS timeout on AMD SNPS 3.0 xHC") Reported-by: Oliver Neukum Signed-off-by: Nicolas Saenz Julienne --- drivers/usb/host/xhci.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h index c3515bad5dbb..011dd45

Re: [PATCH v3] usb: hub: add retry routine after intr URB submit error

2018-11-20 Thread Nicolas Saenz Julienne
Hi Oliver, On Tue, 2018-11-20 at 15:57 +0100, Oliver Neukum wrote: > On Di, 2018-11-20 at 15:34 +0100, Nicolas Saenz Julienne wrote: > > The hub sends hot-plug events to the host trough it's interrupt > > URB. The > > driver takes care of completing the URB and re-sub

[PATCH v3] usb: hub: add retry routine after intr URB submit error

2018-11-20 Thread Nicolas Saenz Julienne
ected. As some USB subsystems already take care of this issue, the implementation was inspired from usbhid/hid_core.c's. Signed-off-by: Nicolas Saenz Julienne --- v3: As per Oliver's request: - Take care of race condition between disconnect and irq v2: as per Alan's and Olive

Re: [PATCH v2] usb: hub: add retry routine after intr URB sumbit error

2018-11-19 Thread Nicolas Saenz Julienne
Hi Oliver, thanks for the reviews :). On Mon, 2018-11-19 at 15:04 +0100, Oliver Neukum wrote: > On Mo, 2018-11-19 at 15:02 +0100, Nicolas Saenz Julienne wrote: > > +static void hub_retry_irq_urb(struct timer_list *t) > > +{ > > + struct usb_hub *hub = from_timer(

[PATCH v2] usb: hub: add retry routine after intr URB sumbit error

2018-11-19 Thread Nicolas Saenz Julienne
ected. As some USB subsystems already take care of this issue, the implementation was inspired from usbhid/hid_core.c's. Signed-off-by: Nicolas Saenz Julienne --- v2: as per Alan's and Oliver's comments: - Rename timer - Delete the timer on disconnect - Don't reset HUB

Re: [PATCH] usb: hub: add I/O error retry & reset routine

2018-11-16 Thread Nicolas Saenz Julienne
Hi Alan, thanks for the review. On Thu, 2018-11-15 at 14:24 -0500, Alan Stern wrote: > On Thu, 15 Nov 2018, Nicolas Saenz Julienne wrote: > > > An URB submission error in the HUB's endpoint completion function > > renders the whole HUB device unresponsive. This patch i

[PATCH] usb: hub: add I/O error retry & reset routine

2018-11-15 Thread Nicolas Saenz Julienne
implements the same functionality. It was tested with the help of BCC's error injection tool (inject.py). Signed-off-by: Nicolas Saenz Julienne --- drivers/usb/core/hub.c | 43 +- drivers/usb/core/hub.h | 3 +++ 2 files changed, 45 insertions(+), 1 de

[PATCH v2] usb: dwc3: gadget: don't rely on jiffies while holding spinlock

2016-08-23 Thread Nicolas Saenz Julienne
a "decrement variable and wait" timeout scheme. Signed-off-by: Nicolas Saenz Julienne --- v2. removed udelay() from while loop note: resubmitting since earlier patch had errata on e-mail address drivers/usb/dwc3/gadget.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) di

[PATCH v2] usb: dwc3: gadget: don't rely on jiffies while holding spinlock

2016-08-16 Thread Nicolas Saenz Julienne
From: Nicolas Saenz Julienne __dwc3_gadget_wakeup() is called while holding a spinlock, then depends on jiffies in order to timeout while polling the USB core for a link state update. In the case the wakeup failed, the timeout will never happen and will also cause the cpu to stall until

[PATCH] usb: dwc3: gadget: don't rely on jiffies while holding spinlock

2016-08-15 Thread Nicolas Saenz Julienne
a "decrement variable and wait" timeout scheme. Signed-off-by: Nicolas Saenz Julienne --- drivers/usb/dwc3/gadget.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 8f8c215..d0c711f 100644 --- a/d

[PATCH v2] USB: cdc-acm: add support for Sagem Monetel ELC930

2016-03-15 Thread Nicolas Saenz Julienne
t; error during the probe function. Adding the NO_UNION_NORMAL quirk solves the issue. Signed-off-by: Nicolas Saenz Julienne --- v2. Added a proper description drivers/usb/class/cdc-acm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm

Re: [PATCH] USB: cdc-acm: add support for Sagem Monetel ELC930

2016-03-14 Thread Nicolas Saenz Julienne
On Sat, Mar 12, 2016 at 04:27:29PM -0800, Greg KH wrote: > On Sat, Mar 12, 2016 at 11:44:51PM +0000, Nicolas Saenz Julienne wrote: > > Signed-off-by: Nicolas Saenz Julienne > > --- > > drivers/usb/class/cdc-acm.c | 3 +++ > > 1 file changed, 3 insertions(+) > > &

[PATCH] USB: cdc-acm: add support for Sagem Monetel ELC930

2016-03-12 Thread Nicolas Saenz Julienne
Signed-off-by: Nicolas Saenz Julienne --- drivers/usb/class/cdc-acm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index fa4e239..9831607 100644 --- a/drivers/usb/class/cdc-acm.c +++ b/drivers/usb/class/cdc-acm.c @@ -1681,6