Re: [PATCH] USB/Gadget: Fix race between gether_disconnect and rx_submit

2019-10-21 Thread Felipe Balbi
Hi, kvaradarajan writes: > From: Kiruthika Varadarajan > > During gadget connection/disconnect several times panic observed. > > [ 64.723260] BUG: unable to handle kernel NULL pointer dereference at > 00f0 > [ 64.732040] IP: [] rx_fill+0x1ed/0x3b0 > [ 64.737984] PGD 6bece067 PUD

Re: NEC Corporation uPD720200 regression: intermittent WARN: xHC CMD_RUN timeout during suspend

2019-10-21 Thread Julian Sikorski
W dniu 20.10.2019 o 15:41, Julian Sikorski pisze: > Hi list, > > the issue was originally investigated at kernel bugzilla: > https://bugzilla.kernel.org/show_bug.cgi?id=204529 > > In brief, my laptop has started having issues suspending a few months > back. I have eventually managed to produce us

Re: problem with XHCI_SPURIOUS_WAKEUP quirk

2019-10-21 Thread Takashi Iwai
On Mon, 21 Oct 2019 20:14:19 +0200, Ross Zwisler wrote: > > Hi, > > I'm hitting an issue on a Broadwell based Chromebox that appears to be > related to the XHCI_SPURIOUS_WAKEUP quirk. > > Here are the reproduction steps: > > 1) Start with a fully booted system on a recent kernel. I've been > t

Re: [PATCH] PCI: increase D3 delay for AMD Ryzen5/7 XHCI controllers

2019-10-21 Thread Daniel Drake
On Mon, Oct 21, 2019 at 7:33 PM Mika Westerberg wrote: > Just to be sure, did you try the patch or just looked at it? Because > what the patch does is that it does the delay when the downstream/root > port is resumed, not the xHCI itself. I tried it, it didn't fix the problem. Daniel

Re: [PATCH 12/18] usb: typec: ucsi: acpi: Move to the new API

2019-10-21 Thread kbuild test robot
Hi Heikki, I love your patch! Perhaps something to improve: [auto build test WARNING on usb/usb-testing] [cannot apply to v5.4-rc4 next-20191021] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also suggest to use '--base'

RE: [PATCH 00/18] usb: typec: API improvements

2019-10-21 Thread Ajay Gupta
Hi Heikki, > -Original Message- > From: linux-usb-ow...@vger.kernel.org > On Behalf Of Heikki Krogerus > Sent: Monday, October 21, 2019 4:25 AM > To: Greg Kroah-Hartman > Cc: Guenter Roeck ; Ajay Gupta ; > linux-usb@vger.kernel.org > Subject: [PATCH 00/18] usb: typec: API improvements >

RE: [PATCH 14/18] usb: typec: ucsi: Remove the old API

2019-10-21 Thread Ajay Gupta
Hi Heikki, > -Original Message- > From: linux-usb-ow...@vger.kernel.org > On Behalf Of Heikki Krogerus > Sent: Monday, October 21, 2019 4:25 AM > To: Greg Kroah-Hartman > Cc: Guenter Roeck ; Ajay Gupta ; > linux-usb@vger.kernel.org > Subject: [PATCH 14/18] usb: typec: ucsi: Remove the ol

Re: [PATCH v3] usbip: tools: Fix read_usb_vudc_device() error path handling

2019-10-21 Thread shuah
On 10/17/19 9:22 PM, GwanYeong Kim wrote: This isn't really accurate right. fread() doesn't always return 0 in error. It could return < number of elements and set errno. Signed-off-by: GwanYeong Kim --- tools/usb/usbip/libsrc/usbip_device_driver.c | 6 -- 1 file changed, 4 insertions(+),

problem with XHCI_SPURIOUS_WAKEUP quirk

2019-10-21 Thread Ross Zwisler
Hi, I'm hitting an issue on a Broadwell based Chromebox that appears to be related to the XHCI_SPURIOUS_WAKEUP quirk. Here are the reproduction steps: 1) Start with a fully booted system on a recent kernel. I've been testing with v5.4-rc4. 2) Gracefully shut down the system, either with 'halt

Re: 5.3.6: I/O error on writing SD card via USB3

2019-10-21 Thread Alan Stern
On Mon, 21 Oct 2019, Harald Dunkel wrote: > Hi Alan, > > On 10/19/19 4:57 PM, Alan Stern wrote: > > > > What happens if you don't use that rather slow 133x SD card? Do other > > cards work better? > > > > No problem with a 32 GByte SDHC card (U1). > > > Another possibility: If you attach the

Re: 5.3.6: I/O error on writing SD card via USB3

2019-10-21 Thread Harald Dunkel
Hi Alan, On 10/19/19 4:57 PM, Alan Stern wrote: What happens if you don't use that rather slow 133x SD card? Do other cards work better? No problem with a 32 GByte SDHC card (U1). Another possibility: If you attach the card adapter by a USB-2 cable then it will run as a USB-2 device (even

[PATCH] usb-storage: Revert commit 747668dbc061 ("usb-storage: Set virt_boundary_mask to avoid SG overflows")

2019-10-21 Thread Alan Stern
Commit 747668dbc061 ("usb-storage: Set virt_boundary_mask to avoid SG overflows") attempted to solve a problem involving scatter-gather I/O and USB/IP by setting the virt_boundary_mask for mass-storage devices. However, it now turns out that this interacts badly with commit 09324d32d2a0 ("block: f

Re: [USB EHCI DRIVER] [Regression] EHCI no longer working in 5.4 series kernel

2019-10-21 Thread Arvind Sankar
On Mon, Oct 21, 2019 at 07:04:45AM +0200, Ben wrote: > Thanks, > > I could have sworn I checked lkml. Thanks for the fix! > > Any idea why only ehci is affected? > > Seems a bit odd, that's why I thought it would be a problem with usb driver. > I'm not sure -- in theory at least, it should aff

Re: [PATCH 11/18] usb: typec: ucsi: Simplified registration and I/O API

2019-10-21 Thread Heikki Krogerus
On Mon, Oct 21, 2019 at 06:17:30AM -0700, Guenter Roeck wrote: > On 10/21/19 4:25 AM, Heikki Krogerus wrote: > > Adding more simplified API for interface registration and > > read and write operations. > > > > The registration is split into separate creation and > > registration phases. That allow

RE: [PATCH 10/18] usb: typec: hd3ss3220: Give the connector fwnode to the port device

2019-10-21 Thread Biju Das
Hi Heikki, Thanks for the patch. > -Original Message- > From: Heikki Krogerus > Sent: Monday, October 21, 2019 12:25 PM > To: Greg Kroah-Hartman > Cc: Guenter Roeck ; Ajay Gupta ; > linux-usb@vger.kernel.org; Biju Das > Subject: [PATCH 10/18] usb: typec: hd3ss3220: Give the connector f

Re: [PATCH 11/18] usb: typec: ucsi: Simplified registration and I/O API

2019-10-21 Thread Guenter Roeck
On 10/21/19 4:25 AM, Heikki Krogerus wrote: Adding more simplified API for interface registration and read and write operations. The registration is split into separate creation and registration phases. That allows the drivers to properly initialize the interface before registering it if necessa

Re: [PATCH] PCI: increase D3 delay for AMD Ryzen5/7 XHCI controllers

2019-10-21 Thread Mika Westerberg
Hi, Sorry for the delay. I was on vacation last week. On Tue, Oct 15, 2019 at 01:31:32PM +0800, Daniel Drake wrote: > On Mon, Oct 14, 2019 at 11:43 PM Bjorn Helgaas wrote: > > Can you tell if this is because the Ryzen7 XHCI controller is out of > > spec, or is the Linux PCI core missing some del

[PATCH 09/18] usb: typec: Remove unused members from struct typec_capability

2019-10-21 Thread Heikki Krogerus
The members for the muxes are not used, so dropping them. Signed-off-by: Heikki Krogerus Reviewed-by: Guenter Roeck --- include/linux/usb/typec.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/linux/usb/typec.h b/include/linux/usb/typec.h index 894798084319..0f52723a11bd 100644 --

[PATCH 12/18] usb: typec: ucsi: acpi: Move to the new API

2019-10-21 Thread Heikki Krogerus
Replacing the old "cmd" and "sync" callbacks with an implementation of struct ucsi_operations. The ACPI notification (interrupt) handler will from now on read the CCI (Command Status and Connector Change Indication) register, and call ucsi_connector_change() function and/or complete pending command

[PATCH 07/18] usb: typec: hd3ss3220: Start using struct typec_operations

2019-10-21 Thread Heikki Krogerus
Supplying the operation callbacks as part of a struct typec_operations instead of as part of struct typec_capability during port registration. After this there is not need to keep the capabilities stored anywhere in the driver. Signed-off-by: Heikki Krogerus Reviewed-by: Guenter Roeck --- drive

[PATCH 18/18] usb: typec: ucsi: Optimise ucsi_unregister()

2019-10-21 Thread Heikki Krogerus
There is no need to reset the PPM when the interface is unregistered. Quietly silencing the notifications and then unregistering everything is enough. This speeds up ucsi_unregister() a lot. Signed-off-by: Heikki Krogerus --- drivers/usb/typec/ucsi/ucsi.c | 9 +++-- 1 file changed, 3 inserti

[PATCH 08/18] usb: typec: Remove the callback members from struct typec_capability

2019-10-21 Thread Heikki Krogerus
There are no more users for them. Signed-off-by: Heikki Krogerus Reviewed-by: Guenter Roeck --- drivers/usb/typec/class.c | 40 +++ include/linux/usb/typec.h | 17 - 2 files changed, 11 insertions(+), 46 deletions(-) diff --git a/drivers/usb/

[PATCH 13/18] usb: typec: ucsi: ccg: Move to the new API

2019-10-21 Thread Heikki Krogerus
Replacing the old "cmd" and "sync" callbacks with an implementation of struct ucsi_operations. The interrupt handler will from now on read the CCI (Command Status and Connector Change Indication) register, and call ucsi_connector_change() function and/or complete pending command completions based o

[PATCH 15/18] usb: typec: ucsi: Remove struct ucsi_control

2019-10-21 Thread Heikki Krogerus
That data structure was used for constructing the commands before executing them, but it was never really useful. Using the structure just complicated the driver. The commands are 64-bit wide, so it is enough to simply fill a u64 variable. No data structures needed. This simplifies the driver cons

[PATCH 16/18] usb: typec: ucsi: Remove all bit-fields

2019-10-21 Thread Heikki Krogerus
We can't use bit fields with data that is received or send to/from the device. Signed-off-by: Heikki Krogerus --- drivers/usb/typec/ucsi/trace.h | 12 ++--- drivers/usb/typec/ucsi/ucsi.c | 52 +++ drivers/usb/typec/ucsi/ucsi.h | 93 +- 3 files ch

[PATCH 11/18] usb: typec: ucsi: Simplified registration and I/O API

2019-10-21 Thread Heikki Krogerus
Adding more simplified API for interface registration and read and write operations. The registration is split into separate creation and registration phases. That allows the drivers to properly initialize the interface before registering it if necessary. The read and write operations are supplie

[PATCH 10/18] usb: typec: hd3ss3220: Give the connector fwnode to the port device

2019-10-21 Thread Heikki Krogerus
The driver already finds the node in order to get reference to the USB role switch. Signed-off-by: Heikki Krogerus Cc: Biju Das --- drivers/usb/typec/hd3ss3220.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/usb/typec/hd3ss3220.c b/drivers/usb/typec/hd

[PATCH 14/18] usb: typec: ucsi: Remove the old API

2019-10-21 Thread Heikki Krogerus
The drivers now only use the new API, so removing the old one. Signed-off-by: Heikki Krogerus --- drivers/usb/typec/ucsi/displayport.c | 24 +- drivers/usb/typec/ucsi/trace.h | 17 -- drivers/usb/typec/ucsi/ucsi.c| 345 +++ drivers/usb/typec/ucsi/ucsi.h

[PATCH 17/18] usb: typec: ucsi: New error codes

2019-10-21 Thread Heikki Krogerus
Adding new error codes to the driver that were introduced in UCSI specification v1.1. Signed-off-by: Heikki Krogerus --- drivers/usb/typec/ucsi/ucsi.c | 25 - drivers/usb/typec/ucsi/ucsi.h | 6 ++ 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/driver

[PATCH 03/18] usb: typec: Separate the operations vector

2019-10-21 Thread Heikki Krogerus
Introducing struct typec_operations which has the same callbacks as struct typec_capability. The old callbacks are kept for now, but after all users have been converted, they will be removed. Signed-off-by: Heikki Krogerus Reviewed-by: Guenter Roeck --- drivers/usb/typec/class.c | 39 ++

[PATCH 04/18] usb: typec: tcpm: Start using struct typec_operations

2019-10-21 Thread Heikki Krogerus
Supplying the operation callbacks as part of a struct typec_operations instead of as part of struct typec_capability during port registration. Signed-off-by: Heikki Krogerus Reviewed-by: Guenter Roeck --- drivers/usb/typec/tcpm/tcpm.c | 45 --- 1 file changed, 20

[PATCH 00/18] usb: typec: API improvements

2019-10-21 Thread Heikki Krogerus
Hi, The first patches in this series (patches 1-8) introduce a small change to the USB Type-C Connector Class API. Guenter was kind enough to go over those already. Patches 10-15 improve the ucsi driver API by introducing more traditional read and write routines, and the rest is more generic opti

[PATCH 01/18] usb: typec: Copy everything from struct typec_capability during registration

2019-10-21 Thread Heikki Krogerus
Copying everything from struct typec_capability to struct typec_port during port registration. This will make sure that under no circumstances the driver can change the values in the struct typec_capability that the port uses. Signed-off-by: Heikki Krogerus Reviewed-by: Guenter Roeck --- driver

[PATCH 06/18] usb: typec: ucsi: Start using struct typec_operations

2019-10-21 Thread Heikki Krogerus
Supplying the operation callbacks as part of a struct typec_operations instead of as part of struct typec_capability during port registration. Signed-off-by: Heikki Krogerus Reviewed-by: Guenter Roeck --- drivers/usb/typec/ucsi/ucsi.c | 22 +++--- 1 file changed, 11 insertions(+

[PATCH 05/18] usb: typec: tps6598x: Start using struct typec_operations

2019-10-21 Thread Heikki Krogerus
Supplying the operation callbacks as part of a struct typec_operations instead of as part of struct typec_capability during port registration. After this there is not need to keep the capabilities stored anywhere in the driver. Signed-off-by: Heikki Krogerus Reviewed-by: Guenter Roeck --- drive

[PATCH 02/18] usb: typec: Introduce typec_get_drvdata()

2019-10-21 Thread Heikki Krogerus
Leaving the private driver_data pointer of the port device to the port drivers. Signed-off-by: Heikki Krogerus Reviewed-by: Guenter Roeck --- drivers/usb/typec/class.c | 11 +++ include/linux/usb/typec.h | 4 2 files changed, 15 insertions(+) diff --git a/drivers/usb/typec/class.

Re: musb: cppi41: broken high speed FTDI functionality when connected to musb directly

2019-10-21 Thread Yegor Yefremov
Hi Tony, On Thu, Oct 3, 2019 at 10:39 AM Yegor Yefremov wrote: > > Hi Tony, > > On Wed, Oct 2, 2019 at 6:52 PM Tony Lindgren wrote: > > > > * Yegor Yefremov [191002 06:57]: > > > On Wed, Oct 2, 2019 at 12:03 AM Tony Lindgren wrote: > > > > The other way to fix this would be to just wake up cpp