From: Fabio Estevam <fabio.estevam@freescale.com>
To: <davem@davemloft.net>
Cc: <Frank.Li@freescale.com>, <shawn.guo@linaro.org>, <marex@denx.de>,
<s.hauer@pengutronix.de>, <netdev@vger.kernel.org>,
Fabio Estevam <fabio.estevam@freescale.com>
Subject: [PATCH] net: fec: Fix the disabling of RX interrupt
Date: Mon, 18 Feb 2013 16:07:27 -0300 [thread overview]
Message-ID: <1361214447-7279-1-git-send-email-fabio.estevam@freescale.com> (raw)
The correct way to disable FEC RX interrupt is to clean only the FEC_ENET_RXF
bit.
Since commit dc975382d2e (net: fec: add napi support to improve proformance)
FEC_RX_DISABLED_IMASK is being written to the FEC_IMASK register, which also
incorrectly sets other bits.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
drivers/net/ethernet/freescale/fec.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/freescale/fec.c b/drivers/net/ethernet/freescale/fec.c
index 0fe68c4..f4f8495 100644
--- a/drivers/net/ethernet/freescale/fec.c
+++ b/drivers/net/ethernet/freescale/fec.c
@@ -811,6 +811,7 @@ fec_enet_interrupt(int irq, void *dev_id)
struct fec_enet_private *fep = netdev_priv(ndev);
uint int_events;
irqreturn_t ret = IRQ_NONE;
+ int reg;
do {
int_events = readl(fep->hwp + FEC_IEVENT);
@@ -821,8 +822,9 @@ fec_enet_interrupt(int irq, void *dev_id)
/* Disable the RX interrupt */
if (napi_schedule_prep(&fep->napi)) {
- writel(FEC_RX_DISABLED_IMASK,
- fep->hwp + FEC_IMASK);
+ reg = readl(fep->hwp + FEC_IMASK);
+ reg &= ~FEC_ENET_RXF;
+ writel(reg, fep->hwp + FEC_IMASK);
__napi_schedule(&fep->napi);
}
}
--
1.7.9.5
reply other threads:[~2013-02-18 19:07 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1361214447-7279-1-git-send-email-fabio.estevam@freescale.com \
--to=fabio.estevam@freescale.com \
--cc=Frank.Li@freescale.com \
--cc=davem@davemloft.net \
--cc=marex@denx.de \
--cc=netdev@vger.kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawn.guo@linaro.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).