diff options
author | Tony Battersby <tonyb@cybernetics.com> | 2007-11-14 15:38:43 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2007-11-14 15:52:16 -0500 |
commit | 6ee6a2f0258c064bbc64ad97dc195063457ebebe (patch) | |
tree | c2c00967dcb1c0f7724dbe40fda013ede6dba76a /drivers/scsi | |
parent | 505f76b3061f6e74a50f378e45ac931abc1fe784 (diff) |
[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 <tonyb@cybernetics.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/libiscsi.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c index efceed451b46..8b57af5baaec 100644 --- a/drivers/scsi/libiscsi.c +++ b/drivers/scsi/libiscsi.c | |||
@@ -291,9 +291,6 @@ invalid_datalen: | |||
291 | min_t(uint16_t, senselen, SCSI_SENSE_BUFFERSIZE)); | 291 | min_t(uint16_t, senselen, SCSI_SENSE_BUFFERSIZE)); |
292 | } | 292 | } |
293 | 293 | ||
294 | if (sc->sc_data_direction == DMA_TO_DEVICE) | ||
295 | goto out; | ||
296 | |||
297 | if (rhdr->flags & ISCSI_FLAG_CMD_UNDERFLOW) { | 294 | if (rhdr->flags & ISCSI_FLAG_CMD_UNDERFLOW) { |
298 | int res_count = be32_to_cpu(rhdr->residual_count); | 295 | int res_count = be32_to_cpu(rhdr->residual_count); |
299 | 296 | ||