XHCI baby steps!
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#include <device/pci.h>
|
||||
#include <device/pci_ide.h>
|
||||
#include <device/pci_info.h>
|
||||
#include <device/pci_xhci.h>
|
||||
#include <libk/lengthof.h>
|
||||
#include <libk/std.h>
|
||||
#include <libk/string.h>
|
||||
@@ -12,6 +13,7 @@
|
||||
|
||||
static const struct pci_driver_info pci_driver_infos[] = {
|
||||
{.class = 0x01, .subclass = 0x01, .init = &pci_ide_init},
|
||||
{.class = 0x0C, .subclass = 0x03, .init = &pci_xhci_init},
|
||||
};
|
||||
|
||||
static spin_lock_t pci_lock = SPIN_LOCK_INIT;
|
||||
@@ -279,7 +281,9 @@ static void pci_discovery_cb (struct proc* proc, struct reschedule_ctx* rctx,
|
||||
for (size_t driver = 0; driver < lengthof (pci_driver_infos); driver++) {
|
||||
if (pci_driver_infos[driver].class == pci_info.class &&
|
||||
pci_driver_infos[driver].subclass == pci_info.subclass) {
|
||||
pci_driver_infos[driver].init (proc, rctx, pci_info);
|
||||
if (!pci_driver_infos[driver].init (proc, rctx, pci_info)) {
|
||||
DEBUG ("Init failed. Skipping this device!\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user