[PATCH] usb:xhci:Fix regression when ATI chipsets detected

2017-08-23 Thread Sandeep Singh
From: Sandeep Singh The following commit cause a regression on ATI chipsets. 'commit e788787ef4f9 ("usb:xhci:Add quirk for Certain failing HP keyboard on reset after resume")' This causes pinfo->smbus_dev to be wrongly set to NULL on systems with the ATI chipset that this

Re: [PATCH v2 1/1] usb:xhci: update condition to select bus->sysdev from parent device

2017-08-23 Thread Thang Q. Nguyen
On Sat, Aug 19, 2017 at 10:43 AM, Thang Q. Nguyen wrote: > From: "Thang Q. Nguyen" > > For commit 4c39d4b949d3 ("usb: xhci: use bus->sysdev for DMA > configuration"), sysdev points to devices known to the system firmware > or hardware for DMA parameters. >

Re: [PATCH] usb: gadget: pch_udc: add checks for dma mapping errors

2017-08-23 Thread Jack Pham
On Thu, Aug 24, 2017 at 01:47:08AM +0300, Alexey Khoroshilov wrote: > There are no checks for dma mapping errors in pch_udc. > Tha patch adds the checks and error handling code. > Compile tested only. > > Found by Linux Driver Verification project (linuxtesting.org). > > Signed-off-by: Alexey

Re: [PATCH] usb:xhci:Fix regression when ATI chipsets detected

2017-08-23 Thread Greg KH
On Wed, Aug 23, 2017 at 04:26:00PM +0530, Sandeep Singh wrote: > From: Sandeep Singh > > The following commit cause a regression on ATI chipsets. > 'commit e788787ef4f9 ("usb:xhci:Add quirk for Certain > failing HP keyboard on reset after resume")' > > This causes

[PATCH] usb: gadget: pch_udc: add checks for dma mapping errors

2017-08-23 Thread Alexey Khoroshilov
There are no checks for dma mapping errors in pch_udc. Tha patch adds the checks and error handling code. Compile tested only. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/usb/gadget/udc/pch_udc.c | 15

Re: high irqs-off latency caused by USB serial driver

2017-08-23 Thread Alan Stern
On Wed, 23 Aug 2017, David Mosberger wrote: > Alan, > > On Wed, Aug 23, 2017 at 10:30 AM, Alan Stern > wrote: > > >> Does anybody know why HCD_BH is not enabled in ohci-hcd.c? > > > > Because it changes the semantics of isochronous and interrupt > > streaming. See

Re: high irqs-off latency caused by USB serial driver

2017-08-23 Thread Alan Stern
On Wed, 23 Aug 2017, David Mosberger wrote: > Actually, I just found this commit: > > 94dfd7edf USB: HCD: support giveback of URB in tasklet context > > It won't fix the problem entirely, but I think it should cut the worst-case > irqs-disabled latency about in half, which would be a good

Re: high irqs-off latency caused by USB serial driver

2017-08-23 Thread Alan Stern
On Wed, 23 Aug 2017, David Mosberger wrote: > On Tue, Aug 22, 2017 at 3:40 PM, Greg KH wrote: > > On Tue, Aug 22, 2017 at 02:44:20PM -0600, David Mosberger wrote: > > >> > There was an option a while ago to turn USB irqs > >> > into threaded irqs, do those work on

Re: high irqs-off latency caused by USB serial driver

2017-08-23 Thread David Mosberger
Actually, I just found this commit: 94dfd7edf USB: HCD: support giveback of URB in tasklet context It won't fix the problem entirely, but I think it should cut the worst-case irqs-disabled latency about in half, which would be a good improvement. Does anybody know why HCD_BH is not enabled in

Re: [PATCH] usb: reducing an usb-port auto-resume latency.

2017-08-23 Thread Mathias Nyman
On 23.08.2017 17:30, Alan Stern wrote: On Wed, 23 Aug 2017, Mathias Nyman wrote: On 23.08.2017 09:18, anshuman.gu...@intel.com wrote: From: Anshuman Gupta This patch will improve the variable auto-resume latency of an usb-port. When xhci gets a port status change

Re: high irqs-off latency caused by USB serial driver

2017-08-23 Thread David Mosberger
On Tue, Aug 22, 2017 at 3:40 PM, Greg KH wrote: > On Tue, Aug 22, 2017 at 02:44:20PM -0600, David Mosberger wrote: >> > There was an option a while ago to turn USB irqs >> > into threaded irqs, do those work on your platform? If so, that might >> > help you out here.

Re: Web camera USB bandwidth allocation

2017-08-23 Thread Alan Stern
On Wed, 23 Aug 2017, Martin Oprešnik wrote: > Hi, > > What happens when you try to use the fourth camera? > > I'm sorry I forgot to write whet the actual problem is. Error message is > "No space left on device". Based on what I read this means there it > can't allocate enough bandwidth. > >

Re: [PATCH] usb: reducing an usb-port auto-resume latency.

2017-08-23 Thread Alan Stern
On Wed, 23 Aug 2017, Mathias Nyman wrote: > On 23.08.2017 09:18, anshuman.gu...@intel.com wrote: > > From: Anshuman Gupta > > > > This patch will improve the variable auto-resume latency of an usb-port. > > > > When xhci gets a port status change event interrupt due to

Re: Possible regression between 4.9 and 4.13

2017-08-23 Thread Mason
On 23/08/2017 14:41, Mason wrote: > I compiled a minimal kernel, with lots of irrelevant drivers and > frameworks left out, including power management. I still get the > "xHCI host controller not responding, assume dead" issue. The problem seems to have a timing-related aspect. I added a bunch

Re: Possible regression between 4.9 and 4.13

2017-08-23 Thread Mason
On 23/08/2017 13:54, Mason wrote: > On 23/08/2017 13:11, Mathias Nyman wrote: > >> In this case we read the register when hub thread asks to clear port feature. >> >> why portsc returns 0x is a another question, could the hub thread be >> running while xhci controller is (in D3)? >> Was

Re: Possible regression between 4.9 and 4.13

2017-08-23 Thread Mason
On 23/08/2017 13:11, Mathias Nyman wrote: > On 23.08.2017 12:31, Mason wrote: > >> [ 46.525247] usb 2-2: new SuperSpeed USB device number 2 using xhci_hcd >> [ 46.565496] usb-storage 2-2:1.0: USB Mass Storage device detected >> [ 46.571934] scsi host0: usb-storage 2-2:1.0 >> [ 47.601227]

Re: Possible regression between 4.9 and 4.13

2017-08-23 Thread Mathias Nyman
On 23.08.2017 12:31, Mason wrote: On 23/08/2017 09:51, Mathias Nyman wrote: very likely cause is the more aggressive detection of pci removed xhci hosts See commit d9f11ba9f107aa335091ab8d7ba5eea714e46e8b xhci: Rework how we handle unresponsive or hoptlug removed hosts It checks if a

[PATCH] usb:xhci:Fix regression when ATI chipsets detected

2017-08-23 Thread Sandeep Singh
From: Sandeep Singh The following commit cause a regression on ATI chipsets. 'commit e788787ef4f9 ("usb:xhci:Add quirk for Certain failing HP keyboard on reset after resume")' This causes pinfo->smbus_dev to be wrongly set to NULL on systems with the ATI chipset that this

Re: Possible regression between 4.9 and 4.13

2017-08-23 Thread Mason
On 23/08/2017 09:51, Mathias Nyman wrote: > very likely cause is the more aggressive detection of pci removed xhci hosts > > See commit d9f11ba9f107aa335091ab8d7ba5eea714e46e8b > xhci: Rework how we handle unresponsive or hoptlug removed hosts > > It checks if a xhci register reads returns

Re: Possible regression between 4.9 and 4.13

2017-08-23 Thread Mason
On 23/08/2017 09:51, Mathias Nyman wrote: > very likely cause is the more aggressive detection of pci removed xhci hosts > > See commit d9f11ba9f107aa335091ab8d7ba5eea714e46e8b > xhci: Rework how we handle unresponsive or hoptlug removed hosts > > It checks if a xhci register reads returns

Re: Possible regression between 4.9 and 4.13

2017-08-23 Thread Mason
On 23/08/2017 09:51, Mathias Nyman wrote: > On 23.08.2017 09:07, Felipe Balbi wrote: > >> Mason writes: >> >>> Any idea what could have changed between 4.9 and 4.13 ? >> >> Quite a bit: >> >> $ git rev-list --no-merges --count v4.13-rc6 ^v4.9 -- drivers/usb/host/xhci >> drivers/usb/core/ >> 58

Re: Web camera USB bandwidth allocation

2017-08-23 Thread Martin Oprešnik
Hi, What happens when you try to use the fourth camera? I'm sorry I forgot to write whet the actual problem is. Error message is "No space left on device". Based on what I read this means there it can't allocate enough bandwidth. Using this command (cat /sys/kernel/debug/usb/devices | grep

Re: [PATCH] usb: reducing an usb-port auto-resume latency.

2017-08-23 Thread Mathias Nyman
On 23.08.2017 09:18, anshuman.gu...@intel.com wrote: From: Anshuman Gupta This patch will improve the variable auto-resume latency of an usb-port. When xhci gets a port status change event interrupt due to PORT_PLC (port link state transition), linux Host controller

Re: Possible regression between 4.9 and 4.13

2017-08-23 Thread Mathias Nyman
On 23.08.2017 09:07, Felipe Balbi wrote: Hi, Mason writes: Hello, The driver for my system's PCIe host bridge landed recently (in 4.13) but it was developed on 4.9 I tested the PCIe host bridge by plugging a 4-port USB3 adapter into the PCIe slot (system at rest) and

[PATCH 1/2] usb: xhci: Support enabling of compliance mode for xhci 1.1

2017-08-23 Thread Jack Pham
To perform SuperSpeed compliance testing the port should first be placed into compliance mode. For xHCI 1.0 and prior this transition happens automatically when the port is in Training and encounters an LFPS timeout. Thus running compliance tests against a test appliance may simply just work by

[PATCH 2/2] usb: misc: lvstest: add entry to place port in compliance mode

2017-08-23 Thread Jack Pham
Add support for the SuperSpeed Link Layer test case TD.7.34 which requires the operator to place the port into compliance mode, and to subsequently bring it out via reset. Historically according to the (now deprecated) USB 3.0 specification a SuperSpeed host downstream port would automatically

[PATCH 0/2] usb: lvstest: explicit compliance mode entry/exit on xhci 1.1 hosts

2017-08-23 Thread Jack Pham
Hi, This patch series aims to allow the lvstest driver to work with xHCI 1.1 hosts. In xHCI 1.1 a downstream port might not automatically enter compliance mode upon LFPS timeout; instead the port must be explicitly enabled to allow this transition. This is needed to pass the Link Layer test case

[PATCH] usb: reducing an usb-port auto-resume latency.

2017-08-23 Thread anshuman . gupta
From: Anshuman Gupta This patch will improve the variable auto-resume latency of an usb-port. When xhci gets a port status change event interrupt due to PORT_PLC (port link state transition), linux Host controller driver drives the resume signalling on the bus for the

Re: Possible regression between 4.9 and 4.13

2017-08-23 Thread Felipe Balbi
Hi, Mason writes: > Hello, > > The driver for my system's PCIe host bridge landed recently > (in 4.13) but it was developed on 4.9 > > I tested the PCIe host bridge by plugging a 4-port USB3 adapter > into the PCIe slot (system at rest) and plugging an USB3 Flash > drive into

Re: Web camera USB bandwidth allocation

2017-08-23 Thread Felipe Balbi
Hi, Alan Stern writes: > On Tue, 22 Aug 2017, Martin Oprešnik wrote: > >> Hello, >> >> we are working on a project, where we need multiple cameras connected to >> embedded computer. For computer we have chosen odroid XU4 and for >> cameras Logitech C920. We need at