diff options
author | zhenyu.z.wang@intel.com <zhenyu.z.wang@intel.com> | 2006-01-13 18:05:38 -0600 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2006-01-14 10:55:15 -0600 |
commit | bf310b8f582bddec20c27e32ffbaf8e2c91e147c (patch) | |
tree | 562a6ba3dc94f903f99e9a829b766d7abae8ec3e /drivers/scsi | |
parent | 42f72aa9e5bc969a34e5989fc00e7e2d71e8a95b (diff) | |
download | blackbird-op-linux-bf310b8f582bddec20c27e32ffbaf8e2c91e147c.tar.gz blackbird-op-linux-bf310b8f582bddec20c27e32ffbaf8e2c91e147c.zip |
[SCSI] iscsi: data under/over flow fix
We need to check the ISCSI_FLAG_DATA_* flags.
Signed-off-by: Alex Aizman <itn780@yahoo.com>
Signed-off-by: Dmitry Yusupov <dmitry_yus@yahoo.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/iscsi_tcp.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c index 49d6dd5572cb..550ff66ba9ec 100644 --- a/drivers/scsi/iscsi_tcp.c +++ b/drivers/scsi/iscsi_tcp.c @@ -357,7 +357,7 @@ iscsi_data_rsp(struct iscsi_conn *conn, struct iscsi_cmd_task *ctask) struct scsi_cmnd *sc = ctask->sc; conn->exp_statsn = be32_to_cpu(rhdr->statsn) + 1; - if (rhdr->flags & ISCSI_FLAG_CMD_UNDERFLOW) { + if (rhdr->flags & ISCSI_FLAG_DATA_UNDERFLOW) { int res_count = be32_to_cpu(rhdr->residual_count); if (res_count > 0 && @@ -367,9 +367,7 @@ iscsi_data_rsp(struct iscsi_conn *conn, struct iscsi_cmd_task *ctask) } else sc->result = (DID_BAD_TARGET << 16) | rhdr->cmd_status; - } else if (rhdr->flags & ISCSI_FLAG_CMD_BIDI_UNDERFLOW) - sc->result = (DID_BAD_TARGET << 16) | rhdr->cmd_status; - else if (rhdr->flags & ISCSI_FLAG_CMD_OVERFLOW) { + } else if (rhdr->flags & ISCSI_FLAG_DATA_OVERFLOW) { sc->resid = be32_to_cpu(rhdr->residual_count); sc->result = (DID_OK << 16) | rhdr->cmd_status; } else |