All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [SCSI] iscsi: return data transfer residual for data-out commands
@ 2007-11-07 18:06 Tony Battersby
  2007-11-07 19:17 ` Boaz Harrosh
  0 siblings, 1 reply; 3+ messages in thread
From: Tony Battersby @ 2007-11-07 18:06 UTC (permalink / raw)
  To: linux-scsi, open-iscsi

Currently, the iSCSI driver returns the data transfer residual for
data-in commands (e.g. read) but not data-out commands (e.g. write).
This patch makes it return the data transfer residual for both types of
commands.

Signed-off-by: Tony Battersby <tonyb@cybernetics.com>
---
--- linux-2.6.24-rc2/drivers/scsi/libiscsi.c.orig	2007-11-07 12:52:20.000000000 -0500
+++ linux-2.6.24-rc2/drivers/scsi/libiscsi.c	2007-11-07 12:52:27.000000000 -0500
@@ -291,9 +291,6 @@ invalid_datalen:
 			   min_t(uint16_t, senselen, SCSI_SENSE_BUFFERSIZE));
 	}
 
-	if (sc->sc_data_direction == DMA_TO_DEVICE)
-		goto out;
-
 	if (rhdr->flags & ISCSI_FLAG_CMD_UNDERFLOW) {
 		int res_count = be32_to_cpu(rhdr->residual_count);
 



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-11-07 20:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-07 18:06 [PATCH] [SCSI] iscsi: return data transfer residual for data-out commands Tony Battersby
2007-11-07 19:17 ` Boaz Harrosh
2007-11-07 20:42   ` Mike Christie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.