[linux-yocto] [PATCH] drivers/net: Update the LSI FEMAC Driver for Axxia

Cristian Bercaru cristian.bercaru at windriver.com
Wed Dec 2 02:16:35 PST 2015


From: John Jacques <john.jacques at intel.com>

The driver was calling free_irq() without first calling
disable_irq() to synchronize pending and active handlers.
This commit adds a call to disable_irq().

Signed-off-by: John Jacques <john.jacques at intel.com>
---
 drivers/net/ethernet/lsi/lsi_acp_net.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/lsi/lsi_acp_net.c b/drivers/net/ethernet/lsi/lsi_acp_net.c
index a3c72c9..7066679 100644
--- a/drivers/net/ethernet/lsi/lsi_acp_net.c
+++ b/drivers/net/ethernet/lsi/lsi_acp_net.c
@@ -1010,8 +1010,12 @@ static int appnic_stop(struct net_device *dev)
 
 	pr_info("%s: Stopping the interface.\n", LSI_DRV_NAME);
 
-	/* Disable all device interrupts. */
+	/* Disable interrupts. Note that disable_irq() will wait for
+	 * any interrupt handlers that are currently executing to
+	 * complete.
+	 */
 	write_mac(0, APPNIC_DMA_INTERRUPT_ENABLE);
+	disable_irq(dev->irq);
 	free_irq(dev->irq, dev);
 
 	/* Indicate to the OS that no more packets should be sent.  */
-- 
1.7.9.5



More information about the linux-yocto mailing list