[SCSI] stex: use resid for xfer len information
authorEd Lin <ed.lin@promise.com>
Thu, 5 Jul 2007 19:09:06 +0000 (12:09 -0700)
committerJames Bottomley <jejb@mulgrave.localdomain>
Sat, 14 Jul 2007 23:59:10 +0000 (18:59 -0500)
The original implementation in stex_ys_commands() is inappropriate.
For xfer len information, we should use resid instead.

Signed-off-by: Ed Lin <ed.lin@promise.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/stex.c

index adda296b594bfbd2389081990e441f1497802a15..72f6d8015358d6f52c967f51876d53cac2597c29 100644 (file)
@@ -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;
        }