From: Ed Lin Date: Thu, 5 Jul 2007 19:09:06 +0000 (-0700) Subject: [SCSI] stex: use resid for xfer len information X-Git-Tag: v2.6.23-rc1~1053^2~17 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=968a5763fb7247feb0e69573a2975a7a0c094267;p=linux-2.6 [SCSI] stex: use resid for xfer len information The original implementation in stex_ys_commands() is inappropriate. For xfer len information, we should use resid instead. Signed-off-by: Ed Lin Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/stex.c b/drivers/scsi/stex.c index adda296b59..72f6d80153 100644 --- a/drivers/scsi/stex.c +++ b/drivers/scsi/stex.c @@ -719,8 +719,8 @@ static void stex_ys_commands(struct st_hba *hba, if (ccb->cmd->cmnd[0] == MGT_CMD && resp->scsi_status != SAM_STAT_CHECK_CONDITION) { - scsi_bufflen(ccb->cmd) = - le32_to_cpu(*(__le32 *)&resp->variable[0]); + scsi_set_resid(ccb->cmd, scsi_bufflen(ccb->cmd) - + le32_to_cpu(*(__le32 *)&resp->variable[0])); return; }