diff options
-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) | |||
357 | struct scsi_cmnd *sc = ctask->sc; | 357 | struct scsi_cmnd *sc = ctask->sc; |
358 | 358 | ||
359 | conn->exp_statsn = be32_to_cpu(rhdr->statsn) + 1; | 359 | conn->exp_statsn = be32_to_cpu(rhdr->statsn) + 1; |
360 | if (rhdr->flags & ISCSI_FLAG_CMD_UNDERFLOW) { | 360 | if (rhdr->flags & ISCSI_FLAG_DATA_UNDERFLOW) { |
361 | int res_count = be32_to_cpu(rhdr->residual_count); | 361 | int res_count = be32_to_cpu(rhdr->residual_count); |
362 | 362 | ||
363 | if (res_count > 0 && | 363 | if (res_count > 0 && |
@@ -367,9 +367,7 @@ iscsi_data_rsp(struct iscsi_conn *conn, struct iscsi_cmd_task *ctask) | |||
367 | } else | 367 | } else |
368 | sc->result = (DID_BAD_TARGET << 16) | | 368 | sc->result = (DID_BAD_TARGET << 16) | |
369 | rhdr->cmd_status; | 369 | rhdr->cmd_status; |
370 | } else if (rhdr->flags & ISCSI_FLAG_CMD_BIDI_UNDERFLOW) | 370 | } else if (rhdr->flags & ISCSI_FLAG_DATA_OVERFLOW) { |
371 | sc->result = (DID_BAD_TARGET << 16) | rhdr->cmd_status; | ||
372 | else if (rhdr->flags & ISCSI_FLAG_CMD_OVERFLOW) { | ||
373 | sc->resid = be32_to_cpu(rhdr->residual_count); | 371 | sc->resid = be32_to_cpu(rhdr->residual_count); |
374 | sc->result = (DID_OK << 16) | rhdr->cmd_status; | 372 | sc->result = (DID_OK << 16) | rhdr->cmd_status; |
375 | } else | 373 | } else |