scsi: pm80xx: Deal with kexec reboots
authorVikram Auradkar <auradkar@google.com>
Mon, 16 Mar 2020 07:49:02 +0000 (13:19 +0530)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 17 Mar 2020 17:57:15 +0000 (13:57 -0400)
commitd384be6ede5caa22e8d34dc89949b987c4f44381
tree0e8477b5b2bd6530b547b20494b7bba85b2a9633
parent58bf14c17e6569cb32d1e9a8ac7418f7f5a88fca
scsi: pm80xx: Deal with kexec reboots

A kexec reboot causes the controller fw to assert. This assertion shows up
in two ways, the controller doesn't show up as ready and an interrupt is
waiting as soon as the handler is registered. To resolve this added below
fix:

 - Split the interrupt handling setup into two parts, setup and request.

 - If the controller ready register indicates not-ready, but that the not
   readiness is only on the IOC units we can still try a reset to bring the
   system back to the pre-reboot state.

Link: https://lore.kernel.org/r/20200316074906.9119-3-deepak.ukey@microchip.com
Acked-by: Jack Wang <jinpu.wang@cloud.ionos.com>
Signed-off-by: Vikram Auradkar <auradkar@google.com>
Signed-off-by: Deepak Ukey <deepak.ukey@microchip.com>
Signed-off-by: Viswas G <Viswas.G@microchip.com>
Signed-off-by: Radha Ramachandran <radha@google.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/pm8001/pm8001_init.c
drivers/scsi/pm8001/pm80xx_hwi.c