aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/be2iscsi/be_iscsi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/be2iscsi/be_iscsi.c')
-rw-r--r--drivers/scsi/be2iscsi/be_iscsi.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/drivers/scsi/be2iscsi/be_iscsi.c b/drivers/scsi/be2iscsi/be_iscsi.c
index 454027ccbf16..d9321ee01534 100644
--- a/drivers/scsi/be2iscsi/be_iscsi.c
+++ b/drivers/scsi/be2iscsi/be_iscsi.c
@@ -52,7 +52,7 @@ struct iscsi_cls_session *beiscsi_session_create(struct iscsi_endpoint *ep,
52 SE_DEBUG(DBG_LVL_8, "In beiscsi_session_create\n"); 52 SE_DEBUG(DBG_LVL_8, "In beiscsi_session_create\n");
53 53
54 if (!ep) { 54 if (!ep) {
55 SE_DEBUG(DBG_LVL_1, "beiscsi_session_create: invalid ep \n"); 55 SE_DEBUG(DBG_LVL_1, "beiscsi_session_create: invalid ep\n");
56 return NULL; 56 return NULL;
57 } 57 }
58 beiscsi_ep = ep->dd_data; 58 beiscsi_ep = ep->dd_data;
@@ -157,7 +157,7 @@ static int beiscsi_bindconn_cid(struct beiscsi_hba *phba,
157 "Connection table already occupied. Detected clash\n"); 157 "Connection table already occupied. Detected clash\n");
158 return -EINVAL; 158 return -EINVAL;
159 } else { 159 } else {
160 SE_DEBUG(DBG_LVL_8, "phba->conn_table[%d]=%p(beiscsi_conn) \n", 160 SE_DEBUG(DBG_LVL_8, "phba->conn_table[%d]=%p(beiscsi_conn)\n",
161 cid, beiscsi_conn); 161 cid, beiscsi_conn);
162 phba->conn_table[cid] = beiscsi_conn; 162 phba->conn_table[cid] = beiscsi_conn;
163 } 163 }
@@ -196,7 +196,7 @@ int beiscsi_conn_bind(struct iscsi_cls_session *cls_session,
196 196
197 if (beiscsi_ep->phba != phba) { 197 if (beiscsi_ep->phba != phba) {
198 SE_DEBUG(DBG_LVL_8, 198 SE_DEBUG(DBG_LVL_8,
199 "beiscsi_ep->hba=%p not equal to phba=%p \n", 199 "beiscsi_ep->hba=%p not equal to phba=%p\n",
200 beiscsi_ep->phba, phba); 200 beiscsi_ep->phba, phba);
201 return -EEXIST; 201 return -EEXIST;
202 } 202 }
@@ -204,7 +204,7 @@ int beiscsi_conn_bind(struct iscsi_cls_session *cls_session,
204 beiscsi_conn->beiscsi_conn_cid = beiscsi_ep->ep_cid; 204 beiscsi_conn->beiscsi_conn_cid = beiscsi_ep->ep_cid;
205 beiscsi_conn->ep = beiscsi_ep; 205 beiscsi_conn->ep = beiscsi_ep;
206 beiscsi_ep->conn = beiscsi_conn; 206 beiscsi_ep->conn = beiscsi_conn;
207 SE_DEBUG(DBG_LVL_8, "beiscsi_conn=%p conn=%p ep_cid=%d \n", 207 SE_DEBUG(DBG_LVL_8, "beiscsi_conn=%p conn=%p ep_cid=%d\n",
208 beiscsi_conn, conn, beiscsi_ep->ep_cid); 208 beiscsi_conn, conn, beiscsi_ep->ep_cid);
209 return beiscsi_bindconn_cid(phba, beiscsi_conn, beiscsi_ep->ep_cid); 209 return beiscsi_bindconn_cid(phba, beiscsi_conn, beiscsi_ep->ep_cid);
210} 210}
@@ -308,7 +308,7 @@ int beiscsi_get_host_param(struct Scsi_Host *shost,
308 case ISCSI_HOST_PARAM_HWADDRESS: 308 case ISCSI_HOST_PARAM_HWADDRESS:
309 tag = be_cmd_get_mac_addr(phba); 309 tag = be_cmd_get_mac_addr(phba);
310 if (!tag) { 310 if (!tag) {
311 SE_DEBUG(DBG_LVL_1, "be_cmd_get_mac_addr Failed \n"); 311 SE_DEBUG(DBG_LVL_1, "be_cmd_get_mac_addr Failed\n");
312 return -1; 312 return -1;
313 } else 313 } else
314 wait_event_interruptible(phba->ctrl.mcc_wait[tag], 314 wait_event_interruptible(phba->ctrl.mcc_wait[tag],
@@ -319,7 +319,7 @@ int beiscsi_get_host_param(struct Scsi_Host *shost,
319 status = phba->ctrl.mcc_numtag[tag] & 0x000000FF; 319 status = phba->ctrl.mcc_numtag[tag] & 0x000000FF;
320 if (status || extd_status) { 320 if (status || extd_status) {
321 SE_DEBUG(DBG_LVL_1, "be_cmd_get_mac_addr Failed" 321 SE_DEBUG(DBG_LVL_1, "be_cmd_get_mac_addr Failed"
322 " status = %d extd_status = %d \n", 322 " status = %d extd_status = %d\n",
323 status, extd_status); 323 status, extd_status);
324 free_mcc_tag(&phba->ctrl, tag); 324 free_mcc_tag(&phba->ctrl, tag);
325 return -1; 325 return -1;
@@ -493,7 +493,7 @@ static int beiscsi_open_conn(struct iscsi_endpoint *ep,
493 SE_DEBUG(DBG_LVL_1, "No free cid available\n"); 493 SE_DEBUG(DBG_LVL_1, "No free cid available\n");
494 return ret; 494 return ret;
495 } 495 }
496 SE_DEBUG(DBG_LVL_8, "In beiscsi_open_conn, ep_cid=%d ", 496 SE_DEBUG(DBG_LVL_8, "In beiscsi_open_conn, ep_cid=%d\n",
497 beiscsi_ep->ep_cid); 497 beiscsi_ep->ep_cid);
498 phba->ep_array[beiscsi_ep->ep_cid - 498 phba->ep_array[beiscsi_ep->ep_cid -
499 phba->fw_config.iscsi_cid_start] = ep; 499 phba->fw_config.iscsi_cid_start] = ep;
@@ -507,7 +507,7 @@ static int beiscsi_open_conn(struct iscsi_endpoint *ep,
507 tag = mgmt_open_connection(phba, dst_addr, beiscsi_ep); 507 tag = mgmt_open_connection(phba, dst_addr, beiscsi_ep);
508 if (!tag) { 508 if (!tag) {
509 SE_DEBUG(DBG_LVL_1, 509 SE_DEBUG(DBG_LVL_1,
510 "mgmt_open_connection Failed for cid=%d \n", 510 "mgmt_open_connection Failed for cid=%d\n",
511 beiscsi_ep->ep_cid); 511 beiscsi_ep->ep_cid);
512 } else { 512 } else {
513 wait_event_interruptible(phba->ctrl.mcc_wait[tag], 513 wait_event_interruptible(phba->ctrl.mcc_wait[tag],
@@ -526,7 +526,7 @@ static int beiscsi_open_conn(struct iscsi_endpoint *ep,
526 wrb = queue_get_wrb(mccq, wrb_num); 526 wrb = queue_get_wrb(mccq, wrb_num);
527 free_mcc_tag(&phba->ctrl, tag); 527 free_mcc_tag(&phba->ctrl, tag);
528 528
529 ptcpcnct_out = embedded_payload(wrb); 529 ptcpcnct_out = embedded_payload(wrb);
530 beiscsi_ep = ep->dd_data; 530 beiscsi_ep = ep->dd_data;
531 beiscsi_ep->fw_handle = ptcpcnct_out->connection_handle; 531 beiscsi_ep->fw_handle = ptcpcnct_out->connection_handle;
532 beiscsi_ep->cid_vld = 1; 532 beiscsi_ep->cid_vld = 1;
@@ -556,18 +556,18 @@ beiscsi_ep_connect(struct Scsi_Host *shost, struct sockaddr *dst_addr,
556 struct iscsi_endpoint *ep; 556 struct iscsi_endpoint *ep;
557 int ret; 557 int ret;
558 558
559 SE_DEBUG(DBG_LVL_8, "In beiscsi_ep_connect \n"); 559 SE_DEBUG(DBG_LVL_8, "In beiscsi_ep_connect\n");
560 if (shost) 560 if (shost)
561 phba = iscsi_host_priv(shost); 561 phba = iscsi_host_priv(shost);
562 else { 562 else {
563 ret = -ENXIO; 563 ret = -ENXIO;
564 SE_DEBUG(DBG_LVL_1, "shost is NULL \n"); 564 SE_DEBUG(DBG_LVL_1, "shost is NULL\n");
565 return ERR_PTR(ret); 565 return ERR_PTR(ret);
566 } 566 }
567 567
568 if (phba->state != BE_ADAPTER_UP) { 568 if (phba->state != BE_ADAPTER_UP) {
569 ret = -EBUSY; 569 ret = -EBUSY;
570 SE_DEBUG(DBG_LVL_1, "The Adapter state is Not UP \n"); 570 SE_DEBUG(DBG_LVL_1, "The Adapter state is Not UP\n");
571 return ERR_PTR(ret); 571 return ERR_PTR(ret);
572 } 572 }
573 573
@@ -581,7 +581,7 @@ beiscsi_ep_connect(struct Scsi_Host *shost, struct sockaddr *dst_addr,
581 beiscsi_ep->phba = phba; 581 beiscsi_ep->phba = phba;
582 beiscsi_ep->openiscsi_ep = ep; 582 beiscsi_ep->openiscsi_ep = ep;
583 if (beiscsi_open_conn(ep, NULL, dst_addr, non_blocking)) { 583 if (beiscsi_open_conn(ep, NULL, dst_addr, non_blocking)) {
584 SE_DEBUG(DBG_LVL_1, "Failed in beiscsi_open_conn \n"); 584 SE_DEBUG(DBG_LVL_1, "Failed in beiscsi_open_conn\n");
585 ret = -ENOMEM; 585 ret = -ENOMEM;
586 goto free_ep; 586 goto free_ep;
587 } 587 }
@@ -624,7 +624,7 @@ static int beiscsi_close_conn(struct beiscsi_endpoint *beiscsi_ep, int flag)
624 624
625 tag = mgmt_upload_connection(phba, beiscsi_ep->ep_cid, flag); 625 tag = mgmt_upload_connection(phba, beiscsi_ep->ep_cid, flag);
626 if (!tag) { 626 if (!tag) {
627 SE_DEBUG(DBG_LVL_8, "upload failed for cid 0x%x", 627 SE_DEBUG(DBG_LVL_8, "upload failed for cid 0x%x\n",
628 beiscsi_ep->ep_cid); 628 beiscsi_ep->ep_cid);
629 ret = -1; 629 ret = -1;
630 } else { 630 } else {
@@ -646,7 +646,7 @@ static int beiscsi_unbind_conn_to_cid(struct beiscsi_hba *phba,
646 if (phba->conn_table[cid]) 646 if (phba->conn_table[cid])
647 phba->conn_table[cid] = NULL; 647 phba->conn_table[cid] = NULL;
648 else { 648 else {
649 SE_DEBUG(DBG_LVL_8, "Connection table Not occupied. \n"); 649 SE_DEBUG(DBG_LVL_8, "Connection table Not occupied.\n");
650 return -EINVAL; 650 return -EINVAL;
651 } 651 }
652 return 0; 652 return 0;
@@ -687,7 +687,7 @@ void beiscsi_ep_disconnect(struct iscsi_endpoint *ep)
687 savecfg_flag); 687 savecfg_flag);
688 if (!tag) { 688 if (!tag) {
689 SE_DEBUG(DBG_LVL_1, 689 SE_DEBUG(DBG_LVL_1,
690 "mgmt_invalidate_connection Failed for cid=%d \n", 690 "mgmt_invalidate_connection Failed for cid=%d\n",
691 beiscsi_ep->ep_cid); 691 beiscsi_ep->ep_cid);
692 } else { 692 } else {
693 wait_event_interruptible(phba->ctrl.mcc_wait[tag], 693 wait_event_interruptible(phba->ctrl.mcc_wait[tag],