[PATCH] mptscsih: set resid for retried commands

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

 



Most of the time, the data transfer residual is initialized to 0 before the
SCSI command is queued, so it is not necessary to set it to 0 explicitly if
the command completes successfully.  However, if the command fails with e.g.
queue full status, the data transfer residual will be set to a nonzero value
when the command is queued for retry.  This patch ensures that the residual
is set to 0 if the retry completes successfully rather than retaining the
residual from the first execution of the command.

--- linux-2.6.17-rc3/drivers/message/fusion/mptscsih.c.orig	2006-04-27 13:45:48.000000000 -0400
+++ linux-2.6.17-rc3/drivers/message/fusion/mptscsih.c	2006-04-27 13:46:45.000000000 -0400
@@ -569,7 +569,7 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F
 
 	if (pScsiReply == NULL) {
 		/* special context reply handling */
-		;
+		sc->resid = 0;
 	} else {
 		u32	 xfer_cnt;
 		u16	 status;

Anthony J. Battersby
Cybernetics

-
: 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