]> rtime.felk.cvut.cz Git - zynq/linux.git/commitdiff
net: ethernet: axienet: Fix bug in the rxreject interrupt handling
authorKedareswara rao Appana <appana.durga.rao@xilinx.com>
Thu, 9 Mar 2017 05:08:13 +0000 (10:38 +0530)
committerMichal Simek <michal.simek@xilinx.com>
Thu, 15 Mar 2018 14:17:58 +0000 (15:17 +0100)
Currenlty driver is doing a reset of the device
when we got a rxreject interrupt which is not proper,
when we got a rxreject interrupt it means ethernet mac
won't have enough room to store the recv packet.
In such scenario we should increment the device dropped
Packet statstics instead of resetting the device.

This patch fixes the same.

Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
Acked-by: Anirudha Sarangi <anirudh@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/net/ethernet/xilinx/xilinx_axienet_main.c

index c4474a6cbbea4ae9550bbf5902cd8f7829361be7..03cec383fd5df11c725cac49c4ec89ebb0e1296e 100644 (file)
@@ -1308,8 +1308,8 @@ static irqreturn_t axienet_err_irq(int irq, void *_ndev)
        }
 
        if (status & XAE_INT_RXRJECT_MASK) {
+               ndev->stats.rx_dropped++;
                axienet_iow(lp, XAE_IS_OFFSET, XAE_INT_RXRJECT_MASK);
-               axienet_device_reset(ndev);
        }
 
        return IRQ_HANDLED;