Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/ena/ena.c
Show First 20 Lines • Show All 1,938 Lines • ▼ Show 20 Lines | irq->res = bus_alloc_resource_any(adapter->pdev, SYS_RES_IRQ, | ||||
&irq->vector, flags); | &irq->vector, flags); | ||||
if (unlikely(irq->res == NULL)) { | if (unlikely(irq->res == NULL)) { | ||||
device_printf(adapter->pdev, "could not allocate " | device_printf(adapter->pdev, "could not allocate " | ||||
"irq vector: %d\n", irq->vector); | "irq vector: %d\n", irq->vector); | ||||
return (ENXIO); | return (ENXIO); | ||||
} | } | ||||
rc = bus_activate_resource(adapter->pdev, SYS_RES_IRQ, | |||||
irq->vector, irq->res); | |||||
if (unlikely(rc != 0)) { | |||||
device_printf(adapter->pdev, "could not activate " | |||||
"irq vector: %d\n", irq->vector); | |||||
goto err_res_free; | |||||
} | |||||
rc = bus_setup_intr(adapter->pdev, irq->res, | rc = bus_setup_intr(adapter->pdev, irq->res, | ||||
INTR_TYPE_NET | INTR_MPSAFE, NULL, ena_intr_msix_mgmnt, | INTR_TYPE_NET | INTR_MPSAFE, NULL, ena_intr_msix_mgmnt, | ||||
irq->data, &irq->cookie); | irq->data, &irq->cookie); | ||||
if (unlikely(rc != 0)) { | if (unlikely(rc != 0)) { | ||||
device_printf(adapter->pdev, "failed to register " | device_printf(adapter->pdev, "failed to register " | ||||
"interrupt handler for irq %ju: %d\n", | "interrupt handler for irq %ju: %d\n", | ||||
rman_get_start(irq->res), rc); | rman_get_start(irq->res), rc); | ||||
goto err_res_free; | goto err_res_free; | ||||
▲ Show 20 Lines • Show All 2,002 Lines • Show Last 20 Lines |