diff options
author | John Soni Jose <sony.john-n@emulex.com> | 2012-08-20 13:30:18 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2012-09-14 12:59:27 -0400 |
commit | 99bc5d55c06cbf9ac2d8ab7fb8348c4abce5fbaf (patch) | |
tree | fbee8df63f7a62916e93fcbae5f3e0cc9d103735 /drivers/scsi/be2iscsi/be_mgmt.c | |
parent | 9aef4200ee25636edd77b022f996b6f5870ce567 (diff) |
[SCSI] be2iscsi: Added Logging mechanism for the driver.
Added new log level mechanism for different events. These
log levels can be set at driver load time/run time. The
log level is set for each Scsi_host.
Fixed few multi-line print warning to get over the new checkpatch.pl
warnings on multi-line strings.
Signed-off-by: John Soni Jose <sony.john-n@emulex.com>
Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/be2iscsi/be_mgmt.c')
-rw-r--r-- | drivers/scsi/be2iscsi/be_mgmt.c | 157 |
1 files changed, 95 insertions, 62 deletions
diff --git a/drivers/scsi/be2iscsi/be_mgmt.c b/drivers/scsi/be2iscsi/be_mgmt.c index e294b0ae324f..3dca332acce2 100644 --- a/drivers/scsi/be2iscsi/be_mgmt.c +++ b/drivers/scsi/be2iscsi/be_mgmt.c | |||
@@ -42,7 +42,10 @@ unsigned int mgmt_reopen_session(struct beiscsi_hba *phba, | |||
42 | struct be_cmd_reopen_session_req *req; | 42 | struct be_cmd_reopen_session_req *req; |
43 | unsigned int tag = 0; | 43 | unsigned int tag = 0; |
44 | 44 | ||
45 | SE_DEBUG(DBG_LVL_8, "In bescsi_get_boot_target\n"); | 45 | beiscsi_log(phba, KERN_INFO, |
46 | BEISCSI_LOG_CONFIG | BEISCSI_LOG_MBOX, | ||
47 | "BG_%d : In bescsi_get_boot_target\n"); | ||
48 | |||
46 | spin_lock(&ctrl->mbox_lock); | 49 | spin_lock(&ctrl->mbox_lock); |
47 | tag = alloc_mcc_tag(phba); | 50 | tag = alloc_mcc_tag(phba); |
48 | if (!tag) { | 51 | if (!tag) { |
@@ -74,7 +77,10 @@ unsigned int mgmt_get_boot_target(struct beiscsi_hba *phba) | |||
74 | struct be_cmd_get_boot_target_req *req; | 77 | struct be_cmd_get_boot_target_req *req; |
75 | unsigned int tag = 0; | 78 | unsigned int tag = 0; |
76 | 79 | ||
77 | SE_DEBUG(DBG_LVL_8, "In bescsi_get_boot_target\n"); | 80 | beiscsi_log(phba, KERN_INFO, |
81 | BEISCSI_LOG_CONFIG | BEISCSI_LOG_MBOX, | ||
82 | "BG_%d : In bescsi_get_boot_target\n"); | ||
83 | |||
78 | spin_lock(&ctrl->mbox_lock); | 84 | spin_lock(&ctrl->mbox_lock); |
79 | tag = alloc_mcc_tag(phba); | 85 | tag = alloc_mcc_tag(phba); |
80 | if (!tag) { | 86 | if (!tag) { |
@@ -106,7 +112,10 @@ unsigned int mgmt_get_session_info(struct beiscsi_hba *phba, | |||
106 | struct be_cmd_get_session_resp *resp; | 112 | struct be_cmd_get_session_resp *resp; |
107 | struct be_sge *sge; | 113 | struct be_sge *sge; |
108 | 114 | ||
109 | SE_DEBUG(DBG_LVL_8, "In beiscsi_get_session_info\n"); | 115 | beiscsi_log(phba, KERN_INFO, |
116 | BEISCSI_LOG_CONFIG | BEISCSI_LOG_MBOX, | ||
117 | "BG_%d : In beiscsi_get_session_info\n"); | ||
118 | |||
110 | spin_lock(&ctrl->mbox_lock); | 119 | spin_lock(&ctrl->mbox_lock); |
111 | tag = alloc_mcc_tag(phba); | 120 | tag = alloc_mcc_tag(phba); |
112 | if (!tag) { | 121 | if (!tag) { |
@@ -165,16 +174,16 @@ int mgmt_get_fw_config(struct be_ctrl_info *ctrl, | |||
165 | phba->fw_config.iscsi_cid_count = | 174 | phba->fw_config.iscsi_cid_count = |
166 | pfw_cfg->ulp[0].sq_count; | 175 | pfw_cfg->ulp[0].sq_count; |
167 | if (phba->fw_config.iscsi_cid_count > (BE2_MAX_SESSIONS / 2)) { | 176 | if (phba->fw_config.iscsi_cid_count > (BE2_MAX_SESSIONS / 2)) { |
168 | SE_DEBUG(DBG_LVL_8, | 177 | beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT, |
169 | "FW reported MAX CXNS as %d\t" | 178 | "BG_%d : FW reported MAX CXNS as %d\t" |
170 | "Max Supported = %d.\n", | 179 | "Max Supported = %d.\n", |
171 | phba->fw_config.iscsi_cid_count, | 180 | phba->fw_config.iscsi_cid_count, |
172 | BE2_MAX_SESSIONS); | 181 | BE2_MAX_SESSIONS); |
173 | phba->fw_config.iscsi_cid_count = BE2_MAX_SESSIONS / 2; | 182 | phba->fw_config.iscsi_cid_count = BE2_MAX_SESSIONS / 2; |
174 | } | 183 | } |
175 | } else { | 184 | } else { |
176 | shost_printk(KERN_WARNING, phba->shost, | 185 | beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_INIT, |
177 | "Failed in mgmt_get_fw_config\n"); | 186 | "BG_%d : Failed in mgmt_get_fw_config\n"); |
178 | } | 187 | } |
179 | 188 | ||
180 | spin_unlock(&ctrl->mbox_lock); | 189 | spin_unlock(&ctrl->mbox_lock); |
@@ -194,9 +203,9 @@ int mgmt_check_supported_fw(struct be_ctrl_info *ctrl, | |||
194 | sizeof(struct be_mgmt_controller_attributes), | 203 | sizeof(struct be_mgmt_controller_attributes), |
195 | &nonemb_cmd.dma); | 204 | &nonemb_cmd.dma); |
196 | if (nonemb_cmd.va == NULL) { | 205 | if (nonemb_cmd.va == NULL) { |
197 | SE_DEBUG(DBG_LVL_1, | 206 | beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT, |
198 | "Failed to allocate memory for mgmt_check_supported_fw" | 207 | "BG_%d : Failed to allocate memory for " |
199 | "\n"); | 208 | "mgmt_check_supported_fw\n"); |
200 | return -ENOMEM; | 209 | return -ENOMEM; |
201 | } | 210 | } |
202 | nonemb_cmd.size = sizeof(struct be_mgmt_controller_attributes); | 211 | nonemb_cmd.size = sizeof(struct be_mgmt_controller_attributes); |
@@ -213,18 +222,23 @@ int mgmt_check_supported_fw(struct be_ctrl_info *ctrl, | |||
213 | status = be_mbox_notify(ctrl); | 222 | status = be_mbox_notify(ctrl); |
214 | if (!status) { | 223 | if (!status) { |
215 | struct be_mgmt_controller_attributes_resp *resp = nonemb_cmd.va; | 224 | struct be_mgmt_controller_attributes_resp *resp = nonemb_cmd.va; |
216 | SE_DEBUG(DBG_LVL_8, "Firmware version of CMD: %s\n", | 225 | beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT, |
217 | resp->params.hba_attribs.flashrom_version_string); | 226 | "BG_%d : Firmware Version of CMD : %s\n" |
218 | SE_DEBUG(DBG_LVL_8, "Firmware version is : %s\n", | 227 | "Firmware Version is : %s\n" |
219 | resp->params.hba_attribs.firmware_version_string); | 228 | "Developer Build, not performing version check...\n", |
220 | SE_DEBUG(DBG_LVL_8, | 229 | resp->params.hba_attribs |
221 | "Developer Build, not performing version check...\n"); | 230 | .flashrom_version_string, |
231 | resp->params.hba_attribs. | ||
232 | firmware_version_string); | ||
233 | |||
222 | phba->fw_config.iscsi_features = | 234 | phba->fw_config.iscsi_features = |
223 | resp->params.hba_attribs.iscsi_features; | 235 | resp->params.hba_attribs.iscsi_features; |
224 | SE_DEBUG(DBG_LVL_8, " phba->fw_config.iscsi_features = %d\n", | 236 | beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT, |
225 | phba->fw_config.iscsi_features); | 237 | "BM_%d : phba->fw_config.iscsi_features = %d\n", |
238 | phba->fw_config.iscsi_features); | ||
226 | } else | 239 | } else |
227 | SE_DEBUG(DBG_LVL_1, " Failed in mgmt_check_supported_fw\n"); | 240 | beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT, |
241 | "BG_%d : Failed in mgmt_check_supported_fw\n"); | ||
228 | spin_unlock(&ctrl->mbox_lock); | 242 | spin_unlock(&ctrl->mbox_lock); |
229 | if (nonemb_cmd.va) | 243 | if (nonemb_cmd.va) |
230 | pci_free_consistent(ctrl->pdev, nonemb_cmd.size, | 244 | pci_free_consistent(ctrl->pdev, nonemb_cmd.size, |
@@ -273,9 +287,10 @@ unsigned int mgmt_vendor_specific_fw_cmd(struct be_ctrl_info *ctrl, | |||
273 | OPCODE_COMMON_READ_FLASH, sizeof(*req)); | 287 | OPCODE_COMMON_READ_FLASH, sizeof(*req)); |
274 | break; | 288 | break; |
275 | default: | 289 | default: |
276 | shost_printk(KERN_WARNING, phba->shost, | 290 | beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_CONFIG, |
277 | "Unsupported cmd = 0x%x\n\n", bsg_req->rqst_data. | 291 | "BG_%d : Unsupported cmd = 0x%x\n\n", |
278 | h_vendor.vendor_cmd[0]); | 292 | bsg_req->rqst_data.h_vendor.vendor_cmd[0]); |
293 | |||
279 | spin_unlock(&ctrl->mbox_lock); | 294 | spin_unlock(&ctrl->mbox_lock); |
280 | return -ENOSYS; | 295 | return -ENOSYS; |
281 | } | 296 | } |
@@ -319,8 +334,8 @@ int mgmt_epfw_cleanup(struct beiscsi_hba *phba, unsigned short chute) | |||
319 | 334 | ||
320 | status = be_mcc_notify_wait(phba); | 335 | status = be_mcc_notify_wait(phba); |
321 | if (status) | 336 | if (status) |
322 | shost_printk(KERN_WARNING, phba->shost, | 337 | beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_INIT, |
323 | " mgmt_epfw_cleanup , FAILED\n"); | 338 | "BG_%d : mgmt_epfw_cleanup , FAILED\n"); |
324 | spin_unlock(&ctrl->mbox_lock); | 339 | spin_unlock(&ctrl->mbox_lock); |
325 | return status; | 340 | return status; |
326 | } | 341 | } |
@@ -503,8 +518,9 @@ int mgmt_open_connection(struct beiscsi_hba *phba, | |||
503 | &daddr_in6->sin6_addr.in6_u.u6_addr8, 16); | 518 | &daddr_in6->sin6_addr.in6_u.u6_addr8, 16); |
504 | beiscsi_ep->ip_type = BE2_IPV6; | 519 | beiscsi_ep->ip_type = BE2_IPV6; |
505 | } else{ | 520 | } else{ |
506 | shost_printk(KERN_ERR, phba->shost, "unknown addr family %d\n", | 521 | beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG, |
507 | dst_addr->sa_family); | 522 | "BG_%d : unknown addr family %d\n", |
523 | dst_addr->sa_family); | ||
508 | spin_unlock(&ctrl->mbox_lock); | 524 | spin_unlock(&ctrl->mbox_lock); |
509 | free_mcc_tag(&phba->ctrl, tag); | 525 | free_mcc_tag(&phba->ctrl, tag); |
510 | return -EINVAL; | 526 | return -EINVAL; |
@@ -515,7 +531,8 @@ int mgmt_open_connection(struct beiscsi_hba *phba, | |||
515 | if (phba->nxt_cqid == phba->num_cpus) | 531 | if (phba->nxt_cqid == phba->num_cpus) |
516 | phba->nxt_cqid = 0; | 532 | phba->nxt_cqid = 0; |
517 | req->cq_id = phwi_context->be_cq[i].id; | 533 | req->cq_id = phwi_context->be_cq[i].id; |
518 | SE_DEBUG(DBG_LVL_8, "i=%d cq_id=%d\n", i, req->cq_id); | 534 | beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_CONFIG, |
535 | "BG_%d : i=%d cq_id=%d\n", i, req->cq_id); | ||
519 | req->defq_id = def_hdr_id; | 536 | req->defq_id = def_hdr_id; |
520 | req->hdr_ring_id = def_hdr_id; | 537 | req->hdr_ring_id = def_hdr_id; |
521 | req->data_ring_id = def_data_id; | 538 | req->data_ring_id = def_data_id; |
@@ -550,8 +567,8 @@ unsigned int mgmt_get_all_if_id(struct beiscsi_hba *phba) | |||
550 | if (!status) | 567 | if (!status) |
551 | phba->interface_handle = pbe_allid->if_hndl_list[0]; | 568 | phba->interface_handle = pbe_allid->if_hndl_list[0]; |
552 | else { | 569 | else { |
553 | shost_printk(KERN_WARNING, phba->shost, | 570 | beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_CONFIG, |
554 | "Failed in mgmt_get_all_if_id\n"); | 571 | "BG_%d : Failed in mgmt_get_all_if_id\n"); |
555 | } | 572 | } |
556 | spin_unlock(&ctrl->mbox_lock); | 573 | spin_unlock(&ctrl->mbox_lock); |
557 | 574 | ||
@@ -594,9 +611,10 @@ static int mgmt_exec_nonemb_cmd(struct beiscsi_hba *phba, | |||
594 | extd_status = (phba->ctrl.mcc_numtag[tag] & 0x0000FF00) >> 8; | 611 | extd_status = (phba->ctrl.mcc_numtag[tag] & 0x0000FF00) >> 8; |
595 | status = phba->ctrl.mcc_numtag[tag] & 0x000000FF; | 612 | status = phba->ctrl.mcc_numtag[tag] & 0x000000FF; |
596 | if (status || extd_status) { | 613 | if (status || extd_status) { |
597 | SE_DEBUG(DBG_LVL_1, | 614 | beiscsi_log(phba, KERN_ERR, |
598 | "mgmt_exec_nonemb_cmd Failed status = %d" | 615 | BEISCSI_LOG_CONFIG | BEISCSI_LOG_MBOX, |
599 | "extd_status = %d\n", status, extd_status); | 616 | "BG_%d : mgmt_exec_nonemb_cmd Failed status = %d" |
617 | "extd_status = %d\n", status, extd_status); | ||
600 | rc = -EIO; | 618 | rc = -EIO; |
601 | goto free_tag; | 619 | goto free_tag; |
602 | } | 620 | } |
@@ -617,7 +635,8 @@ static int mgmt_alloc_cmd_data(struct beiscsi_hba *phba, struct be_dma_mem *cmd, | |||
617 | { | 635 | { |
618 | cmd->va = pci_alloc_consistent(phba->ctrl.pdev, size, &cmd->dma); | 636 | cmd->va = pci_alloc_consistent(phba->ctrl.pdev, size, &cmd->dma); |
619 | if (!cmd->va) { | 637 | if (!cmd->va) { |
620 | SE_DEBUG(DBG_LVL_1, "Failed to allocate memory for if info\n"); | 638 | beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG, |
639 | "BG_%d : Failed to allocate memory for if info\n"); | ||
621 | return -ENOMEM; | 640 | return -ENOMEM; |
622 | } | 641 | } |
623 | memset(cmd->va, 0, size); | 642 | memset(cmd->va, 0, size); |
@@ -673,8 +692,8 @@ mgmt_static_ip_modify(struct beiscsi_hba *phba, | |||
673 | 692 | ||
674 | rc = mgmt_exec_nonemb_cmd(phba, &nonemb_cmd, NULL, 0); | 693 | rc = mgmt_exec_nonemb_cmd(phba, &nonemb_cmd, NULL, 0); |
675 | if (rc < 0) | 694 | if (rc < 0) |
676 | shost_printk(KERN_WARNING, phba->shost, | 695 | beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_CONFIG, |
677 | "Failed to Modify existing IP Address\n"); | 696 | "BG_%d : Failed to Modify existing IP Address\n"); |
678 | return rc; | 697 | return rc; |
679 | } | 698 | } |
680 | 699 | ||
@@ -728,8 +747,8 @@ int mgmt_set_ip(struct beiscsi_hba *phba, | |||
728 | 747 | ||
729 | if (boot_proto == ISCSI_BOOTPROTO_DHCP) { | 748 | if (boot_proto == ISCSI_BOOTPROTO_DHCP) { |
730 | if (if_info.dhcp_state) { | 749 | if (if_info.dhcp_state) { |
731 | shost_printk(KERN_WARNING, phba->shost, | 750 | beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_CONFIG, |
732 | "DHCP Already Enabled\n"); | 751 | "BG_%d : DHCP Already Enabled\n"); |
733 | return 0; | 752 | return 0; |
734 | } | 753 | } |
735 | /* The ip_param->len is 1 in DHCP case. Setting | 754 | /* The ip_param->len is 1 in DHCP case. Setting |
@@ -756,8 +775,9 @@ int mgmt_set_ip(struct beiscsi_hba *phba, | |||
756 | 775 | ||
757 | rc = mgmt_exec_nonemb_cmd(phba, &nonemb_cmd, NULL, 0); | 776 | rc = mgmt_exec_nonemb_cmd(phba, &nonemb_cmd, NULL, 0); |
758 | if (rc < 0) { | 777 | if (rc < 0) { |
759 | shost_printk(KERN_WARNING, phba->shost, | 778 | beiscsi_log(phba, KERN_WARNING, |
760 | "Failed to Delete existing dhcp\n"); | 779 | BEISCSI_LOG_CONFIG, |
780 | "BG_%d : Failed to Delete existing dhcp\n"); | ||
761 | return rc; | 781 | return rc; |
762 | } | 782 | } |
763 | } | 783 | } |
@@ -776,8 +796,8 @@ int mgmt_set_ip(struct beiscsi_hba *phba, | |||
776 | memset(>way_addr_set, 0, sizeof(gtway_addr_set)); | 796 | memset(>way_addr_set, 0, sizeof(gtway_addr_set)); |
777 | rc = mgmt_get_gateway(phba, BE2_IPV4, >way_addr_set); | 797 | rc = mgmt_get_gateway(phba, BE2_IPV4, >way_addr_set); |
778 | if (rc) { | 798 | if (rc) { |
779 | shost_printk(KERN_WARNING, phba->shost, | 799 | beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_CONFIG, |
780 | "Failed to Get Gateway Addr\n"); | 800 | "BG_%d : Failed to Get Gateway Addr\n"); |
781 | return rc; | 801 | return rc; |
782 | } | 802 | } |
783 | 803 | ||
@@ -787,8 +807,9 @@ int mgmt_set_ip(struct beiscsi_hba *phba, | |||
787 | IP_ACTION_DEL, IP_V4_LEN); | 807 | IP_ACTION_DEL, IP_V4_LEN); |
788 | 808 | ||
789 | if (rc) { | 809 | if (rc) { |
790 | shost_printk(KERN_WARNING, phba->shost, | 810 | beiscsi_log(phba, KERN_WARNING, |
791 | "Failed to clear Gateway Addr Set\n"); | 811 | BEISCSI_LOG_CONFIG, |
812 | "BG_%d : Failed to clear Gateway Addr Set\n"); | ||
792 | return rc; | 813 | return rc; |
793 | } | 814 | } |
794 | } | 815 | } |
@@ -827,8 +848,8 @@ int mgmt_set_gateway(struct beiscsi_hba *phba, | |||
827 | memset(>way_addr_set, 0, sizeof(gtway_addr_set)); | 848 | memset(>way_addr_set, 0, sizeof(gtway_addr_set)); |
828 | rt_val = mgmt_get_gateway(phba, BE2_IPV4, >way_addr_set); | 849 | rt_val = mgmt_get_gateway(phba, BE2_IPV4, >way_addr_set); |
829 | if (rt_val) { | 850 | if (rt_val) { |
830 | shost_printk(KERN_WARNING, phba->shost, | 851 | beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_CONFIG, |
831 | "Failed to Get Gateway Addr\n"); | 852 | "BG_%d : Failed to Get Gateway Addr\n"); |
832 | return rt_val; | 853 | return rt_val; |
833 | } | 854 | } |
834 | 855 | ||
@@ -837,8 +858,8 @@ int mgmt_set_gateway(struct beiscsi_hba *phba, | |||
837 | rt_val = mgmt_modify_gateway(phba, gtway_addr, IP_ACTION_DEL, | 858 | rt_val = mgmt_modify_gateway(phba, gtway_addr, IP_ACTION_DEL, |
838 | gateway_param->len); | 859 | gateway_param->len); |
839 | if (rt_val) { | 860 | if (rt_val) { |
840 | shost_printk(KERN_WARNING, phba->shost, | 861 | beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_CONFIG, |
841 | "Failed to clear Gateway Addr Set\n"); | 862 | "BG_%d : Failed to clear Gateway Addr Set\n"); |
842 | return rt_val; | 863 | return rt_val; |
843 | } | 864 | } |
844 | } | 865 | } |
@@ -848,8 +869,8 @@ int mgmt_set_gateway(struct beiscsi_hba *phba, | |||
848 | gateway_param->len); | 869 | gateway_param->len); |
849 | 870 | ||
850 | if (rt_val) | 871 | if (rt_val) |
851 | shost_printk(KERN_WARNING, phba->shost, | 872 | beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_CONFIG, |
852 | "Failed to Set Gateway Addr\n"); | 873 | "BG_%d : Failed to Set Gateway Addr\n"); |
853 | 874 | ||
854 | return rt_val; | 875 | return rt_val; |
855 | } | 876 | } |
@@ -997,7 +1018,9 @@ int be_mgmt_get_boot_shandle(struct beiscsi_hba *phba, | |||
997 | /* Get the Boot Target Session Handle and Count*/ | 1018 | /* Get the Boot Target Session Handle and Count*/ |
998 | tag = mgmt_get_boot_target(phba); | 1019 | tag = mgmt_get_boot_target(phba); |
999 | if (!tag) { | 1020 | if (!tag) { |
1000 | SE_DEBUG(DBG_LVL_1, "mgmt_get_boot_target Failed\n"); | 1021 | beiscsi_log(phba, KERN_ERR, |
1022 | BEISCSI_LOG_CONFIG | BEISCSI_LOG_INIT, | ||
1023 | "BG_%d : Getting Boot Target Info Failed\n"); | ||
1001 | return -EAGAIN; | 1024 | return -EAGAIN; |
1002 | } else | 1025 | } else |
1003 | wait_event_interruptible(phba->ctrl.mcc_wait[tag], | 1026 | wait_event_interruptible(phba->ctrl.mcc_wait[tag], |
@@ -1007,9 +1030,11 @@ int be_mgmt_get_boot_shandle(struct beiscsi_hba *phba, | |||
1007 | extd_status = (phba->ctrl.mcc_numtag[tag] & 0x0000FF00) >> 8; | 1030 | extd_status = (phba->ctrl.mcc_numtag[tag] & 0x0000FF00) >> 8; |
1008 | status = phba->ctrl.mcc_numtag[tag] & 0x000000FF; | 1031 | status = phba->ctrl.mcc_numtag[tag] & 0x000000FF; |
1009 | if (status || extd_status) { | 1032 | if (status || extd_status) { |
1010 | SE_DEBUG(DBG_LVL_1, "mgmt_get_boot_target Failed" | 1033 | beiscsi_log(phba, KERN_ERR, |
1011 | " status = %d extd_status = %d\n", | 1034 | BEISCSI_LOG_INIT | BEISCSI_LOG_CONFIG, |
1012 | status, extd_status); | 1035 | "BG_%d : mgmt_get_boot_target Failed" |
1036 | " status = %d extd_status = %d\n", | ||
1037 | status, extd_status); | ||
1013 | free_mcc_tag(&phba->ctrl, tag); | 1038 | free_mcc_tag(&phba->ctrl, tag); |
1014 | return -EBUSY; | 1039 | return -EBUSY; |
1015 | } | 1040 | } |
@@ -1019,7 +1044,9 @@ int be_mgmt_get_boot_shandle(struct beiscsi_hba *phba, | |||
1019 | 1044 | ||
1020 | /* Check if the there are any Boot targets configured */ | 1045 | /* Check if the there are any Boot targets configured */ |
1021 | if (!boot_resp->boot_session_count) { | 1046 | if (!boot_resp->boot_session_count) { |
1022 | SE_DEBUG(DBG_LVL_8, "No boot targets configured\n"); | 1047 | beiscsi_log(phba, KERN_INFO, |
1048 | BEISCSI_LOG_INIT | BEISCSI_LOG_CONFIG, | ||
1049 | "BG_%d ;No boot targets configured\n"); | ||
1023 | return -ENXIO; | 1050 | return -ENXIO; |
1024 | } | 1051 | } |
1025 | 1052 | ||
@@ -1033,7 +1060,9 @@ int be_mgmt_get_boot_shandle(struct beiscsi_hba *phba, | |||
1033 | tag = mgmt_reopen_session(phba, BE_REOPEN_BOOT_SESSIONS, | 1060 | tag = mgmt_reopen_session(phba, BE_REOPEN_BOOT_SESSIONS, |
1034 | INVALID_SESS_HANDLE); | 1061 | INVALID_SESS_HANDLE); |
1035 | if (!tag) { | 1062 | if (!tag) { |
1036 | SE_DEBUG(DBG_LVL_1, "mgmt_reopen_session Failed\n"); | 1063 | beiscsi_log(phba, KERN_ERR, |
1064 | BEISCSI_LOG_INIT | BEISCSI_LOG_CONFIG, | ||
1065 | "BG_%d : mgmt_reopen_session Failed\n"); | ||
1037 | return -EAGAIN; | 1066 | return -EAGAIN; |
1038 | } else | 1067 | } else |
1039 | wait_event_interruptible(phba->ctrl.mcc_wait[tag], | 1068 | wait_event_interruptible(phba->ctrl.mcc_wait[tag], |
@@ -1043,9 +1072,11 @@ int be_mgmt_get_boot_shandle(struct beiscsi_hba *phba, | |||
1043 | extd_status = (phba->ctrl.mcc_numtag[tag] & 0x0000FF00) >> 8; | 1072 | extd_status = (phba->ctrl.mcc_numtag[tag] & 0x0000FF00) >> 8; |
1044 | status = phba->ctrl.mcc_numtag[tag] & 0x000000FF; | 1073 | status = phba->ctrl.mcc_numtag[tag] & 0x000000FF; |
1045 | if (status || extd_status) { | 1074 | if (status || extd_status) { |
1046 | SE_DEBUG(DBG_LVL_1, "mgmt_reopen_session Failed" | 1075 | beiscsi_log(phba, KERN_ERR, |
1047 | " status = %d extd_status = %d\n", | 1076 | BEISCSI_LOG_INIT | BEISCSI_LOG_CONFIG, |
1048 | status, extd_status); | 1077 | "BG_%d : mgmt_reopen_session Failed" |
1078 | " status = %d extd_status = %d\n", | ||
1079 | status, extd_status); | ||
1049 | free_mcc_tag(&phba->ctrl, tag); | 1080 | free_mcc_tag(&phba->ctrl, tag); |
1050 | return -EBUSY; | 1081 | return -EBUSY; |
1051 | } | 1082 | } |
@@ -1054,6 +1085,8 @@ int be_mgmt_get_boot_shandle(struct beiscsi_hba *phba, | |||
1054 | } while (--boot_retry); | 1085 | } while (--boot_retry); |
1055 | 1086 | ||
1056 | /* Couldn't log into the boot target */ | 1087 | /* Couldn't log into the boot target */ |
1057 | SE_DEBUG(DBG_LVL_1, "Login to Boot Target Failed\n"); | 1088 | beiscsi_log(phba, KERN_ERR, |
1089 | BEISCSI_LOG_INIT | BEISCSI_LOG_CONFIG, | ||
1090 | "BG_%d : Login to Boot Target Failed\n"); | ||
1058 | return -ENXIO; | 1091 | return -ENXIO; |
1059 | } | 1092 | } |