diff options
author | David Woodhouse <David.Woodhouse@intel.com> | 2008-10-21 14:42:20 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2008-10-21 14:42:20 -0400 |
commit | b876d08f816527af257e13d89fb0d3b4b849223c (patch) | |
tree | 40569f568230f918ca55f04b355e251747f913ed /drivers/pci/quirks.c | |
parent | b364776ad1208a71f0c53578c84619a395412a8d (diff) | |
parent | 2515ddc6db8eb49a79f0fe5e67ff09ac7c81eab4 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
drivers/pci/dmar.c
Diffstat (limited to 'drivers/pci/quirks.c')
-rw-r--r-- | drivers/pci/quirks.c | 173 |
1 files changed, 87 insertions, 86 deletions
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 832175d9ca25..96cf8ecd04ce 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c | |||
@@ -24,6 +24,14 @@ | |||
24 | #include <linux/kallsyms.h> | 24 | #include <linux/kallsyms.h> |
25 | #include "pci.h" | 25 | #include "pci.h" |
26 | 26 | ||
27 | int isa_dma_bridge_buggy; | ||
28 | EXPORT_SYMBOL(isa_dma_bridge_buggy); | ||
29 | int pci_pci_problems; | ||
30 | EXPORT_SYMBOL(pci_pci_problems); | ||
31 | int pcie_mch_quirk; | ||
32 | EXPORT_SYMBOL(pcie_mch_quirk); | ||
33 | |||
34 | #ifdef CONFIG_PCI_QUIRKS | ||
27 | /* The Mellanox Tavor device gives false positive parity errors | 35 | /* The Mellanox Tavor device gives false positive parity errors |
28 | * Mark this device with a broken_parity_status, to allow | 36 | * Mark this device with a broken_parity_status, to allow |
29 | * PCI scanning code to "skip" this now blacklisted device. | 37 | * PCI scanning code to "skip" this now blacklisted device. |
@@ -76,8 +84,6 @@ DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82441, quirk_p | |||
76 | 84 | ||
77 | This appears to be BIOS not version dependent. So presumably there is a | 85 | This appears to be BIOS not version dependent. So presumably there is a |
78 | chipset level fix */ | 86 | chipset level fix */ |
79 | int isa_dma_bridge_buggy; | ||
80 | EXPORT_SYMBOL(isa_dma_bridge_buggy); | ||
81 | 87 | ||
82 | static void __devinit quirk_isa_dma_hangs(struct pci_dev *dev) | 88 | static void __devinit quirk_isa_dma_hangs(struct pci_dev *dev) |
83 | { | 89 | { |
@@ -98,9 +104,6 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_CBUS_1, quirk_isa_d | |||
98 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_CBUS_2, quirk_isa_dma_hangs); | 104 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_CBUS_2, quirk_isa_dma_hangs); |
99 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_CBUS_3, quirk_isa_dma_hangs); | 105 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_CBUS_3, quirk_isa_dma_hangs); |
100 | 106 | ||
101 | int pci_pci_problems; | ||
102 | EXPORT_SYMBOL(pci_pci_problems); | ||
103 | |||
104 | /* | 107 | /* |
105 | * Chipsets where PCI->PCI transfers vanish or hang | 108 | * Chipsets where PCI->PCI transfers vanish or hang |
106 | */ | 109 | */ |
@@ -1376,9 +1379,6 @@ static void __init quirk_alder_ioapic(struct pci_dev *pdev) | |||
1376 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_EESSC, quirk_alder_ioapic); | 1379 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_EESSC, quirk_alder_ioapic); |
1377 | #endif | 1380 | #endif |
1378 | 1381 | ||
1379 | int pcie_mch_quirk; | ||
1380 | EXPORT_SYMBOL(pcie_mch_quirk); | ||
1381 | |||
1382 | static void __devinit quirk_pcie_mch(struct pci_dev *pdev) | 1382 | static void __devinit quirk_pcie_mch(struct pci_dev *pdev) |
1383 | { | 1383 | { |
1384 | pcie_mch_quirk = 1; | 1384 | pcie_mch_quirk = 1; |
@@ -1569,84 +1569,6 @@ static void __devinit fixup_rev1_53c810(struct pci_dev* dev) | |||
1569 | } | 1569 | } |
1570 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NCR, PCI_DEVICE_ID_NCR_53C810, fixup_rev1_53c810); | 1570 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NCR, PCI_DEVICE_ID_NCR_53C810, fixup_rev1_53c810); |
1571 | 1571 | ||
1572 | static void pci_do_fixups(struct pci_dev *dev, struct pci_fixup *f, struct pci_fixup *end) | ||
1573 | { | ||
1574 | while (f < end) { | ||
1575 | if ((f->vendor == dev->vendor || f->vendor == (u16) PCI_ANY_ID) && | ||
1576 | (f->device == dev->device || f->device == (u16) PCI_ANY_ID)) { | ||
1577 | #ifdef DEBUG | ||
1578 | dev_dbg(&dev->dev, "calling %pF\n", f->hook); | ||
1579 | #endif | ||
1580 | f->hook(dev); | ||
1581 | } | ||
1582 | f++; | ||
1583 | } | ||
1584 | } | ||
1585 | |||
1586 | extern struct pci_fixup __start_pci_fixups_early[]; | ||
1587 | extern struct pci_fixup __end_pci_fixups_early[]; | ||
1588 | extern struct pci_fixup __start_pci_fixups_header[]; | ||
1589 | extern struct pci_fixup __end_pci_fixups_header[]; | ||
1590 | extern struct pci_fixup __start_pci_fixups_final[]; | ||
1591 | extern struct pci_fixup __end_pci_fixups_final[]; | ||
1592 | extern struct pci_fixup __start_pci_fixups_enable[]; | ||
1593 | extern struct pci_fixup __end_pci_fixups_enable[]; | ||
1594 | extern struct pci_fixup __start_pci_fixups_resume[]; | ||
1595 | extern struct pci_fixup __end_pci_fixups_resume[]; | ||
1596 | extern struct pci_fixup __start_pci_fixups_resume_early[]; | ||
1597 | extern struct pci_fixup __end_pci_fixups_resume_early[]; | ||
1598 | extern struct pci_fixup __start_pci_fixups_suspend[]; | ||
1599 | extern struct pci_fixup __end_pci_fixups_suspend[]; | ||
1600 | |||
1601 | |||
1602 | void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev) | ||
1603 | { | ||
1604 | struct pci_fixup *start, *end; | ||
1605 | |||
1606 | switch(pass) { | ||
1607 | case pci_fixup_early: | ||
1608 | start = __start_pci_fixups_early; | ||
1609 | end = __end_pci_fixups_early; | ||
1610 | break; | ||
1611 | |||
1612 | case pci_fixup_header: | ||
1613 | start = __start_pci_fixups_header; | ||
1614 | end = __end_pci_fixups_header; | ||
1615 | break; | ||
1616 | |||
1617 | case pci_fixup_final: | ||
1618 | start = __start_pci_fixups_final; | ||
1619 | end = __end_pci_fixups_final; | ||
1620 | break; | ||
1621 | |||
1622 | case pci_fixup_enable: | ||
1623 | start = __start_pci_fixups_enable; | ||
1624 | end = __end_pci_fixups_enable; | ||
1625 | break; | ||
1626 | |||
1627 | case pci_fixup_resume: | ||
1628 | start = __start_pci_fixups_resume; | ||
1629 | end = __end_pci_fixups_resume; | ||
1630 | break; | ||
1631 | |||
1632 | case pci_fixup_resume_early: | ||
1633 | start = __start_pci_fixups_resume_early; | ||
1634 | end = __end_pci_fixups_resume_early; | ||
1635 | break; | ||
1636 | |||
1637 | case pci_fixup_suspend: | ||
1638 | start = __start_pci_fixups_suspend; | ||
1639 | end = __end_pci_fixups_suspend; | ||
1640 | break; | ||
1641 | |||
1642 | default: | ||
1643 | /* stupid compiler warning, you would think with an enum... */ | ||
1644 | return; | ||
1645 | } | ||
1646 | pci_do_fixups(dev, start, end); | ||
1647 | } | ||
1648 | EXPORT_SYMBOL(pci_fixup_device); | ||
1649 | |||
1650 | /* Enable 1k I/O space granularity on the Intel P64H2 */ | 1572 | /* Enable 1k I/O space granularity on the Intel P64H2 */ |
1651 | static void __devinit quirk_p64h2_1k_io(struct pci_dev *dev) | 1573 | static void __devinit quirk_p64h2_1k_io(struct pci_dev *dev) |
1652 | { | 1574 | { |
@@ -2020,3 +1942,82 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x4375, | |||
2020 | quirk_msi_intx_disable_bug); | 1942 | quirk_msi_intx_disable_bug); |
2021 | 1943 | ||
2022 | #endif /* CONFIG_PCI_MSI */ | 1944 | #endif /* CONFIG_PCI_MSI */ |
1945 | |||
1946 | static void pci_do_fixups(struct pci_dev *dev, struct pci_fixup *f, struct pci_fixup *end) | ||
1947 | { | ||
1948 | while (f < end) { | ||
1949 | if ((f->vendor == dev->vendor || f->vendor == (u16) PCI_ANY_ID) && | ||
1950 | (f->device == dev->device || f->device == (u16) PCI_ANY_ID)) { | ||
1951 | dev_dbg(&dev->dev, "calling %pF\n", f->hook); | ||
1952 | f->hook(dev); | ||
1953 | } | ||
1954 | f++; | ||
1955 | } | ||
1956 | } | ||
1957 | |||
1958 | extern struct pci_fixup __start_pci_fixups_early[]; | ||
1959 | extern struct pci_fixup __end_pci_fixups_early[]; | ||
1960 | extern struct pci_fixup __start_pci_fixups_header[]; | ||
1961 | extern struct pci_fixup __end_pci_fixups_header[]; | ||
1962 | extern struct pci_fixup __start_pci_fixups_final[]; | ||
1963 | extern struct pci_fixup __end_pci_fixups_final[]; | ||
1964 | extern struct pci_fixup __start_pci_fixups_enable[]; | ||
1965 | extern struct pci_fixup __end_pci_fixups_enable[]; | ||
1966 | extern struct pci_fixup __start_pci_fixups_resume[]; | ||
1967 | extern struct pci_fixup __end_pci_fixups_resume[]; | ||
1968 | extern struct pci_fixup __start_pci_fixups_resume_early[]; | ||
1969 | extern struct pci_fixup __end_pci_fixups_resume_early[]; | ||
1970 | extern struct pci_fixup __start_pci_fixups_suspend[]; | ||
1971 | extern struct pci_fixup __end_pci_fixups_suspend[]; | ||
1972 | |||
1973 | |||
1974 | void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev) | ||
1975 | { | ||
1976 | struct pci_fixup *start, *end; | ||
1977 | |||
1978 | switch(pass) { | ||
1979 | case pci_fixup_early: | ||
1980 | start = __start_pci_fixups_early; | ||
1981 | end = __end_pci_fixups_early; | ||
1982 | break; | ||
1983 | |||
1984 | case pci_fixup_header: | ||
1985 | start = __start_pci_fixups_header; | ||
1986 | end = __end_pci_fixups_header; | ||
1987 | break; | ||
1988 | |||
1989 | case pci_fixup_final: | ||
1990 | start = __start_pci_fixups_final; | ||
1991 | end = __end_pci_fixups_final; | ||
1992 | break; | ||
1993 | |||
1994 | case pci_fixup_enable: | ||
1995 | start = __start_pci_fixups_enable; | ||
1996 | end = __end_pci_fixups_enable; | ||
1997 | break; | ||
1998 | |||
1999 | case pci_fixup_resume: | ||
2000 | start = __start_pci_fixups_resume; | ||
2001 | end = __end_pci_fixups_resume; | ||
2002 | break; | ||
2003 | |||
2004 | case pci_fixup_resume_early: | ||
2005 | start = __start_pci_fixups_resume_early; | ||
2006 | end = __end_pci_fixups_resume_early; | ||
2007 | break; | ||
2008 | |||
2009 | case pci_fixup_suspend: | ||
2010 | start = __start_pci_fixups_suspend; | ||
2011 | end = __end_pci_fixups_suspend; | ||
2012 | break; | ||
2013 | |||
2014 | default: | ||
2015 | /* stupid compiler warning, you would think with an enum... */ | ||
2016 | return; | ||
2017 | } | ||
2018 | pci_do_fixups(dev, start, end); | ||
2019 | } | ||
2020 | #else | ||
2021 | void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev) {} | ||
2022 | #endif | ||
2023 | EXPORT_SYMBOL(pci_fixup_device); | ||