Message ID | 20220209043201.1365811-1-Raju.Rangoju@amd.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 68c2d6af1f1e469544d6cbe9a601d96fb9c00e7f |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net] net: amd-xgbe: disable interrupts during pci removal | expand |
Hello: This patch was applied to netdev/net.git (master) by David S. Miller <davem@davemloft.net>: 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 <Selwin.Sebastian@amd.com> > Signed-off-by: Raju Rangoju <Raju.Rangoju@amd.com> > > [...] 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!
On 2/8/22 22:32, Raju Rangoju 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. Are there issues? I would expect the change log to say what the issues are and hence the reason for making this change. > > 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? > Suggested-by: Selwin Sebastian <Selwin.Sebastian@amd.com> > Signed-off-by: Raju Rangoju <Raju.Rangoju@amd.com> > --- > drivers/net/ethernet/amd/xgbe/xgbe-pci.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-pci.c b/drivers/net/ethernet/amd/xgbe/xgbe-pci.c > index efdcf484a510..2af3da4b2d05 100644 > --- a/drivers/net/ethernet/amd/xgbe/xgbe-pci.c > +++ b/drivers/net/ethernet/amd/xgbe/xgbe-pci.c > @@ -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 > xgbe_free_pdata(pdata); > } >
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-pci.c b/drivers/net/ethernet/amd/xgbe/xgbe-pci.c index efdcf484a510..2af3da4b2d05 100644 --- a/drivers/net/ethernet/amd/xgbe/xgbe-pci.c +++ b/drivers/net/ethernet/amd/xgbe/xgbe-pci.c @@ -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); }
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> --- drivers/net/ethernet/amd/xgbe/xgbe-pci.c | 3 +++ 1 file changed, 3 insertions(+)