aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorTim Yamin <plasm@roo.me.uk>2010-03-19 17:22:58 -0400
committerJesse Barnes <jbarnes@virtuousgeek.org>2010-03-24 16:21:37 -0400
commitca8463926306580c25e62eb901a206530d480cae (patch)
tree2aa0652820128f7f3060b3997f0e7d19e326ae94 /drivers
parentc519a5a7dab2d8e9a114f003e2d369bcf8e913f3 (diff)
PCI quirk: only apply CX700 PCI bus parking quirk if external VT6212L is present
Apply the CX700 quirk only when an external VT6212L is present (which is the case for the errant hardware the quirk was written for), don't touch the settings otherwise -- Hauppage PVR-500 tuners need PCI Bus Parking in order to work and when that's turned on everything seems to behave fine. I guess the underlying problem is a combination of an external VT6212L and the CX700 rather than the CX700's PCI being broken completely for all cases... Reported-by: Jeroen Roos <jeroen@roosnl.com> Signed-off-by: Tim Yamin <plasm@roo.me.uk> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/pci/quirks.c20
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}
2011DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_VIA, 0x324e, quirk_via_cx700_pci_parking_caching); 2025DECLARE_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