Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/ixgbe/if_ixv.c
Show First 20 Lines • Show All 1,126 Lines • ▼ Show 20 Lines | |||||
************************************************************************/ | ************************************************************************/ | ||||
static void | static void | ||||
ixv_free_pci_resources(if_ctx_t ctx) | ixv_free_pci_resources(if_ctx_t ctx) | ||||
{ | { | ||||
struct adapter *adapter = iflib_get_softc(ctx); | struct adapter *adapter = iflib_get_softc(ctx); | ||||
struct ix_rx_queue *que = adapter->rx_queues; | struct ix_rx_queue *que = adapter->rx_queues; | ||||
device_t dev = iflib_get_dev(ctx); | device_t dev = iflib_get_dev(ctx); | ||||
/* Release all msix 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) { | if (que != NULL) { | ||||
for (int i = 0; i < adapter->num_rx_queues; i++, que++) { | for (int i = 0; i < adapter->num_rx_queues; i++, que++) { | ||||
iflib_irq_free(ctx, &que->que_irq); | iflib_irq_free(ctx, &que->que_irq); | ||||
} | } | ||||
} | } | ||||
/* Clean the Legacy or Link interrupt last */ | |||||
if (adapter->pci_mem != NULL) | if (adapter->pci_mem != NULL) | ||||
bus_release_resource(dev, SYS_RES_MEMORY, | bus_release_resource(dev, SYS_RES_MEMORY, | ||||
PCIR_BAR(0), adapter->pci_mem); | rman_get_rid(adapter->pci_mem), adapter->pci_mem); | ||||
} /* ixv_free_pci_resources */ | } /* ixv_free_pci_resources */ | ||||
/************************************************************************ | /************************************************************************ | ||||
* ixv_setup_interface | * ixv_setup_interface | ||||
* | * | ||||
* Setup networking device structure and register an interface. | * Setup networking device structure and register an interface. | ||||
************************************************************************/ | ************************************************************************/ | ||||
static int | static int | ||||
▲ Show 20 Lines • Show All 780 Lines • Show Last 20 Lines |