From 3ad145b62a15c86150dd0cc229a39a3120d462f9 Mon Sep 17 00:00:00 2001 From: Huang Rui Date: Thu, 3 Oct 2013 23:37:12 +0800 Subject: usb: ehci: use amd_chipset_type to filter for usb subsystem hang bug Commit "usb: pci-quirks: refactor AMD quirk to abstract AMD chipset types" introduced a new AMD chipset type to filter AMD platforms with different chipsets. According to a recent thread [1], this patch updates USB subsystem hang symptom quirk which is observed on AMD all SB600 and SB700 revision 0x3a/0x3b. And make it use the new chipset type to represent. [1] http://marc.info/?l=linux-usb&m=138012321616452&w=2 Signed-off-by: Huang Rui Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman --- drivers/usb/host/pci-quirks.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'drivers/usb/host/pci-quirks.c') diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c index 9eec463c73c..138a55536d9 100644 --- a/drivers/usb/host/pci-quirks.c +++ b/drivers/usb/host/pci-quirks.c @@ -262,6 +262,19 @@ int usb_hcd_amd_remote_wakeup_quirk(struct pci_dev *pdev) } EXPORT_SYMBOL_GPL(usb_hcd_amd_remote_wakeup_quirk); +bool usb_amd_hang_symptom_quirk(void) +{ + u8 rev; + + usb_amd_find_chipset_info(); + rev = amd_chipset.sb_type.rev; + /* SB600 and old version of SB700 have hang symptom bug */ + return amd_chipset.sb_type.gen == AMD_CHIPSET_SB600 || + (amd_chipset.sb_type.gen == AMD_CHIPSET_SB700 && + rev >= 0x3a && rev <= 0x3b); +} +EXPORT_SYMBOL_GPL(usb_amd_hang_symptom_quirk); + /* * The hardware normally enables the A-link power management feature, which * lets the system lower the power consumption in idle states. -- cgit v1.2.3-70-g09d2