* [PATCH] net: fec: Fix the disabling of RX interrupt
@ 2013-02-18 19:07 Fabio Estevam
0 siblings, 0 replies; only message in thread
From: Fabio Estevam @ 2013-02-18 19:07 UTC (permalink / raw)
To: davem; +Cc: Frank.Li, shawn.guo, marex, s.hauer, netdev, Fabio Estevam
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-02-18 19:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-18 19:07 [PATCH] net: fec: Fix the disabling of RX interrupt Fabio Estevam
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).