Skip to content

Commit fb00449

Browse files
Karan Tilak Kumargregkh
authored andcommitted
scsi: fnic: Replace return codes in fnic_clean_pending_aborts()
commit 5a43b07 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent b191ff1 commit fb00449

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

drivers/scsi/fnic/fnic.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
#define DRV_NAME "fnic"
2929
#define DRV_DESCRIPTION "Cisco FCoE HBA Driver"
30-
#define DRV_VERSION "1.6.0.54"
30+
#define DRV_VERSION "1.6.0.55"
3131
#define PFX DRV_NAME ": "
3232
#define DFX DRV_NAME "%d: "
3333

drivers/scsi/fnic/fnic_scsi.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2139,7 +2139,7 @@ static int fnic_clean_pending_aborts(struct fnic *fnic,
21392139
bool new_sc)
21402140

21412141
{
2142-
int ret = SUCCESS;
2142+
int ret = 0;
21432143
struct fnic_pending_aborts_iter_data iter_data = {
21442144
.fnic = fnic,
21452145
.lun_dev = lr_sc->device,
@@ -2159,9 +2159,11 @@ static int fnic_clean_pending_aborts(struct fnic *fnic,
21592159

21602160
/* walk again to check, if IOs are still pending in fw */
21612161
if (fnic_is_abts_pending(fnic, lr_sc))
2162-
ret = FAILED;
2162+
ret = 1;
21632163

21642164
clean_pending_aborts_end:
2165+
FNIC_SCSI_DBG(KERN_INFO, fnic->lport->host,
2166+
"%s: exit status: %d\n", __func__, ret);
21652167
return ret;
21662168
}
21672169

0 commit comments

Comments
 (0)