From: Hannes Reinecke Date: Fri, 24 Oct 2014 12:26:47 +0000 (+0200) Subject: fas216: return DID_ERROR for incomplete data transfer X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=279c43b30b82c8d509e4222ffdfa8b552a5f2a73;p=linux-beck.git fas216: return DID_ERROR for incomplete data transfer 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 Reviewed-by: Robert Elliott Signed-off-by: Christoph Hellwig --- diff --git a/drivers/scsi/arm/fas216.c b/drivers/scsi/arm/fas216.c index 71cfb1e504c4..7fc6fd30593d 100644 --- a/drivers/scsi/arm/fas216.c +++ b/drivers/scsi/arm/fas216.c @@ -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; } }