summaryrefslogtreecommitdiff
path: root/src/sys/io
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2025-10-11 16:31:55 -0400
committerIan Moffett <ian@osmora.org>2025-10-11 16:31:55 -0400
commitf0b15b392130a89b071985bb7ec21a5b4ff8158b (patch)
tree931ea70d6a2d0d736ed04e198dedc0b973db615a /src/sys/io
parent29428812855bd38cd450315260218c0c27ef08da (diff)
kern: pci: Use LU types instead of classrev field
Instead of using bitfields to say which kind identification we are doing, it is a better idea to just use the lookup type directly as it is more scalable Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'src/sys/io')
-rw-r--r--src/sys/io/ic/ahci.c2
-rw-r--r--src/sys/io/pci/pci.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/sys/io/ic/ahci.c b/src/sys/io/ic/ahci.c
index 725fbcf..95cfbda 100644
--- a/src/sys/io/ic/ahci.c
+++ b/src/sys/io/ic/ahci.c
@@ -536,7 +536,7 @@ ahci_attach(struct pci_adv *adv)
static struct pci_adv driver = {
.lookup = PCI_CS_ID(0x1, 0x06),
.attach = ahci_attach,
- .classrev = 1
+ .idtype = PCI_LU_CLASSREV
};
MODULE_EXPORT("ahci", MODTYPE_PCI, ahci_init);
diff --git a/src/sys/io/pci/pci.c b/src/sys/io/pci/pci.c
index 23aa82c..76ab616 100644
--- a/src/sys/io/pci/pci.c
+++ b/src/sys/io/pci/pci.c
@@ -327,7 +327,7 @@ pci_init_bus(void)
/* Now allocate load the drivers */
TAILQ_FOREACH(advp, &advlist, link) {
dev = advp->lookup;
- lup = advp->classrev ? PCI_LU_CLASSREV : PCI_LU_VENDEV;
+ lup = advp->idtype;
error = pci_bus_lookup(&dev, lup);
if (error == 0) {