From: Tony Battersby Date: Wed, 14 Nov 2007 20:38:43 +0000 (-0600) Subject: [SCSI] iscsi: return data transfer residual for data-out commands X-Git-Tag: v2.6.24-rc4~7^2~4 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6ee6a2f0258c064bbc64ad97dc195063457ebebe;p=linux-2.6 [SCSI] iscsi: return data transfer residual for data-out commands 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 Signed-off-by: Mike Christie Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c index efceed451b..8b57af5baa 100644 --- a/drivers/scsi/libiscsi.c +++ b/drivers/scsi/libiscsi.c @@ -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);