[PATCH] [SCSI] sym53c8xx: fix resid calculation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <tonyb@xxxxxxxxxxxxxxx>
---
--- linux-2.6.24-rc1-git15/drivers/scsi/sym53c8xx_2/sym_hipd.c.orig	2007-11-06 15:51:12.000000000 -0500
+++ linux-2.6.24-rc1-git15/drivers/scsi/sym53c8xx_2/sym_hipd.c	2007-11-06 15:51:44.000000000 -0500
@@ -3842,7 +3842,7 @@ int sym_compute_residual(struct sym_hcb 
 	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;
 	}
 
 	/*


-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux