void isci_interrupt_msix_handler(void *arg) { struct ISCI_INTERRUPT_INFO *interrupt_info = (struct ISCI_INTERRUPT_INFO *)arg; struct ISCI_CONTROLLER *controller = (struct ISCI_CONTROLLER *)interrupt_info->interrupt_target_handle; SCIC_CONTROLLER_INTERRUPT_HANDLER interrupt_handler; SCIC_CONTROLLER_COMPLETION_HANDLER completion_handler; interrupt_handler = interrupt_info->handlers->interrupt_handler; completion_handler = interrupt_info->handlers->completion_handler; SCI_CONTROLLER_HANDLE_T scic_controller_handle; scic_controller_handle = scif_controller_get_scic_handle( controller->scif_controller_handle); if (interrupt_handler(scic_controller_handle)) { mtx_lock(&controller->lock); completion_handler(scic_controller_handle); /* * isci_controller_release_queued_ccb() is a relatively * expensive routine, so we don't call it until the controller * level flag is set to TRUE. */ if (controller->release_queued_ccbs == TRUE) isci_controller_release_queued_ccbs(controller); mtx_unlock(&controller->lock); } }
void isci_interrupt_legacy_handler(void *arg) { struct ISCI_INTERRUPT_INFO *interrupt_info = (struct ISCI_INTERRUPT_INFO *)arg; struct isci_softc *isci = (struct isci_softc *)interrupt_info->interrupt_target_handle; SCIC_CONTROLLER_INTERRUPT_HANDLER interrupt_handler; SCIC_CONTROLLER_COMPLETION_HANDLER completion_handler; int index; interrupt_handler = interrupt_info->handlers->interrupt_handler; completion_handler = interrupt_info->handlers->completion_handler; for (index = 0; index < isci->controller_count; index++) { struct ISCI_CONTROLLER *controller = &isci->controllers[index]; /* If controller_count > 0, we will get interrupts here for * controller 0 before controller 1 has even started. So * we need to make sure we don't call the completion handler * for a non-started controller. */ if (controller->is_started == TRUE) { SCI_CONTROLLER_HANDLE_T scic_controller_handle = scif_controller_get_scic_handle( controller->scif_controller_handle); if (interrupt_handler(scic_controller_handle)) { mtx_lock(&controller->lock); completion_handler(scic_controller_handle); mtx_unlock(&controller->lock); } } } }
void isci_interrupt_msix_handler(void *arg) { struct ISCI_INTERRUPT_INFO *interrupt_info = (struct ISCI_INTERRUPT_INFO *)arg; struct ISCI_CONTROLLER *controller = (struct ISCI_CONTROLLER *)interrupt_info->interrupt_target_handle; SCIC_CONTROLLER_INTERRUPT_HANDLER interrupt_handler; SCIC_CONTROLLER_COMPLETION_HANDLER completion_handler; interrupt_handler = interrupt_info->handlers->interrupt_handler; completion_handler = interrupt_info->handlers->completion_handler; SCI_CONTROLLER_HANDLE_T scic_controller_handle; scic_controller_handle = scif_controller_get_scic_handle( controller->scif_controller_handle); if (interrupt_handler(scic_controller_handle)) { mtx_lock(&controller->lock); completion_handler(scic_controller_handle); mtx_unlock(&controller->lock); } }