summaryrefslogtreecommitdiff
path: root/src/devices
diff options
context:
space:
mode:
authorEric Biederman <ebiederm@xmission.com>2003-10-14 02:36:51 +0000
committerEric Biederman <ebiederm@xmission.com>2003-10-14 02:36:51 +0000
commitad1b35a12b724b2083102fce493d4b03937a0cb1 (patch)
tree8dd0803fdd7c0e0740fd3480d8ba87ef6aab495e /src/devices
parentfb3e1edc0003f0f56954ab4f82fe4a290ff9bdb9 (diff)
- Minor bugfixes
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1215 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/devices')
-rw-r--r--src/devices/hypertransport.c1
-rw-r--r--src/devices/pci_device.c4
2 files changed, 5 insertions, 0 deletions
diff --git a/src/devices/hypertransport.c b/src/devices/hypertransport.c
index 326f343662..ba57bc830e 100644
--- a/src/devices/hypertransport.c
+++ b/src/devices/hypertransport.c
@@ -14,6 +14,7 @@ static device_t ht_scan_get_devs(device_t *old_devices)
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)) {
last = last->sibling;
}
diff --git a/src/devices/pci_device.c b/src/devices/pci_device.c
index 031d855fbf..ffa420739a 100644
--- a/src/devices/pci_device.c
+++ b/src/devices/pci_device.c
@@ -475,6 +475,10 @@ static struct device *pci_scan_get_dev(struct device **list, unsigned int devfn)
{
struct device *dev = 0;
for(; *list; list = &(*list)->sibling) {
+ if ((*list)->path.type != DEVICE_PATH_PCI) {
+ printk_err("child %s not a pci device\n", dev_path(*list));
+ continue;
+ }
if ((*list)->path.u.pci.devfn == devfn) {
/* Unlink from the list */
dev = *list;