summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaju Rangoju <Raju.Rangoju@amd.com>2022-02-09 10:02:01 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-02-16 12:56:30 +0100
commit4b24ef1d03cf56008184f458be780da0125fc244 (patch)
tree76b45a9da7ed96245867bb9f408f40937f30c033
parent489d9fa78e59712b1219b1b7d58906abf2b007fe (diff)
downloadlinux-stable-4b24ef1d03cf56008184f458be780da0125fc244.tar.gz
linux-stable-4b24ef1d03cf56008184f458be780da0125fc244.tar.bz2
linux-stable-4b24ef1d03cf56008184f458be780da0125fc244.zip
net: amd-xgbe: disable interrupts during pci removal
[ Upstream commit 68c2d6af1f1e469544d6cbe9a601d96fb9c00e7f ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/net/ethernet/amd/xgbe/xgbe-pci.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-pci.c b/drivers/net/ethernet/amd/xgbe/xgbe-pci.c
index 90cb55eb5466..014513ce00a1 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe-pci.c
+++ b/drivers/net/ethernet/amd/xgbe/xgbe-pci.c
@@ -418,6 +418,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);
}