Skip to contentSkip to conversation

Patch "xhci: Fix sleeping with spin_lock_irq() held in ASmedia 1042A workaround" has been added to the 4.9-stable tree

PATCH [email protected] 1 participant 1 message Oct 9, 2017

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

xhci: Fix sleeping with spin_lock_irq() held in ASmedia 1042A workaround

to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
xhci-fix-sleeping-with-spin_lock_irq-held-in-asmedia-1042a-workaround.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 4ec1cd3eeeee7ccc35681270da028dbc29ca7bbd Mon Sep 17 00:00:00 2001

From: Mathias Nyman <[email protected]>
Date: Mon, 18 Sep 2017 17:39:17 +0300
Subject: xhci: Fix sleeping with spin_lock_irq() held in ASmedia 1042A workaround

From: Mathias Nyman <[email protected]>

commit 4ec1cd3eeeee7ccc35681270da028dbc29ca7bbd upstream.

The flow control workaround for ASM1042A xHC hosts sleeps between register polling. The workaround gets called in several places, among them with spin_lock_irq() held when xHC host is resumed or hoplug removed.

This was noticed as kernel panics at resume on a Dell XPS15 9550 with TB16 thunderbolt dock.

Avoid sleeping with spin_lock_irq() held, use udelay() instead

The original workaround was added to 4.9 and 4.12 stable releases, this patch needs to be applied to those as well.

Fixes 9da5a1092b13 ("xhci: Bad Ethernet performance plugged in ASM1042A host")
---
 drivers/usb/host/pci-quirks.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/host/pci-quirks.c +1 -1
@@ -447,7 +447,7 @@ static int usb_asmedia_wait_write(struct
 		if ((value & ASMT_CONTROL_WRITE_BIT) == 0)
 			return 0;
 
-		usleep_range(40, 60);
+		udelay(50);
 	}
 
 	dev_warn(&pdev->dev, "%s: check_write_ready timeout", __func__);

Patches currently in stable-queue which might be from [email protected] are

queue-4.9/xhci-fix-finding-correct-bus_state-structure-for-usb-3.1-hosts.patch queue-4.9/revert-xhci-limit-usb2-port-wake-support-for-amd-promontory-hosts.patch queue-4.9/xhci-set-missing-superspeedplus-link-protocol-bit-in-roothub-descriptor.patch queue-4.9/usb-pci-quirks.c-corrected-timeout-values-used-in-handshake.patch queue-4.9/xhci-fix-sleeping-with-spin_lock_irq-held-in-asmedia-1042a-workaround.patch