net: fec: only check queue 0 if RXF_0/TXF_0 interrupt is set
authorTroy Kisky <troy.kisky@boundarydevices.com>
Wed, 20 Sep 2017 00:33:07 +0000 (17:33 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 20 Sep 2017 22:47:30 +0000 (15:47 -0700)
Before queue 0 was always checked if any queue caused an interrupt.
It is better to just mark queue 0 if queue 0 has caused an interrupt.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Acked-by: Fugang Duan <Fugang.duan@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/fec_main.c

index 56f56d6..464055f 100644 (file)
@@ -1559,14 +1559,14 @@ fec_enet_collect_events(struct fec_enet_private *fep, uint int_events)
        if (int_events == 0)
                return false;
 
-       if (int_events & FEC_ENET_RXF)
+       if (int_events & FEC_ENET_RXF_0)
                fep->work_rx |= (1 << 2);
        if (int_events & FEC_ENET_RXF_1)
                fep->work_rx |= (1 << 0);
        if (int_events & FEC_ENET_RXF_2)
                fep->work_rx |= (1 << 1);
 
-       if (int_events & FEC_ENET_TXF)
+       if (int_events & FEC_ENET_TXF_0)
                fep->work_tx |= (1 << 2);
        if (int_events & FEC_ENET_TXF_1)
                fep->work_tx |= (1 << 0);