Re: [PATCH] xhci-pci: Allow host runtime PM as default for Intel Alder Lake xHCI

2021-04-07 Thread Mathias Nyman
On 7.4.2021 2.35, Azhar Shaikh wrote: > From: Abhijeet Rao > > In the same way as Intel Tiger Lake TCSS (Type-C Subsystem) the Alder Lake > TCSS xHCI needs to be runtime suspended whenever possible to allow the > TCSS hardware block to enter D3cold and thus save energy. > > Signed-off-by:

Re: [PATCH 15/17] usb: xhci-mtk: support to build xhci-mtk-hcd.ko

2021-03-08 Thread Mathias Nyman
On 7.3.2021 18.00, Greg Kroah-Hartman wrote: > On Fri, Mar 05, 2021 at 05:02:53PM +0800, Chunfeng Yun wrote: >> Currently xhci-hcd.ko building depends on USB_XHCI_MTK, this >> is not flexible for some cases. For example: >> USB_XHCI_HCD is y, and USB_XHCI_MTK is m, then we can't >> implement

Re: [PATCH v2 15/18] usb: xhci-mtk: support to build xhci-mtk-hcd.ko

2021-03-08 Thread Mathias Nyman
host/xhci-mtk.c | 2 ++ > drivers/usb/host/xhci-mtk.h | 33 +++ > drivers/usb/host/xhci-ring.c| 1 - > drivers/usb/host/xhci.c | 30 + > drivers/usb/host/xhci.h | 8 ++ > 8 files changed, 64 insertions(+), 66 deletions(-) > Acked-by: Mathias Nyman

Re: [RFC PATCH] USB:XHCI:Modify XHCI driver for USB2.0 controller

2021-02-26 Thread Mathias Nyman
On 26.2.2021 10.21, Longfang Liu wrote: > Our current XHCI hardware controller has been customized to only > support USB 2.0 ports. When using the current xhci driver, an xhci > controller device and an ehci controller device will be created > automatically. We want the driver to create only one

Re: [PATCH] xhci-pci: Set AMD Renoir USB controller to D3 when shutdown

2021-02-10 Thread Mathias Nyman
On 9.2.2021 10.37, Greg Kroah-Hartman wrote: > On Fri, Feb 05, 2021 at 02:50:15PM +0800, Kai-Heng Feng wrote: >> On Fri, Feb 5, 2021 at 2:45 PM Aaron Ma wrote: >>> >>> >>> On 2/5/21 12:27 PM, Kai-Heng Feng wrote: Can you please test the following patch, which should address the root

Re: [RFC PATCH v2 2/3] usb: xhci-mtk: modify the SOF/ITP interval for mt8195

2021-02-08 Thread Mathias Nyman
On 7.2.2021 4.27, Chunfeng Yun wrote: > Hi Mathias, > > On Wed, 2021-02-03 at 18:26 +0800, Chunfeng Yun wrote: >> There are 4 USB controllers on MT8195, the controllers (IP1~IP3, >> exclude IP0) have a wrong default SOF/ITP interval which is >> calculated from the frame counter clock 24Mhz by

Re: [PATCH v2] usb: host: xhci: mvebu: make USB 3.0 PHY optional for Armada 3720

2021-02-03 Thread Mathias Nyman
: # 5.1+: ea17a0f153af: phy: marvell: comphy: >> Convert internal SMCC firmware return codes to errno >> Cc: # 5.1+: f768e718911e: usb: host: xhci-plat: add >> priv quirk for skip PHY initialization > > > Mathias, any objection for me taking this now to get into 5.11-final? > > thanks, > > greg k-h > No objections, looks good to me. Acked-by: Mathias Nyman

Re: [PATCH 0/4] add xhci hooks for USB offload

2021-01-27 Thread Mathias Nyman
On 28.1.2021 5.38, Howard Yen wrote: > On Tue, Jan 26, 2021 at 10:19 PM Greg KH wrote: >> >> On Fri, Jan 22, 2021 at 05:32:58PM +0200, Mathias Nyman wrote: >>> >>> Ok, before adding hooks like this I think we need to see how they are used. >>> Do you h

Re: [PATCH v6] usb: xhci-mtk: fix unreleased bandwidth data

2021-01-26 Thread Mathias Nyman
On 26.1.2021 16.13, Greg Kroah-Hartman wrote: > On Wed, Jan 13, 2021 at 06:05:11PM +0800, Ikjoon Jang wrote: >> xhci-mtk needs XHCI_MTK_HOST quirk functions in add_endpoint() and >> drop_endpoint() to handle its own sw bandwidth management. >> >> It stores bandwidth data into an internal table

Re: [PATCH 0/4] add xhci hooks for USB offload

2021-01-22 Thread Mathias Nyman
On 20.1.2021 12.04, Howard Yen wrote: > On Tue, Jan 19, 2021 at 8:47 PM Mathias Nyman wrote: >> >> On 19.1.2021 12.10, Howard Yen wrote: >>> To let the xhci driver support USB offload, add hooks for vendor to have >>> customized behavior for the initializa

Re: [PATCH 0/4] add xhci hooks for USB offload

2021-01-19 Thread Mathias Nyman
On 19.1.2021 12.10, Howard Yen wrote: > To let the xhci driver support USB offload, add hooks for vendor to have > customized behavior for the initialization, memory allocation, irq work, and > device context synchronization. Detail is in each patch commit message. Is this related to the usb

Re: [PATCH v2] usb: host: xhci-plat: fix support for XHCI_SKIP_PHY_INIT quirk

2021-01-15 Thread Mathias Nyman
On 14.1.2021 1.20, Pali Rohár wrote: > On Thursday 24 December 2020 05:59:05 Peter Chen wrote: >> On 20-12-23 17:18:47, Pali Rohár wrote: >>> Currently init_quirk callbacks for xhci platform drivers are called >>> xhci_plat_setup() function which is called after chip reset completes. >>> It

Re: [PATCH v5] usb: xhci-mtk: fix unreleased bandwidth data

2021-01-08 Thread Mathias Nyman
On 8.1.2021 8.11, Chunfeng Yun wrote: > On Thu, 2021-01-07 at 13:09 +0200, Mathias Nyman wrote: >> On 29.12.2020 8.24, Ikjoon Jang wrote: >>> xhci-mtk has hooks on add_endpoint() and drop_endpoint() from xhci >>> to handle its own sw bandwidth management

Re: [PATCH v5] usb: xhci-mtk: fix unreleased bandwidth data

2021-01-07 Thread Mathias Nyman
On 29.12.2020 8.24, Ikjoon Jang wrote: > xhci-mtk has hooks on add_endpoint() and drop_endpoint() from xhci > to handle its own sw bandwidth managements and stores bandwidth data > into internal table every time add_endpoint() is called, > so when bandwidth allocation fails at one endpoint, all

Re: How to enable auto-suspend by default

2020-11-24 Thread Mathias Nyman
On 23.11.2020 15.54, Hans de Goede wrote: > Hi, > > On 11/11/20 3:31 PM, Mika Westerberg wrote: >> On Wed, Nov 11, 2020 at 12:27:32PM +0100, Hans de Goede wrote: >>> Hi, >>> >>> On 11/10/20 6:25 PM, Mika Westerberg wrote: On Tue, Nov 10, 2020 at 04:02:33PM +, Limonciello, Mario wrote:

Re: 5.10 regression, many XHCI swiotlb buffer is full / DMAR: Device bounce map failed errors on thunderbolt connected XHCI controller

2020-11-24 Thread Mathias Nyman
On 24.11.2020 12.31, Hans de Goede wrote: > Hi, > > On 11/24/20 11:27 AM, Christoph Hellwig wrote: >> On Mon, Nov 23, 2020 at 03:49:09PM +0100, Hans de Goede wrote: >>> Hi, >>> >>> +Cc Christoph Hellwig >>> >>> Christoph, this is still an issue, so I've been looking around a bit and >>> think

Re: [PATCH v2] usb: xhci: Workaround for S3 issue on AMD SNPS 3.0 xHC

2020-10-26 Thread Mathias Nyman
On 23.10.2020 16.15, Sandeep Singh wrote: > From: Sandeep Singh > > On some platform of AMD, S3 fails with HCE and SRE errors. To fix this, > need to disable a bit which is enable in sparse controller. > > Signed-off-by: Sanket Goswami > Signed-off-by: Sandeep Singh > --- > Changes since

Re: [PATCH] usb: remove unneeded break

2020-10-26 Thread Mathias Nyman
On 19.10.2020 18.02, t...@redhat.com wrote: > From: Tom Rix > > A break is not needed if it is preceded by a return or goto > > Signed-off-by: Tom Rix > --- > drivers/usb/gadget/function/f_hid.c | 9 - > drivers/usb/host/xhci-mem.c | 1 - > drivers/usb/misc/iowarrior.c

Re: [PATCH] xhci: Fix sizeof() mismatch

2020-10-26 Thread Mathias Nyman
On 8.10.2020 20.11, Colin King wrote: > From: Colin Ian King > > An incorrect sizeof() is being used, sizeof(rhub->ports) is not > correct, it should be sizeof(*rhub->ports). This bug did not > cause any issues because it just so happens the sizes are the same. > > Addresses-Coverity: ("Sizeof

Re: [patch 05/12] usb: xhci: Remove in_interrupt() checks

2020-10-23 Thread Mathias Nyman
o sense. Simply return -ESHUTDOWN and > be done with it. > > Signed-off-by: Ahmed S. Darwish > Signed-off-by: Sebastian Andrzej Siewior > Signed-off-by: Thomas Gleixner > Cc: Mathias Nyman > Cc: Greg Kroah-Hartman > Cc: linux-...@vger.kernel.org > --- > drivers/usb/

Re: [PATCH v3] xhci: Prevent runtime suspend on Etron EJ168

2020-09-28 Thread Mathias Nyman
On 28.9.2020 12.10, Kai-Heng Feng wrote: > > >> On Jun 8, 2020, at 11:56, Kai-Heng Feng wrote: >> >> >> >>> On May 5, 2020, at 01:16, Kai-Heng Feng wrote: >>> >>> Etron EJ168 USB 3.0 Host Controller stops working after S3, if it was >>> runtime suspended previously: >>> [ 370.080359] pci

Re: [PATCH] xhci: workaround for S3 issue on AMD SNPS 3.0 xHC

2020-09-16 Thread Mathias Nyman
On 31.8.2020 9.52, Nehal Bakulchandra Shah wrote: > From: Nehal Bakulchandra Shah > > On some platform of AMD, S3 fails with HCE and SRE errors.To fix this, > sparse controller enable bit has to be disabled. > > Signed-off-by: Nehal Bakulchandra Shah > --- > drivers/usb/host/xhci-pci.c | 12

Re: [PATCH] xhci: workaround for S3 issue on AMD SNPS 3.0 xHC

2020-09-16 Thread Mathias Nyman
On 16.9.2020 11.06, Greg KH wrote: > On Mon, Aug 31, 2020 at 06:52:46AM +, Nehal Bakulchandra Shah wrote: >> From: Nehal Bakulchandra Shah >> >> On some platform of AMD, S3 fails with HCE and SRE errors.To fix this, >> sparse controller enable bit has to be disabled. >> >> Signed-off-by:

Re: kworker/0:3+pm hogging CPU

2020-08-31 Thread Mathias Nyman
On 29.8.2020 18.59, Alan Stern wrote: > On Sat, Aug 29, 2020 at 11:50:03AM +0200, Salvatore Bonaccorso wrote: >> Hi Alan, >> >> I'm following up on this thread because a user in Debian (Dirk, Cc'ed) >> as well encountered the same/similar issue: >> >> On Tue, Jul 21, 2020 at 10:33:25AM -0400, Alan

Re: [PATCH] xhci: Always restore EP_SOFT_CLEAR_TOGGLE even if ep reset failed

2020-08-21 Thread Mathias Nyman
On 21.8.2020 10.31, Greg KH wrote: > On Fri, Aug 21, 2020 at 03:06:52PM +0800, Ding Hui wrote: >> Some devices driver call libusb_clear_halt when target ep queue >> is not empty. (eg. spice client connected to qemu for usb redir) >> >> Before commit f5249461b504 ("xhci: Clear the host side toggle

Re: [PATCH] x86/hotplug: Silence APIC only after all irq's are migrated

2020-08-20 Thread Mathias Nyman
Fixes: 60dcaad5736f ("x86/hotplug: Silence APIC and NMI when CPU is dead") > Link: https://lore.kernel.org/lkml/875zdarr4h@nanos.tec.linutronix.de/ > Signed-off-by: Ashok Raj > > To: linux-kernel@vger.kernel.org > To: Thomas Gleixner > Cc: Sukumar Ghorai >

Re: [PATCH] xhci: Do warm-reset when both CAS and XDEV_RESUME are set

2020-08-11 Thread Mathias Nyman
On 10.8.2020 17.07, Kai-Heng Feng wrote: > Sometimes re-plugging a USB device during system sleep renders the device > useless: > [ 173.418345] xhci_hcd :00:14.0: Get port status 2-4 read: 0x14203e2, > return 0x10262 > ... > [ 176.496485] usb 2-4: Waited 2000ms for CONNECT > [ 176.496781]

Re: [PATCH v2 0/2] Small fixes for ASMedia host controllers

2020-07-28 Thread Mathias Nyman
0 +++--- >> 1 file changed, 7 insertions(+), 3 deletions(-) > > Mathias, any objection for me just taking these now? > No objection Acked-by: Mathias Nyman Note that I'll be away most of this and the the next week so response will be slow. Thanks -Mathias

Re: [PATCH 02/30] usb: host: pci-quirks: Demote function header from kerneldoc to comment block

2020-07-03 Thread Mathias Nyman
ch the other headers > in the file. > > Fixes the following W=1 kernel build warning: > > drivers/usb/host/pci-quirks.c:1145: warning: Function parameter or member > 'pdev' not described in 'quirk_usb_handoff_xhci' > > Cc: Mathias Nyman > Cc: Martin Mares > Cc

Re: [PATCH] xhci: Make debug message consistent with bus and port number

2020-06-30 Thread Mathias Nyman
On 30.6.2020 14.46, Kai-Heng Feng wrote: > >> >> Added to my for-usb-next branch, (which I'll need to rebase on 5.8-rc1 once >> released) > > Hmm, not seeing this patch from mainline, next or xhci tree.. > Apparently I never pushed it to kernel.org, now it should be in my for-usb-next branch

Re: XHCI vs PCM2903B/PCM2904 part 2

2020-06-30 Thread Mathias Nyman
On 30.6.2020 16.08, Rik van Riel wrote: > I misread the code, it's not a bitfield, so state 1 means an endpoint marked > with running state. The next urb is never getting a response, though. > > However, the xhci spec says an endpoint is halted upon a babble error. I was looking at the same, so

Re: [PATCH 2/2] xhci: Poll for U0 after disabling USB2 LPM

2020-06-23 Thread Mathias Nyman
On 19.6.2020 17.19, Kai-Heng Feng wrote: > Hi Mathias, > >> On Jun 9, 2020, at 18:15, Kai-Heng Feng wrote: >> >> >> >>> On Jun 8, 2020, at 19:21, Mathias Nyman >>> wrote: >>> >>> On 20.5.2020 13.18, Kai-Heng Feng wrote: &

Re: [PATCH v3 5/9] usb: xhci-pci: Add support for reset controllers

2020-06-15 Thread Mathias Nyman
Saenz Julienne Acked-by: Mathias Nyman

Re: [PATCH 1/2] xhci: Suspend ports to U3 directly from U1 or U2

2020-06-10 Thread Mathias Nyman
On 10.6.2020 18.43, Kai-Heng Feng wrote: > > >> On Jun 10, 2020, at 22:32, Alan Stern wrote: >> >> On Wed, Jun 10, 2020 at 02:42:30PM +0800, Kai-Heng Feng wrote: >>> xHCI spec "4.15.1 Port Suspend" states that port can be put to U3 as long >>> as Enabled bit is set and from U0, U1 or U2 state.

Re: [PATCH 2/2] xhci: Poll for U0 after disabling USB2 LPM

2020-06-08 Thread Mathias Nyman
On 20.5.2020 13.18, Kai-Heng Feng wrote: > USB2 devices with LPM enabled may interrupt the system suspend: > [ 932.510475] usb 1-7: usb suspend, wakeup 0 > [ 932.510549] hub 1-0:1.0: hub_suspend > [ 932.510581] usb usb1: bus suspend, wakeup 0 > [ 932.510590] xhci_hcd :00:14.0: port 9 not

Re: [PATCH] xhci: Make debug message consistent with bus and port number

2020-06-08 Thread Mathias Nyman
On 8.6.2020 6.57, Kai-Heng Feng wrote: > > >> On May 7, 2020, at 18:35, Mathias Nyman >> wrote: >> >> On 7.5.2020 11.21, Greg Kroah-Hartman wrote: >>> On Thu, May 07, 2020 at 03:58:36PM +0800, Kai-Heng Feng wrote: >>>> >>>> &

Re: [PATCH v4] usb: host: xhci-mtk: avoid runtime suspend when removing hcd

2020-06-04 Thread Mathias Nyman
On 4.6.2020 6.01, Macpaul Lin wrote: > When runtime suspend was enabled, runtime suspend might happen > when xhci is removing hcd. This might cause kernel panic when hcd > has been freed but runtime pm suspend related handle need to > reference it. > > Signed-off-by: Macpaul Lin > Reviewed-by:

Re: [PATCH] usb: host: xhci-mtk: avoid runtime suspend when removing hcd

2020-06-03 Thread Mathias Nyman
On 29.5.2020 7.29, Macpaul Lin wrote: > When runtime suspend was enabled, runtime suspend might happened > when xhci is removing hcd. This might cause kernel panic when hcd > has been freed but runtime pm suspend related handle need to > reference it. > > Change-Id:

Re: XHCI vs PCM2903B/PCM2904 part 2

2020-05-25 Thread Mathias Nyman
On 21.5.2020 6.45, Rik van Riel wrote: > On Wed, 2020-05-20 at 16:34 -0400, Alan Stern wrote: >> On Wed, May 20, 2020 at 03:21:44PM -0400, Rik van Riel wrote: >>> >>> Interesting. That makes me really curious why things are >>> getting stuck, now... >> >> This could be a bug in xhci-hcd. Perhaps

Re: XHCI vs PCM2903B/PCM2904 part 2

2020-05-20 Thread Mathias Nyman
On 20.5.2020 14.26, Rik van Riel wrote: > After a few more weeks of digging, I have come to the tentative > conclusion that either the XHCI driver, or the USB sound driver, > or both, fail to handle USB errors correctly. > > I have some questions at the bottom, after a (brief-ish) explanation >

Re: [PATCH] xhci: Fix log mistake of xhci_start

2020-05-15 Thread Mathias Nyman
On 15.5.2020 8.45, jiahao wrote: > It is obvious that XCHI_MAX_HALT_USEC is usec, > not milliseconds; Replace 'milliseconds' with > 'usec' of the debug message. > > Signed-off-by: jiahao > --- > drivers/usb/host/xhci.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git

Re: [PATCH v13 0/5] usb: xhci: Add support for Renesas USB controllers

2020-05-13 Thread Mathias Nyman
On 13.5.2020 15.40, Greg Kroah-Hartman wrote: > On Wed, May 13, 2020 at 03:19:29PM +0300, Mathias Nyman wrote: >> On 6.5.2020 9.00, Vinod Koul wrote: >>> This series add support for Renesas USB controllers uPD720201 and uPD720202. >>> These require firmware to be load

Re: [PATCH v13 5/5] usb: xhci: provide a debugfs hook for erasing rom

2020-05-13 Thread Mathias Nyman
On 6.5.2020 9.00, Vinod Koul wrote: > run "echo 1 > /sys/kernel/debug/renesas-usb/rom_erase" to erase > firmware when driver is loaded. > > Subsequent init of driver shall reload the firmware > > Signed-off-by: Vinod Koul > --- > drivers/usb/host/xhci-pci-renesas.c | 33

Re: [PATCH v13 0/5] usb: xhci: Add support for Renesas USB controllers

2020-05-13 Thread Mathias Nyman
On 6.5.2020 9.00, Vinod Koul wrote: > This series add support for Renesas USB controllers uPD720201 and uPD720202. > These require firmware to be loaded and in case devices have ROM those can > also be programmed if empty. If ROM is programmed, it runs from ROM as well. > > This includes patches

Re: [PATCH v8 4/4] USB: pci-quirks: Add Raspberry Pi 4 quirk

2020-05-13 Thread Mathias Nyman
gt;> Changes since v1: >> - Make RASPBERRYPI_FIRMWARE dependent on this quirk to make sure it >>gets compiled when needed. >> >> drivers/firmware/Kconfig | 3 ++- >> drivers/usb/host/pci-quirks.c | 16 >> 2 files changed, 18 insertions(+), 1 deletion(-) > > Hi Mathias, > > I would need your ACK to merge this series, thanks. > > Lorenzo Ah, yes, of course Acked-by: Mathias Nyman

Re: [PATCH] xhci: Make debug message consistent with bus and port number

2020-05-07 Thread Mathias Nyman
On 7.5.2020 11.21, Greg Kroah-Hartman wrote: > On Thu, May 07, 2020 at 03:58:36PM +0800, Kai-Heng Feng wrote: >> >> >>> On May 7, 2020, at 15:31, Greg Kroah-Hartman >>> wrote: >>> >>> On Thu, May 07, 2020 at 03:15:01PM +0800, Kai-Heng Feng wrote: > On May 7, 2020, at 14:45, Greg

Re: [PATCH v12 2/5] usb: renesas-xhci: Add the renesas xhci driver

2020-05-04 Thread Mathias Nyman
On 30.4.2020 19.59, Vinod Koul wrote: > From: Christian Lamparter > > This add a new driver for renesas xhci which is basically a firmware > loader for uPD720201 and uPD720202 w/o ROM. The xhci-pci driver will > invoke this driver for loading/unloading on relevant devices. > > This patch adds a

Re: [PATCH] xhci: Prevent runtime suspend all the time with XHCI_RESET_ON_RESUME quirk

2020-05-04 Thread Mathias Nyman
On 4.5.2020 13.02, Kai-Heng Feng wrote: > > >> On May 4, 2020, at 17:47, Oliver Neukum wrote: >> >> Am Montag, den 04.05.2020, 17:19 +0800 schrieb Kai-Heng Feng: >>> Etron EJ168 USB 3.0 Host Controller stops working after S3, if it was >>> runtime suspended previously: >>> [ 370.080359] pci

Re: [PATCH v11 2/5] usb: renesas-xhci: Add the renesas xhci driver

2020-04-30 Thread Mathias Nyman
On 30.4.2020 13.10, Vinod Koul wrote: > From: Christian Lamparter > > This add a new driver for renesas xhci which is basically a firmware > loader for uPD720201 and uPD720202 w/o ROM. It uses xhci-pci driver for > most of the work. > > This is added in Makefile before the xhci-pci driver so

Re: [PATCH v10 3/5] usb: xhci: Add support for Renesas controller with memory

2020-04-30 Thread Mathias Nyman
On 30.4.2020 9.20, Vinod Koul wrote: > On 29-04-20, 19:58, Vinod Koul wrote: >> On 29-04-20, 16:53, Mathias Nyman wrote: >>> On 24.4.2020 13.14, Vinod Koul wrote: > >>>>/* Prevent runtime suspending between USB-2 and USB-3 initialization */ >

Re: [PATCH v10 4/5] usb: renesas-xhci: Add ROM loader for uPD720201

2020-04-29 Thread Mathias Nyman
On 24.4.2020 13.14, Vinod Koul wrote: > uPD720201 supports ROM and allows software to program the ROM and boot > from it. Add support for detecting if ROM is present, if so load the ROM > if not programmed earlier. > > Signed-off-by: Vinod Koul > Cc: Yoshihiro Shimoda > Cc: Christian Lamparter

Re: [PATCH v10 3/5] usb: xhci: Add support for Renesas controller with memory

2020-04-29 Thread Mathias Nyman
On 24.4.2020 13.14, Vinod Koul wrote: > Some rensas controller like uPD720201 and uPD720202 need firmware to be > loaded. Add these devices in table and invoke renesas firmware loader > functions to check and load the firmware into device memory when > required. > > Signed-off-by: Vinod Koul >

Re: [PATCH] usb: xhci: fix Immediate Data Transfer endianness

2019-10-23 Thread Mathias Nyman
On 20.10.2019 4.53, Samuel Holland wrote: The arguments to queue_trb are always byteswapped to LE for placement in the ring, but this should not happen in the case of immediate data; the bytes copied out of transfer_buffer are already in the correct order. Add a complementary byteswap so the

Re: [PATCH v3] usb: Add a new quirk to let buggy hub enable and disable LPM during suspend and resume

2019-10-21 Thread Mathias Nyman
On 18.10.2019 21.59, Greg Kroah-Hartman wrote: On Thu, Oct 17, 2019 at 02:33:00PM +0800, Kai-Heng Feng wrote: On Oct 4, 2019, at 03:04, Alan Stern wrote: On Fri, 4 Oct 2019, Kai-Heng Feng wrote: Dell WD15 dock has a topology like this: /: Bus 04.Port 1: Dev 1, Class=root_hub,

Re: [PATCH] xhci: Don't use soft retry if slot id > 0

2019-10-14 Thread Mathias Nyman
On 13.10.2019 3.33, Bernhard Gebetsberger wrote: According to the xhci specification(chapter 4.6.8.1) soft retry shouldn't be used if the slot id is higher than 0. Currently some usb devices break on some systems because soft retry is being used when there is a transaction error, without

Re: [BISECTED] Suspend / USB broken on XPS 9370 + TB16

2019-10-07 Thread Mathias Nyman
On 7.10.2019 10.21, Carlo Caione wrote: Hi, I bisected an issue down to commit f7fac17ca925 "xhci: Convert xhci_handshake() to use readl_poll_timeout_atomic()". Setup: XPS 9370 + Thunderbolt dock Dell TB16 Issue: The laptop is unable to go to sleep. It never really goes to sleep and after a

Re: [PATCH v1 4/4] usb: host: xhci-tegra: Switch to use %ptT

2019-10-01 Thread Mathias Nyman
by Thierry Reding, so its more up to him Cc: Mathias Nyman Cc: Thierry Reding Cc: Jonathan Hunter Signed-off-by: Andy Shevchenko --- drivers/usb/host/xhci-tegra.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/usb/host/xhci-tegra.c b/drivers/usb/host/xhci

Re: [PATCH] xhci: Increase STS_SAVE timeout in xhci_suspend()

2019-09-27 Thread Mathias Nyman
On 26.9.2019 20.57, Kai-Heng Feng wrote: After commit f7fac17ca925 ("xhci: Convert xhci_handshake() to use readl_poll_timeout_atomic()"), ASMedia xHCI may fail to suspend. Although the algorithms are essentially the same, the old max timeout is (usec + usec * time of doing readl()), and the new

Re: [PATCH] xhci: fix memleak on setup address fails.

2019-08-30 Thread Mathias Nyman
On 26.8.2019 9.41, Ikjoon Jang wrote: On Wed, Aug 14, 2019 at 9:57 PM Mathias Nyman wrote: On 11.8.2019 11.22, Ikjoon Jang wrote: Xhci re-enables a slot on transaction error in set_address using xhci_disable_slot() + xhci_alloc_dev(). But in this case, xhci_alloc_dev() creates debugfs

Re: [PATCH v2 4/7] usb: mtk-xhci: support ip-sleep wakeup for MT8183

2019-08-29 Thread Mathias Nyman
On 28.8.2019 10.34, Chunfeng Yun wrote: Support USB wakeup by ip-sleep mode for MT8183, it's similar to MT8173 Signed-off-by: Chunfeng Yun Acked-by: Mathias Nyman

Re: [RESEND PATCH v2 2/2] usb: xhci-mtk: add an optional xhci_ck clock

2019-08-23 Thread Mathias Nyman
On 23.8.2019 9.40, Chunfeng Yun wrote: Some SoCs may have an optional clock xhci_ck (125M or 200M), it usually uses the same PLL as sys_ck, so support it. Signed-off-by: Chunfeng Yun Acked-by: Mathias Nyman

Re: [PATCH v4 2/4] usb: xhci: Use register defined and field names

2019-06-28 Thread Mathias Nyman
On 26.6.2019 10.55, Vinod Koul wrote: Instead of using register values and fields lets define them and use in the driver. Signed-off-by: Vinod Koul Cc: Yoshihiro Shimoda Cc: Christian Lamparter Tested-by: Christian Lamparter --- drivers/usb/host/xhci-pci.c | 60

Re: [PATCH v4 1/4] usb: xhci: add firmware loader for uPD720201 and uPD720202 w/o ROM

2019-06-28 Thread Mathias Nyman
On 26.6.2019 10.55, Vinod Koul wrote: From: Christian Lamparter This patch adds a firmware loader for the uPD720201K8-711-BAC-A and uPD720202K8-711-BAA-A variant. Both of these chips are listed in Renesas' R19UH0078EJ0500 Rev.5.00 "User's Manual: Hardware" as devices which need the firmware

Re: [PATCH] xhci: clear port_remote_wakeup after resume failure

2019-06-04 Thread Mathias Nyman
On 27.5.2019 14.28, Nicolas Saenz Julienne wrote: Hi Matthias, thanks for the review. On Mon, 2019-05-27 at 14:16 +0300, Mathias Nyman wrote: On 24.5.2019 17.52, Nicolas Saenz Julienne wrote: This was seen on a Dell Precision 5520 using it's WD15 dock. The dock's Ethernet device interfaces

Re: [PATCH v11 2/2] usb: xhci: Add Clear_TT_Buffer

2019-06-03 Thread Mathias Nyman
(2/2) at the same time: Acked-by: Mathias Nyman

Re: [PATCH] xhci: clear port_remote_wakeup after resume failure

2019-05-27 Thread Mathias Nyman
On 24.5.2019 17.52, Nicolas Saenz Julienne wrote: This was seen on a Dell Precision 5520 using it's WD15 dock. The dock's Ethernet device interfaces with the laptop through one of it's USB3 ports. While idle, the Ethernet device and HCD are suspended by runtime PM, being the only device

Re: [RFC] xhci: clear port_remote_wakeup on device disconnection

2019-03-20 Thread Mathias Nyman
On 19.3.2019 16.54, Nicolas Saenz Julienne wrote: Hi Oliver, thanks for the review! On Tue, 2019-03-19 at 12:01 +0100, Oliver Neukum wrote: On Mo, 2019-03-18 at 18:00 +0100, Nicolas Saenz Julienne wrote: This patch clears "port_remote_wakeup" upon detecting a device disconnection. Making sure

Re: Linux Kernel - problem

2019-03-04 Thread Mathias Nyman
On 4.3.2019 14.17, Cezary Lenkiewicz wrote: Hello, I have problem with Euphony system - this is linux for audio. I talking with Euphony support but they say that the problem is in the linux kernel. Please show my conversation with euphony:

Re: [PATCH] xhci: use iopoll for xhci_handshake

2019-02-28 Thread Mathias Nyman
On 28.2.2019 9.09, Greg Kroah-Hartman wrote: On Wed, Feb 27, 2019 at 03:19:17PM -0700, Daniel Kurtz wrote: In cases such as xhci_abort_cmd_ring(), xhci_handshake() is called with a spin lock held (and local interrupts disabled) with a huge 5 second timeout. This can translates to 5 million

Re: [PATCH 4.4 026/143] usb: hub: delay hub autosuspend if USB3 port is still link training

2019-02-19 Thread Mathias Nyman
ing the port in link training (polling) and adding the debounce delay prevents unnecessary failed attempts to autosuspend the hub. Signed-off-by: Mathias Nyman Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin We should be careful with this commit; it has caus

Re: [RFC PATCH 0/2] Fix for the internal card reader and suspend on MacBooks

2019-02-14 Thread Mathias Nyman
(attached) to see if it helps? Thanks -Mathias >From 6b3b9f3d41b8ac9cf993bf4b88a20e30c99e3b7f Mon Sep 17 00:00:00 2001 From: Mathias Nyman Date: Thu, 14 Feb 2019 15:40:12 +0200 Subject: [PATCH] usb: warm reset USB3 ports stuck in polling warm reset USB3 ports stuck in polling after 360ms. In the

Re: [PATCH 1/6] dt-bindings: usb: xhci-tegra: Add Tegra186 support

2019-02-13 Thread Mathias Nyman
| 4 1 file changed, 4 insertions(+) Hi Greg, Mathias, do you have any comments on this series or is it good to go into v5.1? xhci parts look good to me, (patches 2/6 and 3/6) Sorry about the delay. Acked-by: Mathias Nyman

Re: [PATCH 2/2] drivers: xhci: Add quirk to reset xHCI port PHY

2019-02-08 Thread Mathias Nyman
On 07.02.2019 17:17, Srinath Mannam wrote: Hi Mathias, Thanks for review, please see my comments below inline. On Thu, Feb 7, 2019 at 8:32 PM Mathias Nyman wrote: On 05.02.2019 08:18, Srinath Mannam wrote: Add a quirk to reset xHCI port PHY on port disconnect event. Stingray USB HS PHY has

Re: [PATCH 2/2] drivers: xhci: Add quirk to reset xHCI port PHY

2019-02-07 Thread Mathias Nyman
On 05.02.2019 08:18, Srinath Mannam wrote: Add a quirk to reset xHCI port PHY on port disconnect event. Stingray USB HS PHY has an issue, that USB High Speed device detected at Full Speed after the same port has connected to Full speed device. This problem can be resolved with that port PHY

Re: [PATCH] xhci: Use ffs() to find page size in xhci_mem_init()

2019-02-07 Thread Mathias Nyman
On 07.02.2019 12:58, Felipe Balbi wrote: Hi, Mathias Nyman writes: Get page size order using ffs() instead of open coding it with a loop. Signed-off-by: Andrey Smirnov Cc: Mathias Nyman Cc: Greg Kroah-Hartman Cc: linux-...@vger.kernel.org Cc: linux-kernel@vger.kernel.org --- drivers

Re: [PATCH] xhci: Use ffs() to find page size in xhci_mem_init()

2019-02-07 Thread Mathias Nyman
On 07.02.2019 11:06, Felipe Balbi wrote: Hi, Mathias Nyman writes: On 07.02.2019 02:03, Andrey Smirnov wrote: Get page size order using ffs() instead of open coding it with a loop. Signed-off-by: Andrey Smirnov Cc: Mathias Nyman Cc: Greg Kroah-Hartman Cc: linux-...@vger.kernel.org Cc

Re: [PATCH] xhci: Use ffs() to find page size in xhci_mem_init()

2019-02-07 Thread Mathias Nyman
On 07.02.2019 02:03, Andrey Smirnov wrote: Get page size order using ffs() instead of open coding it with a loop. Signed-off-by: Andrey Smirnov Cc: Mathias Nyman Cc: Greg Kroah-Hartman Cc: linux-...@vger.kernel.org Cc: linux-kernel@vger.kernel.org --- drivers/usb/host/xhci-mem.c | 6

Re: [PATCH] xhci: Convert xhci_handshake() to use readl_poll_timeout()

2019-02-07 Thread Mathias Nyman
On 07.02.2019 02:03, Andrey Smirnov wrote: Xhci_handshake() implements the algorithm already captured by readl_poll_timeout(). Convert the former to use the latter to avoid repetition. readl_poll_timeout() doesn't really work here as it might sleep. iopoll.h: /** * readx_poll_timeout -

Re: kernel: xhci_hcd 0000:00:14.0: ERROR unknown event type 37 - Kernel 4.19.13

2019-01-24 Thread Mathias Nyman
On 10.01.2019 00:11, Nathan Royce wrote: Wow, my system got wrecked (exaggeration) during this latest stretch... Pulseaudio was stretched to the limit and beyond and was forced to restart. Anything that was producing audio had to be restarted to get it back. This time was much like the first

Re: kernel: xhci_hcd 0000:00:14.0: ERROR unknown event type 37 - Kernel 4.19.13

2019-01-02 Thread Mathias Nyman
On 01.01.2019 20:57, Nathan Royce wrote: Kernel 4.19.13 00:14.0 USB controller: Intel Corporation 9 Series Chipset Family USB xHCI Controller Around 400 "unknown event type 37" messages logged in a 2 second span. * Jan 01 02:08:07 computername tvheadend[2370]: linuxdvb: Auvitek AU8522

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

2018-12-17 Thread Mathias Nyman
overrides to generic XHCI hc_driver ops */ Thanks, not sure how I missed that. Greg, in case you want to pick this simple fix to 4.20 still: Acked-by: Mathias Nyman Or prefer me to resend it? -Mathias

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

Re: [PATCH 4.19 014/110] usb: xhci: Prevent bus suspend if a port connect change or polling state is detected

2018-12-13 Thread Mathias Nyman
: Mathias Nyman commit 2f31a67f01a8beb22cae754c53522cb61a005750 upstream. [...] on a current Thinkpad X1 Yoga, this breaks resume from hibernate such that opening the lid has (in the regular use case, see below) no effect any more: The system is configured to hibernate when the lid is closed. So

Re: [PATCH v2] usb: xhci: fix small typo

2018-12-11 Thread Mathias Nyman
On 10.12.2018 18:34, Frank Lee wrote: ping.. Thanks Adding to queue for 4.22 -Mathias

Re: [PATCH] USB: quirks: add NO_LPM quirk for Logitech Flare|Meetup|Brio|Rally

2018-12-10 Thread Mathias Nyman
On 08.12.2018 00:18, Kyle Williams wrote: On Tue, Dec 04, 2018 at 04:36:18PM -0500, Alan Stern wrote: On Tue, 4 Dec 2018, Kyle Williams wrote: Description: Some USB device / host controller combinations seem to have problems with Link Power management. In particular it is described that the

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

2018-10-30 Thread Mathias Nyman
On 30.10.2018 12:48, Cherian, George wrote: Implement workaround for ThunderX2 Errata-129 (documented in CN99XX Known Issues" available at Cavium support site). As per ThunderX2errata-129, USB 2 device may come up as USB 1 if a connection to a USB 1 device is followed by another connection to a

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

2018-10-30 Thread Mathias Nyman
On 30.10.2018 12:48, Cherian, George wrote: Implement workaround for ThunderX2 Errata-129 (documented in CN99XX Known Issues" available at Cavium support site). As per ThunderX2errata-129, USB 2 device may come up as USB 1 if a connection to a USB 1 device is followed by another connection to a

Re: [PATCH V2 0/5] Tegra xHCI genpd support

2018-10-16 Thread Mathias Nyman
On 15.10.2018 15:40, Jon Hunter wrote: Hi Mathias, On 28/09/18 15:11, Jon Hunter wrote: This series add genpd support for the Tegra xHCI device that requires more than one power-domain to operate. This series is making changes to more than one subsystem and at first glance may look like a

Re: [PATCH V2 0/5] Tegra xHCI genpd support

2018-10-16 Thread Mathias Nyman
On 15.10.2018 15:40, Jon Hunter wrote: Hi Mathias, On 28/09/18 15:11, Jon Hunter wrote: This series add genpd support for the Tegra xHCI device that requires more than one power-domain to operate. This series is making changes to more than one subsystem and at first glance may look like a

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

2018-06-25 Thread Mathias Nyman
On 25.06.2018 08:20, Kai-Heng Feng wrote: pm_runtime_put_sync() gets called everytime in xhci_dbc_stop(). If dbc is not started, this makes the runtime PM counter incorrectly becomes 0, and calls autosuspend function. Then we'll keep seeing this: [54664.762220] xhci_hcd :00:14.0: Root hub

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

2018-06-25 Thread Mathias Nyman
On 25.06.2018 08:20, Kai-Heng Feng wrote: pm_runtime_put_sync() gets called everytime in xhci_dbc_stop(). If dbc is not started, this makes the runtime PM counter incorrectly becomes 0, and calls autosuspend function. Then we'll keep seeing this: [54664.762220] xhci_hcd :00:14.0: Root hub

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

2018-04-10 Thread Mathias Nyman
On 10.04.2018 07:56, Kai Heng Feng wrote: Hi Matthias, On Mar 18, 2018, at 11:11 PM, Kai-Heng Feng 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

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

2018-04-10 Thread Mathias Nyman
On 10.04.2018 07:56, Kai Heng Feng wrote: Hi Matthias, On Mar 18, 2018, at 11:11 PM, Kai-Heng Feng 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 [

Re: Intel GemniLake xHCI connected devices can never wake up the system from suspend

2018-03-16 Thread Mathias Nyman
Adding Rafael directly to CC In short, if _S3D and _S3W are missing in DSDT then a PCI device stays in D0 during suspend in Linux, but goes to D3 in Windows. USB wake doesn't work in Geminilake because of this. Should this be changed? reasoning below. On 16.03.2018 10:23, Daniel Drake wrote:

Re: Intel GemniLake xHCI connected devices can never wake up the system from suspend

2018-03-16 Thread Mathias Nyman
Adding Rafael directly to CC In short, if _S3D and _S3W are missing in DSDT then a PCI device stays in D0 during suspend in Linux, but goes to D3 in Windows. USB wake doesn't work in Geminilake because of this. Should this be changed? reasoning below. On 16.03.2018 10:23, Daniel Drake wrote:

Re: Intel GemniLake xHCI connected devices can never wake up the system from suspend

2018-03-15 Thread Mathias Nyman
On 15.03.2018 15:28, Chris Chiu wrote: On Thu, Mar 15, 2018 at 7:46 PM, Mathias Nyman <mathias.ny...@linux.intel.com> wrote: On 15.03.2018 06:40, Chris Chiu wrote: Hi, I have a ASUS AIO V222GA and another Acer Desktop XC-830 both have Intel CPU J5005 and they both hit the same p

Re: Intel GemniLake xHCI connected devices can never wake up the system from suspend

2018-03-15 Thread Mathias Nyman
On 15.03.2018 15:28, Chris Chiu wrote: On Thu, Mar 15, 2018 at 7:46 PM, Mathias Nyman wrote: On 15.03.2018 06:40, Chris Chiu wrote: Hi, I have a ASUS AIO V222GA and another Acer Desktop XC-830 both have Intel CPU J5005 and they both hit the same problem. The XHCI connected USB

Re: Intel GemniLake xHCI connected devices can never wake up the system from suspend

2018-03-15 Thread Mathias Nyman
On 15.03.2018 06:40, Chris Chiu wrote: Hi, I have a ASUS AIO V222GA and another Acer Desktop XC-830 both have Intel CPU J5005 and they both hit the same problem. The XHCI connected USB keyboard/mouse can never wakeup the system from suspend. It reminds me that similiar thing happens on

Re: Intel GemniLake xHCI connected devices can never wake up the system from suspend

2018-03-15 Thread Mathias Nyman
On 15.03.2018 06:40, Chris Chiu wrote: Hi, I have a ASUS AIO V222GA and another Acer Desktop XC-830 both have Intel CPU J5005 and they both hit the same problem. The XHCI connected USB keyboard/mouse can never wakeup the system from suspend. It reminds me that similiar thing happens on

Re: [PATCH 2/3] usb: xhci: tegra: Add runtime PM support

2018-03-09 Thread Mathias Nyman
On 09.03.2018 10:36, Thierry Reding wrote: On Thu, Mar 08, 2018 at 09:31:07PM +, Jon Hunter wrote: On 01/03/18 14:18, Mathias Nyman wrote: On 14.02.2018 18:34, Jon Hunter wrote: Add runtime PM support to the Tegra XHCI driver and move the function calls to enable/disable the clocks

  1   2   3   4   5   6   7   8   9   10   >