diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/pci/quirks.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 81d19d5683ac..8284958fc530 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c | |||
@@ -1977,11 +1977,25 @@ static void __devinit quirk_via_cx700_pci_parking_caching(struct pci_dev *dev) | |||
1977 | /* | 1977 | /* |
1978 | * Disable PCI Bus Parking and PCI Master read caching on CX700 | 1978 | * Disable PCI Bus Parking and PCI Master read caching on CX700 |
1979 | * which causes unspecified timing errors with a VT6212L on the PCI | 1979 | * which causes unspecified timing errors with a VT6212L on the PCI |
1980 | * bus leading to USB2.0 packet loss. The defaults are that these | 1980 | * bus leading to USB2.0 packet loss. |
1981 | * features are turned off but some BIOSes turn them on. | 1981 | * |
1982 | * This quirk is only enabled if a second (on the external PCI bus) | ||
1983 | * VT6212L is found -- the CX700 core itself also contains a USB | ||
1984 | * host controller with the same PCI ID as the VT6212L. | ||
1982 | */ | 1985 | */ |
1983 | 1986 | ||
1987 | /* Count VT6212L instances */ | ||
1988 | struct pci_dev *p = pci_get_device(PCI_VENDOR_ID_VIA, | ||
1989 | PCI_DEVICE_ID_VIA_8235_USB_2, NULL); | ||
1984 | uint8_t b; | 1990 | uint8_t b; |
1991 | |||
1992 | /* p should contain the first (internal) VT6212L -- see if we have | ||
1993 | an external one by searching again */ | ||
1994 | p = pci_get_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8235_USB_2, p); | ||
1995 | if (!p) | ||
1996 | return; | ||
1997 | pci_dev_put(p); | ||
1998 | |||
1985 | if (pci_read_config_byte(dev, 0x76, &b) == 0) { | 1999 | if (pci_read_config_byte(dev, 0x76, &b) == 0) { |
1986 | if (b & 0x40) { | 2000 | if (b & 0x40) { |
1987 | /* Turn off PCI Bus Parking */ | 2001 | /* Turn off PCI Bus Parking */ |
@@ -2008,7 +2022,7 @@ static void __devinit quirk_via_cx700_pci_parking_caching(struct pci_dev *dev) | |||
2008 | } | 2022 | } |
2009 | } | 2023 | } |
2010 | } | 2024 | } |
2011 | DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_VIA, 0x324e, quirk_via_cx700_pci_parking_caching); | 2025 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, 0x324e, quirk_via_cx700_pci_parking_caching); |
2012 | 2026 | ||
2013 | /* | 2027 | /* |
2014 | * For Broadcom 5706, 5708, 5709 rev. A nics, any read beyond the | 2028 | * For Broadcom 5706, 5708, 5709 rev. A nics, any read beyond the |