From: Adam Belay <abelay@novell.com>
To: linux-kernel@vger.kernel.org
Cc: greg@kroah.com
Subject: [RFC][PATCH] master abort on scanning fixes [6/9]
Date: Thu, 14 Jul 2005 04:55:26 -0400 [thread overview]
Message-ID: <1121331326.3398.94.camel@localhost.localdomain> (raw)
The PCI bridge driver now checks if changing bridge_ctrl is necessary.
It also restores the original bridge_ctl settings when finished scanning
for devices. Finally, a pci_bus setup fix is included.
Signed-off-by: Adam Belay <abelay@novell.com>
--- a/drivers/pci/bus/pci-bridge.c 2005-07-12 01:45:46.000000000 -0400
+++ b/drivers/pci/bus/pci-bridge.c 2005-07-14 02:09:15.000000000 -0400
@@ -30,7 +30,7 @@
bus->bridge = &dev->dev;
bus->ops = bus->parent->ops;
bus->sysdata = bus->parent->sysdata;
- bus->bridge = get_device(&dev->dev);
+ bus->self = dev;
/* Set up default resource pointers and names.. */
for (i = 0; i < 4; i++) {
@@ -82,12 +82,7 @@
if (!bus)
return NULL;
- /* 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);
bus->number = bus->secondary = busnr;
bus->primary = buses & 0xFF;
@@ -105,10 +100,22 @@
{
unsigned int devfn;
+ /* Disable MasterAbortMode during probing to avoid reporting
+ * of bus errors (in some architectures)
+ */
+ if (!(bus->bridge_ctl & PCI_BRIDGE_CTL_MASTER_ABORT))
+ pci_write_config_word(bus->self, PCI_BRIDGE_CONTROL,
+ bus->bridge_ctl & ~PCI_BRIDGE_CTL_MASTER_ABORT);
+
/* Go find them, Rover! */
for (devfn = 0; devfn < 0x100; devfn += 8)
pci_scan_slot(bus, devfn);
+ /* restore the original bridge_ctl configuration */
+ if (!(bus->bridge_ctl & PCI_BRIDGE_CTL_MASTER_ABORT))
+ pci_write_config_word(bus->self, PCI_BRIDGE_CONTROL,
+ bus->bridge_ctl);
+
pcibios_fixup_bus(bus);
pci_bus_add_devices(bus);
}
reply other threads:[~2005-07-14 9:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1121331326.3398.94.camel@localhost.localdomain \
--to=abelay@novell.com \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®