Fix logic error. Due to the bug, it incorrectly checked TXQ status
authorMichael Neumann <mneumann@ntecs.de>
Tue, 5 Aug 2014 13:20:12 +0000 (15:20 +0200)
committerMichael Neumann <mneumann@ntecs.de>
Tue, 5 Aug 2014 13:20:12 +0000 (15:20 +0200)
which in turn can leave TXQ active.

Obtained From: FreeBSD (r218038 747546166f1055f5d23ef661fbc30e355f1d6fec)

sys/dev/netif/alc/if_alc.c

index a10bff0..749008b 100644 (file)
@@ -3366,7 +3366,7 @@ alc_stop_queue(struct alc_softc *sc)
        }
        /* Disable TxQ. */
        reg = CSR_READ_4(sc, ALC_TXQ_CFG);
-       if ((reg & TXQ_CFG_ENB) == 0) {
+       if ((reg & TXQ_CFG_ENB) != 0) {
                reg &= ~TXQ_CFG_ENB;
                CSR_WRITE_4(sc, ALC_TXQ_CFG, reg);
        }