It add a remote wakeup pci quirk for some special AMD platforms. This quirk filters southbridge revision which is 0x39 or 0x3a. Signed-off-by: Huang Rui <ray.huang@xxxxxxx> --- drivers/usb/host/pci-quirks.c | 14 +++++++++++++- drivers/usb/host/pci-quirks.h | 1 + 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c index 2c76ef1..d440e73 100644 --- a/drivers/usb/host/pci-quirks.c +++ b/drivers/usb/host/pci-quirks.c @@ -140,9 +140,11 @@ int usb_amd_find_chipset_info(void) rev = info.smbus_dev->revision; if (rev >= 0x11 && rev <= 0x18) info.sb_type = 2; + if (rev >= 0x39 && rev <= 0x3a) + info.sb_type = 4; } - if (info.sb_type == 0) { + if (info.sb_type == 0 || info.sb_type == 4) { if (info.smbus_dev) { pci_dev_put(info.smbus_dev); info.smbus_dev = NULL; @@ -197,6 +199,16 @@ commit: } EXPORT_SYMBOL_GPL(usb_amd_find_chipset_info); +int usb_amd_remote_wakeup_quirk(void) +{ + if (amd_chipset.sb_type != 4) + return 0; + + printk(KERN_DEBUG "QUIRK: Enable AMD remote wakeup fix\n"); + return 1; +} +EXPORT_SYMBOL_GPL(usb_amd_remote_wakeup_quirk); + /* * The hardware normally enables the A-link power management feature, which * lets the system lower the power consumption in idle states. diff --git a/drivers/usb/host/pci-quirks.h b/drivers/usb/host/pci-quirks.h index ed6700d..e28bbbe 100644 --- a/drivers/usb/host/pci-quirks.h +++ b/drivers/usb/host/pci-quirks.h @@ -5,6 +5,7 @@ void uhci_reset_hc(struct pci_dev *pdev, unsigned long base); int uhci_check_and_reset_hc(struct pci_dev *pdev, unsigned long base); int usb_amd_find_chipset_info(void); +int usb_amd_remote_wakeup_quirk(void); void usb_amd_dev_put(void); void usb_amd_quirk_pll_disable(void); void usb_amd_quirk_pll_enable(void); -- 1.7.11.7 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html