net: amd-xgbe: disable interrupts during pci removal
authorRaju Rangoju <Raju.Rangoju@amd.com>
Wed, 9 Feb 2022 04:32:01 +0000 (10:02 +0530)
committerDavid S. Miller <davem@davemloft.net>
Wed, 9 Feb 2022 12:52:59 +0000 (12:52 +0000)
Hardware interrupts are enabled during the pci probe, however,
they are not disabled during pci removal.

Disable all hardware interrupts during pci removal to avoid any
issues.

Fixes: e75377404726 ("amd-xgbe: Update PCI support to use new IRQ functions")
Suggested-by: Selwin Sebastian <Selwin.Sebastian@amd.com>
Signed-off-by: Raju Rangoju <Raju.Rangoju@amd.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/amd/xgbe/xgbe-pci.c

index efdcf484a510f139dbd2d8ce5a9f171aef2ad076..2af3da4b2d05355717e42ee89b21dff9047f04e8 100644 (file)
@@ -425,6 +425,9 @@ static void xgbe_pci_remove(struct pci_dev *pdev)
 
        pci_free_irq_vectors(pdata->pcidev);
 
+       /* Disable all interrupts in the hardware */
+       XP_IOWRITE(pdata, XP_INT_EN, 0x0);
+
        xgbe_free_pdata(pdata);
 }