feat: device subsystem rework
[lunaix-os.git] / lunaix-os / hal / ahci / io_event.c
index e11016a3b5a1165208e1a78b40fef4465226d819..2ce49ef4e1c9701c8c2070436396e72dc7d0936d 100644 (file)
@@ -6,16 +6,16 @@
 
 LOG_MODULE("io_evt")
 
-extern struct llist_header ahcis;
-
 void
 __ahci_hba_isr(const isr_param* param)
 {
     struct ahci_hba* hba;
     struct ahci_driver *pos, *n;
-    llist_for_each(pos, n, &ahcis, ahci_drvs)
+    struct llist_header* ahcis = (struct llist_header*)isrm_get_payload(param);
+
+    llist_for_each(pos, n, ahcis, ahci_drvs)
     {
-        if (pos->id == param->vector) {
+        if (pos->id == (int)param->execp->vector) {
             hba = &pos->hba;
             goto proceed;
         }