diff options
author | Hannes Reinecke <hare@suse.de> | 2014-01-14 10:26:25 +0100 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2014-03-15 10:19:17 -0700 |
commit | c60b7b121da1db780197914b45b6ed6f63c52ac5 (patch) | |
tree | 08b2db51819bdbd5be42dac0304a621633585b99 /drivers/scsi/bfa | |
parent | 10ca149c4add37f104200e33271d826460f8964b (diff) | |
download | linux-c60b7b121da1db780197914b45b6ed6f63c52ac5.tar.bz2 |
[SCSI] bfa: set correct command return code
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>
Diffstat (limited to 'drivers/scsi/bfa')
-rw-r--r-- | drivers/scsi/bfa/bfad_im.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/scsi/bfa/bfad_im.c b/drivers/scsi/bfa/bfad_im.c index 9967f9c14851..f067332bf763 100644 --- a/drivers/scsi/bfa/bfad_im.c +++ b/drivers/scsi/bfa/bfad_im.c @@ -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); |