RDMA/efa: Add shutdown notifier
Subsystems (2)
Michael Margolin
maintainerPATCH 1/1 RDMA/efa: Add shutdown notifier
Add driver function to stop the device and release any active IRQs as preparation for shutdown. This should fix issues cased by unexpected AQ interrupts when booting kernel using kexec and possible data integrity issues when the system is being shutdown during traffic.
--- drivers/infiniband/hw/efa/efa_main.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
drivers/infiniband/hw/efa/efa_main.c +11 -0
@@ -671,11 +671,22 @@ static void efa_remove(struct pci_dev *pdev)efa_remove_device (pdev); } +static void efa_shutdown (struct pci_dev *pdev) +{ +struct efa_dev *dev =pci_get_drvdata (pdev); + +efa_destroy_eqs (dev); +efa_com_dev_reset (&dev->edev,EFA_REGS_RESET_SHUTDOWN ); +efa_free_irq (dev, &dev->admin_irq); +efa_disable_msix (dev); +} +static struct pci_driver efa_pci_driver = { .name =DRV_MODULE_NAME , .id_table = efa_pci_tbl, .probe = efa_probe, .remove = efa_remove, + .shutdown = efa_shutdown, };module_pci_driver (efa_pci_driver);
Signature · 1 line
2.40.1
Hi Michael,
Thanks a lot for the patch.
Thanks,
Tao Liu
Quoted 43 lines · Michael Margolin
Add driver function to stop the device and release any active IRQs as preparation for shutdown. This should fix issues cased by unexpected AQ interrupts when booting kernel using kexec and possible data integrity issues when the system is being shutdown during traffic.
Reviewed-by Firas Jahjah <[email protected]>Reviewed-by Yonatan Nachum <[email protected]>Signed-off-by Michael Margolin <[email protected]>--- drivers/infiniband/hw/efa/efa_main.c | 11 +++++++++++ 1 file changed, 11 insertions(+)drivers/infiniband/hw/efa/efa_main.c +11
-1@@ -671,11 +671,22 @@ static void efa_remove(struct pci_dev *pdev)efa_remove_device (pdev); } +static void efa_shutdown (struct pci_dev *pdev) +{ +struct efa_dev *dev =pci_get_drvdata (pdev); + +efa_destroy_eqs (dev); +efa_com_dev_reset (&dev->edev,EFA_REGS_RESET_SHUTDOWN ); +efa_free_irq (dev, &dev->admin_irq); +efa_disable_msix (dev); +} +static struct pci_driver efa_pci_driver = { .name =DRV_MODULE_NAME , .id_table = efa_pci_tbl, .probe = efa_probe, .remove = efa_remove, + .shutdown = efa_shutdown, };module_pci_driver (efa_pci_driver); --2.40.1
Quoted 2 lines · Michael Margolin
Add driver function to stop the device and release any active IRQs as preparation for shutdown. This should fix issues cased by unexpected AQ
s/cased/caused ?
Zhu Yanjun
Quoted 37 lines
interrupts when booting kernel using kexec and possible data integrity issues when the system is being shutdown during traffic.
Reviewed-by Firas Jahjah <[email protected]>Reviewed-by Yonatan Nachum <[email protected]>Signed-off-by Michael Margolin <[email protected]>--- drivers/infiniband/hw/efa/efa_main.c | 11 +++++++++++ 1 file changed, 11 insertions(+)drivers/infiniband/hw/efa/efa_main.c +11
-0@@ -671,11 +671,22 @@ static void efa_remove(struct pci_dev *pdev)efa_remove_device (pdev); } +static void efa_shutdown (struct pci_dev *pdev) +{ +struct efa_dev *dev =pci_get_drvdata (pdev); + +efa_destroy_eqs (dev); +efa_com_dev_reset (&dev->edev,EFA_REGS_RESET_SHUTDOWN ); +efa_free_irq (dev, &dev->admin_irq); +efa_disable_msix (dev); +} +static struct pci_driver efa_pci_driver = { .name =DRV_MODULE_NAME , .id_table = efa_pci_tbl, .probe = efa_probe, .remove = efa_remove, + .shutdown = efa_shutdown, };module_pci_driver (efa_pci_driver);
Margolin, Michael
maintainerQuoted 11 lines · Zhu Yanjun
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe.
Quoted 2 lines · Michael Margolin
Add driver function to stop the device and release any active IRQs as preparation for shutdown. This should fix issues cased by unexpected AQ
s/cased/caused ?
Zhu Yanjun
Right, thanks.
Michael
Michael Margolin
maintainerPATCH v2 1/1 RDMA/efa: Add shutdown notifier
In reply to Zhu YanjunAdd driver function to stop the device and release any active IRQs as preparation for shutdown. This should fix issues caused by unexpected AQ interrupts when booting kernel using kexec and possible data integrity issues when the system is being shutdown during traffic.
--- drivers/infiniband/hw/efa/efa_main.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
drivers/infiniband/hw/efa/efa_main.c +11 -0
@@ -671,11 +671,22 @@ static void efa_remove(struct pci_dev *pdev)efa_remove_device (pdev); } +static void efa_shutdown (struct pci_dev *pdev) +{ +struct efa_dev *dev =pci_get_drvdata (pdev); + +efa_destroy_eqs (dev); +efa_com_dev_reset (&dev->edev,EFA_REGS_RESET_SHUTDOWN ); +efa_free_irq (dev, &dev->admin_irq); +efa_disable_msix (dev); +} +static struct pci_driver efa_pci_driver = { .name =DRV_MODULE_NAME , .id_table = efa_pci_tbl, .probe = efa_probe, .remove = efa_remove, + .shutdown = efa_shutdown, };module_pci_driver (efa_pci_driver);
Signature · 1 line
2.40.1
Quoted 11 lines · Michael Margolin
Add driver function to stop the device and release any active IRQs as preparation for shutdown. This should fix issues caused by unexpected AQ interrupts when booting kernel using kexec and possible data integrity issues when the system is being shutdown during traffic.
Reviewed-by Firas Jahjah <[email protected]>Reviewed-by Yonatan Nachum <[email protected]>Signed-off-by Michael Margolin <[email protected]>--- drivers/infiniband/hw/efa/efa_main.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
Applied to for-next
Jason