lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1361214447-7279-1-git-send-email-fabio.estevam@freescale.com>
Date:	Mon, 18 Feb 2013 16:07:27 -0300
From:	Fabio Estevam <fabio.estevam@...escale.com>
To:	<davem@...emloft.net>
CC:	<Frank.Li@...escale.com>, <shawn.guo@...aro.org>, <marex@...x.de>,
	<s.hauer@...gutronix.de>, <netdev@...r.kernel.org>,
	Fabio Estevam <fabio.estevam@...escale.com>
Subject: [PATCH] net: fec: Fix the disabling of RX interrupt

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


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ