Re: usb: CPU 100% hog upon device removal

2018-12-17 Thread Mathias Nyman
On 13.12.2018 00:02, Ju Hyung Park wrote: Hi, Sorry for the late reply. Yes, the stuffs I've been testing are USB BT, cardreader and fingerprint firmware uploader, which are all USB 2.0 devices. I'm happy to report that yes, that fixed the problem. Reported-and-Tested-by: Park Ju Hyung Can w

[GIT PULL] usb: chipidea: changes for v4.21-rc1

2018-12-17 Thread Peter Chen
The following changes since commit e67ebf1b3815b2d1fc505dba182761c0be6c179d: xhci: move usb2 get port status link resume handling to its own function (2018-12-07 15:40:41 +0100) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb.git/ tags/u

Re: [PATCH 3/6] ACPI/IORT: Use device_iommu_mapped()

2018-12-17 Thread Hanjun Guo
On 2018/12/11 21:43, Joerg Roedel wrote: > From: Joerg Roedel > > Replace the iommu-check with a proper and readable function > call. > > Cc: Lorenzo Pieralisi > Acked-by: Robin Murphy > Signed-off-by: Joerg Roedel Acked-by: Hanjun Guo Thanks Hanjun

Re: [PATCH 1/6] driver core: Introduce device_iommu_mapped() function

2018-12-17 Thread Joerg Roedel
On Mon, Dec 17, 2018 at 11:41:10AM +0530, Vinod Koul wrote: > On 11-12-18, 14:43, Joerg Roedel wrote: > > From: Joerg Roedel > > > > Some places in the kernel check the iommu_group pointer in > > 'struct device' in order to find ot whether a device is >^^ > Typ

Re: [PATCH 5/6] xhci: Use device_iommu_mapped()

2018-12-17 Thread Mathias Nyman
On 11.12.2018 15:43, Joerg Roedel wrote: From: Joerg Roedel Replace the dev->iommu_group check with a proper function call that better reprensents its purpose. Cc: Mathias Nyman Acked-by: Robin Murphy Signed-off-by: Joerg Roedel --- drivers/usb/host/xhci.c | 2 +- 1 file changed, 1 inser

RE: [PATCH v1 2/2] usb:cdns3 Add Cadence USB3 DRD Driver

2018-12-17 Thread Pawel Laszczak
Hi Felipe > >Pawel Laszczak writes: > > + case USB_REQ_SET_ISOCH_DELAY: + sprintf(str, "Set Isochronous Delay Delay: %d ns", wValue); + break; + default: + sprintf(str, + "SETUP BRT: %02x BR: %02x V: %04x I: %04x L: %04x\n

RE: [PATCH v1 2/2] usb:cdns3 Add Cadence USB3 DRD Driver

2018-12-17 Thread Felipe Balbi
Hi, Pawel Laszczak writes: > + case USB_REQ_SET_ISOCH_DELAY: > + sprintf(str, "Set Isochronous Delay Delay: %d ns", wValue); > + break; > + default: > + sprintf(str, > + "SETUP BRT: %02x BR: %02x V: %04x I: %04x L: %04x\n", > +

Re: [PATCH] usb: typec: tcpm: Extend the matching rules on PPS APDO selection

2018-12-17 Thread Heikki Krogerus
On Mon, Dec 17, 2018 at 10:48:05AM +0800, Kyle Tso wrote: > Current matching rules ensure that the voltage range of selected Source > Capability is entirely within the range defined in one of the Sink > Capabilities. This is reasonable but not practical because Sink may not > support wide range of

RE: [PATCH v1 2/2] usb:cdns3 Add Cadence USB3 DRD Driver

2018-12-17 Thread Pawel Laszczak
Hi, > +static irqreturn_t cdns3_device_irq_handler(int irq, void *data) +{ + struct cdns3_device *priv_dev; + struct cdns3 *cdns = data; + irqreturn_t ret = IRQ_NONE; + unsigned long flags; + u32 reg; + + priv_dev = cdns->gadget_dev; + spin_

RE: [PATCH v1 2/2] usb:cdns3 Add Cadence USB3 DRD Driver

2018-12-17 Thread Felipe Balbi
Hi, Pawel Laszczak writes: > +static irqreturn_t cdns3_device_irq_handler(int irq, void *data) > +{ > + struct cdns3_device *priv_dev; > + struct cdns3 *cdns = data; > + irqreturn_t ret = IRQ_NONE; > + unsigned long flags; > + u32 reg; > + > + priv_dev = cdns-

RE: [PATCH] usb: typec: tcpm: Extend the matching rules on PPS APDO selection

2018-12-17 Thread Adam Thomson
On 17 December 2018 02:48, Kyle Tso wrote: > Current matching rules ensure that the voltage range of selected Source > Capability is entirely within the range defined in one of the Sink > Capabilities. This > is reasonable but not practical because Sink may not support wide range of > voltage whe

Re: [PATCH] usb: typec: tcpm: Extend the matching rules on PPS APDO selection

2018-12-17 Thread Kyle Tso
On Mon, Dec 17, 2018 at 7:36 PM Heikki Krogerus wrote: > > On Mon, Dec 17, 2018 at 10:48:05AM +0800, Kyle Tso wrote: > > Current matching rules ensure that the voltage range of selected Source > > Capability is entirely within the range defined in one of the Sink > > Capabilities. This is reasonab

serious doubts concerning a7d57abcc8a5bdeb53bbf8e87558e8e0a2c2a29d ("xhci: workaround CSS timeout on AMD SNPS 3.0 xHC")

2018-12-17 Thread Oliver Neukum
Hi, this patch contains the following section: index 260b259b72bc..c3515bad5dbb 100644 --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h @@ -1850,6 +1850,7 @@ struct xhci_hcd { #define XHCI_ZERO_64B_REGS BIT_ULL(32) #define XHCI_DEFAULT_PM_RUNTIME_ALLOW BIT_ULL(33) #define XHCI_

Re: [PATCH] usb: typec: tcpm: Extend the matching rules on PPS APDO selection

2018-12-17 Thread Kyle Tso
On Mon, Dec 17, 2018 at 8:23 PM Adam Thomson wrote: > > On 17 December 2018 02:48, Kyle Tso wrote: > > > Current matching rules ensure that the voltage range of selected Source > > Capability is entirely within the range defined in one of the Sink > > Capabilities. This > > is reasonable but not

Re: serious doubts concerning a7d57abcc8a5bdeb53bbf8e87558e8e0a2c2a29d ("xhci: workaround CSS timeout on AMD SNPS 3.0 xHC")

2018-12-17 Thread Greg KH
On Mon, Dec 17, 2018 at 01:33:05PM +0100, Oliver Neukum wrote: > Hi, > > this patch contains the following section: > > index 260b259b72bc..c3515bad5dbb 100644 > --- a/drivers/usb/host/xhci.h > +++ b/drivers/usb/host/xhci.h > @@ -1850,6 +1850,7 @@ struct xhci_hcd { > #define XHCI_ZERO_64B_REGS

Re: [GIT PULL] usb: chipidea: changes for v4.21-rc1

2018-12-17 Thread Greg Kroah-Hartman
On Mon, Dec 17, 2018 at 09:20:18AM +, Peter Chen wrote: > The following changes since commit e67ebf1b3815b2d1fc505dba182761c0be6c179d: > > xhci: move usb2 get port status link resume handling to its own function > (2018-12-07 15:40:41 +0100) > > are available in the git repository at: > >

Re: [PATCH] Add Proliic new chip: PL2303TB & PL2303N(G)

2018-12-17 Thread Greg KH
On Mon, Dec 17, 2018 at 12:51:24PM +0800, Charles Yeh wrote: > >From b9fd71c64d4d0d939a7a27e08a74d81f960ff5ea Mon Sep 17 00:00:00 2001 > From: Charles Yeh > Date: Sat, 15 Dec 2018 07:10:17 +0800 > Subject: [PATCH] Add Proliic new chip: PL2303TB & PL2303N(G) Much better, but why is this all in the

Re: [PATCH] usb: typec: tcpm: Extend the matching rules on PPS APDO selection

2018-12-17 Thread Kyle Tso
On Mon, Dec 17, 2018 at 8:45 PM Kyle Tso wrote: > > On Mon, Dec 17, 2018 at 8:23 PM Adam Thomson > wrote: > > > > On 17 December 2018 02:48, Kyle Tso wrote: > > > > > Current matching rules ensure that the voltage range of selected Source > > > Capability is entirely within the range defined in o

[PATCH v3] usb: typec: tcpm: Extend the matching rules on PPS APDO selection

2018-12-17 Thread Kyle Tso
Current matching rules ensure that the voltage range of selected Source Capability is entirely within the range defined in one of the Sink Capabilities. This is reasonable but not practical because Sink may not support wide range of voltage when sinking power while Source could advertise its capabi

RE: [PATCH] usb: typec: tcpm: Extend the matching rules on PPS APDO selection

2018-12-17 Thread Adam Thomson
On 17 December 2018 12:45, Kyle Tso wrote: > On Mon, Dec 17, 2018 at 8:23 PM Adam Thomson > wrote: > > > > On 17 December 2018 02:48, Kyle Tso wrote: > > > > > Current matching rules ensure that the voltage range of selected > > > Source Capability is entirely within the range defined in one of t

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

2018-12-17 Thread Nicolas Saenz Julienne
As commented in the struct's definition there shouldn't be anything underneath it's 'priv[0]' member as it would break some macros. The patch converts the broken_suspend into a bit-field and relocates it next to to the rest of bit-fields. Fixes: a7d57abcc8a5 ("xhci: workaround CSS timeout on AMD

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

2018-12-17 Thread Felipe Balbi
Nicolas Saenz Julienne writes: > As commented in the struct's definition there shouldn't be anything > underneath it's 'priv[0]' member as it would break some macros. its? I guess Mathias can fix when applying. -- balbi signature.asc Description: PGP signature

Re: [PATCH] usb: gadget: u_serial: process RX in workqueue instead of tasklet

2018-12-17 Thread Michał Mirosław
On Mon, Dec 17, 2018 at 08:59:42AM +0200, Felipe Balbi wrote: > > Hi, > > Michał Mirosław writes: > > Switch RX processing from tasklet to (delayed) work queue. This allows > > receiver more room to process incoming data and prevents flood of > > "ttyGS0: RX not scheduled?" messages on HS receiv

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

2018-12-17 Thread Mathias Nyman
On 17.12.2018 15:37, Nicolas Saenz Julienne wrote: As commented in the struct's definition there shouldn't be anything underneath it's 'priv[0]' member as it would break some macros. The patch converts the broken_suspend into a bit-field and relocates it next to to the rest of bit-fields. Fixes

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

2018-12-17 Thread Greg Kroah-Hartman
On Mon, Dec 17, 2018 at 03:59:28PM +0200, Mathias Nyman wrote: > On 17.12.2018 15:37, Nicolas Saenz Julienne wrote: > > As commented in the struct's definition there shouldn't be anything > > underneath it's 'priv[0]' member as it would break some macros. > > > > The patch converts the broken_susp

RE: [PATCH v3] usb: typec: tcpm: Extend the matching rules on PPS APDO selection

2018-12-17 Thread Adam Thomson
On 17 December 2018 13:22, Kyle Tso wrote: > Current matching rules ensure that the voltage range of selected Source > Capability is entirely within the range defined in one of the Sink > Capabilities. This > is reasonable but not practical because Sink may not support wide range of > voltage whe

MUSB interrupt storm on device removal

2018-12-17 Thread Måns Rullgård
I have a strange problem with the musb driver in host mode on AM3358 (beaglebone) hardware. If I connect a multi-port serial adapter and open two or more of the ttys, then unplug the device, an interrupt storm ensues that makes the system completely unresponsive until the watchdog resets it. Enab

Re: getting around "Max number of devices this xHCI host supports is 32" limit

2018-12-17 Thread Alan Stern
On Sun, 16 Dec 2018, Marc MERLIN wrote: > Thanks for your reply, and thanks for bearing with me, I'm not actually > that knowledgeable on how things work with multiple USB controllers at > the same time. > > I have a few questions I've outlined. > > Question #1, if I have a random computer that

Re: [PATCH v2 4/6] usb: gadget: add mechanism to specify an explicit status stage

2018-12-17 Thread Alan Stern
On Mon, 17 Dec 2018, Paul Elder wrote: > A usb gadget function driver may or may not want to delay the status > stage of a control OUT request. An instance it might want to is to > asynchronously validate the data of a class-specific request. > > A function driver that wants an explicit status st

Re: [PATCH] Prevent race condition between USB authorisation and USB discovery events

2018-12-17 Thread Alan Stern
On Mon, 17 Dec 2018, Andrew Worsley wrote: > A sysfs driven USB authorisation change can trigger a usb_set_configuration > while a hub_event worker thread is running. This can result in a USB device > being disabled just after it was configured and bringing down all the > devices and impacting har

Re: MUSB interrupt storm on device removal

2018-12-17 Thread Bin Liu
Hi, On Mon, Dec 17, 2018 at 03:13:12PM +, Måns Rullgård wrote: > I have a strange problem with the musb driver in host mode on AM3358 > (beaglebone) hardware. If I connect a multi-port serial adapter and > open two or more of the ttys, then unplug the device, an interrupt storm > ensues that

Re: MUSB interrupt storm on device removal

2018-12-17 Thread Måns Rullgård
Bin Liu writes: > Hi, > > On Mon, Dec 17, 2018 at 03:13:12PM +, Måns Rullgård wrote: >> I have a strange problem with the musb driver in host mode on AM3358 >> (beaglebone) hardware. If I connect a multi-port serial adapter and >> open two or more of the ttys, then unplug the device, an inte

Re: [PATCH] usb: dwc3: gadget: fix miss isoc issue introduced by IRQ latency

2018-12-17 Thread Thinh Nguyen
Hi Zengtao, On 12/16/2018 5:45 PM, Zengtao (B) wrote: >> If it's a busy system, some times when we start an isoc transfer, >> the framenumber get from the event buffer may be already elasped, >> in this case, we will get all the packets dropped due to miss isoc. >> And we turn into

Re: MUSB interrupt storm on device removal

2018-12-17 Thread Bin Liu
On Mon, Dec 17, 2018 at 07:16:08PM +, Måns Rullgård wrote: > Bin Liu writes: > > > Hi, > > > > On Mon, Dec 17, 2018 at 03:13:12PM +, Måns Rullgård wrote: > >> I have a strange problem with the musb driver in host mode on AM3358 > >> (beaglebone) hardware. If I connect a multi-port serial

Re: [PATCH v5 4/4] doc: usb: ci-hdrc-usb2: Add pinctrl properties for HSIC pin groups

2018-12-17 Thread Rob Herring
On Tue, 11 Dec 2018 02:09:04 +, Peter Chen wrote: > For USB HSIC, the data and strobe pin needs to be pulled down > at default, we consider it as "idle" state. When the USB host > is ready to be used, the strobe pin needs to be pulled up, > we consider it as "active" state. > > Signed-off-by:

Re: MUSB interrupt storm on device removal

2018-12-17 Thread Måns Rullgård
Bin Liu writes: > On Mon, Dec 17, 2018 at 07:16:08PM +, Måns Rullgård wrote: >> Bin Liu writes: >> >> > Hi, >> > >> > On Mon, Dec 17, 2018 at 03:13:12PM +, Måns Rullgård wrote: >> >> I have a strange problem with the musb driver in host mode on AM3358 >> >> (beaglebone) hardware. If I

Re: [PATCH v2 2/2] PCI: Override Synopsys USB 3.x HAPS device class

2018-12-17 Thread Bjorn Helgaas
On Mon, Dec 10, 2018 at 02:08:01PM -0800, Thinh Nguyen wrote: > Synopsys USB 3.x host HAPS platform has a class code of > PCI_CLASS_SERIAL_USB_XHCI, and xhci driver can claim it. However, these > devices should use dwc3-haps driver. Change these devices' class code to > PCI_CLASS_SERIAL_USB_DEVICE

Re: [PATCH] Prevent race condition between USB authorisation and USB discovery events

2018-12-17 Thread Andrew Worsley
On Tue, 18 Dec 2018 at 03:21, Alan Stern wrote: > > On Mon, 17 Dec 2018, Andrew Worsley wrote: > > > A sysfs driven USB authorisation change can trigger a usb_set_configuration > > while a hub_event worker thread is running. This can result in a USB device > > being disabled just after it was conf

[PATCH v2] cdc-acm: fix abnormal DATA RX issue for Mediatek Preloader.

2018-12-17 Thread Macpaul Lin
Mediatek Preloader is a proprietary embedded boot loader for loading Little Kernel and Linux into device DRAM. This boot loader also handle firmware update. Mediatek Preloader will be enumerated as a virtual COM port when the device is connected to Windows or Linux OS via CDC-ACM class driver. Whe

Re: getting around "Max number of devices this xHCI host supports is 32" limit

2018-12-17 Thread Marc MERLIN
On Mon, Dec 17, 2018 at 10:52:57AM -0500, Alan Stern wrote: > > Point taken. I think I was thinking about USB ports that were routed to > > either a xHCI or an EHCI chip depending on what's plugged into them, but > > seems that I didn't quite understand how that worked. > > It varies. For example