Skip to content

Commit

Permalink
[SCSI] bfa: set correct command return code
Browse files Browse the repository at this point in the history
For various error conditions the bfa driver just returns
'DID_ERROR', which carries no information at all about the
actual source of error.
This patch updates the error handling to return a correct
error code, depending on the type of error occurred.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Acked-by: Vijaya Mohan Guvva <vmohan@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
  • Loading branch information
Hannes Reinecke authored and James Bottomley committed Mar 15, 2014
1 parent 10ca149 commit c60b7b1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion drivers/scsi/bfa/bfad_im.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,14 @@ bfa_cb_ioim_done(void *drv, struct bfad_ioim_s *dio,

break;

case BFI_IOIM_STS_ABORTED:
case BFI_IOIM_STS_TIMEDOUT:
host_status = DID_TIME_OUT;
cmnd->result = ScsiResult(host_status, 0);
break;
case BFI_IOIM_STS_PATHTOV:
host_status = DID_TRANSPORT_DISRUPTED;
cmnd->result = ScsiResult(host_status, 0);
break;
default:
host_status = DID_ERROR;
cmnd->result = ScsiResult(host_status, 0);
Expand Down

0 comments on commit c60b7b1

Please sign in to comment.