scsi: lpfc: Fix reporting of read-only fw error errors
authorJames Smart <jsmart2021@gmail.com>
Fri, 18 Oct 2019 21:18:18 +0000 (14:18 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 25 Oct 2019 01:02:04 +0000 (21:02 -0400)
commit0a5ce731977da1cc6d8d6d7df01c2e53ebb81796
treeb4c58fb2826236a7c071e63446fd0dc532dd91f6
parent97a9ed3b3ae8eae27a231129c0939151879d5f2b
scsi: lpfc: Fix reporting of read-only fw error errors

When the adapter FW is administratively set to RO mode, a FW update
triggered by the driver's sysfs attribute will fail. Currently, the
driver's logging mechanism does not properly parse the adapter return codes
and print a meaningful message.  This oversight prevents quick diagnosis in
the field.

Parse the adapter return codes for Write_Object and write an appropriate
message to the system console.

[mkp: typo]

Link: https://lore.kernel.org/r/20191018211832.7917-3-jsmart2021@gmail.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_hw4.h
drivers/scsi/lpfc/lpfc_init.c