]> 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 <monstr@monstr.eu>
Tue, 3 Oct 2017 15:26:32 +0000 (17:26 +0200)
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 c308857c6ce4e1c4f54a18be81207f1c30d5cb04..b166fd4abb270f331875c7826be3d22b84236cdd 100644 (file)
@@ -1306,8 +1306,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;