net: amd-xgbe: disable interrupts during pci removal
Subsystems (3)
Raju Rangoju
maintainerPATCH 1/1 net: amd-xgbe: disable interrupts during pci removal
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.
--- drivers/net/ethernet/amd/xgbe/xgbe-pci.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/net/ethernet/amd/xgbe/xgbe-pci.c +3 -0
@@ -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); }
Signature · 1 line
2.25.1
This patch was applied to netdev/net.git (master) by David S. Miller <[email protected]>:
Hello:
This patch was applied to netdev/net.git (master)
by David S. Miller <[email protected]>:
Quoted 11 lines · On Wed, 9 Feb 2022 10:02:01 +0530 you wrote:
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 <[email protected]>Signed-off-by Raju Rangoju <[email protected]>[...]
Here is the summary with links:
- [net] net: amd-xgbe: disable interrupts during pci removal
https://git.kernel.org/netdev/net/c/68c2d6af1f1e
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
Quoted 5 lines · Raju Rangoju
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.
Are there issues? I would expect the change log to say what the issues are and hence the reason for making this change.
Quoted 2 lines
Fixes e75377404726 ("amd-xgbe: Update PCI support to use new IRQ functions")
Is this the right fixes tag? The XP_IOWRITE() that sets XP_INT_EN was introduced in: 47f164deab22 ("amd-xgbe: Add PCI device support"). If the idea is to be certain interrupts are not enabled for the device after removal, wouldn't that really be the tag to use?
Or was the introduction of using pci_free_irq_vectors() in combination with XP_IN_EN not being zeroed the true cause?
Quoted 11 lines
Suggested-by Selwin Sebastian <[email protected]>Signed-off-by Raju Rangoju <[email protected]>--- drivers/net/ethernet/amd/xgbe/xgbe-pci.c | 3 +++ 1 file changed, 3 insertions(+)drivers/net/ethernet/amd/xgbe/xgbe-pci.c +0
-0
drivers/net/ethernet/amd/xgbe/xgbe-pci.c static void xgbe_pci_remove(struct pci_dev *pdev) · line 430
Quoted 6 lines
drivers/net/ethernet/amd/xgbe/xgbe-pci.c +3
-0@@ -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 ); +
Shouldn't this be done before calling pci_free_irq_vectors().
Thanks,
Tom
Quoted 3 lines
drivers/net/ethernet/amd/xgbe/xgbe-pci.c +0
-0xgbe_free_pdata (pdata); }