Commit ca846392 authored by Tim Yamin's avatar Tim Yamin Committed by Jesse Barnes

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: default avatarJeroen Roos <jeroen@roosnl.com>
Signed-off-by: default avatarTim Yamin <plasm@roo.me.uk>
Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
parent c519a5a7
...@@ -1977,11 +1977,25 @@ static void __devinit quirk_via_cx700_pci_parking_caching(struct pci_dev *dev) ...@@ -1977,11 +1977,25 @@ static void __devinit quirk_via_cx700_pci_parking_caching(struct pci_dev *dev)
/* /*
* Disable PCI Bus Parking and PCI Master read caching on CX700 * Disable PCI Bus Parking and PCI Master read caching on CX700
* which causes unspecified timing errors with a VT6212L on the PCI * which causes unspecified timing errors with a VT6212L on the PCI
* bus leading to USB2.0 packet loss. The defaults are that these * bus leading to USB2.0 packet loss.
* features are turned off but some BIOSes turn them on. *
* This quirk is only enabled if a second (on the external PCI bus)
* VT6212L is found -- the CX700 core itself also contains a USB
* host controller with the same PCI ID as the VT6212L.
*/ */
/* Count VT6212L instances */
struct pci_dev *p = pci_get_device(PCI_VENDOR_ID_VIA,
PCI_DEVICE_ID_VIA_8235_USB_2, NULL);
uint8_t b; uint8_t b;
/* p should contain the first (internal) VT6212L -- see if we have
an external one by searching again */
p = pci_get_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8235_USB_2, p);
if (!p)
return;
pci_dev_put(p);
if (pci_read_config_byte(dev, 0x76, &b) == 0) { if (pci_read_config_byte(dev, 0x76, &b) == 0) {
if (b & 0x40) { if (b & 0x40) {
/* Turn off PCI Bus Parking */ /* Turn off PCI Bus Parking */
...@@ -2008,7 +2022,7 @@ static void __devinit quirk_via_cx700_pci_parking_caching(struct pci_dev *dev) ...@@ -2008,7 +2022,7 @@ static void __devinit quirk_via_cx700_pci_parking_caching(struct pci_dev *dev)
} }
} }
} }
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_VIA, 0x324e, quirk_via_cx700_pci_parking_caching); DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, 0x324e, quirk_via_cx700_pci_parking_caching);
/* /*
* For Broadcom 5706, 5708, 5709 rev. A nics, any read beyond the * For Broadcom 5706, 5708, 5709 rev. A nics, any read beyond the
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment