diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-08-17 00:51:31 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-08-17 00:51:31 -0400 |
commit | a2e30e529a48ef4e106e405f91cf4ae525bb01c4 (patch) | |
tree | 2def96ef17c0672c30f1a10287552978bf1d0b1c /drivers/pci | |
parent | edb3366703224d5d8df573ae698ccd6b488dc743 (diff) | |
parent | 2ad56496627630ebc99f06af5f81ca23e17e014e (diff) |
Merge /spare/repo/linux-2.6/
Diffstat (limited to 'drivers/pci')
28 files changed, 88 insertions, 37 deletions
diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c index fedae89d8f7d..fb9a11243d2a 100644 --- a/drivers/pci/bus.c +++ b/drivers/pci/bus.c | |||
@@ -60,7 +60,9 @@ pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res, | |||
60 | continue; | 60 | continue; |
61 | 61 | ||
62 | /* Ok, try it out.. */ | 62 | /* Ok, try it out.. */ |
63 | ret = allocate_resource(r, res, size, min, -1, align, | 63 | ret = allocate_resource(r, res, size, |
64 | r->start ? : min, | ||
65 | -1, align, | ||
64 | alignf, alignf_data); | 66 | alignf, alignf_data); |
65 | if (ret == 0) | 67 | if (ret == 0) |
66 | break; | 68 | break; |
diff --git a/drivers/pci/hotplug/pciehp.h b/drivers/pci/hotplug/pciehp.h index 46b294a12418..2b92b9e8c910 100644 --- a/drivers/pci/hotplug/pciehp.h +++ b/drivers/pci/hotplug/pciehp.h | |||
@@ -23,7 +23,7 @@ | |||
23 | * along with this program; if not, write to the Free Software | 23 | * along with this program; if not, write to the Free Software |
24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
25 | * | 25 | * |
26 | * Send feedback to <greg@kroah.com>, <dely.l.sy@intel.com> | 26 | * Send feedback to <greg@kroah.com>, <kristen.c.accardi@intel.com> |
27 | * | 27 | * |
28 | */ | 28 | */ |
29 | #ifndef _PCIEHP_H | 29 | #ifndef _PCIEHP_H |
diff --git a/drivers/pci/hotplug/pciehp_core.c b/drivers/pci/hotplug/pciehp_core.c index df4915dbc321..cafc7eadcf80 100644 --- a/drivers/pci/hotplug/pciehp_core.c +++ b/drivers/pci/hotplug/pciehp_core.c | |||
@@ -23,7 +23,7 @@ | |||
23 | * along with this program; if not, write to the Free Software | 23 | * along with this program; if not, write to the Free Software |
24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
25 | * | 25 | * |
26 | * Send feedback to <greg@kroah.com>, <dely.l.sy@intel.com> | 26 | * Send feedback to <greg@kroah.com>, <kristen.c.accardi@intel.com> |
27 | * | 27 | * |
28 | */ | 28 | */ |
29 | 29 | ||
diff --git a/drivers/pci/hotplug/pciehp_ctrl.c b/drivers/pci/hotplug/pciehp_ctrl.c index 0dbcf04aa35e..0e0947601526 100644 --- a/drivers/pci/hotplug/pciehp_ctrl.c +++ b/drivers/pci/hotplug/pciehp_ctrl.c | |||
@@ -23,7 +23,7 @@ | |||
23 | * along with this program; if not, write to the Free Software | 23 | * along with this program; if not, write to the Free Software |
24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
25 | * | 25 | * |
26 | * Send feedback to <greg@kroah.com>, <dely.l.sy@intel.com> | 26 | * Send feedback to <greg@kroah.com>, <kristen.c.accardi@intel.com> |
27 | * | 27 | * |
28 | */ | 28 | */ |
29 | 29 | ||
diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c index 1cda30bd6e47..7a0e27f0e063 100644 --- a/drivers/pci/hotplug/pciehp_hpc.c +++ b/drivers/pci/hotplug/pciehp_hpc.c | |||
@@ -23,7 +23,7 @@ | |||
23 | * along with this program; if not, write to the Free Software | 23 | * along with this program; if not, write to the Free Software |
24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
25 | * | 25 | * |
26 | * Send feedback to <greg@kroah.com>,<dely.l.sy@intel.com> | 26 | * Send feedback to <greg@kroah.com>,<kristen.c.accardi@intel.com> |
27 | * | 27 | * |
28 | */ | 28 | */ |
29 | 29 | ||
diff --git a/drivers/pci/hotplug/pciehp_pci.c b/drivers/pci/hotplug/pciehp_pci.c index 723b12c0bb7c..33b539b34f7e 100644 --- a/drivers/pci/hotplug/pciehp_pci.c +++ b/drivers/pci/hotplug/pciehp_pci.c | |||
@@ -23,7 +23,7 @@ | |||
23 | * along with this program; if not, write to the Free Software | 23 | * along with this program; if not, write to the Free Software |
24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
25 | * | 25 | * |
26 | * Send feedback to <greg@kroah.com>, <dely.l.sy@intel.com> | 26 | * Send feedback to <greg@kroah.com>, <kristen.c.accardi@intel.com> |
27 | * | 27 | * |
28 | */ | 28 | */ |
29 | 29 | ||
diff --git a/drivers/pci/hotplug/pciehprm.h b/drivers/pci/hotplug/pciehprm.h index 966775ffb0ff..05f20fbc5f50 100644 --- a/drivers/pci/hotplug/pciehprm.h +++ b/drivers/pci/hotplug/pciehprm.h | |||
@@ -23,7 +23,7 @@ | |||
23 | * along with this program; if not, write to the Free Software | 23 | * along with this program; if not, write to the Free Software |
24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
25 | * | 25 | * |
26 | * Send feedback to <greg@kroah.com>, <dely.l.sy@intel.com> | 26 | * Send feedback to <greg@kroah.com>, <kristen.c.accardi@intel.com> |
27 | * | 27 | * |
28 | */ | 28 | */ |
29 | 29 | ||
diff --git a/drivers/pci/hotplug/pciehprm_acpi.c b/drivers/pci/hotplug/pciehprm_acpi.c index 57f4e6d1b27c..305b47ec2f2c 100644 --- a/drivers/pci/hotplug/pciehprm_acpi.c +++ b/drivers/pci/hotplug/pciehprm_acpi.c | |||
@@ -20,7 +20,7 @@ | |||
20 | * along with this program; if not, write to the Free Software | 20 | * along with this program; if not, write to the Free Software |
21 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 21 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
22 | * | 22 | * |
23 | * Send feedback to <dely.l.sy@intel.com> | 23 | * Send feedback to <kristen.c.accardi@intel.com> |
24 | * | 24 | * |
25 | */ | 25 | */ |
26 | 26 | ||
diff --git a/drivers/pci/hotplug/pciehprm_nonacpi.c b/drivers/pci/hotplug/pciehprm_nonacpi.c index 79a0aa6238ef..3622965f8961 100644 --- a/drivers/pci/hotplug/pciehprm_nonacpi.c +++ b/drivers/pci/hotplug/pciehprm_nonacpi.c | |||
@@ -23,7 +23,7 @@ | |||
23 | * along with this program; if not, write to the Free Software | 23 | * along with this program; if not, write to the Free Software |
24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
25 | * | 25 | * |
26 | * Send feedback to <greg@kroah.com>, <dely.l.sy@intel.com> | 26 | * Send feedback to <greg@kroah.com>, <kristen.c.accardi@intel.com> |
27 | * | 27 | * |
28 | */ | 28 | */ |
29 | 29 | ||
diff --git a/drivers/pci/hotplug/pciehprm_nonacpi.h b/drivers/pci/hotplug/pciehprm_nonacpi.h index 87c90e85ede9..b10603b0e958 100644 --- a/drivers/pci/hotplug/pciehprm_nonacpi.h +++ b/drivers/pci/hotplug/pciehprm_nonacpi.h | |||
@@ -23,7 +23,7 @@ | |||
23 | * along with this program; if not, write to the Free Software | 23 | * along with this program; if not, write to the Free Software |
24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
25 | * | 25 | * |
26 | * Send feedback to <greg@kroah.com>, <dely.l.sy@intel.com> | 26 | * Send feedback to <greg@kroah.com>, <kristen.c.accardi@intel.com> |
27 | * | 27 | * |
28 | */ | 28 | */ |
29 | 29 | ||
diff --git a/drivers/pci/hotplug/shpchp.h b/drivers/pci/hotplug/shpchp.h index 67b6a3370ceb..fe4d653da188 100644 --- a/drivers/pci/hotplug/shpchp.h +++ b/drivers/pci/hotplug/shpchp.h | |||
@@ -23,7 +23,7 @@ | |||
23 | * along with this program; if not, write to the Free Software | 23 | * along with this program; if not, write to the Free Software |
24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
25 | * | 25 | * |
26 | * Send feedback to <greg@kroah.com>,<dely.l.sy@intel.com> | 26 | * Send feedback to <greg@kroah.com>,<kristen.c.accardi@intel.com> |
27 | * | 27 | * |
28 | */ | 28 | */ |
29 | #ifndef _SHPCHP_H | 29 | #ifndef _SHPCHP_H |
diff --git a/drivers/pci/hotplug/shpchp_core.c b/drivers/pci/hotplug/shpchp_core.c index a70a5c5705f2..6f7d8a29957a 100644 --- a/drivers/pci/hotplug/shpchp_core.c +++ b/drivers/pci/hotplug/shpchp_core.c | |||
@@ -23,7 +23,7 @@ | |||
23 | * along with this program; if not, write to the Free Software | 23 | * along with this program; if not, write to the Free Software |
24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
25 | * | 25 | * |
26 | * Send feedback to <greg@kroah.com>, <dely.l.sy@intel.com> | 26 | * Send feedback to <greg@kroah.com>, <kristen.c.accardi@intel.com> |
27 | * | 27 | * |
28 | */ | 28 | */ |
29 | 29 | ||
diff --git a/drivers/pci/hotplug/shpchp_ctrl.c b/drivers/pci/hotplug/shpchp_ctrl.c index 490a9553a062..783b5abb0717 100644 --- a/drivers/pci/hotplug/shpchp_ctrl.c +++ b/drivers/pci/hotplug/shpchp_ctrl.c | |||
@@ -23,7 +23,7 @@ | |||
23 | * along with this program; if not, write to the Free Software | 23 | * along with this program; if not, write to the Free Software |
24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
25 | * | 25 | * |
26 | * Send feedback to <greg@kroah.com>, <dely.l.sy@intel.com> | 26 | * Send feedback to <greg@kroah.com>, <kristen.c.accardi@intel.com> |
27 | * | 27 | * |
28 | */ | 28 | */ |
29 | 29 | ||
diff --git a/drivers/pci/hotplug/shpchp_hpc.c b/drivers/pci/hotplug/shpchp_hpc.c index 38c5d9066697..8d98410bf1c0 100644 --- a/drivers/pci/hotplug/shpchp_hpc.c +++ b/drivers/pci/hotplug/shpchp_hpc.c | |||
@@ -23,7 +23,7 @@ | |||
23 | * along with this program; if not, write to the Free Software | 23 | * along with this program; if not, write to the Free Software |
24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
25 | * | 25 | * |
26 | * Send feedback to <greg@kroah.com>,<dely.l.sy@intel.com> | 26 | * Send feedback to <greg@kroah.com>,<kristen.c.accardi@intel.com> |
27 | * | 27 | * |
28 | */ | 28 | */ |
29 | 29 | ||
diff --git a/drivers/pci/hotplug/shpchp_pci.c b/drivers/pci/hotplug/shpchp_pci.c index 90113e9cd69b..d867099114ec 100644 --- a/drivers/pci/hotplug/shpchp_pci.c +++ b/drivers/pci/hotplug/shpchp_pci.c | |||
@@ -23,7 +23,7 @@ | |||
23 | * along with this program; if not, write to the Free Software | 23 | * along with this program; if not, write to the Free Software |
24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
25 | * | 25 | * |
26 | * Send feedback to <greg@kroah.com>, <dely.l.sy@intel.com> | 26 | * Send feedback to <greg@kroah.com>, <kristen.c.accardi@intel.com> |
27 | * | 27 | * |
28 | */ | 28 | */ |
29 | 29 | ||
diff --git a/drivers/pci/hotplug/shpchprm.h b/drivers/pci/hotplug/shpchprm.h index 88aeb978c911..057b192ce589 100644 --- a/drivers/pci/hotplug/shpchprm.h +++ b/drivers/pci/hotplug/shpchprm.h | |||
@@ -23,7 +23,7 @@ | |||
23 | * along with this program; if not, write to the Free Software | 23 | * along with this program; if not, write to the Free Software |
24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
25 | * | 25 | * |
26 | * Send feedback to <greg@kroah.com>, <dely.l.sy@intel.com> | 26 | * Send feedback to <greg@kroah.com>, <kristen.c.accardi@intel.com> |
27 | * | 27 | * |
28 | */ | 28 | */ |
29 | 29 | ||
diff --git a/drivers/pci/hotplug/shpchprm_acpi.c b/drivers/pci/hotplug/shpchprm_acpi.c index 7957cdc72cd0..d37b31658edf 100644 --- a/drivers/pci/hotplug/shpchprm_acpi.c +++ b/drivers/pci/hotplug/shpchprm_acpi.c | |||
@@ -20,7 +20,7 @@ | |||
20 | * along with this program; if not, write to the Free Software | 20 | * along with this program; if not, write to the Free Software |
21 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 21 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
22 | * | 22 | * |
23 | * Send feedback to <dely.l.sy@intel.com> | 23 | * Send feedback to <kristen.c.accardi@intel.com> |
24 | * | 24 | * |
25 | */ | 25 | */ |
26 | 26 | ||
diff --git a/drivers/pci/hotplug/shpchprm_legacy.c b/drivers/pci/hotplug/shpchprm_legacy.c index 37fa77a98289..ba6c549c9b9d 100644 --- a/drivers/pci/hotplug/shpchprm_legacy.c +++ b/drivers/pci/hotplug/shpchprm_legacy.c | |||
@@ -23,7 +23,7 @@ | |||
23 | * along with this program; if not, write to the Free Software | 23 | * along with this program; if not, write to the Free Software |
24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
25 | * | 25 | * |
26 | * Send feedback to <greg@kroah.com>,<dely.l.sy@intel.com> | 26 | * Send feedback to <greg@kroah.com>,<kristen.c.accardi@intel.com> |
27 | * | 27 | * |
28 | */ | 28 | */ |
29 | 29 | ||
diff --git a/drivers/pci/hotplug/shpchprm_legacy.h b/drivers/pci/hotplug/shpchprm_legacy.h index 29ccea5e57e5..21bda74ddfa5 100644 --- a/drivers/pci/hotplug/shpchprm_legacy.h +++ b/drivers/pci/hotplug/shpchprm_legacy.h | |||
@@ -23,7 +23,7 @@ | |||
23 | * along with this program; if not, write to the Free Software | 23 | * along with this program; if not, write to the Free Software |
24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
25 | * | 25 | * |
26 | * Send feedback to <greg@kroah.com>, <dely.l.sy@intel.com> | 26 | * Send feedback to <greg@kroah.com>, <kristen.c.accardi@intel.com> |
27 | * | 27 | * |
28 | */ | 28 | */ |
29 | 29 | ||
diff --git a/drivers/pci/hotplug/shpchprm_nonacpi.c b/drivers/pci/hotplug/shpchprm_nonacpi.c index 88f4d9f41886..5f75ef7f3df2 100644 --- a/drivers/pci/hotplug/shpchprm_nonacpi.c +++ b/drivers/pci/hotplug/shpchprm_nonacpi.c | |||
@@ -23,7 +23,7 @@ | |||
23 | * along with this program; if not, write to the Free Software | 23 | * along with this program; if not, write to the Free Software |
24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
25 | * | 25 | * |
26 | * Send feedback to <greg@kroah.com>, <dely.l.sy@intel.com> | 26 | * Send feedback to <greg@kroah.com>, <kristen.c.accardi@intel.com> |
27 | * | 27 | * |
28 | */ | 28 | */ |
29 | 29 | ||
diff --git a/drivers/pci/hotplug/shpchprm_nonacpi.h b/drivers/pci/hotplug/shpchprm_nonacpi.h index 6bc8668023c3..cddaaa5ee1b3 100644 --- a/drivers/pci/hotplug/shpchprm_nonacpi.h +++ b/drivers/pci/hotplug/shpchprm_nonacpi.h | |||
@@ -23,7 +23,7 @@ | |||
23 | * along with this program; if not, write to the Free Software | 23 | * along with this program; if not, write to the Free Software |
24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
25 | * | 25 | * |
26 | * Send feedback to <greg@kroah.com>, <dely.l.sy@intel.com> | 26 | * Send feedback to <greg@kroah.com>, <kristen.c.accardi@intel.com> |
27 | * | 27 | * |
28 | */ | 28 | */ |
29 | 29 | ||
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index b5ab9aa6ff7c..2b85aa39f954 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c | |||
@@ -453,7 +453,7 @@ static void enable_msi_mode(struct pci_dev *dev, int pos, int type) | |||
453 | } | 453 | } |
454 | } | 454 | } |
455 | 455 | ||
456 | static void disable_msi_mode(struct pci_dev *dev, int pos, int type) | 456 | void disable_msi_mode(struct pci_dev *dev, int pos, int type) |
457 | { | 457 | { |
458 | u16 control; | 458 | u16 control; |
459 | 459 | ||
@@ -699,6 +699,9 @@ int pci_enable_msi(struct pci_dev* dev) | |||
699 | if (!pci_msi_enable || !dev) | 699 | if (!pci_msi_enable || !dev) |
700 | return status; | 700 | return status; |
701 | 701 | ||
702 | if (dev->no_msi) | ||
703 | return status; | ||
704 | |||
702 | temp = dev->irq; | 705 | temp = dev->irq; |
703 | 706 | ||
704 | if ((status = msi_init()) < 0) | 707 | if ((status = msi_init()) < 0) |
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index d94d7af4f7a0..d00168b1f662 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h | |||
@@ -47,6 +47,12 @@ extern int pci_msi_quirk; | |||
47 | #define pci_msi_quirk 0 | 47 | #define pci_msi_quirk 0 |
48 | #endif | 48 | #endif |
49 | 49 | ||
50 | #ifdef CONFIG_PCI_MSI | ||
51 | void disable_msi_mode(struct pci_dev *dev, int pos, int type); | ||
52 | #else | ||
53 | static inline void disable_msi_mode(struct pci_dev *dev, int pos, int type) { } | ||
54 | #endif | ||
55 | |||
50 | extern int pcie_mch_quirk; | 56 | extern int pcie_mch_quirk; |
51 | extern struct device_attribute pci_dev_attrs[]; | 57 | extern struct device_attribute pci_dev_attrs[]; |
52 | extern struct class_device_attribute class_device_attr_cpuaffinity; | 58 | extern struct class_device_attribute class_device_attr_cpuaffinity; |
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index df3bdae2040f..93e8a878ea95 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c | |||
@@ -507,7 +507,7 @@ int __devinit pci_scan_bridge(struct pci_bus *bus, struct pci_dev * dev, int max | |||
507 | pci_write_config_dword(dev, PCI_PRIMARY_BUS, buses); | 507 | pci_write_config_dword(dev, PCI_PRIMARY_BUS, buses); |
508 | 508 | ||
509 | if (!is_cardbus) { | 509 | if (!is_cardbus) { |
510 | child->bridge_ctl = PCI_BRIDGE_CTL_NO_ISA; | 510 | child->bridge_ctl = bctl | PCI_BRIDGE_CTL_NO_ISA; |
511 | /* | 511 | /* |
512 | * Adjust subordinate busnr in parent buses. | 512 | * Adjust subordinate busnr in parent buses. |
513 | * We do this before scanning for children because | 513 | * We do this before scanning for children because |
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 1521fd5d95cc..bb36bb69803f 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c | |||
@@ -373,6 +373,25 @@ static void __devinit quirk_vt82c686_acpi(struct pci_dev *dev) | |||
373 | } | 373 | } |
374 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_4, quirk_vt82c686_acpi ); | 374 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_4, quirk_vt82c686_acpi ); |
375 | 375 | ||
376 | /* | ||
377 | * VIA VT8235 ISA Bridge: Two IO regions pointed to by words at | ||
378 | * 0x88 (128 bytes of power management registers) | ||
379 | * 0xd0 (16 bytes of SMB registers) | ||
380 | */ | ||
381 | static void __devinit quirk_vt8235_acpi(struct pci_dev *dev) | ||
382 | { | ||
383 | u16 pm, smb; | ||
384 | |||
385 | pci_read_config_word(dev, 0x88, &pm); | ||
386 | pm &= PCI_BASE_ADDRESS_IO_MASK; | ||
387 | quirk_io_region(dev, pm, 128, PCI_BRIDGE_RESOURCES); | ||
388 | |||
389 | pci_read_config_word(dev, 0xd0, &smb); | ||
390 | smb &= PCI_BASE_ADDRESS_IO_MASK; | ||
391 | quirk_io_region(dev, smb, 16, PCI_BRIDGE_RESOURCES + 1); | ||
392 | } | ||
393 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8235, quirk_vt8235_acpi); | ||
394 | |||
376 | 395 | ||
377 | #ifdef CONFIG_X86_IO_APIC | 396 | #ifdef CONFIG_X86_IO_APIC |
378 | 397 | ||
@@ -820,6 +839,11 @@ static void __init asus_hides_smbus_hostbridge(struct pci_dev *dev) | |||
820 | case 0x0001: /* Toshiba Satellite A40 */ | 839 | case 0x0001: /* Toshiba Satellite A40 */ |
821 | asus_hides_smbus = 1; | 840 | asus_hides_smbus = 1; |
822 | } | 841 | } |
842 | if (dev->device == PCI_DEVICE_ID_INTEL_82855PM_HB) | ||
843 | switch(dev->subsystem_device) { | ||
844 | case 0x0001: /* Toshiba Tecra M2 */ | ||
845 | asus_hides_smbus = 1; | ||
846 | } | ||
823 | } else if (unlikely(dev->subsystem_vendor == PCI_VENDOR_ID_SAMSUNG)) { | 847 | } else if (unlikely(dev->subsystem_vendor == PCI_VENDOR_ID_SAMSUNG)) { |
824 | if (dev->device == PCI_DEVICE_ID_INTEL_82855PM_HB) | 848 | if (dev->device == PCI_DEVICE_ID_INTEL_82855PM_HB) |
825 | switch(dev->subsystem_device) { | 849 | switch(dev->subsystem_device) { |
@@ -1267,6 +1291,27 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7520_MCH, quir | |||
1267 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7320_MCH, quirk_pcie_mch ); | 1291 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7320_MCH, quirk_pcie_mch ); |
1268 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7525_MCH, quirk_pcie_mch ); | 1292 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7525_MCH, quirk_pcie_mch ); |
1269 | 1293 | ||
1294 | |||
1295 | /* | ||
1296 | * It's possible for the MSI to get corrupted if shpc and acpi | ||
1297 | * are used together on certain PXH-based systems. | ||
1298 | */ | ||
1299 | static void __devinit quirk_pcie_pxh(struct pci_dev *dev) | ||
1300 | { | ||
1301 | disable_msi_mode(dev, pci_find_capability(dev, PCI_CAP_ID_MSI), | ||
1302 | PCI_CAP_ID_MSI); | ||
1303 | dev->no_msi = 1; | ||
1304 | |||
1305 | printk(KERN_WARNING "PCI: PXH quirk detected, " | ||
1306 | "disabling MSI for SHPC device\n"); | ||
1307 | } | ||
1308 | DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_PXHD_0, quirk_pcie_pxh); | ||
1309 | DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_PXHD_1, quirk_pcie_pxh); | ||
1310 | DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_PXH_0, quirk_pcie_pxh); | ||
1311 | DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_PXH_1, quirk_pcie_pxh); | ||
1312 | DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_PXHV, quirk_pcie_pxh); | ||
1313 | |||
1314 | |||
1270 | static void __devinit quirk_netmos(struct pci_dev *dev) | 1315 | static void __devinit quirk_netmos(struct pci_dev *dev) |
1271 | { | 1316 | { |
1272 | unsigned int num_parallel = (dev->subsystem_device & 0xf0) >> 4; | 1317 | unsigned int num_parallel = (dev->subsystem_device & 0xf0) >> 4; |
diff --git a/drivers/pci/rom.c b/drivers/pci/rom.c index 838575e3fac6..713c78f3a65d 100644 --- a/drivers/pci/rom.c +++ b/drivers/pci/rom.c | |||
@@ -125,7 +125,9 @@ void __iomem *pci_map_rom(struct pci_dev *pdev, size_t *size) | |||
125 | image += readw(pds + 16) * 512; | 125 | image += readw(pds + 16) * 512; |
126 | } while (!last_image); | 126 | } while (!last_image); |
127 | 127 | ||
128 | *size = image - rom; | 128 | /* never return a size larger than the PCI resource window */ |
129 | /* there are known ROMs that get the size wrong */ | ||
130 | *size = min((size_t)(image - rom), *size); | ||
129 | 131 | ||
130 | return rom; | 132 | return rom; |
131 | } | 133 | } |
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index 9fe48f712be9..a2eebc6eaacc 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c | |||
@@ -51,8 +51,6 @@ pbus_assign_resources_sorted(struct pci_bus *bus) | |||
51 | struct resource_list head, *list, *tmp; | 51 | struct resource_list head, *list, *tmp; |
52 | int idx; | 52 | int idx; |
53 | 53 | ||
54 | bus->bridge_ctl &= ~PCI_BRIDGE_CTL_VGA; | ||
55 | |||
56 | head.next = NULL; | 54 | head.next = NULL; |
57 | list_for_each_entry(dev, &bus->devices, bus_list) { | 55 | list_for_each_entry(dev, &bus->devices, bus_list) { |
58 | u16 class = dev->class >> 8; | 56 | u16 class = dev->class >> 8; |
@@ -62,10 +60,6 @@ pbus_assign_resources_sorted(struct pci_bus *bus) | |||
62 | class == PCI_CLASS_BRIDGE_HOST) | 60 | class == PCI_CLASS_BRIDGE_HOST) |
63 | continue; | 61 | continue; |
64 | 62 | ||
65 | if (class == PCI_CLASS_DISPLAY_VGA || | ||
66 | class == PCI_CLASS_NOT_DEFINED_VGA) | ||
67 | bus->bridge_ctl |= PCI_BRIDGE_CTL_VGA; | ||
68 | |||
69 | pdev_sort_resources(dev, &head); | 63 | pdev_sort_resources(dev, &head); |
70 | } | 64 | } |
71 | 65 | ||
@@ -509,12 +503,6 @@ pci_bus_assign_resources(struct pci_bus *bus) | |||
509 | 503 | ||
510 | pbus_assign_resources_sorted(bus); | 504 | pbus_assign_resources_sorted(bus); |
511 | 505 | ||
512 | if (bus->bridge_ctl & PCI_BRIDGE_CTL_VGA) { | ||
513 | /* Propagate presence of the VGA to upstream bridges */ | ||
514 | for (b = bus; b->parent; b = b->parent) { | ||
515 | b->bridge_ctl |= PCI_BRIDGE_CTL_VGA; | ||
516 | } | ||
517 | } | ||
518 | list_for_each_entry(dev, &bus->devices, bus_list) { | 506 | list_for_each_entry(dev, &bus->devices, bus_list) { |
519 | b = dev->subordinate; | 507 | b = dev->subordinate; |
520 | if (!b) | 508 | if (!b) |
diff --git a/drivers/pci/setup-res.c b/drivers/pci/setup-res.c index 1ca21d2ba11c..84eedc965688 100644 --- a/drivers/pci/setup-res.c +++ b/drivers/pci/setup-res.c | |||
@@ -33,6 +33,11 @@ pci_update_resource(struct pci_dev *dev, struct resource *res, int resno) | |||
33 | u32 new, check, mask; | 33 | u32 new, check, mask; |
34 | int reg; | 34 | int reg; |
35 | 35 | ||
36 | /* Ignore resources for unimplemented BARs and unused resource slots | ||
37 | for 64 bit BARs. */ | ||
38 | if (!res->flags) | ||
39 | return; | ||
40 | |||
36 | pcibios_resource_to_bus(dev, ®ion, res); | 41 | pcibios_resource_to_bus(dev, ®ion, res); |
37 | 42 | ||
38 | pr_debug(" got res [%lx:%lx] bus [%lx:%lx] flags %lx for " | 43 | pr_debug(" got res [%lx:%lx] bus [%lx:%lx] flags %lx for " |
@@ -67,7 +72,7 @@ pci_update_resource(struct pci_dev *dev, struct resource *res, int resno) | |||
67 | 72 | ||
68 | if ((new & (PCI_BASE_ADDRESS_SPACE|PCI_BASE_ADDRESS_MEM_TYPE_MASK)) == | 73 | if ((new & (PCI_BASE_ADDRESS_SPACE|PCI_BASE_ADDRESS_MEM_TYPE_MASK)) == |
69 | (PCI_BASE_ADDRESS_SPACE_MEMORY|PCI_BASE_ADDRESS_MEM_TYPE_64)) { | 74 | (PCI_BASE_ADDRESS_SPACE_MEMORY|PCI_BASE_ADDRESS_MEM_TYPE_64)) { |
70 | new = 0; /* currently everyone zeros the high address */ | 75 | new = region.start >> 16 >> 16; |
71 | pci_write_config_dword(dev, reg + 4, new); | 76 | pci_write_config_dword(dev, reg + 4, new); |
72 | pci_read_config_dword(dev, reg + 4, &check); | 77 | pci_read_config_dword(dev, reg + 4, &check); |
73 | if (check != new) { | 78 | if (check != new) { |