diff options
Diffstat (limited to 'sys/dev/ixgbe/if_ix.c')
-rw-r--r-- | sys/dev/ixgbe/if_ix.c | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c index 3c6caf7..e85c066 100644 --- a/sys/dev/ixgbe/if_ix.c +++ b/sys/dev/ixgbe/if_ix.c @@ -689,9 +689,7 @@ ixgbe_detach(device_t dev) for (int i = 0; i < adapter->num_queues; i++, que++, txr++) { if (que->tq) { -#ifndef IXGBE_LEGACY_TX taskqueue_drain(que->tq, &txr->txq_task); -#endif taskqueue_drain(que->tq, &que->que_task); taskqueue_free(que->tq); } @@ -1400,13 +1398,10 @@ ixgbe_handle_que(void *context, int pending) ixgbe_rxeof(que); IXGBE_TX_LOCK(txr); ixgbe_txeof(txr); -#ifndef IXGBE_LEGACY_TX if (!drbr_empty(ifp, txr->br)) ixgbe_mq_start_locked(ifp, txr); -#else if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) ixgbe_start_locked(txr, ifp); -#endif IXGBE_TX_UNLOCK(txr); } @@ -1449,13 +1444,10 @@ ixgbe_legacy_irq(void *arg) IXGBE_TX_LOCK(txr); ixgbe_txeof(txr); -#ifdef IXGBE_LEGACY_TX if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) ixgbe_start_locked(txr, ifp); -#else if (!drbr_empty(ifp, txr->br)) ixgbe_mq_start_locked(ifp, txr); -#endif IXGBE_TX_UNLOCK(txr); /* Check for fan failure */ @@ -1511,13 +1503,10 @@ ixgbe_msix_que(void *arg) IXGBE_TX_LOCK(txr); ixgbe_txeof(txr); -#ifdef IXGBE_LEGACY_TX - if (!IFQ_DRV_IS_EMPTY(ifp->if_snd)) + if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) ixgbe_start_locked(txr, ifp); -#else if (!drbr_empty(ifp, txr->br)) ixgbe_mq_start_locked(ifp, txr); -#endif IXGBE_TX_UNLOCK(txr); /* Do AIM now? */ @@ -2272,9 +2261,7 @@ ixgbe_allocate_legacy(struct adapter *adapter) { device_t dev = adapter->dev; struct ix_queue *que = adapter->queues; -#ifndef IXGBE_LEGACY_TX struct tx_ring *txr = adapter->tx_rings; -#endif int error, rid = 0; /* MSI RID at 1 */ @@ -2294,9 +2281,7 @@ ixgbe_allocate_legacy(struct adapter *adapter) * Try allocating a fast interrupt and the associated deferred * processing contexts. */ -#ifndef IXGBE_LEGACY_TX TASK_INIT(&txr->txq_task, 0, ixgbe_deferred_mq_start, txr); -#endif TASK_INIT(&que->que_task, 0, ixgbe_handle_que, que); que->tq = taskqueue_create_fast("ixgbe_que", M_NOWAIT, taskqueue_thread_enqueue, &que->tq); @@ -2429,9 +2414,7 @@ ixgbe_allocate_msix(struct adapter *adapter) #endif /* IXGBE_DEBUG */ -#ifndef IXGBE_LEGACY_TX TASK_INIT(&txr->txq_task, 0, ixgbe_deferred_mq_start, txr); -#endif TASK_INIT(&que->que_task, 0, ixgbe_handle_que, que); que->tq = taskqueue_create_fast("ixgbe_que", M_NOWAIT, taskqueue_thread_enqueue, &que->tq); @@ -2709,15 +2692,15 @@ ixgbe_setup_interface(device_t dev, struct adapter *adapter) ifp->if_hw_tsomaxsegcount = IXGBE_82599_SCATTER; ifp->if_hw_tsomaxsegsize = 2048; #endif -#ifndef IXGBE_LEGACY_TX + ifp->if_transmit = ixgbe_mq_start; ifp->if_qflush = ixgbe_qflush; -#else + ifp->if_start = ixgbe_start; IFQ_SET_MAXLEN(&ifp->if_snd, adapter->num_tx_desc - 2); ifp->if_snd.ifq_drv_maxlen = adapter->num_tx_desc - 2; IFQ_SET_READY(&ifp->if_snd); -#endif + ether_ifattach(ifp, adapter->hw.mac.addr); |