Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/e1000/if_em.c
Show First 20 Lines • Show All 2,228 Lines • ▼ Show 20 Lines | em_free_pci_resources(if_ctx_t ctx) | ||||
struct adapter *adapter = iflib_get_softc(ctx); | struct adapter *adapter = iflib_get_softc(ctx); | ||||
struct em_rx_queue *que = adapter->rx_queues; | struct em_rx_queue *que = adapter->rx_queues; | ||||
device_t dev = iflib_get_dev(ctx); | device_t dev = iflib_get_dev(ctx); | ||||
/* Release all MSI-X queue resources */ | /* Release all MSI-X queue resources */ | ||||
if (adapter->intr_type == IFLIB_INTR_MSIX) | if (adapter->intr_type == IFLIB_INTR_MSIX) | ||||
iflib_irq_free(ctx, &adapter->irq); | iflib_irq_free(ctx, &adapter->irq); | ||||
if (que != NULL) { | |||||
for (int i = 0; i < adapter->rx_num_queues; i++, que++) { | for (int i = 0; i < adapter->rx_num_queues; i++, que++) { | ||||
iflib_irq_free(ctx, &que->que_irq); | iflib_irq_free(ctx, &que->que_irq); | ||||
} | |||||
} | } | ||||
if (adapter->memory != NULL) { | if (adapter->memory != NULL) { | ||||
bus_release_resource(dev, SYS_RES_MEMORY, | bus_release_resource(dev, SYS_RES_MEMORY, | ||||
rman_get_rid(adapter->memory), adapter->memory); | rman_get_rid(adapter->memory), adapter->memory); | ||||
adapter->memory = NULL; | adapter->memory = NULL; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 2,395 Lines • Show Last 20 Lines |