linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joakim Zhang <qiangqing.zhang@nxp.com>
To: davem@davemloft.net, kuba@kernel.org, nicolas.diaz@nxp.com,
	rmk+kernel@arm.linux.org.uk
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-imx@nxp.com, andrew@lunn.ch
Subject: [PATCH] net: fec: only clear interrupt of handling queue in fec_enet_rx_queue()
Date: Mon,  6 Dec 2021 17:05:53 +0800	[thread overview]
Message-ID: <20211206090553.28615-1-qiangqing.zhang@nxp.com> (raw)

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@nxp.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


             reply	other threads:[~2021-12-06  9:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-06  9:05 Joakim Zhang [this message]
2021-12-06 13:04 ` [PATCH] net: fec: only clear interrupt of handling queue in fec_enet_rx_queue() Andrew Lunn
2021-12-06 13:15   ` Joakim Zhang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211206090553.28615-1-qiangqing.zhang@nxp.com \
    --to=qiangqing.zhang@nxp.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nicolas.diaz@nxp.com \
    --cc=rmk+kernel@arm.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).