fas216: return DID_ERROR for incomplete data transfer
authorHannes Reinecke <hare@suse.de>
Fri, 24 Oct 2014 12:26:47 +0000 (14:26 +0200)
committerChristoph Hellwig <hch@lst.de>
Wed, 12 Nov 2014 10:15:59 +0000 (11:15 +0100)
fas216 returns DID_BAD_TARGET for an incomplete data
transfer. The midlayer uses DID_BAD_TARGET to signal
a non-existing or not reachable target. So we should
rather be using DID_ERROR here.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Robert Elliott <elliott@hp.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/scsi/arm/fas216.c

index 71cfb1e504c4648a0a412b99cd09d51e969414a0..7fc6fd30593d6f95452c056b98f18452a311a5ec 100644 (file)
@@ -2085,8 +2085,7 @@ fas216_std_done(FAS216_Info *info, struct scsi_cmnd *SCpnt, unsigned int result)
                                SCpnt->result, info->scsi.SCp.ptr,
                                info->scsi.SCp.this_residual);
                        __scsi_print_command(SCpnt->cmnd);
-                       SCpnt->result &= ~(255 << 16);
-                       SCpnt->result |= DID_BAD_TARGET << 16;
+                       set_host_byte(SCpnt, DID_ERROR);
                        goto request_sense;
                }
        }