summaryrefslogtreecommitdiff
path: root/src/devices/device_util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/device_util.c')
-rw-r--r--src/devices/device_util.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/devices/device_util.c b/src/devices/device_util.c
index 7a942b457e..56a96015b8 100644
--- a/src/devices/device_util.c
+++ b/src/devices/device_util.c
@@ -133,6 +133,14 @@ const char *dev_path(device_t dev)
sprintf(buffer, "APIC: %02x",
dev->path.u.apic.apic_id);
break;
+ case DEVICE_PATH_PCI_DOMAIN:
+ sprintf(buffer, "PCI_DOMAIN: %04x",
+ dev->path.u.pci_domain.domain);
+ break;
+ case DEVICE_PATH_APIC_CLUSTER:
+ sprintf(buffer, "APIC_CLUSTER: %01x",
+ dev->path.u.apic_cluster.cluster);
+ break;
default:
printk_err("Unknown device path type: %d\n", dev->path.type);
break;
@@ -155,8 +163,7 @@ int path_eq(struct device_path *path1, struct device_path *path2)
equal = 1;
break;
case DEVICE_PATH_PCI:
- equal = (path1->u.pci.bus == path2->u.pci.bus) &&
- (path1->u.pci.devfn == path2->u.pci.devfn);
+ equal = (path1->u.pci.devfn == path2->u.pci.devfn);
break;
case DEVICE_PATH_PNP:
equal = (path1->u.pnp.port == path2->u.pnp.port) &&
@@ -168,6 +175,12 @@ int path_eq(struct device_path *path1, struct device_path *path2)
case DEVICE_PATH_APIC:
equal = (path1->u.apic.apic_id == path2->u.apic.apic_id);
break;
+ case DEVICE_PATH_PCI_DOMAIN:
+ equal = (path1->u.pci_domain.domain == path2->u.pci_domain.domain);
+ break;
+ case DEVICE_PATH_APIC_CLUSTER:
+ equal = (path1->u.apic_cluster.cluster == path2->u.apic_cluster.cluster);
+ break;
default:
printk_err("Uknown device type: %d\n", path1->type);
break;