aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorEddie Wai <eddie.wai@broadcom.com>2010-08-12 19:44:27 -0400
committerJames Bottomley <James.Bottomley@suse.de>2010-09-05 13:39:50 -0400
commit39304072ac401015ee3c0fbfa724574dbedb46b5 (patch)
tree4ae0ee1b5d12d596ece4b2d5323ca763eb3faeb4 /drivers/scsi
parenta87b04de66eec66a728fb65c70a8bf8bb4d1eb48 (diff)
[SCSI] bnx2i: Fixed a protocol violation on nopout responses
According to RFC3720, nopout packet sent in response to unsolicited nopin packet requesting a response must retain the TTT of the requester. Signed-off-by: Eddie Wai <eddie.wai@broadcom.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/bnx2i/bnx2i.h2
-rw-r--r--drivers/scsi/bnx2i/bnx2i_hwi.c5
-rw-r--r--drivers/scsi/bnx2i/bnx2i_iscsi.c2
3 files changed, 3 insertions, 6 deletions
diff --git a/drivers/scsi/bnx2i/bnx2i.h b/drivers/scsi/bnx2i/bnx2i.h
index 00c033511cbf..b6345d91bb66 100644
--- a/drivers/scsi/bnx2i/bnx2i.h
+++ b/drivers/scsi/bnx2i/bnx2i.h
@@ -753,7 +753,7 @@ extern int bnx2i_send_iscsi_tmf(struct bnx2i_conn *conn,
753extern int bnx2i_send_iscsi_scsicmd(struct bnx2i_conn *conn, 753extern int bnx2i_send_iscsi_scsicmd(struct bnx2i_conn *conn,
754 struct bnx2i_cmd *cmnd); 754 struct bnx2i_cmd *cmnd);
755extern int bnx2i_send_iscsi_nopout(struct bnx2i_conn *conn, 755extern int bnx2i_send_iscsi_nopout(struct bnx2i_conn *conn,
756 struct iscsi_task *mtask, u32 ttt, 756 struct iscsi_task *mtask,
757 char *datap, int data_len, int unsol); 757 char *datap, int data_len, int unsol);
758extern int bnx2i_send_iscsi_logout(struct bnx2i_conn *conn, 758extern int bnx2i_send_iscsi_logout(struct bnx2i_conn *conn,
759 struct iscsi_task *mtask); 759 struct iscsi_task *mtask);
diff --git a/drivers/scsi/bnx2i/bnx2i_hwi.c b/drivers/scsi/bnx2i/bnx2i_hwi.c
index d23fc256d585..015efb579384 100644
--- a/drivers/scsi/bnx2i/bnx2i_hwi.c
+++ b/drivers/scsi/bnx2i/bnx2i_hwi.c
@@ -464,7 +464,6 @@ int bnx2i_send_iscsi_scsicmd(struct bnx2i_conn *bnx2i_conn,
464 * @conn: iscsi connection 464 * @conn: iscsi connection
465 * @cmd: driver command structure which is requesting 465 * @cmd: driver command structure which is requesting
466 * a WQE to sent to chip for further processing 466 * a WQE to sent to chip for further processing
467 * @ttt: TTT to be used when building pdu header
468 * @datap: payload buffer pointer 467 * @datap: payload buffer pointer
469 * @data_len: payload data length 468 * @data_len: payload data length
470 * @unsol: indicated whether nopout pdu is unsolicited pdu or 469 * @unsol: indicated whether nopout pdu is unsolicited pdu or
@@ -473,7 +472,7 @@ int bnx2i_send_iscsi_scsicmd(struct bnx2i_conn *bnx2i_conn,
473 * prepare and post a nopout request WQE to CNIC firmware 472 * prepare and post a nopout request WQE to CNIC firmware
474 */ 473 */
475int bnx2i_send_iscsi_nopout(struct bnx2i_conn *bnx2i_conn, 474int bnx2i_send_iscsi_nopout(struct bnx2i_conn *bnx2i_conn,
476 struct iscsi_task *task, u32 ttt, 475 struct iscsi_task *task,
477 char *datap, int data_len, int unsol) 476 char *datap, int data_len, int unsol)
478{ 477{
479 struct bnx2i_endpoint *ep = bnx2i_conn->ep; 478 struct bnx2i_endpoint *ep = bnx2i_conn->ep;
@@ -498,7 +497,7 @@ int bnx2i_send_iscsi_nopout(struct bnx2i_conn *bnx2i_conn,
498 nopout_wqe->itt = ((u16)task->itt | 497 nopout_wqe->itt = ((u16)task->itt |
499 (ISCSI_TASK_TYPE_MPATH << 498 (ISCSI_TASK_TYPE_MPATH <<
500 ISCSI_TMF_REQUEST_TYPE_SHIFT)); 499 ISCSI_TMF_REQUEST_TYPE_SHIFT));
501 nopout_wqe->ttt = ttt; 500 nopout_wqe->ttt = nopout_hdr->ttt;
502 nopout_wqe->flags = 0; 501 nopout_wqe->flags = 0;
503 if (!unsol) 502 if (!unsol)
504 nopout_wqe->flags = ISCSI_NOP_OUT_REQUEST_LOCAL_COMPLETION; 503 nopout_wqe->flags = ISCSI_NOP_OUT_REQUEST_LOCAL_COMPLETION;
diff --git a/drivers/scsi/bnx2i/bnx2i_iscsi.c b/drivers/scsi/bnx2i/bnx2i_iscsi.c
index a46ccc380ab1..36b245b0dd3c 100644
--- a/drivers/scsi/bnx2i/bnx2i_iscsi.c
+++ b/drivers/scsi/bnx2i/bnx2i_iscsi.c
@@ -1078,11 +1078,9 @@ static int bnx2i_iscsi_send_generic_request(struct iscsi_task *task)
1078 buf = bnx2i_conn->gen_pdu.req_buf; 1078 buf = bnx2i_conn->gen_pdu.req_buf;
1079 if (data_len) 1079 if (data_len)
1080 rc = bnx2i_send_iscsi_nopout(bnx2i_conn, task, 1080 rc = bnx2i_send_iscsi_nopout(bnx2i_conn, task,
1081 RESERVED_ITT,
1082 buf, data_len, 1); 1081 buf, data_len, 1);
1083 else 1082 else
1084 rc = bnx2i_send_iscsi_nopout(bnx2i_conn, task, 1083 rc = bnx2i_send_iscsi_nopout(bnx2i_conn, task,
1085 RESERVED_ITT,
1086 NULL, 0, 1); 1084 NULL, 0, 1);
1087 break; 1085 break;
1088 case ISCSI_OP_LOGOUT: 1086 case ISCSI_OP_LOGOUT: