]> Git Repo - linux.git/commitdiff
[SCSI] sym53c8xx: fix resid calculation
authorTony Battersby <[email protected]>
Tue, 6 Nov 2007 21:07:04 +0000 (16:07 -0500)
committerJames Bottomley <[email protected]>
Fri, 8 Feb 2008 00:02:34 +0000 (18:02 -0600)
This patch fixes the calculation of the data transfer residual for the
case of a command that is supposed to transfer an odd number of bytes on
a wide bus but transfers nothing instead.

Signed-off-by: Tony Battersby <[email protected]>
Cc: Matthew Wilcox <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
drivers/scsi/sym53c8xx_2/sym_hipd.c

index 254bdaeb35ff69d970fffd76533e944fd60577b2..35142b5341b5358d045b216dabaf3d2fea618dc7 100644 (file)
@@ -3842,7 +3842,7 @@ int sym_compute_residual(struct sym_hcb *np, struct sym_ccb *cp)
        if (cp->startp == cp->phys.head.lastp ||
            sym_evaluate_dp(np, cp, scr_to_cpu(cp->phys.head.lastp),
                            &dp_ofs) < 0) {
-               return cp->data_len;
+               return cp->data_len - cp->odd_byte_adjustment;
        }
 
        /*
This page took 0.055862 seconds and 4 git commands to generate.