From: John Jacques <[email protected]>

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().

A previous version of this commit got removed when
b53c950 was applied.

Signed-off-by: John Jacques <[email protected]>
---
 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 610ec8a..f73f983 100644
--- a/drivers/net/ethernet/lsi/lsi_acp_net.c
+++ b/drivers/net/ethernet/lsi/lsi_acp_net.c
@@ -991,8 +991,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.9.1

-- 
_______________________________________________
linux-yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/linux-yocto

Reply via email to