Lines 23-28
Link Here
|
23 |
#include <linux/acpi.h> |
23 |
#include <linux/acpi.h> |
24 |
#include "pci.h" |
24 |
#include "pci.h" |
25 |
|
25 |
|
|
|
26 |
static const struct pci_device_id quirk_k8_agp_aperture_sbs[] = { |
27 |
{ |
28 |
PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, 0x00e0), |
29 |
.subvendor = PCI_VENDOR_ID_ASROCK, |
30 |
.subdevice = 0x00e0, |
31 |
}, |
32 |
{ |
33 |
PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, 0x00e0), |
34 |
.subvendor = PCI_VENDOR_ID_ASUSTEK, |
35 |
.subdevice = 0x813f, |
36 |
}, |
37 |
{ |
38 |
PCI_DEVICE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8237), |
39 |
.subvendor = PCI_VENDOR_ID_ASUSTEK, |
40 |
.subdevice = 0x80ed, |
41 |
}, |
42 |
{ |
43 |
NULL, |
44 |
}, |
45 |
}; |
46 |
|
47 |
/* In certain situations the BIOS on some systems sets high bits in the K8 |
48 |
* aperture base, which breaks agpgart. This quirk corrects the base value. */ |
49 |
static void quirk_k8_agp_aperture(struct pci_dev *dev) |
50 |
{ |
51 |
u32 aper_base, tmp; |
52 |
|
53 |
/* The device we are quirking is the K8 northbridge, but this device |
54 |
* has no subsystem ID's and running this quirk on all K8 northbridges |
55 |
* would be silly. Instead, we use the subsystem ID's of the |
56 |
* southbridge to limit the quirk to only the affected systems. */ |
57 |
if (!pci_dev_present(quirk_k8_agp_aperture_sbs)) { |
58 |
printk (KERN_INFO "PCI: QUIRKed sbs for buggy board not found\n"); |
59 |
/* return; */ |
60 |
} else { |
61 |
printk (KERN_INFO "PCI: QUIRKed sbs for buggy board FOUND!\n"); |
62 |
} |
63 |
|
64 |
pci_read_config_dword(dev, 0x94, &aper_base); |
65 |
tmp = aper_base & 0x7f; |
66 |
|
67 |
if (tmp != aper_base) { |
68 |
printk(KERN_INFO "PCI: QUIRKed buggY ASRock aperture base " |
69 |
"from %x to %x\n", aper_base, tmp); |
70 |
pci_write_config_dword(dev, 0x94, tmp); |
71 |
} else { |
72 |
printk(KERN_INFO "PCI: QUIRK buggY ASRock aperture base " |
73 |
"from %x to %x\n", aper_base, tmp); |
74 |
} |
75 |
} |
76 |
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, 0x1103, quirk_k8_agp_aperture); |
77 |
|
26 |
/* The Mellanox Tavor device gives false positive parity errors |
78 |
/* The Mellanox Tavor device gives false positive parity errors |
27 |
* Mark this device with a broken_parity_status, to allow |
79 |
* Mark this device with a broken_parity_status, to allow |
28 |
* PCI scanning code to "skip" this now blacklisted device. |
80 |
* PCI scanning code to "skip" this now blacklisted device. |