[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211206090553.28615-1-qiangqing.zhang@nxp.com>
Date: Mon, 6 Dec 2021 17:05:53 +0800
From: Joakim Zhang <qiangqing.zhang@....com>
To: davem@...emloft.net, kuba@...nel.org, nicolas.diaz@....com,
rmk+kernel@....linux.org.uk
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-imx@....com, andrew@...n.ch
Subject: [PATCH] net: fec: only clear interrupt of handling queue in fec_enet_rx_queue()
Only clear interrupt of handling queue in fec_enet_rx_queue(), to avoid
missing packets caused by clear interrupt of other queues.
Signed-off-by: Joakim Zhang <qiangqing.zhang@....com>
---
drivers/net/ethernet/freescale/fec_main.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index 09df434b2f87..eeefed3043ad 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -1506,7 +1506,12 @@ fec_enet_rx_queue(struct net_device *ndev, int budget, u16 queue_id)
break;
pkt_received++;
- writel(FEC_ENET_RXF, fep->hwp + FEC_IEVENT);
+ if (queue_id == 0)
+ writel(FEC_ENET_RXF_0, fep->hwp + FEC_IEVENT);
+ else if (queue_id == 1)
+ writel(FEC_ENET_RXF_1, fep->hwp + FEC_IEVENT);
+ else
+ writel(FEC_ENET_RXF_2, fep->hwp + FEC_IEVENT);
/* Check for errors. */
status ^= BD_ENET_RX_LAST;
--
2.17.1
Powered by blists - more mailing lists