aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/be2iscsi/be_iscsi.c
diff options
context:
space:
mode:
authorJayamohan Kallickal <jayamohank@gmail.com>2013-04-05 23:38:23 -0400
committerJames Bottomley <JBottomley@Parallels.com>2013-05-02 11:08:13 -0400
commit1e234bbbea10de2638f6d95a22379bc487e762cb (patch)
tree23a2316c3c284feafc01e24cb47231f1679947bf /drivers/scsi/be2iscsi/be_iscsi.c
parenta8081e346ad3f8bc2449052908095c2675a9996f (diff)
[SCSI] be2iscsi: Fix MBX Command issues
- Check Ready Bit before posting the BMBX Hi Address - Fix the parameters passed to beiscsi_mccq_compl in beiscsi_open_conn() - Fix tag value check in beiscsi_ep_connect. Signed-off-by: John Soni Jose <sony.john-n@emulex.com> Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/be2iscsi/be_iscsi.c')
-rw-r--r--drivers/scsi/be2iscsi/be_iscsi.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/scsi/be2iscsi/be_iscsi.c b/drivers/scsi/be2iscsi/be_iscsi.c
index 9014690fe841..461f859cfbf6 100644
--- a/drivers/scsi/be2iscsi/be_iscsi.c
+++ b/drivers/scsi/be2iscsi/be_iscsi.c
@@ -1009,7 +1009,6 @@ static int beiscsi_open_conn(struct iscsi_endpoint *ep,
1009{ 1009{
1010 struct beiscsi_endpoint *beiscsi_ep = ep->dd_data; 1010 struct beiscsi_endpoint *beiscsi_ep = ep->dd_data;
1011 struct beiscsi_hba *phba = beiscsi_ep->phba; 1011 struct beiscsi_hba *phba = beiscsi_ep->phba;
1012 struct be_mcc_wrb *wrb;
1013 struct tcp_connect_and_offload_out *ptcpcnct_out; 1012 struct tcp_connect_and_offload_out *ptcpcnct_out;
1014 struct be_dma_mem nonemb_cmd; 1013 struct be_dma_mem nonemb_cmd;
1015 unsigned int tag; 1014 unsigned int tag;
@@ -1055,7 +1054,7 @@ static int beiscsi_open_conn(struct iscsi_endpoint *ep,
1055 nonemb_cmd.size = sizeof(struct tcp_connect_and_offload_in); 1054 nonemb_cmd.size = sizeof(struct tcp_connect_and_offload_in);
1056 memset(nonemb_cmd.va, 0, nonemb_cmd.size); 1055 memset(nonemb_cmd.va, 0, nonemb_cmd.size);
1057 tag = mgmt_open_connection(phba, dst_addr, beiscsi_ep, &nonemb_cmd); 1056 tag = mgmt_open_connection(phba, dst_addr, beiscsi_ep, &nonemb_cmd);
1058 if (!tag) { 1057 if (tag <= 0) {
1059 beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG, 1058 beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG,
1060 "BS_%d : mgmt_open_connection Failed for cid=%d\n", 1059 "BS_%d : mgmt_open_connection Failed for cid=%d\n",
1061 beiscsi_ep->ep_cid); 1060 beiscsi_ep->ep_cid);
@@ -1066,7 +1065,7 @@ static int beiscsi_open_conn(struct iscsi_endpoint *ep,
1066 return -EAGAIN; 1065 return -EAGAIN;
1067 } 1066 }
1068 1067
1069 ret = beiscsi_mccq_compl(phba, tag, &wrb, NULL); 1068 ret = beiscsi_mccq_compl(phba, tag, NULL, nonemb_cmd.va);
1070 if (ret) { 1069 if (ret) {
1071 beiscsi_log(phba, KERN_ERR, 1070 beiscsi_log(phba, KERN_ERR,
1072 BEISCSI_LOG_CONFIG | BEISCSI_LOG_MBOX, 1071 BEISCSI_LOG_CONFIG | BEISCSI_LOG_MBOX,
@@ -1077,7 +1076,7 @@ static int beiscsi_open_conn(struct iscsi_endpoint *ep,
1077 goto free_ep; 1076 goto free_ep;
1078 } 1077 }
1079 1078
1080 ptcpcnct_out = embedded_payload(wrb); 1079 ptcpcnct_out = (struct tcp_connect_and_offload_out *)nonemb_cmd.va;
1081 beiscsi_ep = ep->dd_data; 1080 beiscsi_ep = ep->dd_data;
1082 beiscsi_ep->fw_handle = ptcpcnct_out->connection_handle; 1081 beiscsi_ep->fw_handle = ptcpcnct_out->connection_handle;
1083 beiscsi_ep->cid_vld = 1; 1082 beiscsi_ep->cid_vld = 1;