Re: [PATCH] usbnet: prevent device rpm suspend in usbnet_probe function

2016-11-09 Thread Kai-Heng Feng
Hi, On Wed, Nov 9, 2016 at 8:32 PM, Bjørn Mork wrote: > Oliver Neukum writes: > >> On Tue, 2016-11-08 at 13:44 -0500, Alan Stern wrote: >> >>> These problems could very well be caused by running at SuperSpeed >>> (USB-3) instead of high speed (USB-2). Yes, it's

Re: [PATCH] usbnet: prevent device rpm suspend in usbnet_probe function

2016-11-07 Thread Kai-Heng Feng
Hi, On Mon, Nov 7, 2016 at 7:02 PM, Oliver Neukum <oneu...@suse.com> wrote: > On Fri, 2016-11-04 at 17:57 +0800, Kai-Heng Feng wrote: >> Sometimes cdc_mbim failed to probe if runtime pm is enabled: >> [9.305626] cdc_mbim: probe of 2-2:1.12 failed with error -22 >

Re: cdc_mbim: probe of 2-2:1.12 failed with error -22

2016-11-16 Thread Kai-Heng Feng
On Wed, Nov 16, 2016 at 6:56 PM, Kai-Heng Feng <kai.heng.f...@canonical.com> wrote: > On Wed, Nov 16, 2016 at 6:47 PM, Greg KH <g...@kroah.com> wrote: >> On Wed, Nov 16, 2016 at 06:42:27PM +0800, Kai-Heng Feng wrote: >>> Originally I sent a not-working patch to the m

Re: cdc_mbim: probe of 2-2:1.12 failed with error -22

2016-11-16 Thread Kai-Heng Feng
On Wed, Nov 16, 2016 at 6:47 PM, Greg KH <g...@kroah.com> wrote: > On Wed, Nov 16, 2016 at 06:42:27PM +0800, Kai-Heng Feng wrote: >> Originally I sent a not-working patch to the mailing list [1], turns >> out the patch is far from correct. >> >> Bjørn Mork suggest

Re: [PATCH] usbnet: prevent device rpm suspend in usbnet_probe function

2016-11-16 Thread Kai-Heng Feng
On Mon, Nov 14, 2016 at 3:34 PM, Kai-Heng Feng <kai.heng.f...@canonical.com> wrote: > On Fri, Nov 11, 2016 at 10:44 PM, Mathias Nyman > <mathias.ny...@linux.intel.com> wrote: >> On 10.11.2016 13:22, Oliver Neukum wrote: >>> >>> On Thu, 2016-11-10 at 12

[PATCH] usbnet: prevent device rpm suspend in usbnet_probe function

2016-11-04 Thread Kai-Heng Feng
Sometimes cdc_mbim failed to probe if runtime pm is enabled: [9.305626] cdc_mbim: probe of 2-2:1.12 failed with error -22 This can be solved by increase its pm usage counter. Signed-off-by: Kai-Heng Feng <kai.heng.f...@canonical.com> --- drivers/net/usb/usbnet.c | 7 ++- 1 file c

[PATCH] usb: quirks: Add no-lpm quirk for Moshi USB to Ethernet Adapter

2017-08-04 Thread Kai-Heng Feng
The Realtek r8153 ethernet does not work on Genesys Logic hub, no-lpm quirk can make it work. Since another r8153 dongle at my hand does not have the issue, so add the quirk to the hub instead. Signed-off-by: Kai-Heng Feng <kai.heng.f...@canonical.com> --- drivers/usb/core/quirks.c | 3

[PATCH] usb: quirks: add delay init quirk for Corsair Strafe RGB keyboard

2017-08-15 Thread Kai-Heng Feng
the quirk for Corsair Strafe RGB. BugLink: https://bugs.launchpad.net/bugs/1678477 Signed-off-by: Kai-Heng Feng <kai.heng.f...@canonical.com> --- drivers/usb/core/quirks.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c index 574da2

Runtime PM enabled USB port no longer responses to hotplug after commit dec08194ff

2017-08-11 Thread Kai-Heng Feng
Hi, My ASUS PRIME B350M-A uses this XHCI chip: 03:00.0 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] USB 3.1 XHCI Controller [1022:43bb] (rev 02) ...which matches to the PCI_DEVICE_ID_AMD_PROMONTORYA_2. Revert commit dec08194ffeccfa1cf085906b53d301930eae18f ("xhci: Limit USB2 port

Re: [PATCH v2] usb: quirks: Add no-lpm quirk for Moshi USB to Ethernet Adapter

2017-08-08 Thread Kai-Heng Feng
On Tue, Aug 8, 2017 at 4:28 PM, Oliver Neukum <oneu...@suse.com> wrote: > Am Dienstag, den 08.08.2017, 14:32 +0800 schrieb Kai-Heng Feng: >> Moshi USB to Ethernet Adapter internally uses a Genesys Logic hub to >> connect to Realtek r8153. >> >> The Rea

[PATCH v2] usb: quirks: Add no-lpm quirk for Moshi USB to Ethernet Adapter

2017-08-08 Thread Kai-Heng Feng
-off-by: Kai-Heng Feng <kai.heng.f...@canonical.com> --- v2: Clarify that the adapter uses a hub internally. drivers/usb/core/quirks.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c index 3116edfcdc18..c96daf34431e 100644 --- a/d

[PATCH v3] usb: quirks: Add no-lpm quirk for Moshi USB to Ethernet Adapter

2017-08-08 Thread Kai-Heng Feng
instead. Signed-off-by: Kai-Heng Feng <kai.heng.f...@canonical.com> --- v3: Update comment to reflect the quirk is for the hub. v2: Clarify that the adapter uses a hub internally. drivers/usb/core/quirks.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb/core/quirks.c b/d

Re: [PATCH] usb: quirks: Add no-lpm quirk for Moshi USB to Ethernet Adapter

2017-08-07 Thread Kai-Heng Feng
On Mon, Aug 7, 2017 at 5:08 PM, Oliver Neukum <oneu...@suse.com> wrote: > Am Freitag, den 04.08.2017, 17:34 +0800 schrieb Kai-Heng Feng: >> The Realtek r8153 ethernet does not work on Genesys Logic hub, no-lpm >> quirk can make it work. > > So can you confirm it works wi

[PATCH] usb: xhci: Renesas uPD720202 needs short TX quirk

2017-08-17 Thread Kai-Heng Feng
? [77122.622952] handle_tx_event: 541 callbacks suppressed No more warning messages with XHCI_TRUST_TX_LENGTH applied. BugLink: https://bugs.launchpad.net/bugs/1710548 Signed-off-by: Kai-Heng Feng <kai.heng.f...@canonical.com> --- drivers/usb/host/xhci-pci.c | 4 +++- 1 file changed, 3 inse

Re: [PATCH] usb: xhci: Renesas uPD720202 needs short TX quirk

2017-08-18 Thread Kai-Heng Feng
Hi, On Fri, Aug 18, 2017 at 3:22 PM, Felipe Balbi <felipe.ba...@linux.intel.com> wrote: > > hi, > > Kai-Heng Feng <kai.heng.f...@canonical.com> writes: >> When plugging Logitech C920 webcam, warning messages filled up dmesg: >> [77117.655018] xhci_hcd

[PATCH] usb: host: ehci: workaround PME bug on AMD EHCI controller

2017-06-09 Thread Kai-Heng Feng
-by: Kai-Heng Feng <kai.heng.f...@canonical.com> --- drivers/usb/host/ehci-pci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c index 93326974ff4b..616685f83954 100644 --- a/drivers/usb/host/ehci-pci.c +++ b/drivers/usb/host/ehci

Re: [PATCH] usb: host: ehci: workaround PME bug on AMD EHCI controller

2017-06-19 Thread Kai-Heng Feng
On Tue, Jun 20, 2017 at 2:32 AM, Alan Stern wrote: > > It's possible that the test was invalid. Kai-Heng did not say whether > /sys/.../power/wakeup was set to "enabled" for both the EHCI controller > and the USB root hub beneath it, before the test was started. If >

Re: Runtime PM enabled EHCI does not respond to device plugging.

2017-05-23 Thread Kai-Heng Feng
On Tue, May 23, 2017 at 3:21 AM, Alan Stern <st...@rowland.harvard.edu> wrote: > On Mon, 22 May 2017, Kai-Heng Feng wrote: > >> So in order to detect SD card under runtime PM, it's a perfectly >> normal behavior, right? > > Yes. Thanks for the info. > >>

Re: Runtime PM enabled EHCI does not respond to device plugging.

2017-05-25 Thread Kai-Heng Feng
On Wed, May 24, 2017 at 11:34 PM, Alan Stern <st...@rowland.harvard.edu> wrote: > On Wed, 24 May 2017, Kai-Heng Feng wrote: > >> On Wed, May 24, 2017 at 12:43 AM, Alan Stern <st...@rowland.harvard.edu> >> wrote: >> >> >> >> Output of `

Re: Runtime PM enabled EHCI does not respond to device plugging.

2017-05-21 Thread Kai-Heng Feng
Hi, On Sat, May 20, 2017 at 12:13 AM, Alan Stern wrote: [snip] > > Your log shows that the 2-1.1 device is a USB2.0-CRW card reader, and > it uses the rtsx_usb driver. This driver probes the reader every few > seconds to see whether a card has been inserted (actually,

Re: Runtime PM enabled EHCI does not respond to device plugging.

2017-05-25 Thread Kai-Heng Feng
On Fri, May 26, 2017 at 1:01 AM, Alan Stern <st...@rowland.harvard.edu> wrote: > On Thu, 25 May 2017, Kai-Heng Feng wrote: > >> > My mistake; we need to see the information from "lspci -vv -s 00:12.0" >> > with two "v"'s, not just one. >> >

Runtime PM enabled EHCI does not respond to device plugging.

2017-05-18 Thread Kai-Heng Feng
Hi, This issue happens on Carrizo AMD laptops, only EHCI is affected, XHCI works fine on the same machine. I can see lots of USB wakeup and resume messages showed every two seconds. Plug USB devices to the EHCI port does not change anything. dmesg with ehci-hcd, ehci-pci and usbcore dynamic

Re: Runtime PM enabled EHCI does not respond to device plugging.

2017-05-24 Thread Kai-Heng Feng
On Wed, May 24, 2017 at 12:43 AM, Alan Stern wrote: >> >> Output of `cat /sys/kernel/debug/usb/usbmon/1u`: >> Runtime PM disabled as attachment. > > When you say "runtime PM disabled", you mean that it is disabled for > the EHCI controller but enabled for other devices,

Re: [PATCH] usb: host: ehci: workaround PME bug on AMD EHCI controller

2017-06-15 Thread Kai-Heng Feng
On Wed, Jun 14, 2017 at 1:28 AM, Bjorn Helgaas wrote: > > The lspci output [1] shows: > > 00:12.0 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB EHCI > Controller (rev 39) (prog-if 20 [EHCI]) > Capabilities: [c0] Power Management version 2 > Flags:

Re: [PATCH] usb: host: ehci: workaround PME bug on AMD EHCI controller

2017-06-15 Thread Kai-Heng Feng
On Thu, Jun 15, 2017 at 2:55 AM, Alan Stern <st...@rowland.harvard.edu> wrote: > On Tue, 13 Jun 2017, Bjorn Helgaas wrote: > >> [+cc Rafael, linux-pm] >> >> On Tue, Jun 13, 2017 at 12:21:15PM +0800, Kai-Heng Feng wrote: >> > On Mon, Jun 12, 2017 at 10:18 PM

Re: [PATCH] usb: host: ehci: workaround PME bug on AMD EHCI controller

2017-06-12 Thread Kai-Heng Feng
On Fri, Jun 9, 2017 at 10:43 PM, Alan Stern <st...@rowland.harvard.edu> wrote: > On Fri, 9 Jun 2017, Kai-Heng Feng wrote: > >> As Alan Stern points out [1], the PME signal is not enabled when >> controller is in D3, therefore it's not being woken up when ne

Re: [PATCH] usb: host: ehci: workaround PME bug on AMD EHCI controller

2017-06-15 Thread Kai-Heng Feng
On Thu, Jun 15, 2017 at 10:12 PM, Alan Stern <st...@rowland.harvard.edu> wrote: > On Thu, 15 Jun 2017, Kai-Heng Feng wrote: > >> On Wed, Jun 14, 2017 at 1:28 AM, Bjorn Helgaas <helg...@kernel.org> wrote: >> > >> > The lspci output [1] shows: >>

Re: [PATCH] usb: host: ehci: workaround PME bug on AMD EHCI controller

2017-06-16 Thread Kai-Heng Feng
On Fri, Jun 16, 2017 at 11:07 AM, Kai-Heng Feng <kai.heng.f...@canonical.com> wrote: > On Thu, Jun 15, 2017 at 10:12 PM, Alan Stern <st...@rowland.harvard.edu> > wrote: >> Those documents refer to a hardware bug with a workaround in the BIOS. >> Have you checked to

Re: [PATCH] usb: host: ehci: workaround PME bug on AMD EHCI controller

2017-06-18 Thread Kai-Heng Feng
On Sat, Jun 17, 2017 at 1:30 AM, Alan Stern <st...@rowland.harvard.edu> wrote: > On Sat, 17 Jun 2017, Kai-Heng Feng wrote: > >> On Fri, Jun 16, 2017 at 11:07 AM, Kai-Heng Feng >> <kai.heng.f...@canonical.com> wrote: >> > On Thu, Jun 15, 2017 at 10:12 PM

Re: [PATCH] usb: host: ehci: workaround PME bug on AMD EHCI controller

2017-06-12 Thread Kai-Heng Feng
; assert PME# from D3 when it should. For "lspci -vv" output, see > > http://marc.info/?l=linux-usb=149570231732519=2 > > On Mon, 12 Jun 2017, Kai-Heng Feng wrote: > >> On Mon, Jun 12, 2017 at 3:04 PM, Kai-Heng Feng >> <kai.heng.f...@canonical.com

Re: [PATCH] usb: host: ehci: workaround PME bug on AMD EHCI controller

2017-06-12 Thread Kai-Heng Feng
On Mon, Jun 12, 2017 at 3:04 PM, Kai-Heng Feng <kai.heng.f...@canonical.com> wrote: > On Fri, Jun 9, 2017 at 10:43 PM, Alan Stern <st...@rowland.harvard.edu> wrote: >> On Fri, 9 Jun 2017, Kai-Heng Feng wrote: >> >> Is this really the right solution?

Re: [PATCH] Revert "xhci: Limit USB2 port wake support for AMD Promontory hosts"

2017-09-15 Thread Kai-Heng Feng
On Mon, Aug 28, 2017 at 9:56 PM, Kai-Heng Feng <kai.heng.f...@canonical.com> wrote: > On Mon, Aug 28, 2017 at 6:14 PM, Mathias Nyman > <mathias.ny...@linux.intel.com> wrote: >> On 28.08.2017 12:29, Greg KH wrote: >> >> Adding more people who were involved in the

Re: [PATCH v6] xhci : AMD Promontory USB disable port support

2017-10-04 Thread Kai-Heng Feng
USB 2.0 ports in BIOSsettings, >> those ports will be enabled anyway after you remove a device on >> that port and re-plug it in again. It's a known limitation of the chip. >> As a workaround we can clear the PORT_WAKE_BITS. >> >> Signed-off-by: Joe Lee <asmt.sw...@gmail.com

Re: [PATCH v6] xhci : AMD Promontory USB disable port support

2017-09-26 Thread Kai-Heng Feng
BIOSsettings, >> those ports will be enabled anyway after you remove a device on >> that port and re-plug it in again. It's a known limitation of the chip. >> As a workaround we can clear the PORT_WAKE_BITS. >> >> Signed-off-by: Joe Lee <asmt.sw...@gmail.com> >>

[PATCH] Revert "xhci: Limit USB2 port wake support for AMD Promontory hosts"

2017-08-22 Thread Kai-Heng Feng
fected, so revert the commit. Conflicts: drivers/usb/host/xhci-pci.c drivers/usb/host/xhci.h Signed-off-by: Kai-Heng Feng <kai.heng.f...@canonical.com> --- drivers/usb/host/xhci-hub.c | 3 --- drivers/usb/host/xhci-pci.c | 12 drivers/usb/host/xhci.h | 2 +-

Re: [PATCH] usb: Add device quirk for Logitech HD Pro Webcam C920-C

2017-08-24 Thread Kai-Heng Feng
On Mon, Aug 21, 2017 at 6:03 PM, Dmitry Fleytman wrote: > Commit e0429362ab15 > ("usb: Add device quirk for Logitech HD Pro Webcams C920 and C930e") > introduced quirk to workaround an issue with some Logitech webcams. > > Apparently model C920-C has the same issue so applying

Re: [PATCH] Revert "xhci: Limit USB2 port wake support for AMD Promontory hosts"

2017-08-28 Thread Kai-Heng Feng
On Mon, Aug 28, 2017 at 6:14 PM, Mathias Nyman <mathias.ny...@linux.intel.com> wrote: > On 28.08.2017 12:29, Greg KH wrote: >> >> On Tue, Aug 22, 2017 at 05:14:47PM +0800, Kai-Heng Feng wrote: >>> >>> This reverts commit dec08194ffeccfa1cf085906b53d301930eae

Re: [PATCH] r8152: disable rx checksum offload on Dell TB dock

2017-11-28 Thread Kai Heng Feng
> On 27 Nov 2017, at 11:13 PM, > wrote: > > This is quite surprising to me too. The externally plugged in r8153 dongle, > was it connected over type C port or over type A port? AFAIK Type C port is > actually Alpine ridge pass through

Re: [PATCH] r8152: disable rx checksum offload on Dell TB dock

2017-11-24 Thread Kai Heng Feng
> On 24 Nov 2017, at 4:28 PM, Greg KH wrote: > > The bcdDevice is different between the dock device and the "real" > device, why not use that? Yea, I’ll poke around and see if bcdDevice alone can be a good predicate. > Then there is still a bug. Who as ASMedia is

Re: [PATCH] r8152: disable rx checksum offload on Dell TB dock

2017-11-24 Thread Kai Heng Feng
> Also the MAC address is different, can you just trigger off of Dell's > MAC address space instead of the address space of the dongle device? A really good idea, never thought of this. Thanks for the hint :) Still, I need to ask Dell folks to get all the answers. Kai-Heng -- To unsubscribe

Re: [PATCH] r8152: disable rx checksum offload on Dell TB dock

2017-11-23 Thread Kai Heng Feng
> On 23 Nov 2017, at 5:24 PM, Greg KH <gre...@linuxfoundation.org> wrote: > > On Thu, Nov 23, 2017 at 04:53:41PM +0800, Kai Heng Feng wrote: >> >> What I want to do here is to finding this connection: >> Realtek r8153 <-> SMSC hub (USD ID: 0424:5537)

Re: [PATCH] r8152: disable rx checksum offload on Dell TB dock

2017-11-23 Thread Kai Heng Feng
> On 23 Nov 2017, at 3:58 PM, Greg KH <gre...@linuxfoundation.org> wrote: > > On Thu, Nov 23, 2017 at 01:38:38AM -0500, Kai-Heng Feng wrote: >> r8153 on Dell TB dock corrupts rx packets. >> >> The root cause is not found yet, but disabling rx checksumming can &g

[PATCH] r8152: disable rx checksum offload on Dell TB dock

2017-11-22 Thread Kai-Heng Feng
bugs/1729674 Cc: Mario Limonciello <mario.limoncie...@dell.com> Signed-off-by: Kai-Heng Feng <kai.heng.f...@canonical.com> --- drivers/net/usb/r8152.c | 33 - 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/drivers/net/usb/r8152.c b/drive

Re: Several issues on AMD Promontory [1022:43bb]

2017-12-05 Thread Kai Heng Feng
> On 5 Dec 2017, at 4:52 PM, Joe Lee wrote: > > Hi Kai-Hen, > I want to know what this kernel version? v4.15-rc2. The issue happens on all kernel version though. > > >All three issue can still be reproduced with or without your patch, > >"[PATCH v8] xhci : AMD

Re: [PATCH] usb: Add device quirk for Logitech HD Pro Webcam C925e

2017-12-18 Thread Kai-Heng Feng
Hi, > On 19 Dec 2017, at 12:04 AM, Dmitry Fleytman > wrote: > > From: Dmitry Fleytman Dmitry Fleytman > > Commit e0429362ab15 > ("usb: Add device quirk for Logitech HD Pro Webcams C920 and C930e") > introduced quirk to workaround an

[PATCH 1/2] Revert "Bluetooth: btusb: fix QCA Rome suspend/resume"

2017-12-20 Thread Kai-Heng Feng
. Cc: sta...@vger.kernel.org Cc: Leif Liddy <leif.li...@gmail.com> Cc: Matthias Kaehlcke <m...@chromium.org> Cc: Brian Norris <briannor...@chromium.org> Cc: Daniel Drake <dr...@endlessm.com> Signed-off-by: Kai-Heng Feng <kai.heng.f...@canonical.com> --- Daniel, Cc you becau

[PATCH 2/2] usb: quirks: Add reset-resume quirk for Dell DW1820 QCA Rome Bluetooth

2017-12-20 Thread Kai-Heng Feng
<dr...@endlessm.com> Signed-off-by: Kai-Heng Feng <kai.heng.f...@canonical.com> --- drivers/usb/core/quirks.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c index a10b346b9777..96951104c45b 100644 --- a/drivers/usb/core/

[PATCH] usb: quirks: Add no-lpm quirk for KY-688 USB 3.1 Type-C Hub

2017-11-13 Thread Kai-Heng Feng
KY-688 USB 3.1 Type-C Hub internally uses a Genesys Logic hub to connect to Realtek r8153. Similar to commit ("7496cfe5431f2 usb: quirks: Add no-lpm quirk for Moshi USB to Ethernet Adapter"), no-lpm can make r8153 ethernet work. Signed-off-by: Kai-Heng Feng <kai.heng.f...@

[PATCH] usb: core: lower log level when device is not able to deal with string

2017-11-07 Thread Kai-Heng Feng
USB devices should work just fine when they don't support language id. Lower the log level so user won't panic in the future. BugLink: https://bugs.launchpad.net/bugs/1729618 Signed-off-by: Kai-Heng Feng <kai.heng.f...@canonical.com> --- drivers/usb/core/message.c | 2 +- 1 file chan

[PATCH] xhci: Fix front USB ports on ASUS PRIME B350M-A

2017-12-05 Thread Kai-Heng Feng
[ 549.116746] usb usb4: root hub lost power or was reset Based on previous guesswork, the issue can be workaround by doing PCI reset on [1b21:1343] (04:00.0). Cc: Joe Lee <asmt.sw...@gmail.com> Signed-off-by: Kai-Heng Feng <kai.heng.f...@canonical.com> --- drivers/pci/quirks.c | 2

Several issues on AMD Promontory [1022:43bb]

2017-12-03 Thread Kai-Heng Feng
Hi Joe, I’ve had several issues on AMD Promontory [1022:43bb] XHCI controller, apparently you are the right guy to ask ;) Board: ASUS PRIME B350M-A BIOS version: 3203 Here are the issues: 1. The port stops responding after plugging high speed devices several times. The XHCI resumes then

Re: [PATCH v2] usb: core: Add "quirks" parameter for usbcore

2017-12-06 Thread Kai Heng Feng
> On 6 Dec 2017, at 10:10 PM, Greg KH <gre...@linuxfoundation.org> wrote: > > On Wed, Dec 06, 2017 at 06:26:21PM +0800, Kai-Heng Feng wrote: >> Trying quirks in usbcore needs to rebuild the driver or the entire >> kernel if it's builtin. It can save a lot of

[PATCH] usb: core: Add "quirks" parameter for usbcore

2017-12-06 Thread Kai-Heng Feng
ce this new "dynamic" function. Now users can use "usbcore.quirks=" as short term workaround before the next kernel release. This is inspired by usbhid and usb-storage. Signed-off-by: Kai-Heng Feng <kai.heng.f...@canonical.com> --- Documentation/admin-guide/kernel-param

Re: [PATCH] usb: core: Add "quirks" parameter for usbcore

2017-12-06 Thread Kai Heng Feng
> On 6 Dec 2017, at 5:13 PM, Greg KH <gre...@linuxfoundation.org> wrote: > > On Wed, Dec 06, 2017 at 05:09:32PM +0800, Kai-Heng Feng wrote: >> +/* Works only for digits and letters, but small and fast */ >> +#define TOLOWER(x) ((x) | 0x20) > > What is wrong with

[PATCH v2] usb: core: Add "quirks" parameter for usbcore

2017-12-06 Thread Kai-Heng Feng
ce this new "dynamic" function. Now users can use "usbcore.quirks=" as short term workaround before the next kernel release. This is inspired by usbhid and usb-storage. Signed-off-by: Kai-Heng Feng <kai.heng.f...@canonical.com> --- v2: use in-kernel tolower() function.

Re: [PATCH] xhci: Fix front USB ports on ASUS PRIME B350M-A

2017-12-06 Thread Kai-Heng Feng
On Wed, Dec 6, 2017 at 1:14 AM, Bjorn Helgaas <helg...@kernel.org> wrote: > [+cc Rafael, linux-pm] > > On Wed, Dec 06, 2017 at 12:22:42AM +0800, Kai-Heng Feng wrote: >> The board in question has three XHCI HCs: >> 02:00.0 USB controller [0c03]: Advanced Micro Devices,

Re: [PATCH v2] r8152: disable RX aggregation on Dell TB16 dock

2018-01-18 Thread Kai Heng Feng
> On 18 Jan 2018, at 10:50 PM, David Miller wrote: > > From: Hayes Wang > Date: Thu, 18 Jan 2018 03:04:08 + > >> [...] r8153 on Dell TB15/16 dock corrupts rx packets. This change is suggested by Realtek. They guess that the XHCI

[PATCH v2] r8152: disable RX aggregation on Dell TB16 dock

2018-01-16 Thread Kai-Heng Feng
Limonciello <mario.limoncie...@dell.com> Signed-off-by: Kai-Heng Feng <kai.heng.f...@canonical.com> --- v2: - Disable RX aggregation instead of disable RX checksum - Use bcdDevice and iSerialNumber to uniquely identify Dell TB16 drivers/net/usb/r8152.c | 13 + 1 file

Re: [PATCH v2] r8152: disable RX aggregation on Dell TB16 dock

2018-01-17 Thread Kai Heng Feng
> On 18 Jan 2018, at 11:04 AM, Hayes Wang wrote: > > [...] >>> r8153 on Dell TB15/16 dock corrupts rx packets. >>> >>> This change is suggested by Realtek. They guess that the XHCI >>> controller doesn't have enough buffer, and their guesswork is correct, >>> once the RX

Re: [PATCH] Add delay-init quirk for Corsair K70 RGB keyboards

2018-02-04 Thread Kai Heng Feng
> On 2 Feb 2018, at 11:51 PM, JackStocker wrote: > > From: Jack Stocker > > Following on from this patch: https://lkml.org/lkml/2017/11/3/516, > Corsair K70 RGB keyboards also require the DELAY_INIT quirk to > start correctly at boot. > >

Re: [PATCH v2] Add delay-init quirk for Corsair K70 RGB keyboards

2018-02-04 Thread Kai Heng Feng
> On 5 Feb 2018, at 12:18 AM, JackStocker wrote: > > Do you mean like this? Yes, with proper commit message. > > Signed-off-by: JackStocker > --- > drivers/usb/core/quirks.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git

Paired bluetooth keyboards lead to system auto resume from S3 when WoL enabled for e1000e

2018-01-30 Thread Kai Heng Feng
Hi, This is actually a continuation of [1] with more findings. The machine in question is a CFL desktop. The auto resume roughly happens in 5 ~ 10 mins. After further digging, I found out that the e1000e and XHCI always shares the same wakeup count in /sys/kernel/debug/wakeup_sources, so I did

Re: [PATCH v2] xhci: Fix front USB ports on ASUS PRIME B350M-A

2018-02-20 Thread Kai-Heng Feng
> On 20 Feb 2018, at 4:24 PM, Mathias Nyman <mathias.ny...@linux.intel.com> > wrote: > > Hi > > On 19.02.2018 21:06, Kai-Heng Feng wrote: >> When a USB device gets plugged on ASUS PRIME B350M-A's front ports, the >> xHC stops working: >> [ 549.114587

[PATCH v2] xhci: Fix front USB ports on ASUS PRIME B350M-A

2018-02-19 Thread Kai-Heng Feng
(hcd_pci_runtime_suspend returned -110) Delay before running xHC command CMD_RUN can workaround the issue. Use a new quirk to make the delay only targets to the affected xHC. Signed-off-by: Kai-Heng Feng <kai.heng.f...@canonical.com> --- v2: Instead of doing xHC reset and disabling D3cold, a simple del

Re: [PATCH 1/2] Revert "Bluetooth: btusb: fix QCA Rome suspend/resume"

2018-01-02 Thread Kai Heng Feng
> On 21 Dec 2017, at 7:43 PM, Daniel Drake <dr...@endlessm.com> wrote: > > On Wed, Dec 20, 2017 at 6:53 PM, Brian Norris <briannor...@chromium.org> > wrote: >> >> On Wed, Dec 20, 2017 at 07:00:07PM +0800, Kai-Heng Feng wrote: >>> This commit causes

[PATCH v3] usb: core: Add "quirks" parameter for usbcore

2018-02-25 Thread Kai-Heng Feng
ce this new "dynamic" function. Now users can use "usbcore.quirks=" as short term workaround before the next kernel release. Also, the quirk parameter can XOR the builtin quirks for debugging purpose. This is inspired by usbhid and usb-storage. Signed-off-by: Kai-He

[PATCH 0/5 v3] Keep rtsx_usb suspended when there's no card

2018-07-25 Thread Kai-Heng Feng
Hi, This is based on Ulf's work [1] [2]. This patch series can keep rtsx_usb suspended, to save ~0.5W on Intel platforms and ~1.5W on AMD platforms. [1] https://patchwork.kernel.org/patch/10440583/ [2] https://patchwork.kernel.org/patch/10445725/ Kai-Heng Feng (5): misc: rtsx_usb: Use USB

[PATCH 3/5] memstick: rtsx_usb_ms: Use ms_dev() helper

2018-07-25 Thread Kai-Heng Feng
Use ms_dev() helper for consistency. Signed-off-by: Kai-Heng Feng --- drivers/memstick/host/rtsx_usb_ms.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/memstick/host/rtsx_usb_ms.c b/drivers/memstick/host/rtsx_usb_ms.c index 4f64563df7de..cd12f3d1c088 100644

[PATCH 2/5] memstick: Prevent memstick host from getting runtime suspended during card detection

2018-07-25 Thread Kai-Heng Feng
on, so the host can be inadvertently suspended. Increment rpm count before calling memstick_check(), and decrement rpm count afterward, as now we are sure the memstick host should be suspended or not. Signed-off-by: Kai-Heng Feng --- drivers/memstick/core/memstick.c | 4 1 file changed, 4

[PATCH 4/5] memstick: rtsx_usb_ms: Support runtime power management

2018-07-25 Thread Kai-Heng Feng
from kthread to delayed_work, which can be scheduled when the host is resumed and can be canceled when the host is suspended. Use an idle function check if there's no card and the power mode is MEMSTICK_POWER_OFF. If both criteria are met, put the device to suspend. Signed-off-by: Kai-Heng Feng

[PATCH 5/5] misc: rtsx_usb: / memstick: rtsx_usb_ms: Avoid long delay before system suspend

2018-07-25 Thread Kai-Heng Feng
There's a long power-on delay at the end of rtsx_usb_ms_set_param(). This delay is noticeable right before system suspend. To prevent already suspended memstick host from getting powered on by PM core, use DPM_FLAG_SMART_SUSPEND to avoid the situation. Signed-off-by: Kai-Heng Feng --- drivers

[PATCH 1/5] misc: rtsx_usb: Use USB remote wakeup signaling for card insertion detection

2018-07-25 Thread Kai-Heng Feng
Although rtsx_usb doesn't support card removal detection, card insertion will resume rtsx_usb by USB remote wakeup signaling. When rtsx_usb gets resumed, also resumes its child devices, rtsx_usb_sdmmc and rtsx_usb_ms, to notify them there's a card in its slot. Signed-off-by: Kai-Heng Feng

Re: [1/5] xhci: Fix perceived dead host due to runtime suspend race with event handler

2018-07-11 Thread Kai-Heng Feng
Hi Mathias, at 21:19, Mathias Nyman wrote: Don't rely on event interrupt (EINT) bit alone to detect pending port change in resume. If no change event is detected the host may be suspended again, oterwise roothubs are resumed. There is a lag in xHC setting EINT. If we don't notice the pending

Re: [PATCH v2] xhci: Fix front USB ports on ASUS PRIME B350M-A

2018-03-06 Thread Kai Heng Feng
Hi Matthias, Do you have any concern about this patch? Hopefully this can get merged for v4.16… Kai-Heng -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at

[PATCH v5] usb: core: Add "quirks" parameter for usbcore

2018-03-07 Thread Kai-Heng Feng
ce this new "dynamic" function. Now users can use "usbcore.quirks=" as short term workaround before the next kernel release. Also, the quirk parameter can XOR the builtin quirks for debugging purpose. This is inspired by usbhid and usb-storage. Signed-off-by: Kai-H

[PATCH v6] usb: core: Add "quirks" parameter for usbcore

2018-03-13 Thread Kai-Heng Feng
ce this new "dynamic" function. Now users can use "usbcore.quirks=" as short term workaround before the next kernel release. Also, the quirk parameter can XOR the builtin quirks for debugging purpose. This is inspired by usbhid and usb-storage. Signed-off-by: Kai-Heng Fen

Re: [PATCH 4/4] xhci: Fix front USB ports on ASUS PRIME B350M-A

2018-03-08 Thread Kai Heng Feng
Hi, On Mar 9, 2018, at 1:06 AM, Greg KH <gre...@linuxfoundation.org> wrote: On Thu, Mar 08, 2018 at 05:17:17PM +0200, Mathias Nyman wrote: From: Kai-Heng Feng <kai.heng.f...@canonical.com> When a USB device gets plugged on ASUS PRIME B350M-A's front ports, the xHC s

Re: [PATCH v6] usb: core: Add "quirks" parameter for usbcore

2018-03-13 Thread Kai Heng Feng
Matthew Wilcox <wi...@infradead.org> wrote: On Tue, Mar 13, 2018 at 03:26:19PM +0800, Kai-Heng Feng wrote: + usbcore.quirks= + [USB] A list of quirks entries to supplement or + override the built-in usb core quirk list.

Re: [PATCH] xhci: Fix USB ports for Dell Inspiron 5775

2018-04-09 Thread Kai Heng Feng
Hi Matthias, On Mar 18, 2018, at 11:11 PM, Kai-Heng Feng <kai.heng.f...@canonical.com> wrote: The Dell Inspiron 5775 is a Raven Ridge. The Enable Slot command timed out when a USB device gets plugged: [ 212.156326] xhci_hcd :03:00.3: Error while assigning device slot ID [ 212.

[PATCH] xhci: Fix USB ports for Dell Inspiron 5775

2018-03-18 Thread Kai-Heng Feng
-port3: couldn't allocate usb_device AMD suggests that a delay before xHC suspends can fix the issue. I can confirm it fixes the issue, so use the suspend delay quirk for Raven Ridge's xHC. Cc: sta...@vger.kernel.org Signed-off-by: Kai-Heng Feng <kai.heng.f...@canonical.com> --- drivers/us

[PATCH v7] usb: core: Add "quirks" parameter for usbcore

2018-03-19 Thread Kai-Heng Feng
ce this new "dynamic" function. Now users can use "usbcore.quirks=" as short term workaround before the next kernel release. Also, the quirk parameter can XOR the builtin quirks for debugging purpose. This is inspired by usbhid and usb-storage. Signed-off-by: Kai-Heng

Re: [PATCH v6] usb: core: Add "quirks" parameter for usbcore

2018-03-19 Thread Kai Heng Feng
Kai Heng Feng <kai.heng.f...@canonical.com> wrote: Matthew Wilcox <wi...@infradead.org> wrote: On Tue, Mar 13, 2018 at 03:26:19PM +0800, Kai-Heng Feng wrote: + usbcore.quirks= + [USB] A list of quirks entries to supplement or +

Re: [bug report] usb: core: Add "quirks" parameter for usbcore

2018-03-23 Thread Kai-Heng Feng
Hi Dan, Dan Carpenter <dan.carpen...@oracle.com> wrote: Hello Kai-Heng Feng, This is a semi-automatic email about new static checker warnings. I ran Smatch but didn't see the error message: $ make -j`nproc` CHECK="~/smatch/smatch -p=kernel" C=1 bzImage modules | tee wa

[PATCH 2/2] usb: core: Add USB_QUIRK_DELAY_CTRL_MSG to usbcore quirks

2018-03-23 Thread Kai-Heng Feng
There's a new quirk, USB_QUIRK_DELAY_CTRL_MSG. Add it to usbcore quirks for completeness. Signed-off-by: Kai-Heng Feng <kai.heng.f...@canonical.com> --- Documentation/admin-guide/kernel-parameters.txt | 4 +++- drivers/usb/core/quirks.c | 3 +++ 2 files chan

[PATCH 1/2] usb: core: Copy parameter string correctly and remove superfluous null check

2018-03-23 Thread Kai-Heng Feng
the superfluous null check. This is found by Smatch. Fixes: 027bd6cafd9a ("usb: core: Add "quirks" parameter for usbcore") Cc: Dan Carpenter <dan.carpen...@oracle.com> Signed-off-by: Kai-Heng Feng <kai.heng.f...@canonical.com> --- drivers/usb/core/quirks.c | 9 +++

[PATCH v4] usb: core: Add "quirks" parameter for usbcore

2018-02-26 Thread Kai-Heng Feng
ce this new "dynamic" function. Now users can use "usbcore.quirks=" as short term workaround before the next kernel release. Also, the quirk parameter can XOR the builtin quirks for debugging purpose. This is inspired by usbhid and usb-storage. Signed-off-by: Kai-Heng Feng

Re: [PATCH v3] usb: core: Add "quirks" parameter for usbcore

2018-02-25 Thread Kai-Heng Feng
On Sun, Feb 25, 2018 at 11:18 PM, Matthew Wilcox <wi...@infradead.org> wrote: > On Sun, Feb 25, 2018 at 08:38:33PM +0800, Kai-Heng Feng wrote: >> v2: Use in-kernel tolower() function. > > ... why are you using tolower at all? > > You've got 13 quirks already; you may nee

Re: [PATCH v4] usb: core: Add "quirks" parameter for usbcore

2018-02-28 Thread Kai Heng Feng
On 28 Feb 2018, at 10:47 PM, Matthew Wilcox <wi...@infradead.org> wrote: On Mon, Feb 26, 2018 at 11:04:57PM +0800, Kai-Heng Feng wrote: +static char quirks_param[128]; +module_param_string(quirks, quirks_param, sizeof(quirks_param), 0644); +MODULE_PARM_DESC(quirks, "Add/modify