For TX rings' whose enable flag are not set, which could happen during
polling entering/exiting, its corresponding subqueue will be purged.
for (i = 0; i < sc->tx_ring_cnt; ++i) {
ifsq_clr_oactive(sc->tx_rings[i].ifsq);
ifsq_watchdog_stop(&sc->tx_rings[i].tx_watchdog);
+ sc->tx_rings[i].tx_flags &= ~IGB_TXFLAG_ENABLED;
}
e1000_reset_hw(&sc->hw);
/* Set number of descriptors available */
txr->tx_avail = txr->num_tx_desc;
+
+ /* Enable this TX ring */
+ txr->tx_flags |= IGB_TXFLAG_ENABLED;
}
static void
if ((ifp->if_flags & IFF_RUNNING) == 0 || ifsq_is_oactive(ifsq))
return;
- if (!sc->link_active) {
+ if (!sc->link_active || (txr->tx_flags & IGB_TXFLAG_ENABLED) == 0) {
ifsq_purge(ifsq);
return;
}
uint32_t me;
uint32_t tx_flags;
#define IGB_TXFLAG_TSO_IPLEN0 0x1
+#define IGB_TXFLAG_ENABLED 0x2
struct e1000_tx_desc *tx_base;
int num_tx_desc;
uint32_t next_avail_desc;