scsi: lpfc: Fix target reset failing
authorJames Smart <jsmart2021@gmail.com>
Mon, 4 Jan 2021 18:02:34 +0000 (10:02 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 8 Jan 2021 04:02:36 +0000 (23:02 -0500)
commit31051249f12e225c446bc8208a4734279d2c743d
tree0cee8a6c8fd3663216bd6f91b2e2db384db30528
parentda09ae4864e10b1436d129e1d2fc1029172c74fa
scsi: lpfc: Fix target reset failing

Target reset is failed by the target as an invalid command.

The Target Reset TMF has been obsoleted in T10 for a while, but continues
to be used. On (newer) devices, the TMF is rejected causing the reset
handler to escalate to adapter resets.

Fix by having Target Reset TMF rejections be translated into a LOGO and
re-PLOGI with the target device. This provides the same semantic action
(although, if the device also supports nvme traffic, it will terminate nvme
traffic as well - but it's still recoverable).

Link: https://lore.kernel.org/r/20210104180240.46824-10-jsmart2021@gmail.com
Co-developed-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_disc.h
drivers/scsi/lpfc/lpfc_els.c
drivers/scsi/lpfc/lpfc_scsi.c