Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/hptiop/hptiop.c
Show First 20 Lines • Show All 2,046 Lines • ▼ Show 20 Lines | static int hptiop_attach(device_t dev) | ||||
xpt_setup_ccb(&ccb.ccb_h, hba->path, /*priority*/5); | xpt_setup_ccb(&ccb.ccb_h, hba->path, /*priority*/5); | ||||
ccb.ccb_h.func_code = XPT_SASYNC_CB; | ccb.ccb_h.func_code = XPT_SASYNC_CB; | ||||
ccb.event_enable = (AC_FOUND_DEVICE | AC_LOST_DEVICE); | ccb.event_enable = (AC_FOUND_DEVICE | AC_LOST_DEVICE); | ||||
ccb.callback = hptiop_async; | ccb.callback = hptiop_async; | ||||
ccb.callback_arg = hba->sim; | ccb.callback_arg = hba->sim; | ||||
xpt_action((union ccb *)&ccb); | xpt_action((union ccb *)&ccb); | ||||
rid = 0; | rid = 0; | ||||
if ((hba->irq_res = bus_alloc_resource(hba->pcidev, SYS_RES_IRQ, | if ((hba->irq_res = bus_alloc_resource_any(hba->pcidev, SYS_RES_IRQ, | ||||
&rid, 0, ~0ul, 1, RF_SHAREABLE | RF_ACTIVE)) == NULL) { | &rid, RF_SHAREABLE | RF_ACTIVE)) == NULL) { | ||||
device_printf(dev, "allocate irq failed!\n"); | device_printf(dev, "allocate irq failed!\n"); | ||||
goto free_hba_path; | goto free_hba_path; | ||||
} | } | ||||
if (bus_setup_intr(hba->pcidev, hba->irq_res, INTR_TYPE_CAM | INTR_MPSAFE, | if (bus_setup_intr(hba->pcidev, hba->irq_res, INTR_TYPE_CAM | INTR_MPSAFE, | ||||
NULL, hptiop_pci_intr, hba, &hba->irq_handle)) | NULL, hptiop_pci_intr, hba, &hba->irq_handle)) | ||||
{ | { | ||||
device_printf(dev, "allocate intr function failed!\n"); | device_printf(dev, "allocate intr function failed!\n"); | ||||
▲ Show 20 Lines • Show All 790 Lines • Show Last 20 Lines |