diff options
Diffstat (limited to 'drivers/scsi/scsi_lib.c')
-rw-r--r-- | drivers/scsi/scsi_lib.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index a33b2b66da67..ead6405f3e51 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c | |||
@@ -682,11 +682,11 @@ static int __scsi_error_from_host_byte(struct scsi_cmnd *cmd, int result) | |||
682 | error = -ENOLINK; | 682 | error = -ENOLINK; |
683 | break; | 683 | break; |
684 | case DID_TARGET_FAILURE: | 684 | case DID_TARGET_FAILURE: |
685 | cmd->result |= (DID_OK << 16); | 685 | set_host_byte(cmd, DID_OK); |
686 | error = -EREMOTEIO; | 686 | error = -EREMOTEIO; |
687 | break; | 687 | break; |
688 | case DID_NEXUS_FAILURE: | 688 | case DID_NEXUS_FAILURE: |
689 | cmd->result |= (DID_OK << 16); | 689 | set_host_byte(cmd, DID_OK); |
690 | error = -EBADE; | 690 | error = -EBADE; |
691 | break; | 691 | break; |
692 | default: | 692 | default: |
@@ -880,6 +880,7 @@ void scsi_io_completion(struct scsi_cmnd *cmd, unsigned int good_bytes) | |||
880 | cmd->cmnd[0] == WRITE_SAME)) { | 880 | cmd->cmnd[0] == WRITE_SAME)) { |
881 | description = "Discard failure"; | 881 | description = "Discard failure"; |
882 | action = ACTION_FAIL; | 882 | action = ACTION_FAIL; |
883 | error = -EREMOTEIO; | ||
883 | } else | 884 | } else |
884 | action = ACTION_FAIL; | 885 | action = ACTION_FAIL; |
885 | break; | 886 | break; |