From: Ilias Apalodimas <ilias.apalodimas@linaro.org>
To: netdev@vger.kernel.org, jaswinder.singh@linaro.org
Cc: ard.biesheuvel@linaro.org, masami.hiramatsu@linaro.org,
Ilias Apalodimas <ilias.apalodimas@linaro.org>
Subject: [PATCH 1/1] net: socionext: clear rx irq correctly
Date: Thu, 11 Oct 2018 15:28:26 +0300 [thread overview]
Message-ID: <1539260906-29596-1-git-send-email-ilias.apalodimas@linaro.org> (raw)
commit 63ae7949e94a ("net: socionext: Use descriptor info instead of MMIO reads on Rx")
removed constant mmio reads from the driver and started using a descriptor
field to check if packet should be processed.
This lead the napi rx handler being constantly called while no packets
needed processing and ksoftirq getting 100% cpu usage. Issue one mmio read
to clear the irq correcty after processing packets
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reported-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
drivers/net/ethernet/socionext/netsec.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/socionext/netsec.c b/drivers/net/ethernet/socionext/netsec.c
index 7aa5ebb..4289ccb 100644
--- a/drivers/net/ethernet/socionext/netsec.c
+++ b/drivers/net/ethernet/socionext/netsec.c
@@ -735,8 +735,11 @@ static int netsec_process_rx(struct netsec_priv *priv, int budget)
u16 idx = dring->tail;
struct netsec_de *de = dring->vaddr + (DESC_SZ * idx);
- if (de->attr & (1U << NETSEC_RX_PKT_OWN_FIELD))
+ if (de->attr & (1U << NETSEC_RX_PKT_OWN_FIELD)) {
+ /* reading the register clears the irq */
+ netsec_read(priv, NETSEC_REG_NRM_RX_PKTCNT);
break;
+ }
/* This barrier is needed to keep us from reading
* any other fields out of the netsec_de until we have
--
2.7.4
next reply other threads:[~2018-10-11 19:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-11 12:28 Ilias Apalodimas [this message]
2018-10-11 13:49 ` [PATCH 1/1] net: socionext: clear rx irq correctly Ard Biesheuvel
2018-10-11 19:04 ` David Miller
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=1539260906-29596-1-git-send-email-ilias.apalodimas@linaro.org \
--to=ilias.apalodimas@linaro.org \
--cc=ard.biesheuvel@linaro.org \
--cc=jaswinder.singh@linaro.org \
--cc=masami.hiramatsu@linaro.org \
--cc=netdev@vger.kernel.org \
/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).