aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/quirks.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/quirks.c')
-rw-r--r--drivers/pci/quirks.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 75bd6a8648f6..f75ade6f0602 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -587,10 +587,7 @@ DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8237, quirk_via_v
587 */ 587 */
588static void __devinit quirk_amd_ioapic(struct pci_dev *dev) 588static void __devinit quirk_amd_ioapic(struct pci_dev *dev)
589{ 589{
590 u8 rev; 590 if (dev->revision >= 0x02) {
591
592 pci_read_config_byte(dev, PCI_REVISION_ID, &rev);
593 if (rev >= 0x02) {
594 printk(KERN_WARNING "I/O APIC: AMD Erratum #22 may be present. In the event of instability try\n"); 591 printk(KERN_WARNING "I/O APIC: AMD Erratum #22 may be present. In the event of instability try\n");
595 printk(KERN_WARNING " : booting with the \"noapic\" option.\n"); 592 printk(KERN_WARNING " : booting with the \"noapic\" option.\n");
596 } 593 }
@@ -610,13 +607,12 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SI, PCI_ANY_ID, quirk_ioapic_rmw );
610#define AMD8131_NIOAMODE_BIT 0 607#define AMD8131_NIOAMODE_BIT 0
611static void quirk_amd_8131_ioapic(struct pci_dev *dev) 608static void quirk_amd_8131_ioapic(struct pci_dev *dev)
612{ 609{
613 unsigned char revid, tmp; 610 unsigned char tmp;
614 611
615 if (nr_ioapics == 0) 612 if (nr_ioapics == 0)
616 return; 613 return;
617 614
618 pci_read_config_byte(dev, PCI_REVISION_ID, &revid); 615 if (dev->revision == AMD8131_revA0 || dev->revision == AMD8131_revB0) {
619 if (revid == AMD8131_revA0 || revid == AMD8131_revB0) {
620 printk(KERN_INFO "Fixing up AMD8131 IOAPIC mode\n"); 616 printk(KERN_INFO "Fixing up AMD8131 IOAPIC mode\n");
621 pci_read_config_byte( dev, AMD8131_MISC, &tmp); 617 pci_read_config_byte( dev, AMD8131_MISC, &tmp);
622 tmp &= ~(1 << AMD8131_NIOAMODE_BIT); 618 tmp &= ~(1 << AMD8131_NIOAMODE_BIT);
@@ -859,10 +855,8 @@ DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_PCI_MASTER, qu
859static void quirk_disable_pxb(struct pci_dev *pdev) 855static void quirk_disable_pxb(struct pci_dev *pdev)
860{ 856{
861 u16 config; 857 u16 config;
862 u8 rev;
863 858
864 pci_read_config_byte(pdev, PCI_REVISION_ID, &rev); 859 if (pdev->revision != 0x04) /* Only C0 requires this */
865 if (rev != 0x04) /* Only C0 requires this */
866 return; 860 return;
867 pci_read_config_word(pdev, 0x40, &config); 861 pci_read_config_word(pdev, 0x40, &config);
868 if (config & (1<<6)) { 862 if (config & (1<<6)) {