linux/drivers/pci
Ralf Baechle bbe8f9a3e7 [PATCH] PCI: Avoid leaving MASTER_ABORT disabled permanently when returning from pci_scan_bridge.
> On Mon, Feb 13, 2006 at 05:13:21PM -0800, David S. Miller wrote:
> >
> > In drivers/pci/probe.c:pci_scan_bridge(), if this is not the first
> > pass (pass != 0) we don't restore the PCI_BRIDGE_CONTROL_REGISTER and
> > thus leave PCI_BRIDGE_CTL_MASTER_ABORT off:
> >
> > int __devinit pci_scan_bridge(struct pci_bus *bus, struct pci_dev * dev, int max, int pass)
> > {
> >  ...
> > 	/* Disable MasterAbortMode during probing to avoid reporting
> > 	   of bus errors (in some architectures) */
> > 	pci_read_config_word(dev, PCI_BRIDGE_CONTROL, &bctl);
> > 	pci_write_config_word(dev, PCI_BRIDGE_CONTROL,
> > 			      bctl & ~PCI_BRIDGE_CTL_MASTER_ABORT);
> >  ...
> > 	if ((buses & 0xffff00) && !pcibios_assign_all_busses() && !is_cardbus) {
> > 		unsigned int cmax, busnr;
> > 		/*
> > 		 * Bus already configured by firmware, process it in the first
> > 		 * pass and just note the configuration.
> > 		 */
> > 		if (pass)
> > 			return max;
> >  ...
> > 	}
> >
> > 	pci_write_config_word(dev, PCI_BRIDGE_CONTROL, bctl);
> >  ...
> >
> > This doesn't seem intentional.

Agreed, looks like an accident.  The patch [1] originally came from Kip
Walker (Broadcom back then) between 2.6.0-test3 and 2.6.0-test4.  As I
recall it was supposed to fix an issue with with PCI aborts being
signalled by the PCI bridge of the Broadcom BCM1250 family of SOCs when
probing behind pci_scan_bridge.  It is undeseriable to disable
PCI_BRIDGE_CTL_MASTER_ABORT in pci_{read,write)_config_* and the
behaviour wasn't considered a bug in need of a workaround, so this was
put in probe.c.

I don't have an affected system at hand, so can't really test but I
propose something like the below patch.

[1] http://www.linux-mips.org/git?p=linux.git;a=commit;h=599457e0cb702a31a3247ea6a5d9c6c99c4cf195

[PCI] Avoid leaving MASTER_ABORT disabled permanently when returning from pci_scan_bridge.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-23 14:35:12 -08:00
..
hotplug [PATCH] shpchp - Fix incorrect return value of interrupt handler 2006-03-23 14:35:12 -08:00
pcie [PATCH] PCIE: make bus_id for PCI Express devices unique 2006-01-09 12:13:15 -08:00
.gitignore Add some basic .gitignore files 2005-10-18 08:26:15 -07:00
access.c [PATCH] PCI: drivers/pci/: small cleanups 2005-11-10 16:09:18 -08:00
bus.c [PATCH] PCI: Add pci_walk_bus function to PCI core (nonrecursive) 2005-09-08 15:04:30 -07:00
hotplug.c [PATCH] driver core: replace "hotplug" by "uevent" 2006-01-04 16:18:08 -08:00
Kconfig [PATCH] PCI: remove CONFIG_PCI_NAMES 2005-09-08 14:57:23 -07:00
Makefile [PATCH] PCI express must be initialized before PCI hotplug 2005-12-16 11:25:25 -08:00
msi.c [PATCH] PCI: clean up msi.c a bit 2006-03-23 14:35:10 -08:00
msi.h [PATCH] PCI: make it easier to see that set_msi_affinity() is used 2006-01-31 18:00:11 -08:00
pci-acpi.c [PATCH] PCI: kernel-doc fix for pci-acpi.c 2005-11-23 23:04:27 -08:00
pci-driver.c [PATCH] Add pci_bus_type probe and remove methods 2006-01-13 11:26:04 -08:00
pci-sysfs.c [PATCH] PCI: Block config access during BIST 2005-10-28 15:36:58 -07:00
pci.c [PATCH] PCI: return max reserved busnr 2006-03-23 14:35:10 -08:00
pci.h [PATCH] PCI: drivers/pci: some cleanups 2006-01-09 12:13:20 -08:00
probe.c [PATCH] PCI: Avoid leaving MASTER_ABORT disabled permanently when returning from pci_scan_bridge. 2006-03-23 14:35:12 -08:00
proc.c Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6 2006-01-09 18:41:42 -08:00
quirks.c [PATCH] PCI: quirk for IBM Dock II cardbus controllers 2006-03-23 14:35:10 -08:00
remove.c [PATCH] PCI: drivers/pci: some cleanups 2006-01-09 12:13:20 -08:00
rom.c [PATCH] fix missing includes 2005-10-30 17:37:32 -08:00
search.c [IA64] hotplug/ia64: SN Hotplug Driver - pci_find_next_bus export 2005-07-06 15:28:40 -07:00
setup-bus.c cardbus: limit IO windows to 256 bytes 2005-10-23 16:31:16 -07:00
setup-irq.c
setup-res.c [PATCH] PCI Hotplug/powerpc: module build break 2006-01-31 18:00:12 -08:00
syscall.c [PATCH] PCI: Block config access during BIST 2005-10-28 15:36:58 -07:00