Re: [PATCH] usb: dwc3: gadget: only unmap requests from DMA if mapped

2017-09-07 Thread Felipe Balbi
Hi, Jack Pham writes: >> On 6/29/2017 12:54 AM, Jack Pham wrote: >> > A recent optimization was made so that a request put on the >> > pending_list wouldn't get mapped for DMA until just before >> > preparing a TRB for it. However, this poses a problem in case >> > the request is dequeued or the

Re: Bug 196559: xhci_hcd: kernel panic using thunderbolt dell dock TB16 on 4.12.4

2017-09-07 Thread Greg KH
On Wed, Sep 06, 2017 at 10:04:08AM -0600, Jose Marino wrote: > The bug is still present in kernel 4.13. The panic logs look pretty much the > same as with 4.12.4. I have attached the pstore and journald messages to the > bugzilla bug report just in case. > > I reverted commit 5cc9b698a494827 on to

Re: [PATCH] usb: dwc3: Fix the USB 3.0 hub detection bug after warm boot

2017-09-07 Thread Felipe Balbi
Hi, gustavo panizzo writes: --- drivers/usb/dwc3/core.c | 33 + 1 file changed, 33 insertions(+) diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index 326b302fc440..f92dfe213d89 100644 --- a/

Re: Bug 196559: xhci_hcd: kernel panic using thunderbolt dell dock TB16 on 4.12.4

2017-09-07 Thread Mathias Nyman
On 07.09.2017 12:23, Greg KH wrote: On Wed, Sep 06, 2017 at 10:04:08AM -0600, Jose Marino wrote: The bug is still present in kernel 4.13. The panic logs look pretty much the same as with 4.12.4. I have attached the pstore and journald messages to the bugzilla bug report just in case. I reverted

Re: [PATCH 0/2] USB: musb: PM fixes

2017-09-07 Thread Johan Hovold
On Tue, Sep 05, 2017 at 04:21:10PM +0200, Johan Hovold wrote: > These patches fix a couple of bugs introduced by the recent runtime-PM > work. > > Note that the external abort was due to the irq work never being flushed > on suspend, and that we may need similar fixes for the delayed reset and >

Re: [PATCH v2 04/11] usb: xhci: Add Intel cherrytrail extended cap / otg phy mux handling

2017-09-07 Thread Mathias Nyman
On 05.09.2017 19:42, Hans de Goede wrote: The Intel cherrytrail xhci controller has an extended cap mmio-range which contains registers to control the muxing to the xhci (host mode) or the dwc3 (device mode) and vbus-detection for the otg usb-phy. Having a mux driver included in the xhci code (o

[PATCH v2 1/2] USB: musb: fix session-bit runtime-PM quirk

2017-09-07 Thread Johan Hovold
The current session-bit quirk implementation does not prevent the retry counter from underflowing, something which could break runtime PM and keep the device active for a very long time (about 2^32 seconds) after a disconnect. This notably breaks the B-device timeout case, but could potentially ca

[PATCH v2 0/2] USB: musb: PM fixes

2017-09-07 Thread Johan Hovold
These patches fix a couple of bugs introduced by the recent runtime-PM work (details in the individual commit messages). Note that the external abort was due to the irq work never being flushed on suspend, and that we may need similar fixes for the delayed reset and resume work which are likewise

[PATCH v2 2/2] USB: musb: fix late external abort on suspend

2017-09-07 Thread Johan Hovold
The musb delayed irq work was never flushed on suspend, something which since 4.9 can lead to an external abort if the work is scheduled after the grandparent's clock has been disabled: PM: Suspending system (mem) PM: suspend of devices complete after 125.224 msecs PM: suspend devices took 0.132 s

Re: Bug 196559: xhci_hcd: kernel panic using thunderbolt dell dock TB16 on 4.12.4

2017-09-07 Thread Mathias Nyman
On 07.09.2017 14:59, Mathias Nyman wrote: On 07.09.2017 12:23, Greg KH wrote: On Wed, Sep 06, 2017 at 10:04:08AM -0600, Jose Marino wrote: The bug is still present in kernel 4.13. The panic logs look pretty much the same as with 4.12.4. I have attached the pstore and journald messages to the bu

[PATCH] [v2] usb: gadget: dummy: fix nonsensical comparisons

2017-09-07 Thread Arnd Bergmann
gcc-8 points out two comparisons that are clearly bogus and almost certainly not what the author intended to write: drivers/usb/gadget/udc/dummy_hcd.c: In function 'set_link_state_by_speed': drivers/usb/gadget/udc/dummy_hcd.c:379:31: error: bitwise comparison always evaluates to false [-Werror=ta

Re: [PATCH] [v2] usb: gadget: dummy: fix nonsensical comparisons

2017-09-07 Thread Alan Stern
On Thu, 7 Sep 2017, Arnd Bergmann wrote: > gcc-8 points out two comparisons that are clearly bogus > and almost certainly not what the author intended to write: > > drivers/usb/gadget/udc/dummy_hcd.c: In function 'set_link_state_by_speed': > drivers/usb/gadget/udc/dummy_hcd.c:379:31: error: bitwi

Re: Bug 196559: xhci_hcd: kernel panic using thunderbolt dell dock TB16 on 4.12.4

2017-09-07 Thread Jose Marino
I have tested Mathias' patch on top of v4.13 and it fixes the problem. I was able to suspend/resume a few times with no kernel panics. Jose On 09/07/2017 08:09 AM, Mathias Nyman wrote: On 07.09.2017 14:59, Mathias Nyman wrote: On 07.09.2017 12:23, Greg KH wrote: On Wed, Sep 06, 2017 at 10:04

Re: Bug 196559: xhci_hcd: kernel panic using thunderbolt dell dock TB16 on 4.12.4

2017-09-07 Thread Greg KH
On Thu, Sep 07, 2017 at 09:12:53AM -0600, Jose Marino wrote: > I have tested Mathias' patch on top of v4.13 and it fixes the problem. I was > able to suspend/resume a few times with no kernel panics. Yeah! Thanks for testing. Mathias, care to send me a "real" patch for this so I can get it to Li

Re: [PATCH v2 04/11] usb: xhci: Add Intel cherrytrail extended cap / otg phy mux handling

2017-09-07 Thread Hans de Goede
Hi, On 07-09-17 15:14, Mathias Nyman wrote: On 05.09.2017 19:42, Hans de Goede wrote: The Intel cherrytrail xhci controller has an extended cap mmio-range which contains registers to control the muxing to the xhci (host mode) or the dwc3 (device mode) and vbus-detection for the otg usb-phy. Ha

Re: [PATCH 1/2] usb: musb: musb_cppi41: Fix the address of teardown and autoreq registers

2017-09-07 Thread Bin Liu
On Mon, Sep 04, 2017 at 06:32:11PM +0530, Sekhar Nori wrote: > On Monday 14 August 2017 07:06 PM, Sekhar Nori wrote: > > On Monday 14 August 2017 07:01 PM, Sekhar Nori wrote: > >> Hi, > >> > >> On Sunday 13 August 2017 05:34 PM, Alexandre Bailon wrote: > >>> The DA8xx and DSPS platforms don't use t

Re: [PATCH] usb: dwc3: gadget: only unmap requests from DMA if mapped

2017-09-07 Thread Thinh Nguyen
Hi Felipe, On 9/7/2017 12:16 AM, Felipe Balbi wrote: 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 9e41605a..6b299c7 100644 --- a/drivers/usb/dwc3/g