]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[SCSI] iscsi: return data transfer residual for data-out commands
authorTony Battersby <tonyb@cybernetics.com>
Wed, 14 Nov 2007 20:38:43 +0000 (14:38 -0600)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Wed, 14 Nov 2007 20:52:16 +0000 (14:52 -0600)
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>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
drivers/scsi/libiscsi.c

index efceed451b466245d847f59e4da02b7c141be70a..8b57af5baaec7d41c215c645b437af4a725b2acd 100644 (file)
@@ -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);