[PATCH 1/8] xhci: remove the unused sw_lpm_support

2018-12-07 Thread Mathias Nyman
From: Zeng Tao It is introduced for the pre-0.96 xHC controllers, and the driver only support HW LPM for 1.0 and later controllers.It's not actually used now and is thought not to be used in the future any more, so just remove it. Signed-off-by: Zeng Tao Signed-off-by: Mathias Nyman

[PATCH 4/8] xhci: move usb3 speficic bits to own function in get_port_status call

2018-12-07 Thread Mathias Nyman
refactoring, no functional changes Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-hub.c | 68 ++--- 1 file changed, 40 insertions(+), 28 deletions(-) diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c index 5dba0a4..60aeff3

[PATCH 6/8] xhci: cleanup code that sets portstatus and portchange bits

2018-12-07 Thread Mathias Nyman
Group the code where the wPortstatus and wPortChange bits are set into one place. No functional changes Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-hub.c | 26 ++ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/drivers/usb/host/xhci-hub.c b

[PATCH 5/8] xhci: move usb2 speficic bits to own function in get_port_status call

2018-12-07 Thread Mathias Nyman
must have Port power bit set. Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-hub.c | 44 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c index 60aeff3..5af4f90 100644

[PATCH 8/8] xhci: move usb2 get port status link resume handling to its own function

2018-12-07 Thread Mathias Nyman
be set for all 'Enable' substates, including U0,U1,U2,U3 (suspended), Resume, and RExit states. Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-hub.c | 188 1 file changed, 104 insertions(+), 84 deletions(-) diff --git a/drivers/usb/host/xhci-hub.c

[PATCH 0/8] xhci features for usb-next

2018-12-07 Thread Mathias Nyman
Hi Greg This series for usb-next mostly about refactoring the xhci roothub side of the get_port_status request -Mathias Mathias Nyman (7): xhci: move bus_state structure under the xhci_hub structure. xhci: remove unused hcd_index() xhci: move usb3 speficic bits to own function

[PATCH 2/8] xhci: move bus_state structure under the xhci_hub structure.

2018-12-07 Thread Mathias Nyman
. No functional changes. Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-hub.c | 15 ++- drivers/usb/host/xhci-mem.c | 10 +- drivers/usb/host/xhci-ring.c | 2 +- drivers/usb/host/xhci.c | 19 ++- drivers/usb/host/xhci.h | 4 ++-- 5 files changed, 24

[PATCH 3/8] xhci: remove unused hcd_index()

2018-12-07 Thread Mathias Nyman
Now that each root hub has their own bus_state strucure the hcd_undex() used to get the correct bus_state strucure is no longer needed. No functional changes Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci.h | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/usb/host

[PATCH 7/8] xhci: refactor U0 link state handling in get_port_status

2018-12-07 Thread Mathias Nyman
Move U0 link state handing to USB3 and USB2 specific functions Note that bus_state->resuming_ports: bus_state->resume_done[]: are only used for USB2, and don't need to cleared for USB3 ports No functional changes Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-hub.

[PATCH 0/2] xhci fixes for usb-linus

2018-12-05 Thread Mathias Nyman
Hi Greg A couple patches for 4.20. Finally found a reason why devices attached after a high bandwidth USB3 isoc device may fail to enumerate with bandwidth error. Second patch is a quirk for AMD SNPS host specific suspend issue. -Mathias Mathias Nyman (1): xhci: Prevent U1/U2 link pm

[PATCH 1/2] xhci: workaround CSS timeout on AMD SNPS 3.0 xHC

2018-12-05 Thread Mathias Nyman
Signed-off-by: Sandeep Singh cc: Nehal Shah Cc: Tested-by: Kai-Heng Feng Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-pci.c | 4 drivers/usb/host/xhci.c | 26 ++ drivers/usb/host/xhci.h | 3 +++ 3 files changed, 29 insertions(+), 4 deletions

[PATCH 2/2] xhci: Prevent U1/U2 link pm states if exit latency is too long

2018-12-05 Thread Mathias Nyman
exit latency approaches the ESIT." Allowing too long exit latencies for periodic endpoint confuses xHC internal scheduling, and new devices may fail to enumerate with a "Not enough bandwidth for new device state" error from the host. Cc: Signed-off-by: Mathias Nyman --- drivers/

Re: USB driver resets

2018-12-04 Thread Mathias Nyman
On 03.12.2018 12:36, Richard van der Hoff wrote: Does anybody have any suggestions as to how I could set about debugging this? I'm seeing the same symptoms on a 4.19 kernel. On 19/11/2018 15:27, Richard van der Hoff wrote: I have a USB-3.1 dock, which I use for video (via displayport alt

[PATCH] usb: hub: delay hub autosuspend if USB3 port is still link training

2018-11-28 Thread Mathias Nyman
s set until the USB3 link training finishes. Catching the port in link training (polling) and adding the debounce delay prevents unnecessary failed attempts to autosuspend the hub. Signed-off-by: Mathias Nyman --- drivers/usb/core/hub.c | 10 ++ 1 file changed, 10 insertions(+) diff --gi

[PATCH 1/1] xhci: Prevent bus suspend if a port connect change or polling state is detected

2018-11-15 Thread Mathias Nyman
olling state in xhci_bus_suspend(). Don't do any port changes until all ports are checked, buffer all port changes and only write them in the end if suspend can proceed Cc: sta...@vger.kernel.org Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-hub.

[PATCH 0/1] xhci fix for usb-linus

2018-11-15 Thread Mathias Nyman
Hi Greg A case was found where USB3 devices fail to enumerate at boot. If a USB3 link is trained slowly then the roothub might autosuspend while device is just getting enabled. This patch fixes the issue -Mathias Mathias Nyman (1): xhci: Prevent bus suspend if a port connect change

Re: [PATCH] xhci: handle stop ep on invalid CStream

2018-11-14 Thread Mathias Nyman
Hi On 13.11.2018 08:48, Henry Lin wrote: Below Note in xHCI spec 6.4.2.1 describes a Transfer Event is generated for Stop Endpoint Command on invalid CStream: CStream is not valid until a Streams endpoint transitions to the Start Stream state for the first time. A Transfer Event generated by a

[PATCH 3/6] xhci: Add check for invalid byte size error when UAS devices are connected.

2018-11-12 Thread Mathias Nyman
heck which can prevent the invalid byte size error. [1] ade2e3a xhci: handle transfer events without TRB pointer Cc: Signed-off-by: Sandeep Singh cc: Nehal Shah cc: Shyam Sundar S K Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-ring.c | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH 5/6] usb: xhci: fix timeout for transition from RExit to U0

2018-11-12 Thread Mathias Nyman
Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-hub.c | 4 ++-- drivers/usb/host/xhci.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c index 60e4ac7..da98a11 100644 --- a/drivers/usb/host/xhci-hub.c +++ b

[PATCH 6/6] xhci: Add quirk to workaround the errata seen on Cavium Thunder-X2 Soc

2018-11-12 Thread Mathias Nyman
From our tests, retrying 4 times is sufficient. Add a new quirk flag XHCI_RESET_PLL_ON_DISCONNECT to invoke the workaround in handle_xhci_port_status(). Cc: sta...@vger.kernel.org Signed-off-by: George Cherian Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-pci.c | 5 + driver

[PATCH 2/6] xhci: handle port status events for removed USB3 hcd

2018-11-12 Thread Mathias Nyman
Cc: Reported-by: Peter Chen Tested-by: Jack Pham Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-ring.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index a8d92c9..80d464e 100644 --- a/drivers/usb/host/xhci-ring.c ++

[PATCH 1/6] xhci: Fix leaking USB3 shared_hcd at xhci removal

2018-11-12 Thread Mathias Nyman
ley Cc: Chunfeng Yun Cc: Thierry Reding Cc: Jianguo Sun Cc: Reported-by: Jack Pham Tested-by: Jack Pham Tested-by: Peter Chen Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-histb.c | 6 -- drivers/usb/host/xhci-mtk.c | 6 -- drivers/usb/host/xhci-pci.c | 1 + drivers/usb/host/x

[PATCH 0/6] xhci fixes for usb-linus

2018-11-12 Thread Mathias Nyman
Thunder-X2 Soc Mathias Nyman (2): xhci: Fix leaking USB3 shared_hcd at xhci removal xhci: handle port status events for removed USB3 hcd Sandeep Singh (1): xhci: Add check for invalid byte size error when UAS devices are connected. drivers/usb/host/xhci-histb.c | 6 -- drivers/usb

[PATCH 4/6] usb: xhci: fix uninitialized completion when USB3 port got wrong status

2018-11-12 Thread Mathias Nyman
, xhci_get_port_status will call an uninitialized completion in bus_state[0]. Kernel will hang because of NULL pointer. Restrict the USB2 resume status check in USB2 roothub to fix hang issue. Cc: sta...@vger.kernel.org Signed-off-by: Aaron Ma Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-hub.c | 2

Re: EPROTO when USB 3 GbE adapters are under load

2018-10-26 Thread Mathias Nyman
On 25.10.2018 20:28, Alan Stern wrote: On Thu, 25 Oct 2018, Mathias Nyman wrote: On 25.10.2018 12:52, Hao Wei Tee wrote: On 25/10/18 4:45 PM, Mathias Nyman wrote: Reproducing the issue with a recent kernel with xhci traces enabled should show the reason for EPROTO error. Add xhci traces

Re: EPROTO when USB 3 GbE adapters are under load

2018-10-25 Thread Mathias Nyman
On 25.10.2018 12:52, Hao Wei Tee wrote: On 25/10/18 4:45 PM, Mathias Nyman wrote: Reproducing the issue with a recent kernel with xhci traces enabled should show the reason for EPROTO error. Add xhci traces before triggering the issue with: mount -t debugfs none /sys/kernel/debug echo 81920

Re: EPROTO when USB 3 GbE adapters are under load

2018-10-25 Thread Mathias Nyman
On 25.10.2018 06:37, Hao Wei Tee wrote: Hi, There are multiple reports[1][2][3] (more elsewhere on the internet) of USB 3 GbE adapters throwing EPROTO errors on USB transfer especially when the devices are under load. Both of the two common chipsets (Realtek RTL8153 (r8152[4]) and Asix AX88179

Re: USB hotplug on HP 255 G6 laptop

2018-10-16 Thread Mathias Nyman
On 16.10.2018 14:38, Jan Kara wrote: On Wed 03-10-18 16:46:05, Jan Kara wrote: On Wed 03-10-18 17:19:33, Mathias Nyman wrote: On 02.10.2018 17:53, Jan Kara wrote: On Tue 02-10-18 17:01:54, Mathias Nyman wrote: On 02.10.2018 16:06, Jan Kara wrote: Hello, my wife has HP 255 G6 laptop. When

[PATCH 1/2] usb: xhci: tegra: Power-off power-domains on removal

2018-10-16 Thread Mathias Nyman
. Signed-off-by: Jon Hunter Acked-by: Thierry Reding Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-tegra.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/usb/host/xhci-tegra.c b/drivers/usb/host/xhci-tegra.c index 4ee510a..920a50a 100644 --- a/drivers/usb/host/xhci

[PATCH 0/2] xhci features for usb-next

2018-10-16 Thread Mathias Nyman
Hi Greg These two patches are part 2/5 and 3/5 of the Tegra xhci genpd support series. It's how Jon Hunter proposed them to be merged: " This series is making changes to more than one subsystem and at first glance may look like a maintainers nightmare. However, my proposal is this, once

[PATCH 2/2] usb: xhci: tegra: Add genpd support

2018-10-16 Thread Mathias Nyman
' property is present and otherwise we fall back to using the legacy Tegra APIs for managing the power-domains. Signed-off-by: Jon Hunter Acked-by: Thierry Reding Reviewed-by: Ulf Hansson Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-tegra.c | 89

Re: xHCI enable slot command if there are several ports connected

2018-10-10 Thread Mathias Nyman
On 09.10.2018 21:57, Alan Stern wrote: On Tue, 9 Oct 2018, Dmitry Malkin wrote: Hi guys, Could someone can give me a hint to this question: if there are multiple connected USB devices (multiple ports with set PORTSC.CCS bit) to xHCI and I issue the very first enable slot command which port

Re: USB hotplug on HP 255 G6 laptop

2018-10-03 Thread Mathias Nyman
On 02.10.2018 17:53, Jan Kara wrote: On Tue 02-10-18 17:01:54, Mathias Nyman wrote: On 02.10.2018 16:06, Jan Kara wrote: Hello, my wife has HP 255 G6 laptop. When it is attached to AC, everything works as expected however when it is running on battery, USB hotplug stops working - newly

Re: USB hotplug on HP 255 G6 laptop

2018-10-02 Thread Mathias Nyman
On 02.10.2018 16:06, Jan Kara wrote: Hello, my wife has HP 255 G6 laptop. When it is attached to AC, everything works as expected however when it is running on battery, USB hotplug stops working - newly plugged devices do not appear to be visible to the kernel. Only when the AC is plugged back

Re: USB ports on Thunderbolt 3 Dock always doesn't work after resume from suspend

2018-10-01 Thread Mathias Nyman
On 01.10.2018 10:17, Heikki Krogerus wrote: +Mika, Mathias On Sat, Sep 29, 2018 at 08:51:43AM +0200, Ondrej Holy wrote: Hi, I recently got new Lenovo Thinkpad T480s with the ThinkPad Thunderbolt 3 Dock. The USB ports (but probably also audio and ethernet) on the dock always don't work after

Re: [RFT PATCH 2/2] xhci: handle port status events for removed USB3 hcd

2018-10-01 Thread Mathias Nyman
On 28.09.2018 21:10, Jack Pham wrote: Hi Mathias, Jack, Peter, do these patches solve the remove issues you are seeing? At my two USB3 platforms, only apply the 1st patch can fix my problem. Maybe my USB3 port change interrupt occurs always before removing USB2 HCD. It's possible yes.

[PATCH v2 RESEND 2/3] usb: xhci-mtk: resume USB3 roothub first

2018-10-01 Thread Mathias Nyman
From: Chunfeng Yun Give USB3 devices a better chance to enumerate at USB3 speeds if they are connected to a suspended host. Porting from "671ffdff5b13 xhci: resume USB 3 roothub first" Cc: Signed-off-by: Chunfeng Yun Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-mtk.c |

Re: [PATCH v2 0/3] xhci fixes for usb-linus

2018-10-01 Thread Mathias Nyman
On 28.09.2018 15:51, Greg KH wrote: On Thu, Sep 20, 2018 at 06:43:19PM +0300, Mathias Nyman wrote: Hi Greg Second try, shuffling patches between for-usb-linus and for-usb-next A few patches that makes sure USB3 devices enumerate to correct speed after resume on Mediatek hosts, enables role

[PATCH v2 RESEND 3/3] usb: typec: pci: Enable Intel USB role mux on Apollo Lake platforms

2018-10-01 Thread Mathias Nyman
From: Heikki Krogerus Intel Apollo Lake has the same internal USB role mux as Intel Cherry Trail. Cc: Signed-off-by: Heikki Krogerus Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-pci.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/xhci

[PATCH v2 RESEND 1/3] xhci: Add missing CAS workaround for Intel Sunrise Point xHCI

2018-10-01 Thread Mathias Nyman
The workaround for missing CAS bit is also needed for xHC on Intel sunrisepoint PCH. For more details see: Intel 100/c230 series PCH specification update Doc #332692-006 Errata #8 Cc: Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-pci.c | 2 ++ 1 file changed, 2 insertions(+) diff

[PATCH v2 RESEND 0/3] xhci fixes for usb-linus

2018-10-01 Thread Mathias Nyman
Mathias Nyman (1): xhci: Add missing CAS workaround for Intel Sunrise Point xHCI drivers/usb/host/xhci-mtk.c | 4 ++-- drivers/usb/host/xhci-pci.c | 8 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) -- 2.7.4

Re: [RFT PATCH 2/2] xhci: handle port status events for removed USB3 hcd

2018-09-27 Thread Mathias Nyman
On 27.09.2018 19:26, Mathias Nyman wrote: At xhci removal the USB3 hcd (shared_hcd) is removed before the primary USB2 hcd. Interrupts for port status changes may still occur for USB3 ports after the shared_hcd is freed, causing NULL pointer dereference. Check if xhci->shared_hcd is st

[RFT PATCH 2/2] xhci: handle port status events for removed USB3 hcd

2018-09-27 Thread Mathias Nyman
Cc: Reported-by: Peter Chen Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-ring.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index f0a99aa..3d314b8 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/x

[RFT PATCH 1/2] xhci: Fix leaking USB3 shared_hcd at xhci removal

2018-09-27 Thread Mathias Nyman
ley Cc: Chunfeng Yun Cc: Thierry Reding Cc: Jianguo Sun Cc: Reported-by: Jack Pham Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-histb.c | 6 -- drivers/usb/host/xhci-mtk.c | 6 -- drivers/usb/host/xhci-pci.c | 1 + drivers/usb/host/xhci-plat.c | 6 -- drivers/usb/hos

Re: [PATCH 1/3] usb: host: xhci: fix oops when removing hcd

2018-09-26 Thread Mathias Nyman
Hi Jack, Peter On 24.09.2018 19:37, Jack Pham wrote: Hi Peter, On Fri, Sep 21, 2018 at 09:48:43AM +0800, Peter Chen wrote: Type-C-to-A cable, and the USB3 HCD has already been NULL at that time. The oops log like below: [681.782288] xhci-hcd xhci-hcd.1.auto: remove, state 1 [681.787490] usb

[PATCH v2 07/10] xhci: Use soft retry to recover faster from transaction errors

2018-09-20 Thread Mathias Nyman
. For more details on Soft retry see xhci specs 4.6.8.1 Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-ring.c | 19 +++ drivers/usb/host/xhci.h | 2 ++ 2 files changed, 21 insertions(+) diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index

[PATCH v2 03/10] usb: xhci-mtk: improve bandwidth scheduling

2018-09-20 Thread Mathias Nyman
From: Chunfeng Yun Mainly improve SuperSpeed ISOC bandwidth in last microframe, and LowSpeed/FullSpeed IN INT/ISOC bandwidth in split and idle microframes by introduing a bandwidth budget table; Signed-off-by: Chunfeng Yun Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-mtk-sch.c

[PATCH v2 00/10] xhci features for usb-next

2018-09-20 Thread Mathias Nyman
-mtk: supports bandwidth scheduling with multi-TT usb: xhci-mtk: supports SSP without external USB3 gen2 hub Mathias Nyman (2): xhci: Use soft retry to recover faster from transaction errors xhci-pci: allow host runtime PM as default for Intel Alpine and Titan Ridge Peter Chen (1): usb

[PATCH v2 09/10] usb: xhci: tegra: Firmware header is little endian

2018-09-20 Thread Mathias Nyman
-by: Thierry Reding Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-tegra.c | 52 +-- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/drivers/usb/host/xhci-tegra.c b/drivers/usb/host/xhci-tegra.c index 4b463e5..4ee510a 100644 --- a/drivers/usb

[PATCH v2 01/10] usb: xhci-mtk: use maximum ESIT payload of endpiont context

2018-09-20 Thread Mathias Nyman
From: Chunfeng Yun Make use of maximum ESIT payload of endpoint context to calculate the number of packets to send in each ESIT Signed-off-by: Chunfeng Yun Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-mtk-sch.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion

[PATCH v2 10/10] xhci: Avoid USB autosuspend when resuming USB2 ports.

2018-09-20 Thread Mathias Nyman
Gupta Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-hub.c | 5 + drivers/usb/host/xhci-ring.c | 1 + 2 files changed, 6 insertions(+) diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c index 7e2a531..12eea73 100644 --- a/drivers/usb/host/xhci-hub.c +++ b/drivers

[PATCH v2 08/10] xhci-pci: allow host runtime PM as default for Intel Alpine and Titan Ridge

2018-09-20 Thread Mathias Nyman
. Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-pci.c | 24 drivers/usb/host/xhci.h | 1 + 2 files changed, 25 insertions(+) diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c index 6372edf..9433e70 100644 --- a/drivers/usb/host/xhci-pci.c

[PATCH v2 02/10] usb: xhci-mtk: fix ISOC error when interval is zero

2018-09-20 Thread Mathias Nyman
From: Chunfeng Yun If the interval equal zero, needn't round up to power of two for the number of packets in each ESIT, so fix it. Signed-off-by: Chunfeng Yun Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-mtk-sch.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git

[PATCH v2 06/10] usb: host: xhci-plat: add platform TPL support

2018-09-20 Thread Mathias Nyman
From: Peter Chen The TPL support is used to identify targeted devices during EH2.0 and EH3.0 certification test, the user can add "tpl-support" at dts to enable this feature. Signed-off-by: Peter Chen Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-plat.c | 3 +++ 1 file

[PATCH v2 04/10] usb: xhci-mtk: supports bandwidth scheduling with multi-TT

2018-09-20 Thread Mathias Nyman
From: Chunfeng Yun Supports LowSpeed and FullSpeed INT/ISOC bandwidth scheduling with USB multi-TT Signed-off-by: Chunfeng Yun Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-mtk-sch.c | 247 ++-- drivers/usb/host/xhci-mtk.h | 21 2 files

[PATCH v2 05/10] usb: xhci-mtk: supports SSP without external USB3 gen2 hub

2018-09-20 Thread Mathias Nyman
From: Chunfeng Yun Supports SSP scheduling only for SSP device directly connected to root hub but not through external USB3 gen2 hub which need use a new scheduling way. Signed-off-by: Chunfeng Yun Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-mtk-sch.c | 17 +++-- 1

[PATCH v2 3/3] usb: typec: pci: Enable Intel USB role mux on Apollo Lake platforms

2018-09-20 Thread Mathias Nyman
From: Heikki Krogerus Intel Apollo Lake has the same internal USB role mux as Intel Cherry Trail. Cc: Signed-off-by: Heikki Krogerus Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-pci.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/xhci

[PATCH v2 0/3] xhci fixes for usb-linus

2018-09-20 Thread Mathias Nyman
USB3 roothub first usb: typec: pci: Enable Intel USB role mux on Apollo Lake platforms - Added stable tags Chunfeng Yun (1): usb: xhci-mtk: resume USB3 roothub first Heikki Krogerus (1): usb: typec: pci: Enable Intel USB role mux on Apollo Lake platforms Mathias Nyman (1): xhci: Add

[PATCH v2 2/3] usb: xhci-mtk: resume USB3 roothub first

2018-09-20 Thread Mathias Nyman
From: Chunfeng Yun Give USB3 devices a better chance to enumerate at USB3 speeds if they are connected to a suspended host. Porting from "671ffdff5b13 xhci: resume USB 3 roothub first" Cc: Signed-off-by: Chunfeng Yun Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-mtk.c |

[PATCH v2 1/3] xhci: Add missing CAS workaround for Intel Sunrise Point xHCI

2018-09-20 Thread Mathias Nyman
The workaround for missing CAS bit is also needed for xHC on Intel sunrisepoint PCH. For more details see: Intel 100/c230 series PCH specification update Doc #332692-006 Errata #8 Cc: Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-pci.c | 2 ++ 1 file changed, 2 insertions(+) diff

Re: [PATCH 2/3] xhci: Avoid USB autosuspend when resuming USB2 ports.

2018-09-17 Thread Mathias Nyman
On 14.09.2018 16:00, Greg KH wrote: On Fri, Sep 14, 2018 at 03:33:30PM +0300, Mathias Nyman wrote: From: Anshuman Gupta When USB bus host controller root hub resumes from autosuspend, it immediately tries to enter auto-suspend, but there can be a scenario when root hub is resuming its usb2

Re: [PATCH 07/10] usb: typec: pci: Enable Intel USB role mux on Apollo Lake platforms

2018-09-17 Thread Mathias Nyman
On 14.09.2018 16:27, Greg KH wrote: On Thu, Sep 13, 2018 at 03:24:00PM +0300, Mathias Nyman wrote: From: Heikki Krogerus Intel Apollo Lake has the same internal USB role mux as Intel Cherry Trail. Signed-off-by: Heikki Krogerus Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-pci.c

Re: [PATCH 3/3] xhci: Add missing CAS workaround for Intel Sunrise Point xHCI

2018-09-17 Thread Mathias Nyman
On 14.09.2018 16:01, Greg KH wrote: On Fri, Sep 14, 2018 at 03:33:31PM +0300, Mathias Nyman wrote: The workaround for missing CAS bit is also needed for xHC on Intel sunrisepoint PCH. For more details see: Intel 100/c230 series PCH specification update Doc #332692-006 Errata #8 Signed-off

Re: [PATCH 01/10] usb: xhci-mtk: resume USB3 roothub first

2018-09-17 Thread Mathias Nyman
On 14.09.2018 16:27, Greg KH wrote: On Thu, Sep 13, 2018 at 03:23:54PM +0300, Mathias Nyman wrote: From: Chunfeng Yun Give USB3 devices a better chance to enumerate at USB3 speeds if they are connected to a suspended host. Porting from "671ffdff5b13 xhci: resume USB 3 roothub first&quo

[PATCH 3/3] xhci: Add missing CAS workaround for Intel Sunrise Point xHCI

2018-09-14 Thread Mathias Nyman
The workaround for missing CAS bit is also needed for xHC on Intel sunrisepoint PCH. For more details see: Intel 100/c230 series PCH specification update Doc #332692-006 Errata #8 Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-pci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git

[PATCH 0/3] xhci fixes for usb-linus

2018-09-14 Thread Mathias Nyman
Hi Greg A few xhci fixes for usb-linus, two powermanagenet related tunings, and one xhci tegra sparse warning fix. -Mathias Anshuman Gupta (1): xhci: Avoid USB autosuspend when resuming USB2 ports. Mathias Nyman (1): xhci: Add missing CAS workaround for Intel Sunrise Point xHCI Thierry

[PATCH 2/3] xhci: Avoid USB autosuspend when resuming USB2 ports.

2018-09-14 Thread Mathias Nyman
Gupta Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-hub.c | 5 + drivers/usb/host/xhci-ring.c | 1 + 2 files changed, 6 insertions(+) diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c index 7e2a531..12eea73 100644 --- a/drivers/usb/host/xhci-hub.c +++ b/drivers

[PATCH 1/3] usb: xhci: tegra: Firmware header is little endian

2018-09-14 Thread Mathias Nyman
-by: Thierry Reding Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-tegra.c | 52 +-- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/drivers/usb/host/xhci-tegra.c b/drivers/usb/host/xhci-tegra.c index 4b463e5..4ee510a 100644 --- a/drivers/usb

[PATCH 04/10] usb: xhci-mtk: improve bandwidth scheduling

2018-09-13 Thread Mathias Nyman
From: Chunfeng Yun Mainly improve SuperSpeed ISOC bandwidth in last microframe, and LowSpeed/FullSpeed IN INT/ISOC bandwidth in split and idle microframes by introduing a bandwidth budget table; Signed-off-by: Chunfeng Yun Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-mtk-sch.c

[PATCH 10/10] xhci-pci: allow host runtime PM as default for Intel Alpine and Titan Ridge

2018-09-13 Thread Mathias Nyman
. Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-pci.c | 24 drivers/usb/host/xhci.h | 1 + 2 files changed, 25 insertions(+) diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c index aef66ad..213af17 100644 --- a/drivers/usb/host/xhci-pci.c

[PATCH 06/10] usb: xhci-mtk: supports SSP without external USB3 gen2 hub

2018-09-13 Thread Mathias Nyman
From: Chunfeng Yun Supports SSP scheduling only for SSP device directly connected to root hub but not through external USB3 gen2 hub which need use a new scheduling way. Signed-off-by: Chunfeng Yun Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-mtk-sch.c | 17 +++-- 1

[PATCH 08/10] usb: host: xhci-plat: add platform TPL support

2018-09-13 Thread Mathias Nyman
From: Peter Chen The TPL support is used to identify targeted devices during EH2.0 and EH3.0 certification test, the user can add "tpl-support" at dts to enable this feature. Signed-off-by: Peter Chen Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-plat.c | 3 +++ 1 file

[PATCH 09/10] xhci: Use soft retry to recover faster from transaction errors

2018-09-13 Thread Mathias Nyman
. For more details on Soft retry see xhci specs 4.6.8.1 Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-ring.c | 19 +++ drivers/usb/host/xhci.h | 2 ++ 2 files changed, 21 insertions(+) diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index

[PATCH 07/10] usb: typec: pci: Enable Intel USB role mux on Apollo Lake platforms

2018-09-13 Thread Mathias Nyman
From: Heikki Krogerus Intel Apollo Lake has the same internal USB role mux as Intel Cherry Trail. Signed-off-by: Heikki Krogerus Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-pci.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/xhci-pci.c

[PATCH 05/10] usb: xhci-mtk: supports bandwidth scheduling with multi-TT

2018-09-13 Thread Mathias Nyman
From: Chunfeng Yun Supports LowSpeed and FullSpeed INT/ISOC bandwidth scheduling with USB multi-TT Signed-off-by: Chunfeng Yun Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-mtk-sch.c | 247 ++-- drivers/usb/host/xhci-mtk.h | 21 2 files

[PATCH 02/10] usb: xhci-mtk: use maximum ESIT payload of endpiont context

2018-09-13 Thread Mathias Nyman
From: Chunfeng Yun Make use of maximum ESIT payload of endpoint context to calculate the number of packets to send in each ESIT Signed-off-by: Chunfeng Yun Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-mtk-sch.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion

[PATCH 01/10] usb: xhci-mtk: resume USB3 roothub first

2018-09-13 Thread Mathias Nyman
From: Chunfeng Yun Give USB3 devices a better chance to enumerate at USB3 speeds if they are connected to a suspended host. Porting from "671ffdff5b13 xhci: resume USB 3 roothub first" Signed-off-by: Chunfeng Yun Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-mtk.c | 4 ++

[PATCH 03/10] usb: xhci-mtk: fix ISOC error when interval is zero

2018-09-13 Thread Mathias Nyman
From: Chunfeng Yun If the interval equal zero, needn't round up to power of two for the number of packets in each ESIT, so fix it. Signed-off-by: Chunfeng Yun Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-mtk-sch.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git

[PATCH 00/10] xhci features for usb-next

2018-09-13 Thread Mathias Nyman
Intel USB role mux on Apollo Lake platforms Mathias Nyman (2): xhci: Use soft retry to recover faster from transaction errors xhci-pci: allow host runtime PM as default for Intel Alpine and Titan Ridge Peter Chen (1): usb: host: xhci-plat: add platform TPL support drivers/usb/host/xhci

Re: [PATCH 1/1] usb: host: xhci-plat: add platform TPL support

2018-09-13 Thread Mathias Nyman
On 13.09.2018 09:54, Peter Chen wrote: On Wed, Jul 18, 2018 at 2:45 PM Peter Chen wrote: The TPL support is used to identify targeted devices during EH2.0 and EH3.0 certification test, the user can add "tpl-support" at dts to enable this feature. Signed-off-by: Peter Chen ---

Re: Aw: Re: Fw: Re: keyboard-problem on bpi-r2 since 4.17

2018-09-04 Thread Mathias Nyman
On 04.09.2018 17:51, Frank Wunderlich wrote: this fixes the issue: adding the following lines to drivers/usb/host/xhci-mem.c line:1616 if (xhci->quirks & XHCI_MTK_HOST) { in_ep_ctx->reserved[0] = out_ep_ctx->reserved[0]; in_ep_ctx->reserved[1] = out_ep_ctx->reserved[1]; }

[PATCH] usb: Don't die twice if PCI xhci host is not responding in resume

2018-09-04 Thread Mathias Nyman
;) Signed-off-by: Mathias Nyman --- drivers/usb/core/hcd-pci.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c index 66fe1b7..0343246 100644 --- a/drivers/usb/core/hcd-pci.c +++ b/drivers/usb/core/hcd-pci.c @@ -515,8 +515,6 @@ static int

Re: Fw: Aw: Re: keyboard-problem on bpi-r2 since 4.17

2018-09-04 Thread Mathias Nyman
On 04.09.2018 16:14, Frank Wunderlich wrote: Hi, i got an info that my issue was caused by this commit: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=217491487c43892318c18b6dcafe33b6353efd40 Patch is in progress... That patch has been there since 4.13 If 4.16

[PATCH v2] usb: Avoid use-after-free by flushing endpoints early in usb_set_interface()

2018-09-03 Thread Mathias Nyman
the endpoints before calling usb_hcd_alloc_bandwidth() Additional checks in xhci driver will also be implemented to gracefully handle stale URB cancel on freed and re-allocated endpoints Cc: Reported-by: Sudip Mukherjee Signed-off-by: Mathias Nyman --- v2: update kerneldoc as well --- drivers/usb

Re: [PATCH] usb: Avoid use-after-free by flushing endpoints early in usb_set_interface()

2018-09-03 Thread Mathias Nyman
On 31.08.2018 17:39, Alan Stern wrote: On Fri, 31 Aug 2018, Mathias Nyman wrote: The steps taken by usb core to set a new interface is very different from what is done on the xHC host side. xHC hardware will do everything in one go. One command is used to set up new endpoints, free old

[PATCH 0/2] xhci fixes for usb-linus

2018-08-31 Thread Mathias Nyman
Mathias Nyman (1): xhci: Fix use after free for URB cancellation on a reallocated endpoint drivers/usb/host/xhci-plat.c | 27 --- drivers/usb/host/xhci.c | 30 ++ 2 files changed, 46 insertions(+), 11 deletions(-) -- 2.7.4

[PATCH 1/2] usb: host: xhci-plat: Iterate over parent nodes for finding quirks

2018-08-31 Thread Mathias Nyman
ent are correctly updated. Signed-off-by: Anurag Kumar Vulisha Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-plat.c | 27 --- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c index 8dc7

[PATCH 2/2] xhci: Fix use after free for URB cancellation on a reallocated endpoint

2018-08-31 Thread Mathias Nyman
to stop the ring. It would be useless. This can occur if endpoint is not flushed before it is dropped and re-added, which is the case in usb_set_interface() as xhci does things in an odd order. Cc: Tested-by: Sudip Mukherjee Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci.c | 30

[PATCH] usb: Avoid use-after-free by flushing endpoints early in usb_set_interface()

2018-08-31 Thread Mathias Nyman
the endpoints before calling usb_hcd_alloc_bandwidth() Additional checks in xhci driver will also be implemented to gracefully handle stale URB cancel on freed and re-allocated endpoints Cc: Reported-by: Sudip Mukherjee Signed-off-by: Mathias Nyman --- drivers/usb/core/message.c | 7 +++ 1 file

[PATCH 1/1] usb: xhci: Fix memory leak in xhci_endpoint_reset()

2018-07-20 Thread Mathias Nyman
From: Zheng Xiaowei If td_list is not empty the cfg_cmd will not be freed, call xhci_free_command to free it. Signed-off-by: Zheng Xiaowei Cc: Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/host/xhci.c b/drivers/usb

[PATCH 0/1] xhci fix for usb-linus

2018-07-20 Thread Mathias Nyman
Hi Greg Thanks for picking up xhci patches while I've been away This one small fix could be added to usb-linus still. -Mathias Zheng Xiaowei (1): usb: xhci: Fix memory leak in xhci_endpoint_reset() drivers/usb/host/xhci.c | 1 + 1 file changed, 1 insertion(+) -- 2.7.4 -- To unsubscribe

[PATCH 1/1] usb: xhci: dbc: Don't decrement runtime PM counter if DBC is not started

2018-07-02 Thread Mathias Nyman
only calls pm_runtime_put_sync() when dbc was started. Signed-off-by: Kai-Heng Feng Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-dbgcap.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/usb/host/xhci-dbgcap.c b/drivers/usb/host/xhci-dbgcap.c index

[PATCH 0/1] xhci fix for usb-linus

2018-07-02 Thread Mathias Nyman
Hi Greg A small fix for usb-linus making sure runtime PM get/put is balanced -Mathias Kai-Heng Feng (1): usb: xhci: dbc: Don't decrement runtime PM counter if DBC is not started drivers/usb/host/xhci-dbgcap.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) -- 2.7.4

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

2018-06-21 Thread Mathias Nyman
" Cc: Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci.c | 40 +--- drivers/usb/host/xhci.h | 4 2 files changed, 41 insertions(+), 3 deletions(-) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 8c8da2d..f11ec61 100644 ---

[PATCH 0/5] xhci fixes for usb-linus

2018-06-21 Thread Mathias Nyman
Hi Greg A few xhci fixes for usb-linus. Fixing a oops in xhci tracing, a race in S3 resume event handling, tegra runtime PM, and other small fixes. -Mathias Ajay Gupta (1): usb: xhci: increase CRS timeout value Dongjiu Geng (1): usb: xhci: remove the code build warning Mathias Nyman (1

[PATCH 3/5] usb: xhci: remove the code build warning

2018-06-21 Thread Mathias Nyman
] drivers/usb/host/xhci-tegra.c:482:6: note: 'err' was declared here Fixes: e84fce0f8837 ("usb: xhci: Add NVIDIA Tegra XUSB controller driver") Signed-off-by: Dongjiu Geng Acked-by: Thierry Reding Acked-by: Jon Hunter Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-tegra.c | 2

[PATCH 2/5] xhci: Fix kernel oops in trace_xhci_free_virt_device

2018-06-21 Thread Mathias Nyman
edge_irq+0x6d/0x180 [ 1092.335644] handle_irq+0x16/0x20 [ 1092.339417] do_IRQ+0x41/0xc0 [ 1092.342782] common_interrupt+0xf/0xf [ 1092.346955] Fixes: 44a182b9d177 ("xhci: Fix use-after-free in xhci_free_virt_device") Cc: Signed-off-by: Zhengjun Xing Signed-off-by: Mathias Nyma

[PATCH 5/5] usb: xhci: increase CRS timeout value

2018-06-21 Thread Mathias Nyman
-by: Nagaraj Annaiah Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index f11ec61..2f4850f 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -1078,8

[PATCH 4/5] usb: xhci: tegra: fix runtime PM error handling

2018-06-21 Thread Mathias Nyman
ner Acked-by: Jon Hunter Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-tegra.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/xhci-tegra.c b/drivers/usb/host/xhci-tegra.c index d50549f..4b463e5 100644 --- a/drivers/usb/host/xhci-tegra.c +++ b/driver

Re: [PATCH v3] usb: xhci: increase CRS timeout value

2018-06-19 Thread Mathias Nyman
On 12.06.2018 00:10, Ajay Gupta wrote: Some controllers take almost 55ms to complete controller restore state (CRS). There is no timeout limit mentioned in xhci specification so fixing the issue by increasing the timeout limit to 100ms Signed-off-by: Ajay Gupta Signed-off-by: Nagaraj Annaiah

  1   2   3   4   5   6   7   8   9   10   >