summaryrefslogtreecommitdiff
path: root/src/devices/hypertransport.c
diff options
context:
space:
mode:
authorEric Biederman <ebiederm@xmission.com>2004-10-14 21:25:53 +0000
committerEric Biederman <ebiederm@xmission.com>2004-10-14 21:25:53 +0000
commit03acab694b3f2fcedd2ffc152db0c08bba8eebdd (patch)
tree1cd66d4ff0aaccbe4b089389370447d738ba5c7c /src/devices/hypertransport.c
parent992cd008f1d4217c3e7dd6d0a1e8445ade5da63d (diff)
- Updates for 64bit resource support, handling missing devices and cpus in the config file
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1664 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/devices/hypertransport.c')
-rw-r--r--src/devices/hypertransport.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/devices/hypertransport.c b/src/devices/hypertransport.c
index 2126889e19..344f23fec4 100644
--- a/src/devices/hypertransport.c
+++ b/src/devices/hypertransport.c
@@ -14,9 +14,9 @@ static device_t ht_scan_get_devs(device_t *old_devices)
device_t first, last;
first = *old_devices;
last = first;
- while (last && last->sibling &&
- (last->sibling->path.type == DEVICE_PATH_PCI) &&
- (last->sibling->path.u.pci.devfn > last->path.u.pci.devfn)) {
+ while(last && last->sibling &&
+ (last->sibling->path.type == DEVICE_PATH_PCI) &&
+ (last->sibling->path.u.pci.devfn > last->path.u.pci.devfn)) {
last = last->sibling;
}
if (first) {
@@ -264,19 +264,21 @@ unsigned int hypertransport_scan_chain(struct bus *bus, unsigned int max)
*chain_last = dev;
/* Run the magice enable sequence for the device */
if (dev->chip && dev->chip->control && dev->chip->control->enable_dev) {
- int enable = dev->enabled;
- dev->enabled = 1;
dev->chip->control->enable_dev(dev);
- dev->enabled = enable;
}
/* Now read the vendor and device id */
id = pci_read_config32(dev, PCI_VENDOR_ID);
+
/* If the chain is fully enumerated quit */
if (id == 0xffffffff || id == 0x00000000 ||
- id == 0x0000ffff || id == 0xffff0000) {
- printk_err("Missing static device: %s\n",
- dev_path(dev));
+ id == 0x0000ffff || id == 0xffff0000)
+ {
+ if (dev->enabled) {
+ printk_info("Disabling static device: %s\n",
+ dev_path(dev));
+ dev->enabled = 0;
+ }
break;
}
}