scsi/lpfc: use remove handler as shutdown handler
Subsystems (2)
PATCH 1/1 scsi/lpfc: use remove handler as shutdown handler
Without a shutdown handler, some cards behave very badly after a kexec. During probe, pending DMA writes will corrupt kernel memory, for example.
Using the remove handler guarantees we will use a well tested path.
With this patch I applied, I managed to use kexec multiple times and probe and SCSI scan worked every time.
Signed-off-by Thadeu Lima de Souza Cascardo <[email protected]>
--- drivers/scsi/lpfc/lpfc_init.c | 1 + 1 file changed, 1 insertion(+)
drivers/scsi/lpfc/lpfc_init.c +1 -0
@@ -11248,6 +11248,7 @@ static struct pci_driver lpfc_driver = { .id_table = lpfc_id_table, .probe = lpfc_pci_probe_one, .remove = lpfc_pci_remove_one, + .shutdown = lpfc_pci_remove_one, .suspend = lpfc_pci_suspend_one, .resume = lpfc_pci_resume_one, .err_handler = &lpfc_err_handler,
Signature · 1 line
1.7.10.4
Looks good.
Acked-by James Smart <[email protected]>
-- james
Quoted 26 lines · Thadeu Lima de Souza Cascardo
Without a shutdown handler, some cards behave very badly after a kexec. During probe, pending DMA writes will corrupt kernel memory, for example.
Using the remove handler guarantees we will use a well tested path.
With this patch I applied, I managed to use kexec multiple times and probe and SCSI scan worked every time.
Signed-off-by Thadeu Lima de Souza Cascardo <[email protected]>--- drivers/scsi/lpfc/lpfc_init.c | 1 + 1 file changed, 1 insertion(+)drivers/scsi/lpfc/lpfc_init.c +1
-0@@ -11248,6 +11248,7 @@ static struct pci_driver lpfc_driver = { .id_table = lpfc_id_table, .probe = lpfc_pci_probe_one, .remove = lpfc_pci_remove_one, + .shutdown = lpfc_pci_remove_one, .suspend = lpfc_pci_suspend_one, .resume = lpfc_pci_resume_one, .err_handler = &lpfc_err_handler,