diff options
| author | Jack F Vogel <jfv@FreeBSD.org> | 2012-08-06 22:43:49 +0000 |
|---|---|---|
| committer | Jack F Vogel <jfv@FreeBSD.org> | 2012-08-06 22:43:49 +0000 |
| commit | 724f79462b31c0759bcd5a0a13fc574e3e5f0948 (patch) | |
| tree | e14387be834718847ac192889cd723ce74affb58 /sys/dev/e1000 | |
| parent | 12a14de08e31166b3eade179e3dd66015a6f3616 (diff) | |
Notes
Diffstat (limited to 'sys/dev/e1000')
| -rw-r--r-- | sys/dev/e1000/if_igb.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/sys/dev/e1000/if_igb.c b/sys/dev/e1000/if_igb.c index d147882d016d..085ebc43fab7 100644 --- a/sys/dev/e1000/if_igb.c +++ b/sys/dev/e1000/if_igb.c @@ -1502,12 +1502,6 @@ igb_irq_fast(void *arg) } #ifdef DEVICE_POLLING -/********************************************************************* - * - * Legacy polling routine : if using this code you MUST be sure that - * multiqueue is not defined, ie, set igb_num_queues to 1. - * - *********************************************************************/ #if __FreeBSD_version >= 800000 #define POLL_RETURN_COUNT(a) (a) static int @@ -1518,8 +1512,8 @@ static void igb_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) { struct adapter *adapter = ifp->if_softc; - struct igb_queue *que = adapter->queues; - struct tx_ring *txr = adapter->tx_rings; + struct igb_queue *que; + struct tx_ring *txr; u32 reg_icr, rx_done = 0; u32 loop = IGB_MAX_LOOP; bool more; @@ -1541,20 +1535,26 @@ igb_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) } IGB_CORE_UNLOCK(adapter); - igb_rxeof(que, count, &rx_done); + for (int i = 0; i < adapter->num_queues; i++) { + que = &adapter->queues[i]; + txr = que->txr; + + igb_rxeof(que, count, &rx_done); - IGB_TX_LOCK(txr); - do { - more = igb_txeof(txr); - } while (loop-- && more); + IGB_TX_LOCK(txr); + do { + more = igb_txeof(txr); + } while (loop-- && more); #if __FreeBSD_version >= 800000 - if (!drbr_empty(ifp, txr->br)) - igb_mq_start_locked(ifp, txr, NULL); + if (!drbr_empty(ifp, txr->br)) + igb_mq_start_locked(ifp, txr, NULL); #else - if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) - igb_start_locked(txr, ifp); + if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) + igb_start_locked(txr, ifp); #endif - IGB_TX_UNLOCK(txr); + IGB_TX_UNLOCK(txr); + } + return POLL_RETURN_COUNT(rx_done); } #endif /* DEVICE_POLLING */ @@ -4901,7 +4901,7 @@ next_desc: } if (done != NULL) - *done = rxdone; + *done += rxdone; IGB_RX_UNLOCK(rxr); return ((staterr & E1000_RXD_STAT_DD) ? TRUE : FALSE); |
