Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

scsi: fnic: Replace return codes in fnic_clean_pending_aborts()

fnic_clean_pending_aborts() was returning a non-zero value irrespective of
failure or success. This caused the caller of this function to assume that
the device reset had failed, even though it would succeed in most cases. As
a consequence, a successful device reset would escalate to host reset.

Reviewed-by: Sesidhar Baddela <sebaddel@cisco.com>
Tested-by: Karan Tilak Kumar <kartilak@cisco.com>
Signed-off-by: Karan Tilak Kumar <kartilak@cisco.com>
Link: https://lore.kernel.org/r/20230727193919.2519-1-kartilak@cisco.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Karan Tilak Kumar and committed by
Martin K. Petersen
5a43b07a 175544ad

+5 -3
+1 -1
drivers/scsi/fnic/fnic.h
··· 27 27 28 28 #define DRV_NAME "fnic" 29 29 #define DRV_DESCRIPTION "Cisco FCoE HBA Driver" 30 - #define DRV_VERSION "1.6.0.54" 30 + #define DRV_VERSION "1.6.0.55" 31 31 #define PFX DRV_NAME ": " 32 32 #define DFX DRV_NAME "%d: " 33 33
+4 -2
drivers/scsi/fnic/fnic_scsi.c
··· 2139 2139 bool new_sc) 2140 2140 2141 2141 { 2142 - int ret = SUCCESS; 2142 + int ret = 0; 2143 2143 struct fnic_pending_aborts_iter_data iter_data = { 2144 2144 .fnic = fnic, 2145 2145 .lun_dev = lr_sc->device, ··· 2159 2159 2160 2160 /* walk again to check, if IOs are still pending in fw */ 2161 2161 if (fnic_is_abts_pending(fnic, lr_sc)) 2162 - ret = FAILED; 2162 + ret = 1; 2163 2163 2164 2164 clean_pending_aborts_end: 2165 + FNIC_SCSI_DBG(KERN_INFO, fnic->lport->host, 2166 + "%s: exit status: %d\n", __func__, ret); 2165 2167 return ret; 2166 2168 } 2167 2169