aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/setup-bus.c
diff options
context:
space:
mode:
authorKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>2006-10-04 05:15:34 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-04 10:55:14 -0400
commit9bded00bf62090ebc9d6e8be640cdb69e8497db6 (patch)
treebee6645e3b226127d312fb0a152a2586b1d16a18 /drivers/pci/setup-bus.c
parent18e39913d41ca4d63e9e94a2ad25b5ea31caaa7f (diff)
[PATCH] fix "PCI: assign ioapic resource at hotplug"
Roland Dreier wrote: > The change "PCI: assign ioapic resource at hotplug" (commit > 23186279658cea6d42a050400d3e79c56cb459b4 in Linus's tree) makes > networking stop working on my system (SuperMicro H8QC8 with four > dual-core Opteron 885 CPUs). In particular, the on-board NIC stops > working, probably because it gets assigned the wrong IRQ (225 in the > non-working case, 217 in the working case) > > With that patch applied, e1000 doesn't work. Reverting just that > patch (shown below) from Linus's latest tree fixes things for me. > The cause of this problem might be an wrong assumption that the 'start' member of resource structure for ioapic device has non-zero value if the resources are assigned by firmware. The 'start' member of ioapic device seems not to be set even though the resources were actually assigned to ioapic devices by firmware. Cc: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Cc: MUNEDA Takahiro <muneda.takahiro@jp.fujitsu.com> Cc: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com> Cc: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Cc: Greg Kroah-Hartman <gregkh@suse.de> Cc: Roland Dreier <rdreier@cisco.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/pci/setup-bus.c')
-rw-r--r--drivers/pci/setup-bus.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index 54404917be9a..8f7bcf56f149 100644
--- a/drivers/pci/setup-bus.c
+++ b/drivers/pci/setup-bus.c
@@ -55,16 +55,16 @@ pbus_assign_resources_sorted(struct pci_bus *bus)
55 list_for_each_entry(dev, &bus->devices, bus_list) { 55 list_for_each_entry(dev, &bus->devices, bus_list) {
56 u16 class = dev->class >> 8; 56 u16 class = dev->class >> 8;
57 57
58 /* Don't touch classless devices or host bridges. */ 58 /* Don't touch classless devices or host bridges or ioapics. */
59 if (class == PCI_CLASS_NOT_DEFINED || 59 if (class == PCI_CLASS_NOT_DEFINED ||
60 class == PCI_CLASS_BRIDGE_HOST) 60 class == PCI_CLASS_BRIDGE_HOST)
61 continue; 61 continue;
62 62
63 /* Don't touch ioapics if it has the assigned resources. */ 63 /* Don't touch ioapic devices already enabled by firmware */
64 if (class == PCI_CLASS_SYSTEM_PIC) { 64 if (class == PCI_CLASS_SYSTEM_PIC) {
65 res = &dev->resource[0]; 65 u16 command;
66 if (res[0].start || res[1].start || res[2].start || 66 pci_read_config_word(dev, PCI_COMMAND, &command);
67 res[3].start || res[4].start || res[5].start) 67 if (command & (PCI_COMMAND_IO | PCI_COMMAND_MEMORY))
68 continue; 68 continue;
69 } 69 }
70 70