]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: lpfc: Correct return error codes to align with nvme_fc transport
authorDick Kennedy <dick.kennedy@broadcom.com>
Wed, 23 Aug 2017 23:55:35 +0000 (16:55 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 25 Aug 2017 02:29:37 +0000 (22:29 -0400)
commitd653e7b77b21fbe7dfe550a0346652d4bc224aa0
tree0e4dad47449ea92cfbba266f4bedc87ad307d2b7
parent59fbc0cfce50b717281f2cd8eebc92d657039467
scsi: lpfc: Correct return error codes to align with nvme_fc transport

Modify driver return error codes to align with host nvme transport.

Driver isn't returning Exxx error codes to properly reflect out of
resource or connectivity conditions (-EBUSY), yet there were hard error
conditions returning -EBUSY.

Ensure the following situations return the proper return code:

 - Temporary failures or temporary resource availability: -EBUSY

 - Connectivity issues: -ENODEV

All others are treated as hard errors and return an -Exxx value that
indicates the type of error.

Also, lpfc_sli4_issue_wqe() was modified to not translate error from
-Exxx to WQE state.  This allows lpfc_nvme_fcp_io_submit() routine to
just return whatever -E value was returned from other routines.

Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <james.smart@broadcom.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_nvme.c
drivers/scsi/lpfc/lpfc_sli.c