Skip to content

Commit

Permalink
[SCSI] mptfusion: Fix Incorrect return value in mptscsih_dev_reset
Browse files Browse the repository at this point in the history
There's a branch at the end of this function that
is supposed to normalize the return value with what
the mid-layer expects. In this one case, we get it wrong.

Also increase the verbosity of the INFO level printk
at the end of mptscsih_abort to include the actual return value
and the scmd->serial_number. The reason being success
or failure is actually determined by the state of
the internal tag list when a TMF is issued, and not the
return value of the TMF cmd. The serial_number is also
used in this decision, thus it's useful to know for debugging
purposes.

Cc: [email protected]
Reported-by: Peter M. Petrakis <[email protected]>
Signed-off-by: Kashyap Desai <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
  • Loading branch information
Kashyap, Desai authored and James Bottomley committed Feb 12, 2011
1 parent 84857c8 commit bcfe42e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions drivers/message/fusion/mptscsih.c
Original file line number Diff line number Diff line change
Expand Up @@ -1873,8 +1873,9 @@ mptscsih_abort(struct scsi_cmnd * SCpnt)
}

out:
printk(MYIOC_s_INFO_FMT "task abort: %s (sc=%p)\n",
ioc->name, ((retval == SUCCESS) ? "SUCCESS" : "FAILED"), SCpnt);
printk(MYIOC_s_INFO_FMT "task abort: %s (rv=%04x) (sc=%p) (sn=%ld)\n",
ioc->name, ((retval == SUCCESS) ? "SUCCESS" : "FAILED"), retval,
SCpnt, SCpnt->serial_number);

return retval;
}
Expand Down Expand Up @@ -1911,7 +1912,7 @@ mptscsih_dev_reset(struct scsi_cmnd * SCpnt)

vdevice = SCpnt->device->hostdata;
if (!vdevice || !vdevice->vtarget) {
retval = SUCCESS;
retval = 0;
goto out;
}

Expand Down

0 comments on commit bcfe42e

Please sign in to comment.