summaryrefslogtreecommitdiffstats
path: root/sys/dev/ixgbe/if_ix.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/ixgbe/if_ix.c')
-rw-r--r--sys/dev/ixgbe/if_ix.c25
1 files changed, 4 insertions, 21 deletions
diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c
index 65e868a..48ee76b 100644
--- a/sys/dev/ixgbe/if_ix.c
+++ b/sys/dev/ixgbe/if_ix.c
@@ -718,9 +718,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);
}
@@ -1464,13 +1462,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);
}
@@ -1513,13 +1508,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 */
@@ -1575,13 +1567,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? */
@@ -2398,9 +2387,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 */
@@ -2420,9 +2407,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);
@@ -2555,9 +2540,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);
@@ -2840,15 +2823,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);
OpenPOWER on IntegriCloud