Skip to contentSkip to conversation

be2iscsi: Fix some error messages

PATCH In review Christophe JAILLET 5 participants 24 messages Aug 12, 2016 – Aug 17, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 2/2 be2iscsi: Fix some error messages

This fixes:
- missing spaces in string split on several lines
- extra spaces after ':'
- missing '\n' at the end of some messages
- too long lines

---
 drivers/scsi/be2iscsi/be_main.c | 83 +++++++++++++++++++++--------------------
 1 file changed, 43 insertions(+), 40 deletions(-)
drivers/scsi/be2iscsi/be_main.c +43 -40
index 89ae6390b697..415c21ec6a13 100644
@@ -268,7 +268,7 @@ static int beiscsi_eh_abort(struct scsi_cmnd *sc)
 				&nonemb_cmd.dma);
 	if (nonemb_cmd.va = NULL) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_EH,
-			    "BM_%d : Failed to allocate memory for"
+			    "BM_%d : Failed to allocate memory for "
 			    "mgmt_invalidate_icds\n");
 		return FAILED;
 	}
@@ -278,7 +278,7 @@ static int beiscsi_eh_abort(struct scsi_cmnd *sc)
 				   cid, &nonemb_cmd);
 	if (!tag) {
 		beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_EH,
-			    "BM_%d : mgmt_invalidate_icds could not be"
+			    "BM_%d : mgmt_invalidate_icds could not be "
 			    "submitted\n");
 		pci_free_consistent(phba->ctrl.pdev, nonemb_cmd.size,
 				    nonemb_cmd.va, nonemb_cmd.dma);
@@ -350,7 +350,7 @@ static int beiscsi_eh_device_reset(struct scsi_cmnd *sc)
 				&nonemb_cmd.dma);
 	if (nonemb_cmd.va = NULL) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_EH,
-			    "BM_%d : Failed to allocate memory for"
+			    "BM_%d : Failed to allocate memory for "
 			    "mgmt_invalidate_icds\n");
 		return FAILED;
 	}
@@ -1010,7 +1010,7 @@ static int beiscsi_init_irqs(struct beiscsi_hba *phba)
 					  &phwi_context->be_eq[i]);
 			if (ret) {
 				beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-					    "BM_%d : beiscsi_init_irqs-Failed to"
+					    "BM_%d : beiscsi_init_irqs-Failed to "
 					    "register msix for i = %d\n",
 					    i);
 				kfree(phba->msi_name[i]);
@@ -1168,7 +1168,7 @@ free_io_sgl_handle(struct beiscsi_hba *phba, struct sgl_handle *psgl_handle)
 		 * failed in xmit_task or alloc_pdu.
 		 */
 		 beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_IO,
-			     "BM_%d : Double Free in IO SGL io_sgl_free_index=%d,"
+			     "BM_%d : Double Free in IO SGL io_sgl_free_index=%d, "
 			     "value there=%p\n", phba->io_sgl_free_index,
 			     phba->io_sgl_hndl_base
 			     [phba->io_sgl_free_index]);
@@ -1256,7 +1256,7 @@ free_wrb_handle(struct beiscsi_hba *phba, struct hwi_wrb_context *pwrb_context,
 			       phba->params.wrbs_per_cxn);
 	beiscsi_log(phba, KERN_INFO,
 		    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-		    "BM_%d : FREE WRB: pwrb_handle=%p free_index=0x%x"
+		    "BM_%d : FREE WRB: pwrb_handle=%p free_index=0x%x "
 		    "wrb_handles_available=%d\n",
 		    pwrb_handle, pwrb_context->free_index,
 		    pwrb_context->wrb_handles_available);
@@ -1293,7 +1293,7 @@ free_mgmt_sgl_handle(struct beiscsi_hba *phba, struct sgl_handle *psgl_handle)
 {
 	spin_lock_bh(&phba->mgmt_sgl_lock);
 	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_CONFIG,
-		    "BM_%d : In  free_mgmt_sgl_handle,"
+		    "BM_%d : In  free_mgmt_sgl_handle, "
 		    "eh_sgl_free_index=%d\n",
 		    phba->eh_sgl_free_index);
 
@@ -1303,7 +1303,7 @@ free_mgmt_sgl_handle(struct beiscsi_hba *phba, struct sgl_handle *psgl_handle)
 		 * failed in xmit_task or alloc_pdu.
 		 */
 		beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_CONFIG,
-			    "BM_%d : Double Free in eh SGL ,"
+			    "BM_%d : Double Free in eh SGL, "
 			    "eh_sgl_free_index=%d\n",
 			    phba->eh_sgl_free_index);
 		spin_unlock_bh(&phba->mgmt_sgl_lock);
@@ -1604,7 +1604,7 @@ static void hwi_complete_cmd(struct beiscsi_conn *beiscsi_conn,
 	default:
 		beiscsi_log(phba, KERN_WARNING,
 			    BEISCSI_LOG_CONFIG | BEISCSI_LOG_IO,
-			    "BM_%d : In hwi_complete_cmd, unknown type = %d"
+			    "BM_%d : In hwi_complete_cmd, unknown type = %d "
 			    "wrb_index 0x%x CID 0x%x\n", type,
 			    csol_cqe.wrb_index,
 			    csol_cqe.cid);
@@ -2210,7 +2210,7 @@ unsigned int beiscsi_process_cq(struct be_eq_obj *pbe_eq, int budget)
 		case UNSOL_DATA_DIGEST_ERROR_NOTIFY:
 			beiscsi_log(phba, KERN_ERR,
 				    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-				    "BM_%d :  Dropping %s[%d] on DPDU ring on CID : %d\n",
+				    "BM_%d : Dropping %s[%d] on DPDU ring on CID : %d\n",
 				    cqe_desc[code], code, cid);
 			spin_lock_bh(&phba->async_pdu_lock);
 			hwi_flush_default_pdu_buffer(phba, beiscsi_conn,
@@ -2243,7 +2243,7 @@ unsigned int beiscsi_process_cq(struct be_eq_obj *pbe_eq, int budget)
 		default:
 			beiscsi_log(phba, KERN_ERR,
 				    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-				    "BM_%d : Invalid CQE Event Received Code : %d"
+				    "BM_%d : Invalid CQE Event Received Code : %d "
 				    "CID 0x%x...\n",
 				    code, cid);
 			break;
@@ -3305,7 +3305,7 @@ static int beiscsi_create_eqs(struct beiscsi_hba *phba,
 					    phwi_context->cur_eqd);
 		if (ret) {
 			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-				    "BM_%d : beiscsi_cmd_eq_create"
+				    "BM_%d : beiscsi_cmd_eq_create "
 				    "Failed for EQ\n");
 			goto create_eq_error;
 		}
@@ -3315,6 +3315,7 @@ static int beiscsi_create_eqs(struct beiscsi_hba *phba,
 			    phwi_context->be_eq[i].q.id);
 	}
 	return 0;
+
 create_eq_error:
 	for (i = 0; i < (phba->num_cpus + eq_for_mcc); i++) {
 		eq = &phwi_context->be_eq[i].q;
@@ -3370,7 +3371,7 @@ static int beiscsi_create_cqs(struct beiscsi_hba *phba,
 					    false, 0);
 		if (ret) {
 			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-				    "BM_%d : beiscsi_cmd_eq_create"
+				    "BM_%d : beiscsi_cmd_eq_create "
 				    "Failed for ISCSI CQ\n");
 			goto create_cq_error;
 		}
@@ -3432,7 +3433,8 @@ beiscsi_create_def_hdr(struct beiscsi_hba *phba,
 					      BEISCSI_DEFQ_HDR, ulp_num);
 	if (ret) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : be_cmd_create_default_pdu_queue Failed DEFHDR on ULP : %d\n",
+			    "BM_%d : be_cmd_create_default_pdu_queue Failed "
+			    "DEFHDR on ULP : %d\n",
 			    ulp_num);
 
 		return ret;
@@ -3499,7 +3501,7 @@ beiscsi_create_def_data(struct beiscsi_hba *phba,
 
 	hwi_post_async_buffers(phba, BEISCSI_DEFQ_DATA, ulp_num);
 	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-		    "BM_%d : DEFAULT PDU DATA RING CREATED"
+		    "BM_%d : DEFAULT PDU DATA RING CREATED "
 		    "on ULP : %d\n", ulp_num);
 
 	return 0;
@@ -3527,13 +3529,13 @@ beiscsi_post_template_hdr(struct beiscsi_hba *phba)
 
 			if (status != 0) {
 				beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-					    "BM_%d : Post Template HDR Failed for"
+					    "BM_%d : Post Template HDR Failed for "
 					    "ULP_%d\n", ulp_num);
 				return status;
 			}
 
 			beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-				    "BM_%d : Template HDR Pages Posted for"
+				    "BM_%d : Template HDR Pages Posted for "
 				    "ULP_%d\n", ulp_num);
 		}
 	}
@@ -3694,7 +3696,7 @@ beiscsi_create_wrb_rings(struct beiscsi_hba *phba,
 					    ulp_base_num);
 		if (status != 0) {
 			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-				    "BM_%d : wrbq create failed.");
+				    "BM_%d : wrbq create failed.\n");
 			kfree(pwrb_arr);
 			return status;
 		}
@@ -3999,7 +4001,7 @@ static int hwi_init_port(struct beiscsi_hba *phba)
 
 error:
 	beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-		    "BM_%d : hwi_init_port failed");
+		    "BM_%d : hwi_init_port failed\n");
 	hwi_cleanup(phba);
 	return status;
 }
@@ -4013,7 +4015,7 @@ static int hwi_init_controller(struct beiscsi_hba *phba)
 		phwi_ctrlr->phwi_ctxt = (struct hwi_context_memory *)phba->
 		    init_mem[HWI_MEM_ADDN_CONTEXT].mem_array[0].virtual_address;
 		beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-			    "BM_%d :  phwi_ctrlr->phwi_ctxt=%p\n",
+			    "BM_%d : phwi_ctrlr->phwi_ctxt=%p\n",
 			    phwi_ctrlr->phwi_ctxt);
 	} else {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
@@ -4082,7 +4084,7 @@ static int beiscsi_init_controller(struct beiscsi_hba *phba)
 	if (ret)
 		goto free_init;
 	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-		    "BM_%d : Return success from beiscsi_init_controller");
+		    "BM_%d : Return success from beiscsi_init_controller\n");
 
 	return 0;
 
@@ -4125,7 +4127,7 @@ static int beiscsi_init_sgl_handle(struct beiscsi_hba *phba)
 		}
 	} else {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : HWI_MEM_SGLH is more than one element."
+			    "BM_%d : HWI_MEM_SGLH is more than one element. "
 			    "Failing to load\n");
 		return -ENOMEM;
 	}
@@ -4153,7 +4155,7 @@ static int beiscsi_init_sgl_handle(struct beiscsi_hba *phba)
 		idx++;
 	}
 	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-		    "BM_%d : phba->io_sgl_hndl_avbl=%d"
+		    "BM_%d : phba->io_sgl_hndl_avbl=%d "
 		    "phba->eh_sgl_hndl_avbl=%d\n",
 		    phba->io_sgl_hndl_avbl,
 		    phba->eh_sgl_hndl_avbl);
@@ -4212,7 +4214,7 @@ static int hba_setup_cid_tbls(struct beiscsi_hba *phba)
 
 			if (!ptr_cid_info) {
 				beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-					    "BM_%d : Failed to allocate memory"
+					    "BM_%d : Failed to allocate memory "
 					    "for ULP_CID_INFO for ULP : %d\n",
 					    ulp_num);
 				ret = -ENOMEM;
@@ -4226,7 +4228,7 @@ static int hba_setup_cid_tbls(struct beiscsi_hba *phba)
 						  ulp_num), GFP_KERNEL);
 			if (!ptr_cid_info->cid_array) {
 				beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-					    "BM_%d : Failed to allocate memory"
+					    "BM_%d : Failed to allocate memory "
 					    "for CID_ARRAY for ULP : %d\n",
 					    ulp_num);
 				kfree(ptr_cid_info);
@@ -4257,7 +4259,7 @@ static int hba_setup_cid_tbls(struct beiscsi_hba *phba)
 				   phba->params.cxns_per_ctrl, GFP_KERNEL);
 	if (!phba->conn_table) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : Failed to allocate memory in"
+			    "BM_%d : Failed to allocate memory in "
 			    "hba_setup_cid_tbls\n");
 
 		kfree(phba->ep_array);
@@ -4397,7 +4399,7 @@ static int beiscsi_get_boot_info(struct beiscsi_hba *phba)
 	if (nonemb_cmd.va = NULL) {
 		beiscsi_log(phba, KERN_ERR,
 			    BEISCSI_LOG_INIT | BEISCSI_LOG_CONFIG,
-			    "BM_%d : Failed to allocate memory for"
+			    "BM_%d : Failed to allocate memory for "
 			    "beiscsi_get_session_info\n");
 
 		return -ENOMEM;
@@ -4418,7 +4420,7 @@ static int beiscsi_get_boot_info(struct beiscsi_hba *phba)
 	if (ret) {
 		beiscsi_log(phba, KERN_ERR,
 			    BEISCSI_LOG_INIT | BEISCSI_LOG_CONFIG,
-			    "BM_%d : beiscsi_get_session_info Failed");
+			    "BM_%d : beiscsi_get_session_info Failed\n");
 
 		if (ret != -EBUSY)
 			goto boot_freemem;
@@ -4509,14 +4511,14 @@ static int beiscsi_init_port(struct beiscsi_hba *phba)
 	ret = beiscsi_init_controller(phba);
 	if (ret < 0) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : beiscsi_dev_probe - Failed in"
+			    "BM_%d : beiscsi_dev_probe - Failed in "
 			    "beiscsi_init_controller\n");
 		return ret;
 	}
 	ret = beiscsi_init_sgl_handle(phba);
 	if (ret < 0) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : beiscsi_dev_probe - Failed in"
+			    "BM_%d : beiscsi_dev_probe - Failed in "
 			    "beiscsi_init_sgl_handle\n");
 		goto do_cleanup_ctrlr;
 	}
@@ -4752,7 +4754,8 @@ beiscsi_offload_connection(struct beiscsi_conn *beiscsi_conn,
 			       phba->params.wrbs_per_cxn);
 	beiscsi_log(phba, KERN_INFO,
 		    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-		    "BM_%d : put CONTEXT_UPDATE pwrb_handle=%p free_index=0x%x wrb_handles_available=%d\n",
+		    "BM_%d : put CONTEXT_UPDATE pwrb_handle=%p "
+		    "free_index=0x%x wrb_handles_available=%d\n",
 		    pwrb_handle, pwrb_context->free_index,
 		    pwrb_context->wrb_handles_available);
 }
@@ -4806,7 +4809,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
 		if (!io_task->psgl_handle) {
 			beiscsi_log(phba, KERN_ERR,
 				    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-				    "BM_%d : Alloc of IO_SGL_ICD Failed"
+				    "BM_%d : Alloc of IO_SGL_ICD Failed "
 				    "for the CID : %d\n",
 				    beiscsi_conn->beiscsi_conn_cid);
 			goto free_hndls;
@@ -4817,7 +4820,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
 		if (!io_task->pwrb_handle) {
 			beiscsi_log(phba, KERN_ERR,
 				    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-				    "BM_%d : Alloc of WRB_HANDLE Failed"
+				    "BM_%d : Alloc of WRB_HANDLE Failed "
 				    "for the CID : %d\n",
 				    beiscsi_conn->beiscsi_conn_cid);
 			goto free_io_hndls;
@@ -4833,7 +4836,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
 					beiscsi_log(phba, KERN_ERR,
 						    BEISCSI_LOG_IO |
 						    BEISCSI_LOG_CONFIG,
-						    "BM_%d : Alloc of MGMT_SGL_ICD Failed"
+						    "BM_%d : Alloc of MGMT_SGL_ICD Failed "
 						    "for the CID : %d\n",
 						    beiscsi_conn->
 						    beiscsi_conn_cid);
@@ -4851,7 +4854,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
 					beiscsi_log(phba, KERN_ERR,
 						    BEISCSI_LOG_IO |
 						    BEISCSI_LOG_CONFIG,
-						    "BM_%d : Alloc of WRB_HANDLE Failed"
+						    "BM_%d : Alloc of WRB_HANDLE Failed "
 						    "for the CID : %d\n",
 						    beiscsi_conn->
 						    beiscsi_conn_cid);
@@ -4872,7 +4875,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
 				beiscsi_log(phba, KERN_ERR,
 					    BEISCSI_LOG_IO |
 					    BEISCSI_LOG_CONFIG,
-					    "BM_%d : Alloc of MGMT_SGL_ICD Failed"
+					    "BM_%d : Alloc of MGMT_SGL_ICD Failed "
 					    "for the CID : %d\n",
 					    beiscsi_conn->
 					    beiscsi_conn_cid);
@@ -4885,7 +4888,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
 			if (!io_task->pwrb_handle) {
 				beiscsi_log(phba, KERN_ERR,
 					    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-					    "BM_%d : Alloc of WRB_HANDLE Failed"
+					    "BM_%d : Alloc of WRB_HANDLE Failed "
 					    "for the CID : %d\n",
 					    beiscsi_conn->beiscsi_conn_cid);
 				goto free_mgmt_hndls;
@@ -5484,7 +5487,7 @@ static pci_ers_result_t beiscsi_eeh_err_detected(struct pci_dev *pdev,
 
 	if (state = pci_channel_io_perm_failure) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : EEH : State PERM Failure");
+			    "BM_%d : EEH : State PERM Failure\n");
 		return PCI_ERS_RESULT_DISCONNECT;
 	}
 
@@ -5577,8 +5580,8 @@ static void beiscsi_eeh_resume(struct pci_dev *pdev)
 	ret = hwi_init_controller(phba);
 	if (ret) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : beiscsi_eeh_resume -"
-			     "Failed to initialize beiscsi_hba.\n");
+			    "BM_%d : beiscsi_eeh_resume - "
+			    "Failed to initialize beiscsi_hba.\n");
 		goto ret_err;
 	}
 
Signature · 6 lines
2.7.4


---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
https://www.avast.com/antivirus
#1 lore raw
Quoted 5 lines · Christophe JAILLET

This fixes:
- missing spaces in string split on several lines
- extra spaces after ':'
- missing '\n' at the end of some messages
- too long lines

I think that the strings should be concatenated, even if they go past 80 chars. I'm surprised checkpatch didn't complain.

julia

Quoted 383 lines
---
 drivers/scsi/be2iscsi/be_main.c | 83 +++++++++++++++++++++--------------------
 1 file changed, 43 insertions(+), 40 deletions(-)
drivers/scsi/be2iscsi/be_main.c +43 -41
index 89ae6390b697..415c21ec6a13 100644
@@ -268,7 +268,7 @@ static int beiscsi_eh_abort(struct scsi_cmnd *sc)
 				&nonemb_cmd.dma);
 	if (nonemb_cmd.va == NULL) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_EH,
-			    "BM_%d : Failed to allocate memory for"
+			    "BM_%d : Failed to allocate memory for "
 			    "mgmt_invalidate_icds\n");
 		return FAILED;
 	}
@@ -278,7 +278,7 @@ static int beiscsi_eh_abort(struct scsi_cmnd *sc)
 				   cid, &nonemb_cmd);
 	if (!tag) {
 		beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_EH,
-			    "BM_%d : mgmt_invalidate_icds could not be"
+			    "BM_%d : mgmt_invalidate_icds could not be "
 			    "submitted\n");
 		pci_free_consistent(phba->ctrl.pdev, nonemb_cmd.size,
 				    nonemb_cmd.va, nonemb_cmd.dma);
@@ -350,7 +350,7 @@ static int beiscsi_eh_device_reset(struct scsi_cmnd *sc)
 				&nonemb_cmd.dma);
 	if (nonemb_cmd.va == NULL) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_EH,
-			    "BM_%d : Failed to allocate memory for"
+			    "BM_%d : Failed to allocate memory for "
 			    "mgmt_invalidate_icds\n");
 		return FAILED;
 	}
@@ -1010,7 +1010,7 @@ static int beiscsi_init_irqs(struct beiscsi_hba *phba)
 					  &phwi_context->be_eq[i]);
 			if (ret) {
 				beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-					    "BM_%d : beiscsi_init_irqs-Failed to"
+					    "BM_%d : beiscsi_init_irqs-Failed to "
 					    "register msix for i = %d\n",
 					    i);
 				kfree(phba->msi_name[i]);
@@ -1168,7 +1168,7 @@ free_io_sgl_handle(struct beiscsi_hba *phba, struct sgl_handle *psgl_handle)
 		 * failed in xmit_task or alloc_pdu.
 		 */
 		 beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_IO,
-			     "BM_%d : Double Free in IO SGL io_sgl_free_index=%d,"
+			     "BM_%d : Double Free in IO SGL io_sgl_free_index=%d, "
 			     "value there=%p\n", phba->io_sgl_free_index,
 			     phba->io_sgl_hndl_base
 			     [phba->io_sgl_free_index]);
@@ -1256,7 +1256,7 @@ free_wrb_handle(struct beiscsi_hba *phba, struct hwi_wrb_context *pwrb_context,
 			       phba->params.wrbs_per_cxn);
 	beiscsi_log(phba, KERN_INFO,
 		    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-		    "BM_%d : FREE WRB: pwrb_handle=%p free_index=0x%x"
+		    "BM_%d : FREE WRB: pwrb_handle=%p free_index=0x%x "
 		    "wrb_handles_available=%d\n",
 		    pwrb_handle, pwrb_context->free_index,
 		    pwrb_context->wrb_handles_available);
@@ -1293,7 +1293,7 @@ free_mgmt_sgl_handle(struct beiscsi_hba *phba, struct sgl_handle *psgl_handle)
 {
 	spin_lock_bh(&phba->mgmt_sgl_lock);
 	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_CONFIG,
-		    "BM_%d : In  free_mgmt_sgl_handle,"
+		    "BM_%d : In  free_mgmt_sgl_handle, "
 		    "eh_sgl_free_index=%d\n",
 		    phba->eh_sgl_free_index);
 
@@ -1303,7 +1303,7 @@ free_mgmt_sgl_handle(struct beiscsi_hba *phba, struct sgl_handle *psgl_handle)
 		 * failed in xmit_task or alloc_pdu.
 		 */
 		beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_CONFIG,
-			    "BM_%d : Double Free in eh SGL ,"
+			    "BM_%d : Double Free in eh SGL, "
 			    "eh_sgl_free_index=%d\n",
 			    phba->eh_sgl_free_index);
 		spin_unlock_bh(&phba->mgmt_sgl_lock);
@@ -1604,7 +1604,7 @@ static void hwi_complete_cmd(struct beiscsi_conn *beiscsi_conn,
 	default:
 		beiscsi_log(phba, KERN_WARNING,
 			    BEISCSI_LOG_CONFIG | BEISCSI_LOG_IO,
-			    "BM_%d : In hwi_complete_cmd, unknown type = %d"
+			    "BM_%d : In hwi_complete_cmd, unknown type = %d "
 			    "wrb_index 0x%x CID 0x%x\n", type,
 			    csol_cqe.wrb_index,
 			    csol_cqe.cid);
@@ -2210,7 +2210,7 @@ unsigned int beiscsi_process_cq(struct be_eq_obj *pbe_eq, int budget)
 		case UNSOL_DATA_DIGEST_ERROR_NOTIFY:
 			beiscsi_log(phba, KERN_ERR,
 				    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-				    "BM_%d :  Dropping %s[%d] on DPDU ring on CID : %d\n",
+				    "BM_%d : Dropping %s[%d] on DPDU ring on CID : %d\n",
 				    cqe_desc[code], code, cid);
 			spin_lock_bh(&phba->async_pdu_lock);
 			hwi_flush_default_pdu_buffer(phba, beiscsi_conn,
@@ -2243,7 +2243,7 @@ unsigned int beiscsi_process_cq(struct be_eq_obj *pbe_eq, int budget)
 		default:
 			beiscsi_log(phba, KERN_ERR,
 				    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-				    "BM_%d : Invalid CQE Event Received Code : %d"
+				    "BM_%d : Invalid CQE Event Received Code : %d "
 				    "CID 0x%x...\n",
 				    code, cid);
 			break;
@@ -3305,7 +3305,7 @@ static int beiscsi_create_eqs(struct beiscsi_hba *phba,
 					    phwi_context->cur_eqd);
 		if (ret) {
 			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-				    "BM_%d : beiscsi_cmd_eq_create"
+				    "BM_%d : beiscsi_cmd_eq_create "
 				    "Failed for EQ\n");
 			goto create_eq_error;
 		}
@@ -3315,6 +3315,7 @@ static int beiscsi_create_eqs(struct beiscsi_hba *phba,
 			    phwi_context->be_eq[i].q.id);
 	}
 	return 0;
+
 create_eq_error:
 	for (i = 0; i < (phba->num_cpus + eq_for_mcc); i++) {
 		eq = &phwi_context->be_eq[i].q;
@@ -3370,7 +3371,7 @@ static int beiscsi_create_cqs(struct beiscsi_hba *phba,
 					    false, 0);
 		if (ret) {
 			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-				    "BM_%d : beiscsi_cmd_eq_create"
+				    "BM_%d : beiscsi_cmd_eq_create "
 				    "Failed for ISCSI CQ\n");
 			goto create_cq_error;
 		}
@@ -3432,7 +3433,8 @@ beiscsi_create_def_hdr(struct beiscsi_hba *phba,
 					      BEISCSI_DEFQ_HDR, ulp_num);
 	if (ret) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : be_cmd_create_default_pdu_queue Failed DEFHDR on ULP : %d\n",
+			    "BM_%d : be_cmd_create_default_pdu_queue Failed "
+			    "DEFHDR on ULP : %d\n",
 			    ulp_num);
 
 		return ret;
@@ -3499,7 +3501,7 @@ beiscsi_create_def_data(struct beiscsi_hba *phba,
 
 	hwi_post_async_buffers(phba, BEISCSI_DEFQ_DATA, ulp_num);
 	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-		    "BM_%d : DEFAULT PDU DATA RING CREATED"
+		    "BM_%d : DEFAULT PDU DATA RING CREATED "
 		    "on ULP : %d\n", ulp_num);
 
 	return 0;
@@ -3527,13 +3529,13 @@ beiscsi_post_template_hdr(struct beiscsi_hba *phba)
 
 			if (status != 0) {
 				beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-					    "BM_%d : Post Template HDR Failed for"
+					    "BM_%d : Post Template HDR Failed for "
 					    "ULP_%d\n", ulp_num);
 				return status;
 			}
 
 			beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-				    "BM_%d : Template HDR Pages Posted for"
+				    "BM_%d : Template HDR Pages Posted for "
 				    "ULP_%d\n", ulp_num);
 		}
 	}
@@ -3694,7 +3696,7 @@ beiscsi_create_wrb_rings(struct beiscsi_hba *phba,
 					    ulp_base_num);
 		if (status != 0) {
 			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-				    "BM_%d : wrbq create failed.");
+				    "BM_%d : wrbq create failed.\n");
 			kfree(pwrb_arr);
 			return status;
 		}
@@ -3999,7 +4001,7 @@ static int hwi_init_port(struct beiscsi_hba *phba)
 
 error:
 	beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-		    "BM_%d : hwi_init_port failed");
+		    "BM_%d : hwi_init_port failed\n");
 	hwi_cleanup(phba);
 	return status;
 }
@@ -4013,7 +4015,7 @@ static int hwi_init_controller(struct beiscsi_hba *phba)
 		phwi_ctrlr->phwi_ctxt = (struct hwi_context_memory *)phba->
 		    init_mem[HWI_MEM_ADDN_CONTEXT].mem_array[0].virtual_address;
 		beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-			    "BM_%d :  phwi_ctrlr->phwi_ctxt=%p\n",
+			    "BM_%d : phwi_ctrlr->phwi_ctxt=%p\n",
 			    phwi_ctrlr->phwi_ctxt);
 	} else {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
@@ -4082,7 +4084,7 @@ static int beiscsi_init_controller(struct beiscsi_hba *phba)
 	if (ret)
 		goto free_init;
 	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-		    "BM_%d : Return success from beiscsi_init_controller");
+		    "BM_%d : Return success from beiscsi_init_controller\n");
 
 	return 0;
 
@@ -4125,7 +4127,7 @@ static int beiscsi_init_sgl_handle(struct beiscsi_hba *phba)
 		}
 	} else {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : HWI_MEM_SGLH is more than one element."
+			    "BM_%d : HWI_MEM_SGLH is more than one element. "
 			    "Failing to load\n");
 		return -ENOMEM;
 	}
@@ -4153,7 +4155,7 @@ static int beiscsi_init_sgl_handle(struct beiscsi_hba *phba)
 		idx++;
 	}
 	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-		    "BM_%d : phba->io_sgl_hndl_avbl=%d"
+		    "BM_%d : phba->io_sgl_hndl_avbl=%d "
 		    "phba->eh_sgl_hndl_avbl=%d\n",
 		    phba->io_sgl_hndl_avbl,
 		    phba->eh_sgl_hndl_avbl);
@@ -4212,7 +4214,7 @@ static int hba_setup_cid_tbls(struct beiscsi_hba *phba)
 
 			if (!ptr_cid_info) {
 				beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-					    "BM_%d : Failed to allocate memory"
+					    "BM_%d : Failed to allocate memory "
 					    "for ULP_CID_INFO for ULP : %d\n",
 					    ulp_num);
 				ret = -ENOMEM;
@@ -4226,7 +4228,7 @@ static int hba_setup_cid_tbls(struct beiscsi_hba *phba)
 						  ulp_num), GFP_KERNEL);
 			if (!ptr_cid_info->cid_array) {
 				beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-					    "BM_%d : Failed to allocate memory"
+					    "BM_%d : Failed to allocate memory "
 					    "for CID_ARRAY for ULP : %d\n",
 					    ulp_num);
 				kfree(ptr_cid_info);
@@ -4257,7 +4259,7 @@ static int hba_setup_cid_tbls(struct beiscsi_hba *phba)
 				   phba->params.cxns_per_ctrl, GFP_KERNEL);
 	if (!phba->conn_table) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : Failed to allocate memory in"
+			    "BM_%d : Failed to allocate memory in "
 			    "hba_setup_cid_tbls\n");
 
 		kfree(phba->ep_array);
@@ -4397,7 +4399,7 @@ static int beiscsi_get_boot_info(struct beiscsi_hba *phba)
 	if (nonemb_cmd.va == NULL) {
 		beiscsi_log(phba, KERN_ERR,
 			    BEISCSI_LOG_INIT | BEISCSI_LOG_CONFIG,
-			    "BM_%d : Failed to allocate memory for"
+			    "BM_%d : Failed to allocate memory for "
 			    "beiscsi_get_session_info\n");
 
 		return -ENOMEM;
@@ -4418,7 +4420,7 @@ static int beiscsi_get_boot_info(struct beiscsi_hba *phba)
 	if (ret) {
 		beiscsi_log(phba, KERN_ERR,
 			    BEISCSI_LOG_INIT | BEISCSI_LOG_CONFIG,
-			    "BM_%d : beiscsi_get_session_info Failed");
+			    "BM_%d : beiscsi_get_session_info Failed\n");
 
 		if (ret != -EBUSY)
 			goto boot_freemem;
@@ -4509,14 +4511,14 @@ static int beiscsi_init_port(struct beiscsi_hba *phba)
 	ret = beiscsi_init_controller(phba);
 	if (ret < 0) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : beiscsi_dev_probe - Failed in"
+			    "BM_%d : beiscsi_dev_probe - Failed in "
 			    "beiscsi_init_controller\n");
 		return ret;
 	}
 	ret = beiscsi_init_sgl_handle(phba);
 	if (ret < 0) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : beiscsi_dev_probe - Failed in"
+			    "BM_%d : beiscsi_dev_probe - Failed in "
 			    "beiscsi_init_sgl_handle\n");
 		goto do_cleanup_ctrlr;
 	}
@@ -4752,7 +4754,8 @@ beiscsi_offload_connection(struct beiscsi_conn *beiscsi_conn,
 			       phba->params.wrbs_per_cxn);
 	beiscsi_log(phba, KERN_INFO,
 		    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-		    "BM_%d : put CONTEXT_UPDATE pwrb_handle=%p free_index=0x%x wrb_handles_available=%d\n",
+		    "BM_%d : put CONTEXT_UPDATE pwrb_handle=%p "
+		    "free_index=0x%x wrb_handles_available=%d\n",
 		    pwrb_handle, pwrb_context->free_index,
 		    pwrb_context->wrb_handles_available);
 }
@@ -4806,7 +4809,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
 		if (!io_task->psgl_handle) {
 			beiscsi_log(phba, KERN_ERR,
 				    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-				    "BM_%d : Alloc of IO_SGL_ICD Failed"
+				    "BM_%d : Alloc of IO_SGL_ICD Failed "
 				    "for the CID : %d\n",
 				    beiscsi_conn->beiscsi_conn_cid);
 			goto free_hndls;
@@ -4817,7 +4820,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
 		if (!io_task->pwrb_handle) {
 			beiscsi_log(phba, KERN_ERR,
 				    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-				    "BM_%d : Alloc of WRB_HANDLE Failed"
+				    "BM_%d : Alloc of WRB_HANDLE Failed "
 				    "for the CID : %d\n",
 				    beiscsi_conn->beiscsi_conn_cid);
 			goto free_io_hndls;
@@ -4833,7 +4836,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
 					beiscsi_log(phba, KERN_ERR,
 						    BEISCSI_LOG_IO |
 						    BEISCSI_LOG_CONFIG,
-						    "BM_%d : Alloc of MGMT_SGL_ICD Failed"
+						    "BM_%d : Alloc of MGMT_SGL_ICD Failed "
 						    "for the CID : %d\n",
 						    beiscsi_conn->
 						    beiscsi_conn_cid);
@@ -4851,7 +4854,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
 					beiscsi_log(phba, KERN_ERR,
 						    BEISCSI_LOG_IO |
 						    BEISCSI_LOG_CONFIG,
-						    "BM_%d : Alloc of WRB_HANDLE Failed"
+						    "BM_%d : Alloc of WRB_HANDLE Failed "
 						    "for the CID : %d\n",
 						    beiscsi_conn->
 						    beiscsi_conn_cid);
@@ -4872,7 +4875,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
 				beiscsi_log(phba, KERN_ERR,
 					    BEISCSI_LOG_IO |
 					    BEISCSI_LOG_CONFIG,
-					    "BM_%d : Alloc of MGMT_SGL_ICD Failed"
+					    "BM_%d : Alloc of MGMT_SGL_ICD Failed "
 					    "for the CID : %d\n",
 					    beiscsi_conn->
 					    beiscsi_conn_cid);
@@ -4885,7 +4888,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
 			if (!io_task->pwrb_handle) {
 				beiscsi_log(phba, KERN_ERR,
 					    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-					    "BM_%d : Alloc of WRB_HANDLE Failed"
+					    "BM_%d : Alloc of WRB_HANDLE Failed "
 					    "for the CID : %d\n",
 					    beiscsi_conn->beiscsi_conn_cid);
 				goto free_mgmt_hndls;
@@ -5484,7 +5487,7 @@ static pci_ers_result_t beiscsi_eeh_err_detected(struct pci_dev *pdev,
 
 	if (state == pci_channel_io_perm_failure) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : EEH : State PERM Failure");
+			    "BM_%d : EEH : State PERM Failure\n");
 		return PCI_ERS_RESULT_DISCONNECT;
 	}
 
@@ -5577,8 +5580,8 @@ static void beiscsi_eeh_resume(struct pci_dev *pdev)
 	ret = hwi_init_controller(phba);
 	if (ret) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : beiscsi_eeh_resume -"
-			     "Failed to initialize beiscsi_hba.\n");
+			    "BM_%d : beiscsi_eeh_resume - "
+			    "Failed to initialize beiscsi_hba.\n");
 		goto ret_err;
 	}
 
--

2.7.4

---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
https://www.avast.com/antivirus

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
Quoted 11 lines · Julia Lawall
Quoted 5 lines · Christophe JAILLET

This fixes:
- missing spaces in string split on several lines
- extra spaces after ':'
- missing '\n' at the end of some messages
- too long lines

I think that the strings should be concatenated, even if they go past 80 chars. I'm surprised checkpatch didn't complain.

julia

checkpatch did complain.
In this file, all logging messages were written with split lines when too long, so I considered that it was better to keep it like that.

I will resubmit if the patch gets some interest and if a maintainer ask for concatenated messages.

CJ

---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
https://www.avast.com/antivirus

#3 lore raw

PATCH v2 2/2 be2iscsi: Fix some error messages

This fixes:
- missing spaces in string split on several lines
- extra spaces after ':'
- missing '\n' at the end of some messages
- turn a \\n to \n in 1 message (v2)
- concatenate strings on the same line to fix checkpatch warnings (v2)

---
 drivers/scsi/be2iscsi/be_main.c | 79 ++++++++++++++++++++---------------------
 1 file changed, 39 insertions(+), 40 deletions(-)
drivers/scsi/be2iscsi/be_main.c +39 -40
index 89ae6390b697..826c61b3ffcc 100644
@@ -268,7 +268,7 @@ static int beiscsi_eh_abort(struct scsi_cmnd *sc)
 				&nonemb_cmd.dma);
 	if (nonemb_cmd.va = NULL) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_EH,
-			    "BM_%d : Failed to allocate memory for"
+			    "BM_%d : Failed to allocate memory for "
 			    "mgmt_invalidate_icds\n");
 		return FAILED;
 	}
@@ -278,7 +278,7 @@ static int beiscsi_eh_abort(struct scsi_cmnd *sc)
 				   cid, &nonemb_cmd);
 	if (!tag) {
 		beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_EH,
-			    "BM_%d : mgmt_invalidate_icds could not be"
+			    "BM_%d : mgmt_invalidate_icds could not be "
 			    "submitted\n");
 		pci_free_consistent(phba->ctrl.pdev, nonemb_cmd.size,
 				    nonemb_cmd.va, nonemb_cmd.dma);
@@ -350,7 +350,7 @@ static int beiscsi_eh_device_reset(struct scsi_cmnd *sc)
 				&nonemb_cmd.dma);
 	if (nonemb_cmd.va = NULL) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_EH,
-			    "BM_%d : Failed to allocate memory for"
+			    "BM_%d : Failed to allocate memory for "
 			    "mgmt_invalidate_icds\n");
 		return FAILED;
 	}
@@ -1010,7 +1010,7 @@ static int beiscsi_init_irqs(struct beiscsi_hba *phba)
 					  &phwi_context->be_eq[i]);
 			if (ret) {
 				beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-					    "BM_%d : beiscsi_init_irqs-Failed to"
+					    "BM_%d : beiscsi_init_irqs-Failed to "
 					    "register msix for i = %d\n",
 					    i);
 				kfree(phba->msi_name[i]);
@@ -1040,8 +1040,7 @@ static int beiscsi_init_irqs(struct beiscsi_hba *phba)
 				  "beiscsi", phba);
 		if (ret) {
 			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-				    "BM_%d : beiscsi_init_irqs-"
-				    "Failed to register irq\\n");
+				    "BM_%d : beiscsi_init_irqs-Failed to register irq\n");
 			return ret;
 		}
 	}
@@ -1168,7 +1167,7 @@ free_io_sgl_handle(struct beiscsi_hba *phba, struct sgl_handle *psgl_handle)
 		 * failed in xmit_task or alloc_pdu.
 		 */
 		 beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_IO,
-			     "BM_%d : Double Free in IO SGL io_sgl_free_index=%d,"
+			     "BM_%d : Double Free in IO SGL io_sgl_free_index=%d, "
 			     "value there=%p\n", phba->io_sgl_free_index,
 			     phba->io_sgl_hndl_base
 			     [phba->io_sgl_free_index]);
@@ -1256,7 +1255,7 @@ free_wrb_handle(struct beiscsi_hba *phba, struct hwi_wrb_context *pwrb_context,
 			       phba->params.wrbs_per_cxn);
 	beiscsi_log(phba, KERN_INFO,
 		    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-		    "BM_%d : FREE WRB: pwrb_handle=%p free_index=0x%x"
+		    "BM_%d : FREE WRB: pwrb_handle=%p free_index=0x%x "
 		    "wrb_handles_available=%d\n",
 		    pwrb_handle, pwrb_context->free_index,
 		    pwrb_context->wrb_handles_available);
@@ -1293,7 +1292,7 @@ free_mgmt_sgl_handle(struct beiscsi_hba *phba, struct sgl_handle *psgl_handle)
 {
 	spin_lock_bh(&phba->mgmt_sgl_lock);
 	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_CONFIG,
-		    "BM_%d : In  free_mgmt_sgl_handle,"
+		    "BM_%d : In  free_mgmt_sgl_handle, "
 		    "eh_sgl_free_index=%d\n",
 		    phba->eh_sgl_free_index);
 
@@ -1303,7 +1302,7 @@ free_mgmt_sgl_handle(struct beiscsi_hba *phba, struct sgl_handle *psgl_handle)
 		 * failed in xmit_task or alloc_pdu.
 		 */
 		beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_CONFIG,
-			    "BM_%d : Double Free in eh SGL ,"
+			    "BM_%d : Double Free in eh SGL, "
 			    "eh_sgl_free_index=%d\n",
 			    phba->eh_sgl_free_index);
 		spin_unlock_bh(&phba->mgmt_sgl_lock);
@@ -1604,7 +1603,7 @@ static void hwi_complete_cmd(struct beiscsi_conn *beiscsi_conn,
 	default:
 		beiscsi_log(phba, KERN_WARNING,
 			    BEISCSI_LOG_CONFIG | BEISCSI_LOG_IO,
-			    "BM_%d : In hwi_complete_cmd, unknown type = %d"
+			    "BM_%d : In hwi_complete_cmd, unknown type = %d "
 			    "wrb_index 0x%x CID 0x%x\n", type,
 			    csol_cqe.wrb_index,
 			    csol_cqe.cid);
@@ -2210,7 +2209,7 @@ unsigned int beiscsi_process_cq(struct be_eq_obj *pbe_eq, int budget)
 		case UNSOL_DATA_DIGEST_ERROR_NOTIFY:
 			beiscsi_log(phba, KERN_ERR,
 				    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-				    "BM_%d :  Dropping %s[%d] on DPDU ring on CID : %d\n",
+				    "BM_%d : Dropping %s[%d] on DPDU ring on CID : %d\n",
 				    cqe_desc[code], code, cid);
 			spin_lock_bh(&phba->async_pdu_lock);
 			hwi_flush_default_pdu_buffer(phba, beiscsi_conn,
@@ -2243,7 +2242,7 @@ unsigned int beiscsi_process_cq(struct be_eq_obj *pbe_eq, int budget)
 		default:
 			beiscsi_log(phba, KERN_ERR,
 				    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-				    "BM_%d : Invalid CQE Event Received Code : %d"
+				    "BM_%d : Invalid CQE Event Received Code : %d "
 				    "CID 0x%x...\n",
 				    code, cid);
 			break;
@@ -3305,7 +3304,7 @@ static int beiscsi_create_eqs(struct beiscsi_hba *phba,
 					    phwi_context->cur_eqd);
 		if (ret) {
 			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-				    "BM_%d : beiscsi_cmd_eq_create"
+				    "BM_%d : beiscsi_cmd_eq_create "
 				    "Failed for EQ\n");
 			goto create_eq_error;
 		}
@@ -3315,6 +3314,7 @@ static int beiscsi_create_eqs(struct beiscsi_hba *phba,
 			    phwi_context->be_eq[i].q.id);
 	}
 	return 0;
+
 create_eq_error:
 	for (i = 0; i < (phba->num_cpus + eq_for_mcc); i++) {
 		eq = &phwi_context->be_eq[i].q;
@@ -3370,7 +3370,7 @@ static int beiscsi_create_cqs(struct beiscsi_hba *phba,
 					    false, 0);
 		if (ret) {
 			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-				    "BM_%d : beiscsi_cmd_eq_create"
+				    "BM_%d : beiscsi_cmd_eq_create "
 				    "Failed for ISCSI CQ\n");
 			goto create_cq_error;
 		}
@@ -3499,7 +3499,7 @@ beiscsi_create_def_data(struct beiscsi_hba *phba,
 
 	hwi_post_async_buffers(phba, BEISCSI_DEFQ_DATA, ulp_num);
 	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-		    "BM_%d : DEFAULT PDU DATA RING CREATED"
+		    "BM_%d : DEFAULT PDU DATA RING CREATED "
 		    "on ULP : %d\n", ulp_num);
 
 	return 0;
@@ -3527,13 +3527,13 @@ beiscsi_post_template_hdr(struct beiscsi_hba *phba)
 
 			if (status != 0) {
 				beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-					    "BM_%d : Post Template HDR Failed for"
+					    "BM_%d : Post Template HDR Failed for "
 					    "ULP_%d\n", ulp_num);
 				return status;
 			}
 
 			beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-				    "BM_%d : Template HDR Pages Posted for"
+				    "BM_%d : Template HDR Pages Posted for "
 				    "ULP_%d\n", ulp_num);
 		}
 	}
@@ -3694,7 +3694,7 @@ beiscsi_create_wrb_rings(struct beiscsi_hba *phba,
 					    ulp_base_num);
 		if (status != 0) {
 			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-				    "BM_%d : wrbq create failed.");
+				    "BM_%d : wrbq create failed.\n");
 			kfree(pwrb_arr);
 			return status;
 		}
@@ -3999,7 +3999,7 @@ static int hwi_init_port(struct beiscsi_hba *phba)
 
 error:
 	beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-		    "BM_%d : hwi_init_port failed");
+		    "BM_%d : hwi_init_port failed\n");
 	hwi_cleanup(phba);
 	return status;
 }
@@ -4013,7 +4013,7 @@ static int hwi_init_controller(struct beiscsi_hba *phba)
 		phwi_ctrlr->phwi_ctxt = (struct hwi_context_memory *)phba->
 		    init_mem[HWI_MEM_ADDN_CONTEXT].mem_array[0].virtual_address;
 		beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-			    "BM_%d :  phwi_ctrlr->phwi_ctxt=%p\n",
+			    "BM_%d : phwi_ctrlr->phwi_ctxt=%p\n",
 			    phwi_ctrlr->phwi_ctxt);
 	} else {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
@@ -4082,7 +4082,7 @@ static int beiscsi_init_controller(struct beiscsi_hba *phba)
 	if (ret)
 		goto free_init;
 	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-		    "BM_%d : Return success from beiscsi_init_controller");
+		    "BM_%d : Return success from beiscsi_init_controller\n");
 
 	return 0;
 
@@ -4125,7 +4125,7 @@ static int beiscsi_init_sgl_handle(struct beiscsi_hba *phba)
 		}
 	} else {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : HWI_MEM_SGLH is more than one element."
+			    "BM_%d : HWI_MEM_SGLH is more than one element. "
 			    "Failing to load\n");
 		return -ENOMEM;
 	}
@@ -4153,7 +4153,7 @@ static int beiscsi_init_sgl_handle(struct beiscsi_hba *phba)
 		idx++;
 	}
 	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-		    "BM_%d : phba->io_sgl_hndl_avbl=%d"
+		    "BM_%d : phba->io_sgl_hndl_avbl=%d "
 		    "phba->eh_sgl_hndl_avbl=%d\n",
 		    phba->io_sgl_hndl_avbl,
 		    phba->eh_sgl_hndl_avbl);
@@ -4212,7 +4212,7 @@ static int hba_setup_cid_tbls(struct beiscsi_hba *phba)
 
 			if (!ptr_cid_info) {
 				beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-					    "BM_%d : Failed to allocate memory"
+					    "BM_%d : Failed to allocate memory "
 					    "for ULP_CID_INFO for ULP : %d\n",
 					    ulp_num);
 				ret = -ENOMEM;
@@ -4226,7 +4226,7 @@ static int hba_setup_cid_tbls(struct beiscsi_hba *phba)
 						  ulp_num), GFP_KERNEL);
 			if (!ptr_cid_info->cid_array) {
 				beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-					    "BM_%d : Failed to allocate memory"
+					    "BM_%d : Failed to allocate memory "
 					    "for CID_ARRAY for ULP : %d\n",
 					    ulp_num);
 				kfree(ptr_cid_info);
@@ -4257,7 +4257,7 @@ static int hba_setup_cid_tbls(struct beiscsi_hba *phba)
 				   phba->params.cxns_per_ctrl, GFP_KERNEL);
 	if (!phba->conn_table) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : Failed to allocate memory in"
+			    "BM_%d : Failed to allocate memory in "
 			    "hba_setup_cid_tbls\n");
 
 		kfree(phba->ep_array);
@@ -4397,7 +4397,7 @@ static int beiscsi_get_boot_info(struct beiscsi_hba *phba)
 	if (nonemb_cmd.va = NULL) {
 		beiscsi_log(phba, KERN_ERR,
 			    BEISCSI_LOG_INIT | BEISCSI_LOG_CONFIG,
-			    "BM_%d : Failed to allocate memory for"
+			    "BM_%d : Failed to allocate memory for "
 			    "beiscsi_get_session_info\n");
 
 		return -ENOMEM;
@@ -4418,7 +4418,7 @@ static int beiscsi_get_boot_info(struct beiscsi_hba *phba)
 	if (ret) {
 		beiscsi_log(phba, KERN_ERR,
 			    BEISCSI_LOG_INIT | BEISCSI_LOG_CONFIG,
-			    "BM_%d : beiscsi_get_session_info Failed");
+			    "BM_%d : beiscsi_get_session_info Failed\n");
 
 		if (ret != -EBUSY)
 			goto boot_freemem;
@@ -4509,14 +4509,14 @@ static int beiscsi_init_port(struct beiscsi_hba *phba)
 	ret = beiscsi_init_controller(phba);
 	if (ret < 0) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : beiscsi_dev_probe - Failed in"
+			    "BM_%d : beiscsi_dev_probe - Failed in "
 			    "beiscsi_init_controller\n");
 		return ret;
 	}
 	ret = beiscsi_init_sgl_handle(phba);
 	if (ret < 0) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : beiscsi_dev_probe - Failed in"
+			    "BM_%d : beiscsi_dev_probe - Failed in "
 			    "beiscsi_init_sgl_handle\n");
 		goto do_cleanup_ctrlr;
 	}
@@ -4806,7 +4806,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
 		if (!io_task->psgl_handle) {
 			beiscsi_log(phba, KERN_ERR,
 				    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-				    "BM_%d : Alloc of IO_SGL_ICD Failed"
+				    "BM_%d : Alloc of IO_SGL_ICD Failed "
 				    "for the CID : %d\n",
 				    beiscsi_conn->beiscsi_conn_cid);
 			goto free_hndls;
@@ -4817,7 +4817,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
 		if (!io_task->pwrb_handle) {
 			beiscsi_log(phba, KERN_ERR,
 				    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-				    "BM_%d : Alloc of WRB_HANDLE Failed"
+				    "BM_%d : Alloc of WRB_HANDLE Failed "
 				    "for the CID : %d\n",
 				    beiscsi_conn->beiscsi_conn_cid);
 			goto free_io_hndls;
@@ -4833,7 +4833,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
 					beiscsi_log(phba, KERN_ERR,
 						    BEISCSI_LOG_IO |
 						    BEISCSI_LOG_CONFIG,
-						    "BM_%d : Alloc of MGMT_SGL_ICD Failed"
+						    "BM_%d : Alloc of MGMT_SGL_ICD Failed "
 						    "for the CID : %d\n",
 						    beiscsi_conn->
 						    beiscsi_conn_cid);
@@ -4851,7 +4851,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
 					beiscsi_log(phba, KERN_ERR,
 						    BEISCSI_LOG_IO |
 						    BEISCSI_LOG_CONFIG,
-						    "BM_%d : Alloc of WRB_HANDLE Failed"
+						    "BM_%d : Alloc of WRB_HANDLE Failed "
 						    "for the CID : %d\n",
 						    beiscsi_conn->
 						    beiscsi_conn_cid);
@@ -4872,7 +4872,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
 				beiscsi_log(phba, KERN_ERR,
 					    BEISCSI_LOG_IO |
 					    BEISCSI_LOG_CONFIG,
-					    "BM_%d : Alloc of MGMT_SGL_ICD Failed"
+					    "BM_%d : Alloc of MGMT_SGL_ICD Failed "
 					    "for the CID : %d\n",
 					    beiscsi_conn->
 					    beiscsi_conn_cid);
@@ -4885,7 +4885,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
 			if (!io_task->pwrb_handle) {
 				beiscsi_log(phba, KERN_ERR,
 					    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-					    "BM_%d : Alloc of WRB_HANDLE Failed"
+					    "BM_%d : Alloc of WRB_HANDLE Failed "
 					    "for the CID : %d\n",
 					    beiscsi_conn->beiscsi_conn_cid);
 				goto free_mgmt_hndls;
@@ -5484,7 +5484,7 @@ static pci_ers_result_t beiscsi_eeh_err_detected(struct pci_dev *pdev,
 
 	if (state = pci_channel_io_perm_failure) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : EEH : State PERM Failure");
+			    "BM_%d : EEH : State PERM Failure\n");
 		return PCI_ERS_RESULT_DISCONNECT;
 	}
 
@@ -5577,8 +5577,7 @@ static void beiscsi_eeh_resume(struct pci_dev *pdev)
 	ret = hwi_init_controller(phba);
 	if (ret) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : beiscsi_eeh_resume -"
-			     "Failed to initialize beiscsi_hba.\n");
+			    "BM_%d : beiscsi_eeh_resume - Failed to initialize beiscsi_hba.\n");
 		goto ret_err;
 	}
 
Signature · 6 lines
2.7.4


---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
https://www.avast.com/antivirus
#4 lore raw
Quoted 6 lines · Christophe JAILLET

This fixes:
- missing spaces in string split on several lines
- extra spaces after ':'
- missing '\n' at the end of some messages
- turn a \\n to \n in 1 message (v2)
- concatenate strings on the same line to fix checkpatch warnings (v2)

v2 information should be under the ---. It's meaningless when the change is actually committed.

julia

Quoted 372 lines
---
 drivers/scsi/be2iscsi/be_main.c | 79 ++++++++++++++++++++---------------------
 1 file changed, 39 insertions(+), 40 deletions(-)
drivers/scsi/be2iscsi/be_main.c +39 -41
index 89ae6390b697..826c61b3ffcc 100644
@@ -268,7 +268,7 @@ static int beiscsi_eh_abort(struct scsi_cmnd *sc)
 				&nonemb_cmd.dma);
 	if (nonemb_cmd.va == NULL) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_EH,
-			    "BM_%d : Failed to allocate memory for"
+			    "BM_%d : Failed to allocate memory for "
 			    "mgmt_invalidate_icds\n");
 		return FAILED;
 	}
@@ -278,7 +278,7 @@ static int beiscsi_eh_abort(struct scsi_cmnd *sc)
 				   cid, &nonemb_cmd);
 	if (!tag) {
 		beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_EH,
-			    "BM_%d : mgmt_invalidate_icds could not be"
+			    "BM_%d : mgmt_invalidate_icds could not be "
 			    "submitted\n");
 		pci_free_consistent(phba->ctrl.pdev, nonemb_cmd.size,
 				    nonemb_cmd.va, nonemb_cmd.dma);
@@ -350,7 +350,7 @@ static int beiscsi_eh_device_reset(struct scsi_cmnd *sc)
 				&nonemb_cmd.dma);
 	if (nonemb_cmd.va == NULL) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_EH,
-			    "BM_%d : Failed to allocate memory for"
+			    "BM_%d : Failed to allocate memory for "
 			    "mgmt_invalidate_icds\n");
 		return FAILED;
 	}
@@ -1010,7 +1010,7 @@ static int beiscsi_init_irqs(struct beiscsi_hba *phba)
 					  &phwi_context->be_eq[i]);
 			if (ret) {
 				beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-					    "BM_%d : beiscsi_init_irqs-Failed to"
+					    "BM_%d : beiscsi_init_irqs-Failed to "
 					    "register msix for i = %d\n",
 					    i);
 				kfree(phba->msi_name[i]);
@@ -1040,8 +1040,7 @@ static int beiscsi_init_irqs(struct beiscsi_hba *phba)
 				  "beiscsi", phba);
 		if (ret) {
 			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-				    "BM_%d : beiscsi_init_irqs-"
-				    "Failed to register irq\\n");
+				    "BM_%d : beiscsi_init_irqs-Failed to register irq\n");
 			return ret;
 		}
 	}
@@ -1168,7 +1167,7 @@ free_io_sgl_handle(struct beiscsi_hba *phba, struct sgl_handle *psgl_handle)
 		 * failed in xmit_task or alloc_pdu.
 		 */
 		 beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_IO,
-			     "BM_%d : Double Free in IO SGL io_sgl_free_index=%d,"
+			     "BM_%d : Double Free in IO SGL io_sgl_free_index=%d, "
 			     "value there=%p\n", phba->io_sgl_free_index,
 			     phba->io_sgl_hndl_base
 			     [phba->io_sgl_free_index]);
@@ -1256,7 +1255,7 @@ free_wrb_handle(struct beiscsi_hba *phba, struct hwi_wrb_context *pwrb_context,
 			       phba->params.wrbs_per_cxn);
 	beiscsi_log(phba, KERN_INFO,
 		    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-		    "BM_%d : FREE WRB: pwrb_handle=%p free_index=0x%x"
+		    "BM_%d : FREE WRB: pwrb_handle=%p free_index=0x%x "
 		    "wrb_handles_available=%d\n",
 		    pwrb_handle, pwrb_context->free_index,
 		    pwrb_context->wrb_handles_available);
@@ -1293,7 +1292,7 @@ free_mgmt_sgl_handle(struct beiscsi_hba *phba, struct sgl_handle *psgl_handle)
 {
 	spin_lock_bh(&phba->mgmt_sgl_lock);
 	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_CONFIG,
-		    "BM_%d : In  free_mgmt_sgl_handle,"
+		    "BM_%d : In  free_mgmt_sgl_handle, "
 		    "eh_sgl_free_index=%d\n",
 		    phba->eh_sgl_free_index);
 
@@ -1303,7 +1302,7 @@ free_mgmt_sgl_handle(struct beiscsi_hba *phba, struct sgl_handle *psgl_handle)
 		 * failed in xmit_task or alloc_pdu.
 		 */
 		beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_CONFIG,
-			    "BM_%d : Double Free in eh SGL ,"
+			    "BM_%d : Double Free in eh SGL, "
 			    "eh_sgl_free_index=%d\n",
 			    phba->eh_sgl_free_index);
 		spin_unlock_bh(&phba->mgmt_sgl_lock);
@@ -1604,7 +1603,7 @@ static void hwi_complete_cmd(struct beiscsi_conn *beiscsi_conn,
 	default:
 		beiscsi_log(phba, KERN_WARNING,
 			    BEISCSI_LOG_CONFIG | BEISCSI_LOG_IO,
-			    "BM_%d : In hwi_complete_cmd, unknown type = %d"
+			    "BM_%d : In hwi_complete_cmd, unknown type = %d "
 			    "wrb_index 0x%x CID 0x%x\n", type,
 			    csol_cqe.wrb_index,
 			    csol_cqe.cid);
@@ -2210,7 +2209,7 @@ unsigned int beiscsi_process_cq(struct be_eq_obj *pbe_eq, int budget)
 		case UNSOL_DATA_DIGEST_ERROR_NOTIFY:
 			beiscsi_log(phba, KERN_ERR,
 				    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-				    "BM_%d :  Dropping %s[%d] on DPDU ring on CID : %d\n",
+				    "BM_%d : Dropping %s[%d] on DPDU ring on CID : %d\n",
 				    cqe_desc[code], code, cid);
 			spin_lock_bh(&phba->async_pdu_lock);
 			hwi_flush_default_pdu_buffer(phba, beiscsi_conn,
@@ -2243,7 +2242,7 @@ unsigned int beiscsi_process_cq(struct be_eq_obj *pbe_eq, int budget)
 		default:
 			beiscsi_log(phba, KERN_ERR,
 				    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-				    "BM_%d : Invalid CQE Event Received Code : %d"
+				    "BM_%d : Invalid CQE Event Received Code : %d "
 				    "CID 0x%x...\n",
 				    code, cid);
 			break;
@@ -3305,7 +3304,7 @@ static int beiscsi_create_eqs(struct beiscsi_hba *phba,
 					    phwi_context->cur_eqd);
 		if (ret) {
 			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-				    "BM_%d : beiscsi_cmd_eq_create"
+				    "BM_%d : beiscsi_cmd_eq_create "
 				    "Failed for EQ\n");
 			goto create_eq_error;
 		}
@@ -3315,6 +3314,7 @@ static int beiscsi_create_eqs(struct beiscsi_hba *phba,
 			    phwi_context->be_eq[i].q.id);
 	}
 	return 0;
+
 create_eq_error:
 	for (i = 0; i < (phba->num_cpus + eq_for_mcc); i++) {
 		eq = &phwi_context->be_eq[i].q;
@@ -3370,7 +3370,7 @@ static int beiscsi_create_cqs(struct beiscsi_hba *phba,
 					    false, 0);
 		if (ret) {
 			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-				    "BM_%d : beiscsi_cmd_eq_create"
+				    "BM_%d : beiscsi_cmd_eq_create "
 				    "Failed for ISCSI CQ\n");
 			goto create_cq_error;
 		}
@@ -3499,7 +3499,7 @@ beiscsi_create_def_data(struct beiscsi_hba *phba,
 
 	hwi_post_async_buffers(phba, BEISCSI_DEFQ_DATA, ulp_num);
 	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-		    "BM_%d : DEFAULT PDU DATA RING CREATED"
+		    "BM_%d : DEFAULT PDU DATA RING CREATED "
 		    "on ULP : %d\n", ulp_num);
 
 	return 0;
@@ -3527,13 +3527,13 @@ beiscsi_post_template_hdr(struct beiscsi_hba *phba)
 
 			if (status != 0) {
 				beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-					    "BM_%d : Post Template HDR Failed for"
+					    "BM_%d : Post Template HDR Failed for "
 					    "ULP_%d\n", ulp_num);
 				return status;
 			}
 
 			beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-				    "BM_%d : Template HDR Pages Posted for"
+				    "BM_%d : Template HDR Pages Posted for "
 				    "ULP_%d\n", ulp_num);
 		}
 	}
@@ -3694,7 +3694,7 @@ beiscsi_create_wrb_rings(struct beiscsi_hba *phba,
 					    ulp_base_num);
 		if (status != 0) {
 			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-				    "BM_%d : wrbq create failed.");
+				    "BM_%d : wrbq create failed.\n");
 			kfree(pwrb_arr);
 			return status;
 		}
@@ -3999,7 +3999,7 @@ static int hwi_init_port(struct beiscsi_hba *phba)
 
 error:
 	beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-		    "BM_%d : hwi_init_port failed");
+		    "BM_%d : hwi_init_port failed\n");
 	hwi_cleanup(phba);
 	return status;
 }
@@ -4013,7 +4013,7 @@ static int hwi_init_controller(struct beiscsi_hba *phba)
 		phwi_ctrlr->phwi_ctxt = (struct hwi_context_memory *)phba->
 		    init_mem[HWI_MEM_ADDN_CONTEXT].mem_array[0].virtual_address;
 		beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-			    "BM_%d :  phwi_ctrlr->phwi_ctxt=%p\n",
+			    "BM_%d : phwi_ctrlr->phwi_ctxt=%p\n",
 			    phwi_ctrlr->phwi_ctxt);
 	} else {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
@@ -4082,7 +4082,7 @@ static int beiscsi_init_controller(struct beiscsi_hba *phba)
 	if (ret)
 		goto free_init;
 	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-		    "BM_%d : Return success from beiscsi_init_controller");
+		    "BM_%d : Return success from beiscsi_init_controller\n");
 
 	return 0;
 
@@ -4125,7 +4125,7 @@ static int beiscsi_init_sgl_handle(struct beiscsi_hba *phba)
 		}
 	} else {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : HWI_MEM_SGLH is more than one element."
+			    "BM_%d : HWI_MEM_SGLH is more than one element. "
 			    "Failing to load\n");
 		return -ENOMEM;
 	}
@@ -4153,7 +4153,7 @@ static int beiscsi_init_sgl_handle(struct beiscsi_hba *phba)
 		idx++;
 	}
 	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-		    "BM_%d : phba->io_sgl_hndl_avbl=%d"
+		    "BM_%d : phba->io_sgl_hndl_avbl=%d "
 		    "phba->eh_sgl_hndl_avbl=%d\n",
 		    phba->io_sgl_hndl_avbl,
 		    phba->eh_sgl_hndl_avbl);
@@ -4212,7 +4212,7 @@ static int hba_setup_cid_tbls(struct beiscsi_hba *phba)
 
 			if (!ptr_cid_info) {
 				beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-					    "BM_%d : Failed to allocate memory"
+					    "BM_%d : Failed to allocate memory "
 					    "for ULP_CID_INFO for ULP : %d\n",
 					    ulp_num);
 				ret = -ENOMEM;
@@ -4226,7 +4226,7 @@ static int hba_setup_cid_tbls(struct beiscsi_hba *phba)
 						  ulp_num), GFP_KERNEL);
 			if (!ptr_cid_info->cid_array) {
 				beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-					    "BM_%d : Failed to allocate memory"
+					    "BM_%d : Failed to allocate memory "
 					    "for CID_ARRAY for ULP : %d\n",
 					    ulp_num);
 				kfree(ptr_cid_info);
@@ -4257,7 +4257,7 @@ static int hba_setup_cid_tbls(struct beiscsi_hba *phba)
 				   phba->params.cxns_per_ctrl, GFP_KERNEL);
 	if (!phba->conn_table) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : Failed to allocate memory in"
+			    "BM_%d : Failed to allocate memory in "
 			    "hba_setup_cid_tbls\n");
 
 		kfree(phba->ep_array);
@@ -4397,7 +4397,7 @@ static int beiscsi_get_boot_info(struct beiscsi_hba *phba)
 	if (nonemb_cmd.va == NULL) {
 		beiscsi_log(phba, KERN_ERR,
 			    BEISCSI_LOG_INIT | BEISCSI_LOG_CONFIG,
-			    "BM_%d : Failed to allocate memory for"
+			    "BM_%d : Failed to allocate memory for "
 			    "beiscsi_get_session_info\n");
 
 		return -ENOMEM;
@@ -4418,7 +4418,7 @@ static int beiscsi_get_boot_info(struct beiscsi_hba *phba)
 	if (ret) {
 		beiscsi_log(phba, KERN_ERR,
 			    BEISCSI_LOG_INIT | BEISCSI_LOG_CONFIG,
-			    "BM_%d : beiscsi_get_session_info Failed");
+			    "BM_%d : beiscsi_get_session_info Failed\n");
 
 		if (ret != -EBUSY)
 			goto boot_freemem;
@@ -4509,14 +4509,14 @@ static int beiscsi_init_port(struct beiscsi_hba *phba)
 	ret = beiscsi_init_controller(phba);
 	if (ret < 0) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : beiscsi_dev_probe - Failed in"
+			    "BM_%d : beiscsi_dev_probe - Failed in "
 			    "beiscsi_init_controller\n");
 		return ret;
 	}
 	ret = beiscsi_init_sgl_handle(phba);
 	if (ret < 0) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : beiscsi_dev_probe - Failed in"
+			    "BM_%d : beiscsi_dev_probe - Failed in "
 			    "beiscsi_init_sgl_handle\n");
 		goto do_cleanup_ctrlr;
 	}
@@ -4806,7 +4806,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
 		if (!io_task->psgl_handle) {
 			beiscsi_log(phba, KERN_ERR,
 				    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-				    "BM_%d : Alloc of IO_SGL_ICD Failed"
+				    "BM_%d : Alloc of IO_SGL_ICD Failed "
 				    "for the CID : %d\n",
 				    beiscsi_conn->beiscsi_conn_cid);
 			goto free_hndls;
@@ -4817,7 +4817,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
 		if (!io_task->pwrb_handle) {
 			beiscsi_log(phba, KERN_ERR,
 				    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-				    "BM_%d : Alloc of WRB_HANDLE Failed"
+				    "BM_%d : Alloc of WRB_HANDLE Failed "
 				    "for the CID : %d\n",
 				    beiscsi_conn->beiscsi_conn_cid);
 			goto free_io_hndls;
@@ -4833,7 +4833,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
 					beiscsi_log(phba, KERN_ERR,
 						    BEISCSI_LOG_IO |
 						    BEISCSI_LOG_CONFIG,
-						    "BM_%d : Alloc of MGMT_SGL_ICD Failed"
+						    "BM_%d : Alloc of MGMT_SGL_ICD Failed "
 						    "for the CID : %d\n",
 						    beiscsi_conn->
 						    beiscsi_conn_cid);
@@ -4851,7 +4851,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
 					beiscsi_log(phba, KERN_ERR,
 						    BEISCSI_LOG_IO |
 						    BEISCSI_LOG_CONFIG,
-						    "BM_%d : Alloc of WRB_HANDLE Failed"
+						    "BM_%d : Alloc of WRB_HANDLE Failed "
 						    "for the CID : %d\n",
 						    beiscsi_conn->
 						    beiscsi_conn_cid);
@@ -4872,7 +4872,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
 				beiscsi_log(phba, KERN_ERR,
 					    BEISCSI_LOG_IO |
 					    BEISCSI_LOG_CONFIG,
-					    "BM_%d : Alloc of MGMT_SGL_ICD Failed"
+					    "BM_%d : Alloc of MGMT_SGL_ICD Failed "
 					    "for the CID : %d\n",
 					    beiscsi_conn->
 					    beiscsi_conn_cid);
@@ -4885,7 +4885,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
 			if (!io_task->pwrb_handle) {
 				beiscsi_log(phba, KERN_ERR,
 					    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-					    "BM_%d : Alloc of WRB_HANDLE Failed"
+					    "BM_%d : Alloc of WRB_HANDLE Failed "
 					    "for the CID : %d\n",
 					    beiscsi_conn->beiscsi_conn_cid);
 				goto free_mgmt_hndls;
@@ -5484,7 +5484,7 @@ static pci_ers_result_t beiscsi_eeh_err_detected(struct pci_dev *pdev,
 
 	if (state == pci_channel_io_perm_failure) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : EEH : State PERM Failure");
+			    "BM_%d : EEH : State PERM Failure\n");
 		return PCI_ERS_RESULT_DISCONNECT;
 	}
 
@@ -5577,8 +5577,7 @@ static void beiscsi_eeh_resume(struct pci_dev *pdev)
 	ret = hwi_init_controller(phba);
 	if (ret) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : beiscsi_eeh_resume -"
-			     "Failed to initialize beiscsi_hba.\n");
+			    "BM_%d : beiscsi_eeh_resume - Failed to initialize beiscsi_hba.\n");
 		goto ret_err;
 	}
 
--

2.7.4

---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
https://www.avast.com/antivirus

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#5 lore raw

PATCH v3 2/2 be2iscsi: Fix some error messages

In reply to Christophe JAILLET

This fixes:
- missing spaces in string split on several lines
- extra spaces after ':'
- missing '\n' at the end of some messages
- turn a \\n to \n in 1 message
- concatenate strings on the same line to fix checkpatch warnings

---
v2: add:
- turn a \\n into a \n in 1 message
- concatenate strings on the same line to fix checkpatch warnings
v3: update log entry

---
 drivers/scsi/be2iscsi/be_main.c | 79 ++++++++++++++++++++---------------------
 1 file changed, 39 insertions(+), 40 deletions(-)
drivers/scsi/be2iscsi/be_main.c +39 -40
index 89ae6390b697..826c61b3ffcc 100644
@@ -268,7 +268,7 @@ static int beiscsi_eh_abort(struct scsi_cmnd *sc)
 				&nonemb_cmd.dma);
 	if (nonemb_cmd.va = NULL) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_EH,
-			    "BM_%d : Failed to allocate memory for"
+			    "BM_%d : Failed to allocate memory for "
 			    "mgmt_invalidate_icds\n");
 		return FAILED;
 	}
@@ -278,7 +278,7 @@ static int beiscsi_eh_abort(struct scsi_cmnd *sc)
 				   cid, &nonemb_cmd);
 	if (!tag) {
 		beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_EH,
-			    "BM_%d : mgmt_invalidate_icds could not be"
+			    "BM_%d : mgmt_invalidate_icds could not be "
 			    "submitted\n");
 		pci_free_consistent(phba->ctrl.pdev, nonemb_cmd.size,
 				    nonemb_cmd.va, nonemb_cmd.dma);
@@ -350,7 +350,7 @@ static int beiscsi_eh_device_reset(struct scsi_cmnd *sc)
 				&nonemb_cmd.dma);
 	if (nonemb_cmd.va = NULL) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_EH,
-			    "BM_%d : Failed to allocate memory for"
+			    "BM_%d : Failed to allocate memory for "
 			    "mgmt_invalidate_icds\n");
 		return FAILED;
 	}
@@ -1010,7 +1010,7 @@ static int beiscsi_init_irqs(struct beiscsi_hba *phba)
 					  &phwi_context->be_eq[i]);
 			if (ret) {
 				beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-					    "BM_%d : beiscsi_init_irqs-Failed to"
+					    "BM_%d : beiscsi_init_irqs-Failed to "
 					    "register msix for i = %d\n",
 					    i);
 				kfree(phba->msi_name[i]);
@@ -1040,8 +1040,7 @@ static int beiscsi_init_irqs(struct beiscsi_hba *phba)
 				  "beiscsi", phba);
 		if (ret) {
 			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-				    "BM_%d : beiscsi_init_irqs-"
-				    "Failed to register irq\\n");
+				    "BM_%d : beiscsi_init_irqs-Failed to register irq\n");
 			return ret;
 		}
 	}
@@ -1168,7 +1167,7 @@ free_io_sgl_handle(struct beiscsi_hba *phba, struct sgl_handle *psgl_handle)
 		 * failed in xmit_task or alloc_pdu.
 		 */
 		 beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_IO,
-			     "BM_%d : Double Free in IO SGL io_sgl_free_index=%d,"
+			     "BM_%d : Double Free in IO SGL io_sgl_free_index=%d, "
 			     "value there=%p\n", phba->io_sgl_free_index,
 			     phba->io_sgl_hndl_base
 			     [phba->io_sgl_free_index]);
@@ -1256,7 +1255,7 @@ free_wrb_handle(struct beiscsi_hba *phba, struct hwi_wrb_context *pwrb_context,
 			       phba->params.wrbs_per_cxn);
 	beiscsi_log(phba, KERN_INFO,
 		    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-		    "BM_%d : FREE WRB: pwrb_handle=%p free_index=0x%x"
+		    "BM_%d : FREE WRB: pwrb_handle=%p free_index=0x%x "
 		    "wrb_handles_available=%d\n",
 		    pwrb_handle, pwrb_context->free_index,
 		    pwrb_context->wrb_handles_available);
@@ -1293,7 +1292,7 @@ free_mgmt_sgl_handle(struct beiscsi_hba *phba, struct sgl_handle *psgl_handle)
 {
 	spin_lock_bh(&phba->mgmt_sgl_lock);
 	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_CONFIG,
-		    "BM_%d : In  free_mgmt_sgl_handle,"
+		    "BM_%d : In  free_mgmt_sgl_handle, "
 		    "eh_sgl_free_index=%d\n",
 		    phba->eh_sgl_free_index);
 
@@ -1303,7 +1302,7 @@ free_mgmt_sgl_handle(struct beiscsi_hba *phba, struct sgl_handle *psgl_handle)
 		 * failed in xmit_task or alloc_pdu.
 		 */
 		beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_CONFIG,
-			    "BM_%d : Double Free in eh SGL ,"
+			    "BM_%d : Double Free in eh SGL, "
 			    "eh_sgl_free_index=%d\n",
 			    phba->eh_sgl_free_index);
 		spin_unlock_bh(&phba->mgmt_sgl_lock);
@@ -1604,7 +1603,7 @@ static void hwi_complete_cmd(struct beiscsi_conn *beiscsi_conn,
 	default:
 		beiscsi_log(phba, KERN_WARNING,
 			    BEISCSI_LOG_CONFIG | BEISCSI_LOG_IO,
-			    "BM_%d : In hwi_complete_cmd, unknown type = %d"
+			    "BM_%d : In hwi_complete_cmd, unknown type = %d "
 			    "wrb_index 0x%x CID 0x%x\n", type,
 			    csol_cqe.wrb_index,
 			    csol_cqe.cid);
@@ -2210,7 +2209,7 @@ unsigned int beiscsi_process_cq(struct be_eq_obj *pbe_eq, int budget)
 		case UNSOL_DATA_DIGEST_ERROR_NOTIFY:
 			beiscsi_log(phba, KERN_ERR,
 				    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-				    "BM_%d :  Dropping %s[%d] on DPDU ring on CID : %d\n",
+				    "BM_%d : Dropping %s[%d] on DPDU ring on CID : %d\n",
 				    cqe_desc[code], code, cid);
 			spin_lock_bh(&phba->async_pdu_lock);
 			hwi_flush_default_pdu_buffer(phba, beiscsi_conn,
@@ -2243,7 +2242,7 @@ unsigned int beiscsi_process_cq(struct be_eq_obj *pbe_eq, int budget)
 		default:
 			beiscsi_log(phba, KERN_ERR,
 				    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-				    "BM_%d : Invalid CQE Event Received Code : %d"
+				    "BM_%d : Invalid CQE Event Received Code : %d "
 				    "CID 0x%x...\n",
 				    code, cid);
 			break;
@@ -3305,7 +3304,7 @@ static int beiscsi_create_eqs(struct beiscsi_hba *phba,
 					    phwi_context->cur_eqd);
 		if (ret) {
 			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-				    "BM_%d : beiscsi_cmd_eq_create"
+				    "BM_%d : beiscsi_cmd_eq_create "
 				    "Failed for EQ\n");
 			goto create_eq_error;
 		}
@@ -3315,6 +3314,7 @@ static int beiscsi_create_eqs(struct beiscsi_hba *phba,
 			    phwi_context->be_eq[i].q.id);
 	}
 	return 0;
+
 create_eq_error:
 	for (i = 0; i < (phba->num_cpus + eq_for_mcc); i++) {
 		eq = &phwi_context->be_eq[i].q;
@@ -3370,7 +3370,7 @@ static int beiscsi_create_cqs(struct beiscsi_hba *phba,
 					    false, 0);
 		if (ret) {
 			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-				    "BM_%d : beiscsi_cmd_eq_create"
+				    "BM_%d : beiscsi_cmd_eq_create "
 				    "Failed for ISCSI CQ\n");
 			goto create_cq_error;
 		}
@@ -3499,7 +3499,7 @@ beiscsi_create_def_data(struct beiscsi_hba *phba,
 
 	hwi_post_async_buffers(phba, BEISCSI_DEFQ_DATA, ulp_num);
 	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-		    "BM_%d : DEFAULT PDU DATA RING CREATED"
+		    "BM_%d : DEFAULT PDU DATA RING CREATED "
 		    "on ULP : %d\n", ulp_num);
 
 	return 0;
@@ -3527,13 +3527,13 @@ beiscsi_post_template_hdr(struct beiscsi_hba *phba)
 
 			if (status != 0) {
 				beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-					    "BM_%d : Post Template HDR Failed for"
+					    "BM_%d : Post Template HDR Failed for "
 					    "ULP_%d\n", ulp_num);
 				return status;
 			}
 
 			beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-				    "BM_%d : Template HDR Pages Posted for"
+				    "BM_%d : Template HDR Pages Posted for "
 				    "ULP_%d\n", ulp_num);
 		}
 	}
@@ -3694,7 +3694,7 @@ beiscsi_create_wrb_rings(struct beiscsi_hba *phba,
 					    ulp_base_num);
 		if (status != 0) {
 			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-				    "BM_%d : wrbq create failed.");
+				    "BM_%d : wrbq create failed.\n");
 			kfree(pwrb_arr);
 			return status;
 		}
@@ -3999,7 +3999,7 @@ static int hwi_init_port(struct beiscsi_hba *phba)
 
 error:
 	beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-		    "BM_%d : hwi_init_port failed");
+		    "BM_%d : hwi_init_port failed\n");
 	hwi_cleanup(phba);
 	return status;
 }
@@ -4013,7 +4013,7 @@ static int hwi_init_controller(struct beiscsi_hba *phba)
 		phwi_ctrlr->phwi_ctxt = (struct hwi_context_memory *)phba->
 		    init_mem[HWI_MEM_ADDN_CONTEXT].mem_array[0].virtual_address;
 		beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-			    "BM_%d :  phwi_ctrlr->phwi_ctxt=%p\n",
+			    "BM_%d : phwi_ctrlr->phwi_ctxt=%p\n",
 			    phwi_ctrlr->phwi_ctxt);
 	} else {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
@@ -4082,7 +4082,7 @@ static int beiscsi_init_controller(struct beiscsi_hba *phba)
 	if (ret)
 		goto free_init;
 	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-		    "BM_%d : Return success from beiscsi_init_controller");
+		    "BM_%d : Return success from beiscsi_init_controller\n");
 
 	return 0;
 
@@ -4125,7 +4125,7 @@ static int beiscsi_init_sgl_handle(struct beiscsi_hba *phba)
 		}
 	} else {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : HWI_MEM_SGLH is more than one element."
+			    "BM_%d : HWI_MEM_SGLH is more than one element. "
 			    "Failing to load\n");
 		return -ENOMEM;
 	}
@@ -4153,7 +4153,7 @@ static int beiscsi_init_sgl_handle(struct beiscsi_hba *phba)
 		idx++;
 	}
 	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-		    "BM_%d : phba->io_sgl_hndl_avbl=%d"
+		    "BM_%d : phba->io_sgl_hndl_avbl=%d "
 		    "phba->eh_sgl_hndl_avbl=%d\n",
 		    phba->io_sgl_hndl_avbl,
 		    phba->eh_sgl_hndl_avbl);
@@ -4212,7 +4212,7 @@ static int hba_setup_cid_tbls(struct beiscsi_hba *phba)
 
 			if (!ptr_cid_info) {
 				beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-					    "BM_%d : Failed to allocate memory"
+					    "BM_%d : Failed to allocate memory "
 					    "for ULP_CID_INFO for ULP : %d\n",
 					    ulp_num);
 				ret = -ENOMEM;
@@ -4226,7 +4226,7 @@ static int hba_setup_cid_tbls(struct beiscsi_hba *phba)
 						  ulp_num), GFP_KERNEL);
 			if (!ptr_cid_info->cid_array) {
 				beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-					    "BM_%d : Failed to allocate memory"
+					    "BM_%d : Failed to allocate memory "
 					    "for CID_ARRAY for ULP : %d\n",
 					    ulp_num);
 				kfree(ptr_cid_info);
@@ -4257,7 +4257,7 @@ static int hba_setup_cid_tbls(struct beiscsi_hba *phba)
 				   phba->params.cxns_per_ctrl, GFP_KERNEL);
 	if (!phba->conn_table) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : Failed to allocate memory in"
+			    "BM_%d : Failed to allocate memory in "
 			    "hba_setup_cid_tbls\n");
 
 		kfree(phba->ep_array);
@@ -4397,7 +4397,7 @@ static int beiscsi_get_boot_info(struct beiscsi_hba *phba)
 	if (nonemb_cmd.va = NULL) {
 		beiscsi_log(phba, KERN_ERR,
 			    BEISCSI_LOG_INIT | BEISCSI_LOG_CONFIG,
-			    "BM_%d : Failed to allocate memory for"
+			    "BM_%d : Failed to allocate memory for "
 			    "beiscsi_get_session_info\n");
 
 		return -ENOMEM;
@@ -4418,7 +4418,7 @@ static int beiscsi_get_boot_info(struct beiscsi_hba *phba)
 	if (ret) {
 		beiscsi_log(phba, KERN_ERR,
 			    BEISCSI_LOG_INIT | BEISCSI_LOG_CONFIG,
-			    "BM_%d : beiscsi_get_session_info Failed");
+			    "BM_%d : beiscsi_get_session_info Failed\n");
 
 		if (ret != -EBUSY)
 			goto boot_freemem;
@@ -4509,14 +4509,14 @@ static int beiscsi_init_port(struct beiscsi_hba *phba)
 	ret = beiscsi_init_controller(phba);
 	if (ret < 0) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : beiscsi_dev_probe - Failed in"
+			    "BM_%d : beiscsi_dev_probe - Failed in "
 			    "beiscsi_init_controller\n");
 		return ret;
 	}
 	ret = beiscsi_init_sgl_handle(phba);
 	if (ret < 0) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : beiscsi_dev_probe - Failed in"
+			    "BM_%d : beiscsi_dev_probe - Failed in "
 			    "beiscsi_init_sgl_handle\n");
 		goto do_cleanup_ctrlr;
 	}
@@ -4806,7 +4806,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
 		if (!io_task->psgl_handle) {
 			beiscsi_log(phba, KERN_ERR,
 				    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-				    "BM_%d : Alloc of IO_SGL_ICD Failed"
+				    "BM_%d : Alloc of IO_SGL_ICD Failed "
 				    "for the CID : %d\n",
 				    beiscsi_conn->beiscsi_conn_cid);
 			goto free_hndls;
@@ -4817,7 +4817,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
 		if (!io_task->pwrb_handle) {
 			beiscsi_log(phba, KERN_ERR,
 				    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-				    "BM_%d : Alloc of WRB_HANDLE Failed"
+				    "BM_%d : Alloc of WRB_HANDLE Failed "
 				    "for the CID : %d\n",
 				    beiscsi_conn->beiscsi_conn_cid);
 			goto free_io_hndls;
@@ -4833,7 +4833,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
 					beiscsi_log(phba, KERN_ERR,
 						    BEISCSI_LOG_IO |
 						    BEISCSI_LOG_CONFIG,
-						    "BM_%d : Alloc of MGMT_SGL_ICD Failed"
+						    "BM_%d : Alloc of MGMT_SGL_ICD Failed "
 						    "for the CID : %d\n",
 						    beiscsi_conn->
 						    beiscsi_conn_cid);
@@ -4851,7 +4851,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
 					beiscsi_log(phba, KERN_ERR,
 						    BEISCSI_LOG_IO |
 						    BEISCSI_LOG_CONFIG,
-						    "BM_%d : Alloc of WRB_HANDLE Failed"
+						    "BM_%d : Alloc of WRB_HANDLE Failed "
 						    "for the CID : %d\n",
 						    beiscsi_conn->
 						    beiscsi_conn_cid);
@@ -4872,7 +4872,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
 				beiscsi_log(phba, KERN_ERR,
 					    BEISCSI_LOG_IO |
 					    BEISCSI_LOG_CONFIG,
-					    "BM_%d : Alloc of MGMT_SGL_ICD Failed"
+					    "BM_%d : Alloc of MGMT_SGL_ICD Failed "
 					    "for the CID : %d\n",
 					    beiscsi_conn->
 					    beiscsi_conn_cid);
@@ -4885,7 +4885,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
 			if (!io_task->pwrb_handle) {
 				beiscsi_log(phba, KERN_ERR,
 					    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-					    "BM_%d : Alloc of WRB_HANDLE Failed"
+					    "BM_%d : Alloc of WRB_HANDLE Failed "
 					    "for the CID : %d\n",
 					    beiscsi_conn->beiscsi_conn_cid);
 				goto free_mgmt_hndls;
@@ -5484,7 +5484,7 @@ static pci_ers_result_t beiscsi_eeh_err_detected(struct pci_dev *pdev,
 
 	if (state = pci_channel_io_perm_failure) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : EEH : State PERM Failure");
+			    "BM_%d : EEH : State PERM Failure\n");
 		return PCI_ERS_RESULT_DISCONNECT;
 	}
 
@@ -5577,8 +5577,7 @@ static void beiscsi_eeh_resume(struct pci_dev *pdev)
 	ret = hwi_init_controller(phba);
 	if (ret) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : beiscsi_eeh_resume -"
-			     "Failed to initialize beiscsi_hba.\n");
+			    "BM_%d : beiscsi_eeh_resume - Failed to initialize beiscsi_hba.\n");
 		goto ret_err;
 	}
 
Signature · 6 lines
2.7.4


---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
https://www.avast.com/antivirus
#6 lore raw
Quoted 1 line · Christophe JAILLET

This fixes:

[]

Quoted 1 line

   - concatenate strings on the same line to fix checkpatch warnings

[]

drivers/scsi/be2iscsi/be_main.c

Quoted 1 line
drivers/scsi/be2iscsi/be_main.c +0 -0

[]

drivers/scsi/be2iscsi/be_main.c static int beiscsi_eh_abort(struct scsi_cmnd *sc) · line 272

Quoted 7 lines
drivers/scsi/be2iscsi/be_main.c +1 -1
@@ -268,7 +268,7 @@ static int beiscsi_eh_abort(struct scsi_cmnd *sc)
  				&nonemb_cmd.dma);
  	if (nonemb_cmd.va = NULL) {
  		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_EH,
-			    "BM_%d : Failed to allocate memory for"
+			    "BM_%d : Failed to allocate memory for "
  			    "mgmt_invalidate_icds\n");

doesn't match commit log as no coalescing/concatenation is done.

There are many of these.
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#7 lore raw
Quoted 11 lines · Joe Perches

drivers/scsi/be2iscsi/be_main.c static int beiscsi_eh_abort(struct scsi_cmnd *sc) · line 272

Quoted 8 lines
drivers/scsi/be2iscsi/be_main.c +1 -1
@@ -268,7 +268,7 @@ static int beiscsi_eh_abort(struct scsi_cmnd *sc)
  				&nonemb_cmd.dma);
  	if (nonemb_cmd.va = NULL) {
  		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_EH,
-			    "BM_%d : Failed to allocate memory for"
+			    "BM_%d : Failed to allocate memory for "
  			    "mgmt_invalidate_icds\n");

doesn't match commit log as no coalescing/concatenation is done.

Quoted 2 lines

There are many of these.

I have *only* fixed the one reported by checkpatch and left the others unchanged.

My initial proposal was to fix incorrect strings, without modifying too much the code. So I decided to do the minimum of changes.

Should I resubmitted with:
- all strings *in the patch* concatenated?
- all strings *in the file*" concatenated?

CJ

---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
https://www.avast.com/antivirus

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#8 lore raw
Quoted 16 lines · Christophe JAILLET
Quoted 10 lines · Joe Perches

drivers/scsi/be2iscsi/be_main.c static int beiscsi_eh_abort(struct scsi_cmnd *sc) · line 272

Quoted 7 lines
drivers/scsi/be2iscsi/be_main.c +1 -1
@@ -268,7 +268,7 @@ static int beiscsi_eh_abort(struct scsi_cmnd *sc)
   				&nonemb_cmd.dma);
   	if (nonemb_cmd.va = NULL) {
   		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_EH,
-			    "BM_%d : Failed to allocate memory for"
+			    "BM_%d : Failed to allocate memory for "
   			    "mgmt_invalidate_icds\n");

doesn't match commit log as no coalescing/concatenation is done.

Quoted 2 lines

There are many of these.

I have *only* fixed the one reported by checkpatch and left the others unchanged.

Quoted 6 lines

My initial proposal was to fix incorrect strings, without modifying too much the code. So I decided to do the minimum of changes.

Should I resubmitted with:
    - all strings *in the patch* concatenated?
    - all strings *in the file*" concatenated?

Hello Christophe

You don't _have_ to do anything.

I think the commit message is misleading.

You could submit another patch that does
the equivalent of:

$ ./scripts/checkpatch.pl --types=SPLIT_STRING --fix-inplace drivers/scsi/be2iscsi/be_main.c

with the appropriate commit message

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#9 lore raw
Quoted 9 lines · Joe Perches
Quoted 8 lines · Christophe JAILLET
Quoted 7 lines · Joe Perches

Review static int beiscsi_eh_abort(struct scsi_cmnd *sc) · line 272

Quoted 7 lines
(quoted diff) +1 -1
@@ -268,7 +268,7 @@ static int beiscsi_eh_abort(struct scsi_cmnd *sc)
   				&nonemb_cmd.dma);
   	if (nonemb_cmd.va = NULL) {
   		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_EH,
-			    "BM_%d : Failed to allocate memory for"
+			    "BM_%d : Failed to allocate memory for "
   			    "mgmt_invalidate_icds\n");

This is the first time I've looked at the beiscsi_log macro.

It sure is odd and undesirable.

It's _very_ not nice to have a format string take an implied __LINE__ argument.

It'd be much more intelligible to take the first bit as a separate string, concatenate it in the macro with "_%d: " and __LINE__ (if that's really useful, I think it's not) and emit that as the format.

Something like:

drivers/scsi/be2iscsi/be_main.h +0 -0
index 30a4606..3f0fbbf 100644
@@ -1084,11 +1084,12 @@ struct hwi_context_memory {

 #define __beiscsi_log(phba, level, fmt, arg...) \
  shost_printk(level, phba->shost, fmt, __LINE__, ##arg)
-#define beiscsi_log(phba, level, mask, fmt, arg...) \
-do { \
- uint32_t log_value = phba->attr_log_enable; \
- if (((mask) & log_value) || (level[1] <= '3')) \
- __beiscsi_log(phba, level, fmt, ##arg); \
-} while (0);
+#define beiscsi_log(phba, level, mask, prefix, fmt, ...) \
+do { \
+ uint32_t log_value = phba->attr_log_enable; \
+ if (((mask) & log_value) || (level[1] <= '3')) \
+ __beiscsi_log(phba, level, prefix "_%d: " fmt, \
+       ##__VA_ARGS__); \
+} while (0)

 #endif

So these beiscsi_log uses become something like:

	beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_EH,
		    "BM", "Failed to allocate memory for mgmt_invalidate_icds\n");

and the format and its arguments match.

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#10 lore raw

cover be2iscsi: Logging neatening

Joe Perches (2):
be2iscsi: Coalesce split strings and formats
be2iscsi: Use a standard logging style

 drivers/scsi/be2iscsi/be_cmds.c  |  61 +++---
 drivers/scsi/be2iscsi/be_iscsi.c | 115 ++++++-----
 drivers/scsi/be2iscsi/be_main.c  | 398 +++++++++++++++++----------------------
 drivers/scsi/be2iscsi/be_main.h  |  19 +-
 drivers/scsi/be2iscsi/be_mgmt.c  |  99 +++++-----
 5 files changed, 314 insertions(+), 378 deletions(-)
Signature · 1 line
2.8.0.rc4.16.g56331f8
#11 lore raw

Re: [PATCH 0/2] be2iscsi: Logging neatening

Quoted 3 lines · Joe Perches

Joe Perches (2):
be2iscsi: Coalesce split strings and formats
be2iscsi: Use a standard logging style

Hello Joe,

As one can see in be_main.h the "level" argument of macro beiscsi_log() is ignored for log levels KERN_EMERG, KERN_ALERT, KERN_CRIT and KERN_ERR. So for these log levels beiscsi_log() is a synonym of shost_printk(). Have you considered to replace beiscsi_log() with shost_printk() for these log levels and additionally to change beiscsi_log() for the other log levels into pr_debug()? pr_debug() statements namely already can be enabled and disabled at runtime. If the BEISCSI_LOG_* log category would be embedded in the log text that would allow to eliminate the phba->attr_log_enable structure member. Additionally, pr_debug() has a facility for displaying the source file name and the line number. That would allow to leave out __LINE__ from be2iscsi log statements. I don't think it is useful to have that line number in non-debug be2iscsi log statements.

Thanks,

Bart.

#12 lore raw

Re: [PATCH 0/2] be2iscsi: Logging neatening

Quoted 5 lines · Bart Van Assche
Quoted 3 lines · Joe Perches

Joe Perches (2):
  be2iscsi: Coalesce split strings and formats
  be2iscsi: Use a standard logging style

Hello Joe,

Hello Bart.

Quoted 5 lines

As one can see in be_main.h the "level" argument of macro beiscsi_log() is ignored for log levels KERN_EMERG, KERN_ALERT, KERN_CRIT and KERN_ERR. So for these log levels beiscsi_log() is a synonym of shost_printk(). Have you considered to replace beiscsi_log() with shost_printk() for these log levels and additionally to change

Quoted 8 lines

beiscsi_log() for the other log levels into pr_debug()? pr_debug() statements namely already can be enabled and disabled at runtime. If the BEISCSI_LOG_* log category would be embedded in the log text that would allow to eliminate the phba->attr_log_enable structure member. Additionally, pr_debug() has a facility for displaying the source file name and the line number. That would allow to leave out __LINE__ from be2iscsi log statements. I don't think it is useful to have that line number in non-debug be2iscsi log statements.

My main consideration for submitting a patch at all was removing the apparent format/argument mismatches.

As far as I can grep, only KERN_ERR, KERN_WARNING and KERN_INFO are actually used by be2iscsi today.

I agree with the removal of __LINE__ from the macros as its utility is generally pretty low.

Besides, using stringify(__LINE__) is almost always smaller object code than a format with "%d", __LINE__.

Prefixes like "BC" and "BS" are __FILE__ equivalents, and could be removed as well with something like "%s, kbasename(__FILE__)" used if _really_ desired.

I have no issue with defining and using beiscsi_<level> equivalents to shost_printks.

I think the test inside beiscsi_log is better removed with multiple specific beiscsi_<level> calls used.

I don't know why any KERN_ERR should ever be masked, but perhaps something like:

#define beiscsi_printk(level, phba, mask, fmt, ...) \

do {								\
	if ((mask) & (phba)->attr_log_enable)			\
		shost_printk(level, phba->shost, fmt, ##__VA_ARGS__); \
} while (0)
#define beiscsi_err(phba, mask, fmt, ...)			\
	beiscsi_printk(KERN_ERR, phba, mask, fmt, ##__VA_ARGS__)
#define beiscsi_warn(phba, mask, fmt, ...)			\
	beiscsi_printk(KERN_WARNING, phba, mask, fmt, ##__VA_ARGS__)
#define beiscsi_info(phba, mask, fmt, ...)			\
	beiscsi_printk(KERN_INFO, phba, mask, fmt, ##__VA_ARGS__)

with a sed of the .c files:

$ sed -i 's/beiscsi_log(phba, KERN_ERR/beiscsi_err(phba/g' drivers/scsi/be2iscsi/*.c
$ sed -i 's/beiscsi_log(phba, KERN_WARNING/beiscsi_warn(phba/g' drivers/scsi/be2iscsi/*.c
$ sed -i 's/beiscsi_log(phba, KERN_INFO/beiscsi_info(phba/g' drivers/scsi/be2iscsi/*.c

with argument realignment of those lines.

All of these are of course up to the actual maintainers of be2iscsi.

#13 lore raw

Re: [PATCH 0/2] be2iscsi: Logging neatening

Quoted 55 lines · Joe Perches
Quoted 5 lines · Bart Van Assche

As one can see in be_main.h the "level" argument of macro beiscsi_log() is ignored for log levels KERN_EMERG, KERN_ALERT, KERN_CRIT and KERN_ERR. So for these log levels beiscsi_log() is a synonym of shost_printk(). Have you considered to replace beiscsi_log() with shost_printk() for these log levels and additionally to change

Quoted 8 lines

beiscsi_log() for the other log levels into pr_debug()? pr_debug() statements namely already can be enabled and disabled at runtime. If the BEISCSI_LOG_* log category would be embedded in the log text that would allow to eliminate the phba->attr_log_enable structure member. Additionally, pr_debug() has a facility for displaying the source file name and the line number. That would allow to leave out __LINE__ from be2iscsi log statements. I don't think it is useful to have that line number in non-debug be2iscsi log statements.

My main consideration for submitting a patch at all was removing the apparent format/argument mismatches.

As far as I can grep, only KERN_ERR, KERN_WARNING and KERN_INFO are actually used by be2iscsi today.

I agree with the removal of __LINE__ from the macros as its utility is generally pretty low.

Besides, using stringify(__LINE__) is almost always smaller object code than a format with "%d", __LINE__.

Prefixes like "BC" and "BS" are __FILE__ equivalents, and could be removed as well with something like "%s, kbasename(__FILE__)" used if _really_ desired.

I have no issue with defining and using beiscsi_<level> equivalents to shost_printks.

I think the test inside beiscsi_log is better removed with multiple specific beiscsi_<level> calls used.

I don't know why any KERN_ERR should ever be masked, but perhaps something like:

#define beiscsi_printk(level, phba, mask, fmt, ...) \

do {								\
	if ((mask) & (phba)->attr_log_enable)			\
		shost_printk(level, phba->shost, fmt, ##__VA_ARGS__); \
} while (0)
#define beiscsi_err(phba, mask, fmt, ...)			\
	beiscsi_printk(KERN_ERR, phba, mask, fmt, ##__VA_ARGS__)
#define beiscsi_warn(phba, mask, fmt, ...)			\
	beiscsi_printk(KERN_WARNING, phba, mask, fmt, ##__VA_ARGS__)
#define beiscsi_info(phba, mask, fmt, ...)			\
	beiscsi_printk(KERN_INFO, phba, mask, fmt, ##__VA_ARGS__)

with a sed of the .c files:

Quoted 7 lines
$ sed -i 's/beiscsi_log(phba, KERN_ERR/beiscsi_err(phba/g' drivers/scsi/be2iscsi/*.c
$ sed -i 's/beiscsi_log(phba, KERN_WARNING/beiscsi_warn(phba/g' drivers/scsi/be2iscsi/*.c
$ sed -i 's/beiscsi_log(phba, KERN_INFO/beiscsi_info(phba/g' drivers/scsi/be2iscsi/*.c

with argument realignment of those lines.

All of these are of course up to the actual maintainers of be2iscsi.

Hello Joe,

My primary concern is how to enable and disable log messages from user space. Many drivers define their own logging macros and export a bitmask that allows to enable and disable logging messages per category. These bitmask control mechanisms are annoying because figuring out what bit controls which message category requires a search through the driver source code. I'd like to see all these custom logging macros disappear and being replaced by a single mechanism. The "dynamic debug" mechanism e.g. is in my opinion much easier to use than the different custom logging mechanisms.

Bart.

Bart.

#14 lore raw

Re: [PATCH 0/2] be2iscsi: Logging neatening

Quoted 9 lines · Bart Van Assche

My primary concern is how to enable and disable log messages from user space. Many drivers define their own logging macros and export a bitmask that allows to enable and disable logging messages per category. These bitmask control mechanisms are annoying because figuring out what bit controls which message category requires a search through the driver source code. I'd like to see all these custom logging macros disappear and being replaced by a single mechanism. The "dynamic debug" mechanism e.g. is in my opinion much easier to use than the different custom logging mechanisms.

Dynamic debug doesn't have a bitmask function and
still requires looking through the code for lines
and format strings.

I think you are looking for a system wide equivalent for the ethtool/netif_<level> mechanism.

Nothing like that exists currently.

Some code uses a bitmask/and, other code uses a
level/comparison.

Care to propose something?

#15 lore raw

Re: [PATCH 0/2] be2iscsi: Logging neatening

Quoted 18 lines · Joe Perches
Quoted 9 lines · Bart Van Assche

My primary concern is how to enable and disable log messages from user space. Many drivers define their own logging macros and export a bitmask that allows to enable and disable logging messages per category. These bitmask control mechanisms are annoying because figuring out what bit controls which message category requires a search through the driver source code. I'd like to see all these custom logging macros disappear and being replaced by a single mechanism. The "dynamic debug" mechanism e.g. is in my opinion much easier to use than the different custom logging mechanisms.

Dynamic debug doesn't have a bitmask function and
still requires looking through the code for lines
and format strings.

I think you are looking for a system wide equivalent for the ethtool/netif_<level> mechanism.

Quoted 6 lines

Nothing like that exists currently.

Some code uses a bitmask/and, other code uses a
level/comparison.

Care to propose something?

Hello Joe,

As far as I can see all that the ethtool msglevel API implements is a mechanism to query and set the log level from user space. What various SCSI drivers implement is not a log level but a log mask mechanism. How about the following approach to associate a name with each bit in a log mask, to export these names to user space and to make it possible to enable/disable messages per log category:
* Introduce a variant of pr_debug() that allows to specify a textual representation of the log category (a short string without spaces).
* Make the log category names available in /sys/kernel/debug/dynamic_debug/...
* Today dynamic debug allows to enable/disable log messages by specifying the source file name, function name, line number, module name and/or format string. My proposal is to make it also possible to enable/disable log messages based on the log category name.

Anyway, this is just a proposal. Anyone is welcome to come up with an alternative proposal.

Bart.

#16 lore raw

Re: [PATCH 0/2] be2iscsi: Logging neatening

Quoted 4 lines · Bart Van Assche
Quoted 3 lines · Joe Perches
Quoted 2 lines · Bart Van Assche

My primary concern is how to enable and disable log messages from user space.

[]

Quoted 7 lines
Quoted 7 lines

I think you are looking for a system wide equivalent for the ethtool/netif_ mechanism.

Nothing like that exists currently.

Some code uses a bitmask/and, other code uses a
level/comparison.

[]

Quoted 6 lines

As far as I can see all that the ethtool msglevel API implements is a mechanism to query and set the log level from user space. What various SCSI drivers implement is not a log level but a log mask mechanism. How about the following approach to associate a name with each bit in a log mask, to export these names to user space and to make it possible to enable/disable messages per log category:

Quoted 8 lines

* Introduce a variant of pr_debug() that allows to specify a textual representation of the log category (a short string without spaces).
* Make the log category names available in /sys/kernel/debug/dynamic_debug/...
* Today dynamic debug allows to enable/disable log messages by specifying the source file name, function name, line number, module name and/or format string. My proposal is to make it also possible to enable/disable log messages based on the log category name.

Many of these logging mechanisms are not just debug facilities.

Perhaps a dynamic_debug control would be inappropriate.

There have also been various custom scsi log level facilities like the blogic_msg for the very old BusLogic blogic_msg.

These functions also sometimes write into some device-specific buffer.

Perhaps the largest problem, if this is to be scsi only rather than system wide, is finding out what and how the various bits in a mask should be used.

#17 lore raw

PATCH 1/1 be2iscsi: Use a more current logging style

In reply to Joe Perches

shost_printk macros are converted to beiscsi_<level> for a more current logging style.

Consolidate the masked tests into a beiscsi_printk macro and use that to call shost_printk.

Convert the __beiscsi_log macros to use shost_print directly.

Miscellanea:

o Remove the file prefix identifier and use kbasename(__FILE__) and stringify(__LINE__) to reduce code size in beiscsi_printk
o Realign arguments

---
 drivers/scsi/be2iscsi/be_cmds.c  | 142 ++++----
 drivers/scsi/be2iscsi/be_iscsi.c | 223 ++++++------
 drivers/scsi/be2iscsi/be_main.c  | 733 +++++++++++++++++++--------------------
 drivers/scsi/be2iscsi/be_main.h  |  20 +-
 drivers/scsi/be2iscsi/be_mgmt.c  | 270 +++++++-------
 5 files changed, 668 insertions(+), 720 deletions(-)
drivers/scsi/be2iscsi/be_cmds.c +72 -70
index a51bc0e..574d2f4 100644
@@ -95,8 +95,8 @@ int be_chk_reset_complete(struct beiscsi_hba *phba)
 	}
 
 	if ((status & 0x80000000) || (!num_loop)) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BC", "Failed in be_chk_reset_complete status = 0x%x\n",
+		beiscsi_err(phba, BEISCSI_LOG_INIT,
+			    "Failed in be_chk_reset_complete status = 0x%x\n",
 			    status);
 		return -EIO;
 	}
@@ -135,9 +135,9 @@ struct be_mcc_wrb *alloc_mcc_wrb(struct beiscsi_hba *phba,
 
 	spin_lock_bh(&phba->ctrl.mcc_lock);
 	if (mccq->used == mccq->len) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT |
+		beiscsi_err(phba, BEISCSI_LOG_INIT |
 			    BEISCSI_LOG_CONFIG | BEISCSI_LOG_MBOX,
-			    "BC", "MCC queue full: WRB used %u tag avail %u\n",
+			    "MCC queue full: WRB used %u tag avail %u\n",
 			    mccq->used, phba->ctrl.mcc_tag_available);
 		goto alloc_failed;
 	}
@@ -147,9 +147,9 @@ struct be_mcc_wrb *alloc_mcc_wrb(struct beiscsi_hba *phba,
 
 	tag = phba->ctrl.mcc_tag[phba->ctrl.mcc_alloc_index];
 	if (!tag) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT |
+		beiscsi_err(phba, BEISCSI_LOG_INIT |
 			    BEISCSI_LOG_CONFIG | BEISCSI_LOG_MBOX,
-			    "BC", "MCC tag 0 allocated: tag avail %u alloc index %u\n",
+			    "MCC tag 0 allocated: tag avail %u alloc index %u\n",
 			    phba->ctrl.mcc_tag_available,
 			    phba->ctrl.mcc_alloc_index);
 		goto alloc_failed;
@@ -263,10 +263,10 @@ int beiscsi_mccq_compl_wait(struct beiscsi_hba *phba,
 		set_bit(MCC_TAG_STATE_TIMEOUT,
 				&phba->ctrl.ptag_state[tag].tag_state);
 
-		beiscsi_log(phba, KERN_ERR,
+		beiscsi_err(phba,
 			    BEISCSI_LOG_INIT | BEISCSI_LOG_EH |
 			    BEISCSI_LOG_CONFIG,
-			    "BC", "MBX Cmd Completion timed out\n");
+			    "MBX Cmd Completion timed out\n");
 		return -EBUSY;
 	}
 
@@ -289,22 +289,22 @@ int beiscsi_mccq_compl_wait(struct beiscsi_hba *phba,
 	}
 
 	if (status || addl_status) {
-		beiscsi_log(phba, KERN_WARNING,
-			    BEISCSI_LOG_INIT | BEISCSI_LOG_EH |
-			    BEISCSI_LOG_CONFIG,
-			    "BC", "MBX Cmd Failed for Subsys : %d Opcode : %d with Status : %d and Extd_Status : %d\n",
-			    mbx_hdr->subsystem,
-			    mbx_hdr->opcode,
-			    status, addl_status);
+		beiscsi_warn(phba,
+			     BEISCSI_LOG_INIT | BEISCSI_LOG_EH |
+			     BEISCSI_LOG_CONFIG,
+			     "MBX Cmd Failed for Subsys : %d Opcode : %d with Status : %d and Extd_Status : %d\n",
+			     mbx_hdr->subsystem,
+			     mbx_hdr->opcode,
+			     status, addl_status);
 		rc = -EIO;
 		if (status == MCC_STATUS_INSUFFICIENT_BUFFER) {
 			mbx_resp_hdr = (struct be_cmd_resp_hdr *) mbx_hdr;
-			beiscsi_log(phba, KERN_WARNING,
-				    BEISCSI_LOG_INIT | BEISCSI_LOG_EH |
-				    BEISCSI_LOG_CONFIG,
-				    "BC", "Insufficient Buffer Error Resp_Len : %d Actual_Resp_Len : %d\n",
-				    mbx_resp_hdr->response_length,
-				    mbx_resp_hdr->actual_resp_len);
+			beiscsi_warn(phba,
+				     BEISCSI_LOG_INIT | BEISCSI_LOG_EH |
+				     BEISCSI_LOG_CONFIG,
+				     "Insufficient Buffer Error Resp_Len : %d Actual_Resp_Len : %d\n",
+				     mbx_resp_hdr->response_length,
+				     mbx_resp_hdr->actual_resp_len);
 			rc = -EAGAIN;
 		}
 	}
@@ -339,9 +339,8 @@ static int beiscsi_process_mbox_compl(struct be_ctrl_info *ctrl,
 	 * entry is little endian)
 	 */
 	if (!compl->flags) {
-		beiscsi_log(phba, KERN_ERR,
-				BEISCSI_LOG_CONFIG | BEISCSI_LOG_MBOX,
-				"BC", "BMBX busy, no completion\n");
+		beiscsi_err(phba, BEISCSI_LOG_CONFIG | BEISCSI_LOG_MBOX,
+			    "BMBX busy, no completion\n");
 		return -EBUSY;
 	}
 	compl->flags = le32_to_cpu(compl->flags);
@@ -362,8 +361,8 @@ static int beiscsi_process_mbox_compl(struct be_ctrl_info *ctrl,
 	if (compl_status == MCC_STATUS_SUCCESS)
 		return 0;
 
-	beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG | BEISCSI_LOG_MBOX,
-		    "BC", "error in cmd completion: Subsystem : %d Opcode : %d status(compl/extd)=%d/%d\n",
+	beiscsi_err(phba, BEISCSI_LOG_CONFIG | BEISCSI_LOG_MBOX,
+		    "error in cmd completion: Subsystem : %d Opcode : %d status(compl/extd)=%d/%d\n",
 		    hdr->subsystem, hdr->opcode, compl_status, extd_status);
 
 	if (compl_status == MCC_STATUS_INSUFFICIENT_BUFFER) {
@@ -390,14 +389,14 @@ static void beiscsi_process_async_link(struct beiscsi_hba *phba,
 	if (evt->port_link_status & BE_ASYNC_LINK_UP_MASK) {
 		phba->state = BE_ADAPTER_LINK_UP | BE_ADAPTER_CHECK_BOOT;
 		phba->get_boot = BE_GET_BOOT_RETRIES;
-		__beiscsi_log(phba, KERN_ERR,
-			      "BC%d: Link Up on Port %d tag 0x%x\n",
-			      __LINE__, evt->physical_port, evt->event_tag);
+		shost_printk(KERN_ERR, phba->shost,
+			     "BC%d: Link Up on Port %d tag 0x%x\n",
+			     __LINE__, evt->physical_port, evt->event_tag);
 	} else {
 		phba->state = BE_ADAPTER_LINK_DOWN;
-		__beiscsi_log(phba, KERN_ERR,
-			      "BC%d: Link Down on Port %d tag 0x%x\n",
-			      __LINE__, evt->physical_port, evt->event_tag);
+		shost_printk(KERN_ERR, phba->shost,
+			     "BC%d: Link Down on Port %d tag 0x%x\n",
+			     __LINE__, evt->physical_port, evt->event_tag);
 		iscsi_host_for_each_session(phba->shost,
 					    beiscsi_fail_session);
 	}
@@ -438,9 +437,9 @@ static void beiscsi_process_async_sli(struct beiscsi_hba *phba,
 
 	if (state >= ARRAY_SIZE(beiscsi_port_misconf_event_msg)) {
 		/* fw is reporting a state we don't know, log and return */
-		__beiscsi_log(phba, KERN_ERR,
-			      "BC%d: Port %c: Unrecognized optic state 0x%x\n",
-			      __LINE__, phba->port_name, async_sli->event_data1);
+		shost_printk(KERN_ERR, phba->shost,
+			     "BC%d: Port %c: Unrecognized optic state 0x%x\n",
+			     __LINE__, phba->port_name, async_sli->event_data1);
 		return;
 	}
 
@@ -459,16 +458,16 @@ static void beiscsi_process_async_sli(struct beiscsi_hba *phba,
 	}
 
 	if (old_state != phba->optic_state)
-		__beiscsi_log(phba, sev, "BC%d: Port %c: %s%s\n",
-			      __LINE__, phba->port_name,
-			      beiscsi_port_misconf_event_msg[state],
-			      !msg ? "" : msg);
+		shost_printk(sev, phba->shost, "BC%d: Port %c: %s%s\n",
+			     __LINE__, phba->port_name,
+			     beiscsi_port_misconf_event_msg[state],
+			     !msg ? "" : msg);
 }
 
 void beiscsi_process_async_event(struct beiscsi_hba *phba,
 				struct be_mcc_compl *compl)
 {
-	char *sev = KERN_INFO;
+	bool err = false;
 	u8 evt_code;
 
 	/* interpret flags as an async trailer */
@@ -481,19 +480,24 @@ void beiscsi_process_async_event(struct beiscsi_hba *phba,
 	case ASYNC_EVENT_CODE_ISCSI:
 		phba->state |= BE_ADAPTER_CHECK_BOOT;
 		phba->get_boot = BE_GET_BOOT_RETRIES;
-		sev = KERN_ERR;
+		err = true;
 		break;
 	case ASYNC_EVENT_CODE_SLI:
 		beiscsi_process_async_sli(phba, compl);
 		break;
 	default:
 		/* event not registered */
-		sev = KERN_ERR;
+		err = true;
 	}
 
-	beiscsi_log(phba, sev, BEISCSI_LOG_CONFIG | BEISCSI_LOG_MBOX,
-		    "BC", "ASYNC Event %x: status 0x%08x flags 0x%08x\n",
-		    evt_code, compl->status, compl->flags);
+	if (err)
+		beiscsi_err(phba,  BEISCSI_LOG_CONFIG | BEISCSI_LOG_MBOX,
+			    "ASYNC Event %x: status 0x%08x flags 0x%08x\n",
+			    evt_code, compl->status, compl->flags);
+	else
+		beiscsi_info(phba,  BEISCSI_LOG_CONFIG | BEISCSI_LOG_MBOX,
+			     "ASYNC Event %x: status 0x%08x flags 0x%08x\n",
+			     evt_code, compl->status, compl->flags);
 }
 
 int beiscsi_process_mcc_compl(struct be_ctrl_info *ctrl,
@@ -510,17 +514,17 @@ int beiscsi_process_mcc_compl(struct be_ctrl_info *ctrl,
 
 	if (!test_bit(MCC_TAG_STATE_RUNNING,
 		      &ctrl->ptag_state[tag].tag_state)) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_MBOX |
+		beiscsi_err(phba, BEISCSI_LOG_MBOX |
 			    BEISCSI_LOG_INIT | BEISCSI_LOG_CONFIG,
-			    "BC", "MBX cmd completed but not posted\n");
+			    "MBX cmd completed but not posted\n");
 		return 0;
 	}
 
 	if (test_bit(MCC_TAG_STATE_TIMEOUT, &ctrl->ptag_state[tag].tag_state)) {
-		beiscsi_log(phba, KERN_WARNING,
-			    BEISCSI_LOG_MBOX | BEISCSI_LOG_INIT |
-			    BEISCSI_LOG_CONFIG,
-			    "BC", "MBX Completion for timeout Command from FW\n");
+		beiscsi_warn(phba,
+			     BEISCSI_LOG_MBOX | BEISCSI_LOG_INIT |
+			     BEISCSI_LOG_CONFIG,
+			     "MBX Completion for timeout Command from FW\n");
 		/**
 		 * Check for the size before freeing resource.
 		 * Only for non-embedded cmd, PCI resource is allocated.
@@ -571,9 +575,8 @@ int be_mcc_compl_poll(struct beiscsi_hba *phba, unsigned int tag)
 
 	if (!test_bit(MCC_TAG_STATE_RUNNING,
 		      &ctrl->ptag_state[tag].tag_state)) {
-		beiscsi_log(phba, KERN_ERR,
-			    BEISCSI_LOG_CONFIG | BEISCSI_LOG_MBOX,
-			    "BC", "tag %u state not running\n", tag);
+		beiscsi_err(phba, BEISCSI_LOG_CONFIG | BEISCSI_LOG_MBOX,
+			    "tag %u state not running\n", tag);
 		return 0;
 	}
 	for (i = 0; i < mcc_timeout; i++) {
@@ -593,8 +596,8 @@ int be_mcc_compl_poll(struct beiscsi_hba *phba, unsigned int tag)
 	if (i < mcc_timeout)
 		return 0;
 
-	beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG | BEISCSI_LOG_MBOX,
-		    "BC", "FW Timed Out\n");
+	beiscsi_err(phba, BEISCSI_LOG_CONFIG | BEISCSI_LOG_MBOX,
+		    "FW Timed Out\n");
 	phba->fw_timeout = true;
 	beiscsi_ue_detect(phba);
 	return -EBUSY;
@@ -655,9 +658,8 @@ static int be_mbox_db_ready_poll(struct be_ctrl_info *ctrl)
 		msleep(20);
 	} while (!ready);
 
-	beiscsi_log(phba, KERN_ERR,
-			BEISCSI_LOG_CONFIG | BEISCSI_LOG_MBOX,
-			"BC", "FW Timed Out\n");
+	beiscsi_err(phba, BEISCSI_LOG_CONFIG | BEISCSI_LOG_MBOX,
+		    "FW Timed Out\n");
 
 	phba->fw_timeout = true;
 	beiscsi_ue_detect(phba);
@@ -849,8 +851,8 @@ int be_cmd_fw_initialize(struct be_ctrl_info *ctrl)
 
 	status = be_mbox_notify(ctrl);
 	if (status)
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BC", "be_cmd_fw_initialize Failed\n");
+		beiscsi_err(phba, BEISCSI_LOG_INIT,
+			    "be_cmd_fw_initialize Failed\n");
 
 	mutex_unlock(&ctrl->mbox_lock);
 	return status;
@@ -890,8 +892,8 @@ int be_cmd_fw_uninit(struct be_ctrl_info *ctrl)
 
 	status = be_mbox_notify(ctrl);
 	if (status)
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BC", "be_cmd_fw_uninit Failed\n");
+		beiscsi_err(phba, BEISCSI_LOG_INIT,
+			    "be_cmd_fw_uninit Failed\n");
 
 	mutex_unlock(&ctrl->mbox_lock);
 	return status;
@@ -955,8 +957,8 @@ int beiscsi_cmd_cq_create(struct be_ctrl_info *ctrl,
 		cq->id = le16_to_cpu(resp->cq_id);
 		cq->created = true;
 	} else
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BC", "In be_cmd_cq_create, status=ox%08x\n",
+		beiscsi_err(phba, BEISCSI_LOG_INIT,
+			    "In be_cmd_cq_create, status=ox%08x\n",
 			    status);
 
 	mutex_unlock(&ctrl->mbox_lock);
@@ -1031,9 +1033,9 @@ int beiscsi_cmd_q_destroy(struct be_ctrl_info *ctrl, struct be_queue_info *q,
 	u8 subsys = 0, opcode = 0;
 	int status;
 
-	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-		    "BC", "In beiscsi_cmd_q_destroy queue_type : %d\n",
-		    queue_type);
+	beiscsi_info(phba, BEISCSI_LOG_INIT,
+		     "In beiscsi_cmd_q_destroy queue_type : %d\n",
+		     queue_type);
 
 	mutex_lock(&ctrl->mbox_lock);
 	memset(wrb, 0, sizeof(*wrb));
@@ -1327,8 +1329,8 @@ int be_cmd_iscsi_post_sgl_pages(struct be_ctrl_info *ctrl,
 
 		status = be_mbox_notify(ctrl);
 		if (status) {
-			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-				    "BC", "FW CMD to map iscsi frags failed.\n");
+			beiscsi_err(phba, BEISCSI_LOG_INIT,
+				    "FW CMD to map iscsi frags failed.\n");
 
 			goto error;
 		}
drivers/scsi/be2iscsi/be_iscsi.c +110 -113

494 lines not on this page · raw message

drivers/scsi/be2iscsi/be_main.c +349 -384

1,489 lines not on this page · raw message

drivers/scsi/be2iscsi/be_main.h +12 -8
index aa9c682..7cce6e3 100644
@@ -1081,15 +1081,19 @@ struct hwi_context_memory {
 #define BEISCSI_LOG_CONFIG	0x0020	/* CONFIG Code Path */
 #define BEISCSI_LOG_ISCSI	0x0040	/* SCSI/iSCSI Protocol related Logs */
 
-#define __beiscsi_log(phba, level, fmt, ...)				\
-	shost_printk(level, phba->shost, fmt, ##__VA_ARGS__)
-
-#define beiscsi_log(phba, level, mask, prefix, fmt, ...)		\
+#define beiscsi_printk(level, phba, mask, fmt, ...)			\
 do {									\
-	uint32_t log_value = phba->attr_log_enable;			\
-	if (((mask) & log_value) || (level[1] <= '3'))			\
-		__beiscsi_log(phba, level, prefix "_%d: " fmt,		\
-			      __LINE__, ##__VA_ARGS__);			\
+	if ((mask) & (phba)->attr_log_enable)				\
+		shost_printk(level, phba->shost,			\
+			     "%s_" __stringify(__LINE__) ": " fmt,	\
+			     kbasename(__FILE__), ##__VA_ARGS__);	\
 } while (0)
 
+#define beiscsi_err(phba, mask, fmt, ...)				\
+	beiscsi_printk(KERN_ERR, phba, mask, fmt, ##__VA_ARGS__)
+#define beiscsi_warn(phba, mask, fmt, ...)				\
+	beiscsi_printk(KERN_WARNING, phba, mask, fmt, ##__VA_ARGS__)
+#define beiscsi_info(phba, mask, fmt, ...)				\
+	beiscsi_printk(KERN_INFO, phba, mask, fmt, ##__VA_ARGS__)
+
 #endif
drivers/scsi/be2iscsi/be_mgmt.c +125 -145

548 lines not on this page · raw message

Signature · 1 line
2.8.0.rc4.16.g56331f8
#18 lore raw

RE: [PATCH] be2iscsi: Use a more current logging style

Thanks Joe for taking this up. It has been pending for long time from our side.

Quoted 23 lines

-----Original Message-----
From: [email protected] [mailto:linux-scsi- [email protected]] On Behalf Of Joe Perches
Sent: Monday, August 15, 2016 12:26 AM
To: Christophe JAILLET; Jayamohan Kallickal; Ketan Mukadam
Cc: Bart Van Assche; James E.J. Bottomley; Martin K. Petersen; linux- [email protected]; [email protected]
Subject: [PATCH] be2iscsi: Use a more current logging style

shost_printk macros are converted to beiscsi_<level> for a more current logging style.

Consolidate the masked tests into a beiscsi_printk macro and use that to call shost_printk.

Convert the __beiscsi_log macros to use shost_print directly.

Miscellanea:

o Remove the file prefix identifier and use kbasename(__FILE__) and stringify(__LINE__) to reduce code size in beiscsi_printk
o Realign arguments

Quoted 5 lines
---
 drivers/scsi/be2iscsi/be_cmds.c  | 142 ++++----
 drivers/scsi/be2iscsi/be_iscsi.c | 223 ++++++------
 drivers/scsi/be2iscsi/be_main.c  | 733

+++++++++++++++++++--------------------

Review

Quoted 5 lines
 drivers/scsi/be2iscsi/be_main.h  |  20 +-
 drivers/scsi/be2iscsi/be_mgmt.c  | 270 +++++++-------
 5 files changed, 668 insertions(+), 720 deletions(-)
(quoted diff) +0 -0

b/drivers/scsi/be2iscsi/be_cmds.c

drivers/scsi/be2iscsi/be_cmds.c int be_chk_reset_complete(struct beiscsi_hba *phba) · line 99

Quoted 9 lines

index a51bc0e..574d2f4 100644

drivers/scsi/be2iscsi/be_cmds.c +0 -2
@@ -95,8 +95,8 @@ int be_chk_reset_complete(struct beiscsi_hba *phba)
 	}
 
 	if ((status & 0x80000000) || (!num_loop)) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BC", "Failed in be_chk_reset_complete status

=

drivers/scsi/be2iscsi/be_cmds.c int be_chk_reset_complete(struct beiscsi_hba *phba) · line 100

Quoted 3 lines
drivers/scsi/be2iscsi/be_cmds.c +2 -0
 0x%x\n",
+		beiscsi_err(phba, BEISCSI_LOG_INIT,
+			    "Failed in be_chk_reset_complete status =

0x%x\n",

drivers/scsi/be2iscsi/be_cmds.c struct be_mcc_wrb *alloc_mcc_wrb(struct beiscsi_hba · line 141

Quoted 12 lines
drivers/scsi/be2iscsi/be_cmds.c +0 -0
 			    status);
 		return -EIO;
drivers/scsi/be2iscsi/be_cmds.c +1 -2
 	}
@@ -135,9 +135,9 @@ struct be_mcc_wrb *alloc_mcc_wrb(struct beiscsi_hba
 *phba,
 
 	spin_lock_bh(&phba->ctrl.mcc_lock);
 	if (mccq->used == mccq->len) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT |
+		beiscsi_err(phba, BEISCSI_LOG_INIT |
 			    BEISCSI_LOG_CONFIG | BEISCSI_LOG_MBOX,
-			    "BC", "MCC queue full: WRB used %u tag avail

%u\n",

drivers/scsi/be2iscsi/be_cmds.c struct be_mcc_wrb *alloc_mcc_wrb(struct beiscsi_hba · line 153

Quoted 13 lines
drivers/scsi/be2iscsi/be_cmds.c +1 -0
+			    "MCC queue full: WRB used %u tag avail %u\n",
 			    mccq->used, phba->ctrl.mcc_tag_available);
 		goto alloc_failed;
drivers/scsi/be2iscsi/be_cmds.c +1 -2
 	}
@@ -147,9 +147,9 @@ struct be_mcc_wrb *alloc_mcc_wrb(struct beiscsi_hba
 *phba,
 
 	tag = phba->ctrl.mcc_tag[phba->ctrl.mcc_alloc_index];
 	if (!tag) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT |
+		beiscsi_err(phba, BEISCSI_LOG_INIT |
 			    BEISCSI_LOG_CONFIG | BEISCSI_LOG_MBOX,
-			    "BC", "MCC tag 0 allocated: tag avail %u alloc

index

drivers/scsi/be2iscsi/be_cmds.c struct be_mcc_wrb *alloc_mcc_wrb(struct beiscsi_hba · line 154

Quoted 2 lines
drivers/scsi/be2iscsi/be_cmds.c +1 -0
 %u\n",
+			    "MCC tag 0 allocated: tag avail %u alloc index

%u\n",

Quoted 18 lines
drivers/scsi/be2iscsi/be_cmds.c +0 -0
 			    phba->ctrl.mcc_tag_available,
drivers/scsi/be2iscsi/be_cmds.c +2 -2
 			    phba->ctrl.mcc_alloc_index);
 		goto alloc_failed;
@@ -263,10 +263,10 @@ int beiscsi_mccq_compl_wait(struct beiscsi_hba
 *phba,
 		set_bit(MCC_TAG_STATE_TIMEOUT,
 				&phba->ctrl.ptag_state[tag].tag_state);
 
-		beiscsi_log(phba, KERN_ERR,
+		beiscsi_err(phba,
 			    BEISCSI_LOG_INIT | BEISCSI_LOG_EH |
 			    BEISCSI_LOG_CONFIG,
-			    "BC", "MBX Cmd Completion timed out\n");
+			    "MBX Cmd Completion timed out\n");
 		return -EBUSY;
 	}

drivers/scsi/be2iscsi/be_cmds.c int beiscsi_mccq_compl_wait(struct beiscsi_hba · line 296

Quoted 8 lines
drivers/scsi/be2iscsi/be_cmds.c +0 -4
@@ -289,22 +289,22 @@ int beiscsi_mccq_compl_wait(struct beiscsi_hba
 *phba,
 	}
 
 	if (status || addl_status) {
-		beiscsi_log(phba, KERN_WARNING,
-			    BEISCSI_LOG_INIT | BEISCSI_LOG_EH |
-			    BEISCSI_LOG_CONFIG,
-			    "BC", "MBX Cmd Failed for Subsys : %d Opcode :

%d

drivers/scsi/be2iscsi/be_cmds.c int beiscsi_mccq_compl_wait(struct beiscsi_hba *phba,

Quoted 8 lines
drivers/scsi/be2iscsi/be_cmds.c +4 -3
 with Status : %d and Extd_Status : %d\n",
-			    mbx_hdr->subsystem,
-			    mbx_hdr->opcode,
-			    status, addl_status);
+		beiscsi_warn(phba,
+			     BEISCSI_LOG_INIT | BEISCSI_LOG_EH |
+			     BEISCSI_LOG_CONFIG,
+			     "MBX Cmd Failed for Subsys : %d Opcode : %d

with

drivers/scsi/be2iscsi/be_cmds.c int beiscsi_mccq_compl_wait(struct beiscsi_hba *phba,

Quoted 11 lines
drivers/scsi/be2iscsi/be_cmds.c +3 -4
 Status : %d and Extd_Status : %d\n",
+			     mbx_hdr->subsystem,
+			     mbx_hdr->opcode,
+			     status, addl_status);
 		rc = -EIO;
 		if (status == MCC_STATUS_INSUFFICIENT_BUFFER) {
 			mbx_resp_hdr = (struct be_cmd_resp_hdr *) mbx_hdr;
-			beiscsi_log(phba, KERN_WARNING,
-				    BEISCSI_LOG_INIT | BEISCSI_LOG_EH |
-				    BEISCSI_LOG_CONFIG,
-				    "BC", "Insufficient Buffer Error

Resp_Len : %d

drivers/scsi/be2iscsi/be_cmds.c int beiscsi_mccq_compl_wait(struct beiscsi_hba *phba,

Quoted 7 lines
drivers/scsi/be2iscsi/be_cmds.c +4 -2
 Actual_Resp_Len : %d\n",
-				    mbx_resp_hdr->response_length,
-				    mbx_resp_hdr->actual_resp_len);
+			beiscsi_warn(phba,
+				     BEISCSI_LOG_INIT | BEISCSI_LOG_EH |
+				     BEISCSI_LOG_CONFIG,
+				     "Insufficient Buffer Error Resp_Len :

%d

Quoted 20 lines

Actual_Resp_Len : %d\n",

drivers/scsi/be2iscsi/be_cmds.c +4 -3
+				     mbx_resp_hdr->response_length,
+				     mbx_resp_hdr->actual_resp_len);
 			rc = -EAGAIN;
 		}
 	}
@@ -339,9 +339,8 @@ static int beiscsi_process_mbox_compl(struct
 be_ctrl_info *ctrl,
 	 * entry is little endian)
 	 */
 	if (!compl->flags) {
-		beiscsi_log(phba, KERN_ERR,
-				BEISCSI_LOG_CONFIG | BEISCSI_LOG_MBOX,
-				"BC", "BMBX busy, no completion\n");
+		beiscsi_err(phba, BEISCSI_LOG_CONFIG | BEISCSI_LOG_MBOX,
+			    "BMBX busy, no completion\n");
 		return -EBUSY;
 	}
drivers/scsi/be2iscsi/be_cmds.c +0 -0
 	compl->flags = le32_to_cpu(compl->flags);

drivers/scsi/be2iscsi/be_cmds.c static int beiscsi_process_mbox_compl(struct · line 368

Quoted 7 lines
drivers/scsi/be2iscsi/be_cmds.c +0 -2
@@ -362,8 +361,8 @@ static int beiscsi_process_mbox_compl(struct
 be_ctrl_info *ctrl,
 	if (compl_status == MCC_STATUS_SUCCESS)
 		return 0;
 
-	beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG |
 BEISCSI_LOG_MBOX,
-		    "BC", "error in cmd completion: Subsystem : %d Opcode

: %d

Quoted 5 lines
drivers/scsi/be2iscsi/be_cmds.c +2 -0
 status(compl/extd)=%d/%d\n",
+	beiscsi_err(phba, BEISCSI_LOG_CONFIG | BEISCSI_LOG_MBOX,
+		    "error in cmd completion: Subsystem : %d Opcode : %d

status(compl/extd)=%d/%d\n",
hdr->subsystem, hdr->opcode, compl_status,

extd_status);

drivers/scsi/be2iscsi/be_cmds.c static void beiscsi_process_async_link(struct · line 397

Quoted 11 lines
drivers/scsi/be2iscsi/be_cmds.c +0 -3
 	if (compl_status == MCC_STATUS_INSUFFICIENT_BUFFER) {
@@ -390,14 +389,14 @@ static void beiscsi_process_async_link(struct
 beiscsi_hba *phba,
 	if (evt->port_link_status & BE_ASYNC_LINK_UP_MASK) {
 		phba->state = BE_ADAPTER_LINK_UP |
 BE_ADAPTER_CHECK_BOOT;
 		phba->get_boot = BE_GET_BOOT_RETRIES;
-		__beiscsi_log(phba, KERN_ERR,
-			      "BC%d: Link Up on Port %d tag 0x%x\n",
-			      __LINE__, evt->physical_port,

evt->event_tag);

drivers/scsi/be2iscsi/be_cmds.c static void beiscsi_process_async_link(struct beiscsi_hba *phba,

Quoted 3 lines
drivers/scsi/be2iscsi/be_cmds.c +3 -0
+		shost_printk(KERN_ERR, phba->shost,
+			     "BC%d: Link Up on Port %d tag 0x%x\n",
+			     __LINE__, evt->physical_port,

evt->event_tag);

drivers/scsi/be2iscsi/be_cmds.c static void beiscsi_process_async_link(struct beiscsi_hba *phba,

Quoted 5 lines
drivers/scsi/be2iscsi/be_cmds.c +0 -3
 	} else {
 		phba->state = BE_ADAPTER_LINK_DOWN;
-		__beiscsi_log(phba, KERN_ERR,
-			      "BC%d: Link Down on Port %d tag 0x%x\n",
-			      __LINE__, evt->physical_port,

evt->event_tag);

drivers/scsi/be2iscsi/be_cmds.c static void beiscsi_process_async_link(struct beiscsi_hba *phba,

Quoted 3 lines
drivers/scsi/be2iscsi/be_cmds.c +3 -0
+		shost_printk(KERN_ERR, phba->shost,
+			     "BC%d: Link Down on Port %d tag 0x%x\n",
+			     __LINE__, evt->physical_port,

evt->event_tag);

drivers/scsi/be2iscsi/be_cmds.c static void beiscsi_process_async_sli(struct

Quoted 4 lines
drivers/scsi/be2iscsi/be_cmds.c +0 -0
 		iscsi_host_for_each_session(phba->shost,
drivers/scsi/be2iscsi/be_cmds.c +0 -0
 					    beiscsi_fail_session);
 	}
@@ -438,9 +437,9 @@ static void beiscsi_process_async_sli(struct

beiscsi_hba

drivers/scsi/be2iscsi/be_cmds.c static void beiscsi_process_async_sli(struct beiscsi_hba *phba,

Quoted 4 lines
drivers/scsi/be2iscsi/be_cmds.c +0 -0
 *phba,
 
 	if (state >= ARRAY_SIZE(beiscsi_port_misconf_event_msg)) {
 		/* fw is reporting a state we don't know, log and return

*/

drivers/scsi/be2iscsi/be_cmds.c static void beiscsi_process_async_sli(struct · line 443

Quoted 2 lines
drivers/scsi/be2iscsi/be_cmds.c +0 -2
-		__beiscsi_log(phba, KERN_ERR,
-			      "BC%d: Port %c: Unrecognized optic state

0x%x\n",

drivers/scsi/be2iscsi/be_cmds.c static void beiscsi_process_async_sli(struct · line 443

Quoted 4 lines
drivers/scsi/be2iscsi/be_cmds.c +2 -1
-			      __LINE__, phba->port_name, async_sli-
 >event_data1);
+		shost_printk(KERN_ERR, phba->shost,
+			     "BC%d: Port %c: Unrecognized optic state

0x%x\n",

drivers/scsi/be2iscsi/be_cmds.c void beiscsi_process_async_event(struct

Quoted 29 lines
drivers/scsi/be2iscsi/be_cmds.c +1 -0
+			     __LINE__, phba->port_name, async_sli-
 >event_data1);
drivers/scsi/be2iscsi/be_cmds.c +5 -5
 		return;
 	}
@@ -459,16 +458,16 @@ static void beiscsi_process_async_sli(struct
 beiscsi_hba *phba,
 	}
 
 	if (old_state != phba->optic_state)
-		__beiscsi_log(phba, sev, "BC%d: Port %c: %s%s\n",
-			      __LINE__, phba->port_name,
-			      beiscsi_port_misconf_event_msg[state],
-			      !msg ? "" : msg);
+		shost_printk(sev, phba->shost, "BC%d: Port %c: %s%s\n",
+			     __LINE__, phba->port_name,
+			     beiscsi_port_misconf_event_msg[state],
+			     !msg ? "" : msg);
 }
 
 void beiscsi_process_async_event(struct beiscsi_hba *phba,
 				struct be_mcc_compl *compl)
 {
-	char *sev = KERN_INFO;
+	bool err = false;
 	u8 evt_code;
 
drivers/scsi/be2iscsi/be_cmds.c +0 -0
 	/* interpret flags as an async trailer */
@@ -481,19 +480,24 @@ void beiscsi_process_async_event(struct

beiscsi_hba

Quoted 12 lines
drivers/scsi/be2iscsi/be_cmds.c +1 -1
 *phba,
 	case ASYNC_EVENT_CODE_ISCSI:
 		phba->state |= BE_ADAPTER_CHECK_BOOT;
 		phba->get_boot = BE_GET_BOOT_RETRIES;
-		sev = KERN_ERR;
+		err = true;
 		break;
 	case ASYNC_EVENT_CODE_SLI:
 		beiscsi_process_async_sli(phba, compl);
 		break;
 	default:
 		/* event not registered */

drivers/scsi/be2iscsi/be_cmds.c void beiscsi_process_async_event(struct beiscsi_hba *phba,

Quoted 10 lines
drivers/scsi/be2iscsi/be_cmds.c +4 -4
-		sev = KERN_ERR;
+		err = true;
 	}
 
-	beiscsi_log(phba, sev, BEISCSI_LOG_CONFIG | BEISCSI_LOG_MBOX,
-		    "BC", "ASYNC Event %x: status 0x%08x flags 0x%08x\n",
-		    evt_code, compl->status, compl->flags);
+	if (err)
+		beiscsi_err(phba,  BEISCSI_LOG_CONFIG | BEISCSI_LOG_MBOX,
+			    "ASYNC Event %x: status 0x%08x flags

0x%08x\n",

drivers/scsi/be2iscsi/be_cmds.c void beiscsi_process_async_event(struct · line 501

Quoted 5 lines
drivers/scsi/be2iscsi/be_cmds.c +4 -0
+			    evt_code, compl->status, compl->flags);
+	else
+		beiscsi_info(phba,  BEISCSI_LOG_CONFIG |
 BEISCSI_LOG_MBOX,
+			     "ASYNC Event %x: status 0x%08x flags

0x%08x\n",

drivers/scsi/be2iscsi/be_cmds.c int beiscsi_cmd_q_destroy(struct be_ctrl_info

Quoted 105 lines
drivers/scsi/be2iscsi/be_cmds.c +1 -0
+			     evt_code, compl->status, compl->flags);
 }

int beiscsi_process_mcc_compl(struct be_ctrl_info *ctrl,

drivers/scsi/be2iscsi/be_cmds.c +6 -6
@@ -510,17 +514,17 @@ int beiscsi_process_mcc_compl(struct be_ctrl_info
 *ctrl,
 
 	if (!test_bit(MCC_TAG_STATE_RUNNING,
 		      &ctrl->ptag_state[tag].tag_state)) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_MBOX |
+		beiscsi_err(phba, BEISCSI_LOG_MBOX |
 			    BEISCSI_LOG_INIT | BEISCSI_LOG_CONFIG,
-			    "BC", "MBX cmd completed but not posted\n");
+			    "MBX cmd completed but not posted\n");
 		return 0;
 	}
 
 	if (test_bit(MCC_TAG_STATE_TIMEOUT, &ctrl-
 >ptag_state[tag].tag_state)) {
-		beiscsi_log(phba, KERN_WARNING,
-			    BEISCSI_LOG_MBOX | BEISCSI_LOG_INIT |
-			    BEISCSI_LOG_CONFIG,
-			    "BC", "MBX Completion for timeout Command from
 FW\n");
+		beiscsi_warn(phba,
+			     BEISCSI_LOG_MBOX | BEISCSI_LOG_INIT |
+			     BEISCSI_LOG_CONFIG,
+			     "MBX Completion for timeout Command from

FW\n");

drivers/scsi/be2iscsi/be_cmds.c +2 -3
 		/**
 		 * Check for the size before freeing resource.
 		 * Only for non-embedded cmd, PCI resource is allocated.
@@ -571,9 +575,8 @@ int be_mcc_compl_poll(struct beiscsi_hba *phba,
 unsigned int tag)
 
 	if (!test_bit(MCC_TAG_STATE_RUNNING,
 		      &ctrl->ptag_state[tag].tag_state)) {
-		beiscsi_log(phba, KERN_ERR,
-			    BEISCSI_LOG_CONFIG | BEISCSI_LOG_MBOX,
-			    "BC", "tag %u state not running\n", tag);
+		beiscsi_err(phba, BEISCSI_LOG_CONFIG | BEISCSI_LOG_MBOX,
+			    "tag %u state not running\n", tag);
 		return 0;
 	}
drivers/scsi/be2iscsi/be_cmds.c +2 -2
 	for (i = 0; i < mcc_timeout; i++) {
@@ -593,8 +596,8 @@ int be_mcc_compl_poll(struct beiscsi_hba *phba,
 unsigned int tag)
 	if (i < mcc_timeout)
 		return 0;
 
-	beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG |
 BEISCSI_LOG_MBOX,
-		    "BC", "FW Timed Out\n");
+	beiscsi_err(phba, BEISCSI_LOG_CONFIG | BEISCSI_LOG_MBOX,
+		    "FW Timed Out\n");
 	phba->fw_timeout = true;
drivers/scsi/be2iscsi/be_cmds.c +2 -3
 	beiscsi_ue_detect(phba);
 	return -EBUSY;
@@ -655,9 +658,8 @@ static int be_mbox_db_ready_poll(struct be_ctrl_info
 *ctrl)
 		msleep(20);
 	} while (!ready);
 
-	beiscsi_log(phba, KERN_ERR,
-			BEISCSI_LOG_CONFIG | BEISCSI_LOG_MBOX,
-			"BC", "FW Timed Out\n");
+	beiscsi_err(phba, BEISCSI_LOG_CONFIG | BEISCSI_LOG_MBOX,
+		    "FW Timed Out\n");
 
 	phba->fw_timeout = true;
drivers/scsi/be2iscsi/be_cmds.c +6 -6
 	beiscsi_ue_detect(phba);
@@ -849,8 +851,8 @@ int be_cmd_fw_initialize(struct be_ctrl_info *ctrl)
 
 	status = be_mbox_notify(ctrl);
 	if (status)
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BC", "be_cmd_fw_initialize Failed\n");
+		beiscsi_err(phba, BEISCSI_LOG_INIT,
+			    "be_cmd_fw_initialize Failed\n");
 
 	mutex_unlock(&ctrl->mbox_lock);
 	return status;
@@ -890,8 +892,8 @@ int be_cmd_fw_uninit(struct be_ctrl_info *ctrl)
 
 	status = be_mbox_notify(ctrl);
 	if (status)
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BC", "be_cmd_fw_uninit Failed\n");
+		beiscsi_err(phba, BEISCSI_LOG_INIT,
+			    "be_cmd_fw_uninit Failed\n");
 
 	mutex_unlock(&ctrl->mbox_lock);
 	return status;
@@ -955,8 +957,8 @@ int beiscsi_cmd_cq_create(struct be_ctrl_info *ctrl,
 		cq->id = le16_to_cpu(resp->cq_id);
 		cq->created = true;
 	} else
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BC", "In be_cmd_cq_create, status=ox%08x\n",
+		beiscsi_err(phba, BEISCSI_LOG_INIT,
+			    "In be_cmd_cq_create, status=ox%08x\n",
 			    status);
 
 	mutex_unlock(&ctrl->mbox_lock);
@@ -1031,9 +1033,9 @@ int beiscsi_cmd_q_destroy(struct be_ctrl_info

*ctrl,

drivers/scsi/be2iscsi/be_cmds.c int be_cmd_iscsi_post_sgl_pages(struct

Quoted 14 lines
drivers/scsi/be2iscsi/be_cmds.c +3 -3
 struct be_queue_info *q,
 	u8 subsys = 0, opcode = 0;
 	int status;
 
-	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-		    "BC", "In beiscsi_cmd_q_destroy queue_type : %d\n",
-		    queue_type);
+	beiscsi_info(phba, BEISCSI_LOG_INIT,
+		     "In beiscsi_cmd_q_destroy queue_type : %d\n",
+		     queue_type);
 
 	mutex_lock(&ctrl->mbox_lock);
drivers/scsi/be2iscsi/be_cmds.c +0 -0
 	memset(wrb, 0, sizeof(*wrb));
@@ -1327,8 +1329,8 @@ int be_cmd_iscsi_post_sgl_pages(struct

be_ctrl_info

drivers/scsi/be2iscsi/be_cmds.c int be_cmd_iscsi_post_sgl_pages(struct be_ctrl_info *ctrl,

Quoted 6 lines
drivers/scsi/be2iscsi/be_cmds.c +0 -2
 *ctrl,
 
 		status = be_mbox_notify(ctrl);
 		if (status) {
-			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-				    "BC", "FW CMD to map iscsi frags

failed.\n");

drivers/scsi/be2iscsi/be_cmds.c int be_cmd_iscsi_post_sgl_pages(struct · line 1334

Quoted 2 lines
drivers/scsi/be2iscsi/be_cmds.c +2 -0
+			beiscsi_err(phba, BEISCSI_LOG_INIT,
+				    "FW CMD to map iscsi frags

failed.\n");

Review

Quoted 4 lines
drivers/scsi/be2iscsi/be_cmds.c +0 -0
 			goto error;
 		}
(quoted diff) +0 -0

b/drivers/scsi/be2iscsi/be_iscsi.c

drivers/scsi/be2iscsi/be_iscsi.c struct iscsi_cls_session

Quoted 4 lines

index 28aebd3..b0909da 100644

drivers/scsi/be2iscsi/be_iscsi.c +0 -0
@@ -60,17 +60,17 @@ struct iscsi_cls_session

*beiscsi_session_create(struct

Quoted 9 lines
drivers/scsi/be2iscsi/be_iscsi.c +2 -2
 iscsi_endpoint *ep,
 	phba = beiscsi_ep->phba;
 
 	if (phba->state & BE_ADAPTER_PCI_ERR) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG,
-			    "BS", "PCI_ERROR Recovery\n");
+		beiscsi_err(phba, BEISCSI_LOG_CONFIG,
+			    "PCI_ERROR Recovery\n");
 		return NULL;

drivers/scsi/be2iscsi/be_iscsi.c struct iscsi_cls_session *beiscsi_session_create(struct iscsi_endpoint *ep,

Quoted 10 lines
drivers/scsi/be2iscsi/be_iscsi.c +2 -4
 	} else {
-		beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_CONFIG,
-			    "BS", "In beiscsi_session_create\n");
+		beiscsi_info(phba, BEISCSI_LOG_CONFIG,
+			     "In beiscsi_session_create\n");
 	}
 
 	if (cmds_max > beiscsi_ep->phba->params.wrbs_per_cxn) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG,
-			    "BS", "Cannot handle %d cmds.Max cmds per

session

Quoted 8 lines
drivers/scsi/be2iscsi/be_iscsi.c +2 -0
 supported is %d. Using %d.\n",
+		beiscsi_err(phba, BEISCSI_LOG_CONFIG,
+			    "Cannot handle %d cmds.Max cmds per session
 supported is %d. Using %d.\n",
drivers/scsi/be2iscsi/be_iscsi.c +0 -0
 			    cmds_max,
 			    beiscsi_ep->phba->params.wrbs_per_cxn,
 			    beiscsi_ep->phba->params.wrbs_per_cxn);

drivers/scsi/be2iscsi/be_iscsi.c beiscsi_conn_create(struct iscsi_cls_session · line 142

Quoted 6 lines
drivers/scsi/be2iscsi/be_iscsi.c +0 -2
@@ -137,9 +137,9 @@ beiscsi_conn_create(struct iscsi_cls_session
 *cls_session, u32 cid)
 	shost = iscsi_session_to_shost(cls_session);
 	phba = iscsi_host_priv(shost);
 
-	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_CONFIG,
-		    "BS", "In beiscsi_conn_create ,cidfrom iscsi

layer=%d\n",

drivers/scsi/be2iscsi/be_iscsi.c beiscsi_conn_create(struct iscsi_cls_session *cls_session, u32 cid)

Quoted 6 lines
drivers/scsi/be2iscsi/be_iscsi.c +3 -1
-		    cid);
+	beiscsi_info(phba, BEISCSI_LOG_CONFIG,
+		     "In beiscsi_conn_create ,cidfrom iscsi layer=%d\n",
+		     cid);
 
 	cls_conn = iscsi_conn_setup(cls_session, sizeof(*beiscsi_conn),

cid);

drivers/scsi/be2iscsi/be_iscsi.c static int beiscsi_bindconn_cid(struct beiscsi_hba · line 174

Quoted 8 lines
drivers/scsi/be2iscsi/be_iscsi.c +0 -2
 	if (!cls_conn)
@@ -169,14 +169,14 @@ static int beiscsi_bindconn_cid(struct beiscsi_hba
 *phba,
 	uint16_t cri_index = BE_GET_CRI_FROM_CID(cid);
 
 	if (phba->conn_table[cri_index]) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG,
-			    "BS", "Connection table already occupied.

Detected

drivers/scsi/be2iscsi/be_iscsi.c static int beiscsi_bindconn_cid(struct beiscsi_hba *phba,

Quoted 9 lines
drivers/scsi/be2iscsi/be_iscsi.c +2 -2
 clash\n");
+		beiscsi_err(phba, BEISCSI_LOG_CONFIG,
+			    "Connection table already occupied. Detected
 clash\n");
 
 		return -EINVAL;
 	} else {
-		beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_CONFIG,
-			    "BS",

"phba->conn_table[%d]=%p(beiscsi_conn)\n",

Quoted 8 lines
drivers/scsi/be2iscsi/be_iscsi.c +3 -1
-			    cri_index, beiscsi_conn);
+		beiscsi_info(phba, BEISCSI_LOG_CONFIG,
+			     "phba->conn_table[%d]=%p(beiscsi_conn)\n",
+			     cri_index, beiscsi_conn);
drivers/scsi/be2iscsi/be_iscsi.c +0 -0
 		phba->conn_table[cri_index] = beiscsi_conn;
 	}

drivers/scsi/be2iscsi/be_iscsi.c int beiscsi_conn_bind(struct iscsi_cls_session · line 219

Quoted 6 lines
drivers/scsi/be2iscsi/be_iscsi.c +0 -2
@@ -214,8 +214,8 @@ int beiscsi_conn_bind(struct iscsi_cls_session
 *cls_session,
 		return -EINVAL;
 
 	if (beiscsi_ep->phba != phba) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG,
-			    "BS", "beiscsi_ep->hba=%p not equal to

phba=%p\n",

Quoted 8 lines
drivers/scsi/be2iscsi/be_iscsi.c +2 -0
+		beiscsi_err(phba, BEISCSI_LOG_CONFIG,
+			    "beiscsi_ep->hba=%p not equal to phba=%p\n",
 			    beiscsi_ep->phba, phba);
 
drivers/scsi/be2iscsi/be_iscsi.c +0 -0
 		return -EEXIST;
@@ -229,9 +229,9 @@ int beiscsi_conn_bind(struct iscsi_cls_session
 *cls_session,
 	beiscsi_ep->conn = beiscsi_conn;

drivers/scsi/be2iscsi/be_iscsi.c int beiscsi_conn_bind(struct iscsi_cls_session · line 237

Quoted 10 lines
drivers/scsi/be2iscsi/be_iscsi.c +3 -3
 	beiscsi_conn->doorbell_offset = pwrb_context->doorbell_offset;
 
-	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_CONFIG,
-		    "BS", "beiscsi_conn=%p conn=%p ep_cid=%d\n",
-		    beiscsi_conn, conn, beiscsi_ep->ep_cid);
+	beiscsi_info(phba, BEISCSI_LOG_CONFIG,
+		     "beiscsi_conn=%p conn=%p ep_cid=%d\n",
+		     beiscsi_conn, conn, beiscsi_ep->ep_cid);
 
 	return beiscsi_bindconn_cid(phba, beiscsi_conn,

beiscsi_ep->ep_cid);

drivers/scsi/be2iscsi/be_iscsi.c static int beiscsi_create_ipv4_iface(struct

Quoted 2 lines

}

drivers/scsi/be2iscsi/be_iscsi.c +0 -0
@@ -246,8 +246,8 @@ static int beiscsi_create_ipv4_iface(struct

beiscsi_hba

drivers/scsi/be2iscsi/be_iscsi.c static int beiscsi_create_ipv4_iface(struct beiscsi_hba *phba)

Quoted 6 lines
drivers/scsi/be2iscsi/be_iscsi.c +0 -2
 *phba)
 					      ISCSI_IFACE_TYPE_IPV4,
 					      0, 0);
 	if (!phba->ipv4_iface) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG,
-			    "BS", "Could not create default IPv4

address.\n");

drivers/scsi/be2iscsi/be_iscsi.c static int beiscsi_create_ipv6_iface(struct

Quoted 6 lines
drivers/scsi/be2iscsi/be_iscsi.c +2 -0
+		beiscsi_err(phba, BEISCSI_LOG_CONFIG,
+			    "Could not create default IPv4 address.\n");
 		return -ENODEV;
 	}
@@ -264,8 +264,8 @@ static int beiscsi_create_ipv6_iface(struct

beiscsi_hba

drivers/scsi/be2iscsi/be_iscsi.c static int beiscsi_create_ipv6_iface(struct beiscsi_hba *phba)

Quoted 6 lines
drivers/scsi/be2iscsi/be_iscsi.c +0 -2
 *phba)
 					      ISCSI_IFACE_TYPE_IPV6,
 					      0, 0);
 	if (!phba->ipv6_iface) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG,
-			    "BS", "Could not create default IPv6

address.\n");

drivers/scsi/be2iscsi/be_iscsi.c int be2iscsi_iface_set_param(struct Scsi_Host

Quoted 82 lines
drivers/scsi/be2iscsi/be_iscsi.c +17 -15
+		beiscsi_err(phba, BEISCSI_LOG_CONFIG,
+			    "Could not create default IPv6 address.\n");
 		return -ENODEV;
 	}
@@ -330,14 +330,14 @@ beiscsi_set_static_ip(struct Scsi_Host *shost,
 			iface_ip = nla_data(nla);
 		break;
 	default:
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG,
-			    "BS", "Unsupported param %d\n",
+		beiscsi_err(phba, BEISCSI_LOG_CONFIG,
+			    "Unsupported param %d\n",
 			    iface_param->param);
 	}
 
 	if (!iface_ip || !iface_subnet) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG,
-			    "BS", "IP and Subnet Mask required\n");
+		beiscsi_err(phba, BEISCSI_LOG_CONFIG,
+			    "IP and Subnet Mask required\n");
 		return -EINVAL;
 	}
 
@@ -369,8 +369,8 @@ beiscsi_set_vlan_tag(struct Scsi_Host *shost,
 	/* Get the Interface Handle */
 	ret = mgmt_get_all_if_id(phba);
 	if (ret) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG,
-			    "BS", "Getting Interface Handle Failed\n");
+		beiscsi_err(phba, BEISCSI_LOG_CONFIG,
+			    "Getting Interface Handle Failed\n");
 		return ret;
 	}
 
@@ -384,9 +384,9 @@ beiscsi_set_vlan_tag(struct Scsi_Host *shost,
 				    *((uint16_t *)iface_param->value));
 		break;
 	default:
-		beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_CONFIG,
-			    "BS", "Unknown Param Type : %d\n",
-			    iface_param->param);
+		beiscsi_warn(phba, BEISCSI_LOG_CONFIG,
+			     "Unknown Param Type : %d\n",
+			     iface_param->param);
 		return -ENOSYS;
 	}
 	return ret;
@@ -414,8 +414,8 @@ beiscsi_set_ipv4(struct Scsi_Host *shost,
 			ret = beiscsi_set_static_ip(shost, iface_param,
 						    data, dt_len);
 		else
-			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG,
-				    "BS", "Invalid BOOTPROTO: %d\n",
+			beiscsi_err(phba, BEISCSI_LOG_CONFIG,
+				    "Invalid BOOTPROTO: %d\n",
 				    iface_param->value[0]);
 		break;
 	case ISCSI_NET_PARAM_IFACE_ENABLE:
@@ -434,8 +434,8 @@ beiscsi_set_ipv4(struct Scsi_Host *shost,
 		ret = beiscsi_set_vlan_tag(shost, iface_param);
 		break;
 	default:
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG,
-			    "BS", "Param %d not supported\n",
+		beiscsi_err(phba, BEISCSI_LOG_CONFIG,
+			    "Param %d not supported\n",
 			    iface_param->param);
 	}
 
@@ -468,8 +468,8 @@ beiscsi_set_ipv6(struct Scsi_Host *shost,
 		ret = beiscsi_set_vlan_tag(shost, iface_param);
 		break;
 	default:
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG,
-			    "BS", "Param %d not supported\n",
+		beiscsi_err(phba, BEISCSI_LOG_CONFIG,
+			    "Param %d not supported\n",
 			    iface_param->param);
 	}
 
@@ -486,8 +486,8 @@ int be2iscsi_iface_set_param(struct Scsi_Host

*shost,

drivers/scsi/be2iscsi/be_iscsi.c int be2iscsi_iface_set_param(struct Scsi_Host

Quoted 11 lines
drivers/scsi/be2iscsi/be_iscsi.c +2 -2
 	int ret = 0 ;
 
 	if (phba->state & BE_ADAPTER_PCI_ERR) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG,
-			    "BS", "In PCI_ERROR Recovery\n");
+		beiscsi_err(phba, BEISCSI_LOG_CONFIG,
+			    "In PCI_ERROR Recovery\n");
 		return -EBUSY;
 	}
 
@@ -501,8 +501,8 @@ int be2iscsi_iface_set_param(struct Scsi_Host

*shost,

drivers/scsi/be2iscsi/be_iscsi.c int be2iscsi_iface_set_param(struct Scsi_Host *shost,

Quoted 5 lines
drivers/scsi/be2iscsi/be_iscsi.c +0 -2
 		 * BE2ISCSI only supports 1 interface
 		 */
 		if (iface_param->iface_num) {
-			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG,
-				    "BS", "Invalid iface_num %d.Only

iface_num

drivers/scsi/be2iscsi/be_iscsi.c int be2iscsi_iface_set_param(struct Scsi_Host · line 506

Quoted 3 lines
drivers/scsi/be2iscsi/be_iscsi.c +2 -0
 0 is supported.\n",
+			beiscsi_err(phba, BEISCSI_LOG_CONFIG,
+				    "Invalid iface_num %d.Only iface_num 0

is

drivers/scsi/be2iscsi/be_iscsi.c int be2iscsi_iface_set_param(struct Scsi_Host

Quoted 5 lines
drivers/scsi/be2iscsi/be_iscsi.c +0 -0
 supported.\n",
 				    iface_param->iface_num);
drivers/scsi/be2iscsi/be_iscsi.c +0 -0
 			return -EINVAL;
@@ -518,8 +518,8 @@ int be2iscsi_iface_set_param(struct Scsi_Host

*shost,

drivers/scsi/be2iscsi/be_iscsi.c int be2iscsi_iface_set_param(struct Scsi_Host *shost,

Quoted 5 lines
drivers/scsi/be2iscsi/be_iscsi.c +0 -2
 					       data, dt_len);
 			break;
 		default:
-			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG,
-				    "BS", "Invalid iface type :%d

passed\n",

drivers/scsi/be2iscsi/be_iscsi.c int be2iscsi_iface_get_param(struct iscsi_iface

Quoted 6 lines
drivers/scsi/be2iscsi/be_iscsi.c +2 -0
+			beiscsi_err(phba, BEISCSI_LOG_CONFIG,
+				    "Invalid iface type :%d passed\n",
 				    iface_param->iface_type);
 			break;
 		}
@@ -600,8 +600,8 @@ int be2iscsi_iface_get_param(struct iscsi_iface

*iface,

drivers/scsi/be2iscsi/be_iscsi.c int beiscsi_set_param(struct iscsi_cls_conn

Quoted 25 lines
drivers/scsi/be2iscsi/be_iscsi.c +5 -6
 	int len = -ENOSYS;
 
 	if (phba->state & BE_ADAPTER_PCI_ERR) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG,
-			    "BS", "In PCI_ERROR Recovery\n");
+		beiscsi_err(phba, BEISCSI_LOG_CONFIG,
+			    "In PCI_ERROR Recovery\n");
 		return -EBUSY;
 	}
 
@@ -645,10 +645,9 @@ int beiscsi_ep_get_param(struct iscsi_endpoint *ep,
 	struct beiscsi_endpoint *beiscsi_ep = ep->dd_data;
 	int len = 0;
 
-	beiscsi_log(beiscsi_ep->phba, KERN_INFO,
-		    BEISCSI_LOG_CONFIG,
-		    "BS", "In beiscsi_ep_get_param, param= %d\n",
-		    param);
+	beiscsi_info(beiscsi_ep->phba, BEISCSI_LOG_CONFIG,
+		     "In beiscsi_ep_get_param, param= %d\n",
+		     param);
 
 	switch (param) {
 	case ISCSI_PARAM_CONN_PORT:
@@ -675,9 +674,9 @@ int beiscsi_set_param(struct iscsi_cls_conn

*cls_conn,

drivers/scsi/be2iscsi/be_iscsi.c int beiscsi_get_host_param(struct Scsi_Host

Quoted 36 lines
drivers/scsi/be2iscsi/be_iscsi.c +7 -7
 	int ret;
 
 	phba = ((struct beiscsi_conn *)conn->dd_data)->phba;
-	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_CONFIG,
-		    "BS", "In beiscsi_conn_set_param, param= %d\n",
-		    param);
+	beiscsi_info(phba, BEISCSI_LOG_CONFIG,
+		     "In beiscsi_conn_set_param, param= %d\n",
+		     param);
 
 	ret = iscsi_set_param(cls_conn, param, buf, buflen);
 	if (ret)
@@ -725,17 +724,17 @@ static int beiscsi_get_initname(char *buf, struct
 beiscsi_hba *phba)
 
 	tag = be_cmd_get_initname(phba);
 	if (!tag) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG,
-			    "BS", "Getting Initiator Name Failed\n");
+		beiscsi_err(phba, BEISCSI_LOG_CONFIG,
+			    "Getting Initiator Name Failed\n");
 
 		return -EBUSY;
 	}
 
 	rc = beiscsi_mccq_compl_wait(phba, tag, &wrb, NULL);
 	if (rc) {
-		beiscsi_log(phba, KERN_ERR,
+		beiscsi_err(phba,
 			    BEISCSI_LOG_CONFIG | BEISCSI_LOG_MBOX,
-			    "BS", "Initiator Name MBX Failed\n");
+			    "Initiator Name MBX Failed\n");
 		return rc;
 	}
@@ -808,29 +807,29 @@ int beiscsi_get_host_param(struct Scsi_Host

*shost,

drivers/scsi/be2iscsi/be_iscsi.c int beiscsi_get_host_param(struct Scsi_Host *shost,

Quoted 11 lines
drivers/scsi/be2iscsi/be_iscsi.c +2 -4
 	if (phba->state & BE_ADAPTER_PCI_ERR) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG,
-			    "BS", "In PCI_ERROR Recovery\n");
+		beiscsi_err(phba, BEISCSI_LOG_CONFIG,
+			    "In PCI_ERROR Recovery\n");
 		return -EBUSY;
 	} else {
-		beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_CONFIG,
-			    "BS", "In beiscsi_get_host_param, param =

%d\n",

Quoted 12 lines
drivers/scsi/be2iscsi/be_iscsi.c +3 -3
-			    param);
+		beiscsi_info(phba, BEISCSI_LOG_CONFIG,
+			     "In beiscsi_get_host_param, param = %d\n",
+			     param);
 	}
 
 	switch (param) {
 	case ISCSI_HOST_PARAM_HWADDRESS:
 		status = beiscsi_get_macaddr(buf, phba);
 		if (status < 0) {
-			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG,
-				    "BS", "beiscsi_get_macaddr Failed\n");

drivers/scsi/be2iscsi/be_iscsi.c int beiscsi_get_host_param(struct Scsi_Host *shost,

Quoted 10 lines
drivers/scsi/be2iscsi/be_iscsi.c +2 -2
+			beiscsi_err(phba, BEISCSI_LOG_CONFIG,
+				    "beiscsi_get_macaddr Failed\n");
 			return status;
 		}
 		break;
 	case ISCSI_HOST_PARAM_INITIATOR_NAME:
 		status = beiscsi_get_initname(buf, phba);
 		if (status < 0) {
-			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG,
-				    "BS", "Retreiving Initiator Name

Failed\n");

Quoted 31 lines
drivers/scsi/be2iscsi/be_iscsi.c +4 -2
+			beiscsi_err(phba, BEISCSI_LOG_CONFIG,
+				    "Retreiving Initiator Name Failed\n");
 			return status;
 		}
 		break;
@@ -880,8 +879,8 @@ void beiscsi_conn_get_stats(struct iscsi_cls_conn
 *cls_conn,
 	struct beiscsi_hba *phba = NULL;
 
 	phba = ((struct beiscsi_conn *)conn->dd_data)->phba;
-	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_CONFIG,
-		    "BS", "In beiscsi_conn_get_stats\n");
+	beiscsi_info(phba, BEISCSI_LOG_CONFIG,
+		     "In beiscsi_conn_get_stats\n");
 
 	stats->txdata_octets = conn->txdata_octets;
drivers/scsi/be2iscsi/be_iscsi.c +2 -5
 	stats->rxdata_octets = conn->rxdata_octets;
@@ -958,21 +957,19 @@ int beiscsi_conn_start(struct iscsi_cls_conn
 *cls_conn)
 	phba = ((struct beiscsi_conn *)conn->dd_data)->phba;
 
 	if (phba->state & BE_ADAPTER_PCI_ERR) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG,
-			    "BS", "In PCI_ERROR Recovery\n");
+		beiscsi_err(phba, BEISCSI_LOG_CONFIG,
+			    "In PCI_ERROR Recovery\n");
 		return -EBUSY;
 	} else {
-		beiscsi_log(beiscsi_conn->phba, KERN_INFO,
-			    BEISCSI_LOG_CONFIG,
-			    "BS", "In beiscsi_conn_start\n");

drivers/scsi/be2iscsi/be_iscsi.c int beiscsi_conn_start(struct iscsi_cls_conn · line 976

Quoted 10 lines
drivers/scsi/be2iscsi/be_iscsi.c +2 -3
+		beiscsi_info(beiscsi_conn->phba, BEISCSI_LOG_CONFIG,
+			     "In beiscsi_conn_start\n");
 	}
 
 	memset(&params, 0, sizeof(struct beiscsi_offload_params));
 	beiscsi_ep = beiscsi_conn->ep;
 	if (!beiscsi_ep)
-		beiscsi_log(beiscsi_conn->phba, KERN_ERR,
-			    BEISCSI_LOG_CONFIG,
-			    "BS", "In beiscsi_conn_start , no

beiscsi_ep\n");

drivers/scsi/be2iscsi/be_iscsi.c static int beiscsi_open_conn(struct

Quoted 6 lines
drivers/scsi/be2iscsi/be_iscsi.c +2 -0
+		beiscsi_err(beiscsi_conn->phba, BEISCSI_LOG_CONFIG,
+			    "In beiscsi_conn_start , no beiscsi_ep\n");
 
 	beiscsi_conn->login_in_progress = 0;
drivers/scsi/be2iscsi/be_iscsi.c +0 -0
 	beiscsi_set_params_for_offld(beiscsi_conn, &params);
@@ -1089,19 +1086,19 @@ static int beiscsi_open_conn(struct

iscsi_endpoint

Quoted 42 lines
drivers/scsi/be2iscsi/be_iscsi.c +7 -7
 *ep,
 	unsigned int tag, req_memsize;
 	int ret = -ENOMEM;
 
-	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_CONFIG,
-		    "BS", "In beiscsi_open_conn\n");
+	beiscsi_info(phba, BEISCSI_LOG_CONFIG,
+		     "In beiscsi_open_conn\n");
 
 	beiscsi_ep->ep_cid = beiscsi_get_cid(phba);
 	if (beiscsi_ep->ep_cid == 0xFFFF) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG,
-			    "BS", "No free cid available\n");
+		beiscsi_err(phba, BEISCSI_LOG_CONFIG,
+			    "No free cid available\n");
 		return ret;
 	}
 
-	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_CONFIG,
-		    "BS", "In beiscsi_open_conn, ep_cid=%d\n",
-		    beiscsi_ep->ep_cid);
+	beiscsi_info(phba, BEISCSI_LOG_CONFIG,
+		     "In beiscsi_open_conn, ep_cid=%d\n",
+		     beiscsi_ep->ep_cid);
 
 	phba->ep_array[BE_GET_CRI_FROM_CID
drivers/scsi/be2iscsi/be_iscsi.c +2 -2
 		       (beiscsi_ep->ep_cid)] = ep;
@@ -1118,8 +1115,8 @@ static int beiscsi_open_conn(struct iscsi_endpoint
 *ep,
 				&nonemb_cmd.dma);
 	if (nonemb_cmd.va == NULL) {
 
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG,
-			    "BS", "Failed to allocate memory for
 mgmt_open_connection\n");
+		beiscsi_err(phba, BEISCSI_LOG_CONFIG,
+			    "Failed to allocate memory for
 mgmt_open_connection\n");
drivers/scsi/be2iscsi/be_iscsi.c +0 -0
 		beiscsi_free_ep(beiscsi_ep);
 		return -ENOMEM;

drivers/scsi/be2iscsi/be_iscsi.c static int beiscsi_open_conn(struct iscsi_endpoint · line 1134

Quoted 7 lines
drivers/scsi/be2iscsi/be_iscsi.c +0 -2
@@ -1128,8 +1125,8 @@ static int beiscsi_open_conn(struct iscsi_endpoint
 *ep,
 	memset(nonemb_cmd.va, 0, nonemb_cmd.size);
 	tag = mgmt_open_connection(phba, dst_addr, beiscsi_ep,
 &nonemb_cmd);
 	if (tag <= 0) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG,
-			    "BS", "mgmt_open_connection Failed for

cid=%d\n",

drivers/scsi/be2iscsi/be_iscsi.c beiscsi_ep_connect(struct Scsi_Host *shost,

Quoted 32 lines
drivers/scsi/be2iscsi/be_iscsi.c +2 -0
+		beiscsi_err(phba, BEISCSI_LOG_CONFIG,
+			    "mgmt_open_connection Failed for cid=%d\n",
 			    beiscsi_ep->ep_cid);
drivers/scsi/be2iscsi/be_iscsi.c +2 -2
 		pci_free_consistent(phba->ctrl.pdev, nonemb_cmd.size,
@@ -1140,9 +1137,9 @@ static int beiscsi_open_conn(struct iscsi_endpoint
 *ep,
 
 	ret = beiscsi_mccq_compl_wait(phba, tag, NULL, &nonemb_cmd);
 	if (ret) {
-		beiscsi_log(phba, KERN_ERR,
+		beiscsi_err(phba,
 			    BEISCSI_LOG_CONFIG | BEISCSI_LOG_MBOX,
-			    "BS", "mgmt_open_connection Failed");
+			    "mgmt_open_connection Failed");
 
 		if (ret != -EBUSY)

pci_free_consistent(phba->ctrl.pdev,
nonemb_cmd.size,

drivers/scsi/be2iscsi/be_iscsi.c +2 -2
@@ -1156,8 +1153,8 @@ static int beiscsi_open_conn(struct iscsi_endpoint
 *ep,
 	beiscsi_ep = ep->dd_data;
 	beiscsi_ep->fw_handle = ptcpcnct_out->connection_handle;
 	beiscsi_ep->cid_vld = 1;
-	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_CONFIG,
-		    "BS", "mgmt_open_connection Success\n");
+	beiscsi_info(phba, BEISCSI_LOG_CONFIG,
+		     "mgmt_open_connection Success\n");
 
 	pci_free_consistent(phba->ctrl.pdev, nonemb_cmd.size,
drivers/scsi/be2iscsi/be_iscsi.c +0 -0
 			    nonemb_cmd.va, nonemb_cmd.dma);
@@ -1192,20 +1189,20 @@ beiscsi_ep_connect(struct Scsi_Host *shost,

struct

drivers/scsi/be2iscsi/be_iscsi.c static int beiscsi_close_conn(struct

Quoted 52 lines
drivers/scsi/be2iscsi/be_iscsi.c +10 -10
 sockaddr *dst_addr,
 
 	if (beiscsi_error(phba)) {
 		ret = -EIO;
-		beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_CONFIG,
-			    "BS", "The FW state Not Stable!!!\n");
+		beiscsi_warn(phba, BEISCSI_LOG_CONFIG,
+			     "The FW state Not Stable!!!\n");
 		return ERR_PTR(ret);
 	}
 
 	if (phba->state & BE_ADAPTER_PCI_ERR) {
 		ret = -EBUSY;
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG,
-			    "BS", "In PCI_ERROR Recovery\n");
+		beiscsi_err(phba, BEISCSI_LOG_CONFIG,
+			    "In PCI_ERROR Recovery\n");
 		return ERR_PTR(ret);
 	} else if (phba->state & BE_ADAPTER_LINK_DOWN) {
 		ret = -EBUSY;
-		beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_CONFIG,
-			    "BS", "The Adapter Port state is Down!!!\n");
+		beiscsi_warn(phba, BEISCSI_LOG_CONFIG,
+			     "The Adapter Port state is Down!!!\n");
 		return ERR_PTR(ret);
 	}
@@ -1220,8 +1217,8 @@ beiscsi_ep_connect(struct Scsi_Host *shost, struct
 sockaddr *dst_addr,
 	beiscsi_ep->openiscsi_ep = ep;
 	ret = beiscsi_open_conn(ep, NULL, dst_addr, non_blocking);
 	if (ret) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG,
-			    "BS", "Failed in beiscsi_open_conn\n");
+		beiscsi_err(phba, BEISCSI_LOG_CONFIG,
+			    "Failed in beiscsi_open_conn\n");
 		goto free_ep;
 	}
@@ -1243,8 +1240,8 @@ int beiscsi_ep_poll(struct iscsi_endpoint *ep, int
 timeout_ms)
 {
 	struct beiscsi_endpoint *beiscsi_ep = ep->dd_data;
 
-	beiscsi_log(beiscsi_ep->phba, KERN_INFO, BEISCSI_LOG_CONFIG,
-		    "BS", "In  beiscsi_ep_poll\n");
+	beiscsi_info(beiscsi_ep->phba, BEISCSI_LOG_CONFIG,
+		     "In  beiscsi_ep_poll\n");
 
 	if (beiscsi_ep->cid_vld == 1)
drivers/scsi/be2iscsi/be_iscsi.c +0 -0
 		return 1;
@@ -1290,9 +1287,9 @@ static int beiscsi_close_conn(struct

beiscsi_endpoint

drivers/scsi/be2iscsi/be_iscsi.c void beiscsi_ep_disconnect(struct iscsi_endpoint

Quoted 26 lines
drivers/scsi/be2iscsi/be_iscsi.c +3 -3
 *beiscsi_ep, int flag)
 
 	tag = mgmt_upload_connection(phba, beiscsi_ep->ep_cid, flag);
 	if (!tag) {
-		beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_CONFIG,
-			    "BS", "upload failed for cid 0x%x\n",
-			    beiscsi_ep->ep_cid);
+		beiscsi_info(phba, BEISCSI_LOG_CONFIG,
+			     "upload failed for cid 0x%x\n",
+			     beiscsi_ep->ep_cid);
 
 		ret = -EAGAIN;
drivers/scsi/be2iscsi/be_iscsi.c +2 -2
 	}
@@ -1318,8 +1315,8 @@ static int beiscsi_unbind_conn_to_cid(struct
 beiscsi_hba *phba,
 	if (phba->conn_table[cri_index])
 		phba->conn_table[cri_index] = NULL;
 	else {
-		beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_CONFIG,
-			    "BS", "Connection table Not occupied.\n");
+		beiscsi_info(phba, BEISCSI_LOG_CONFIG,
+			     "Connection table Not occupied.\n");
 		return -EINVAL;
 	}
drivers/scsi/be2iscsi/be_iscsi.c +0 -0
 	return 0;
@@ -1342,9 +1339,9 @@ void beiscsi_ep_disconnect(struct iscsi_endpoint

*ep)

drivers/scsi/be2iscsi/be_iscsi.c void beiscsi_ep_disconnect(struct iscsi_endpoint

Quoted 13 lines
drivers/scsi/be2iscsi/be_iscsi.c +3 -3
 	beiscsi_ep = ep->dd_data;
 	phba = beiscsi_ep->phba;
-	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_CONFIG,
-		    "BS", "In beiscsi_ep_disconnect for ep_cid = %d\n",
-		    beiscsi_ep->ep_cid);
+	beiscsi_info(phba, BEISCSI_LOG_CONFIG,
+		     "In beiscsi_ep_disconnect for ep_cid = %d\n",
+		     beiscsi_ep->ep_cid);
 
 	if (beiscsi_ep->conn) {
 		beiscsi_conn = beiscsi_ep->conn;
@@ -1357,8 +1354,8 @@ void beiscsi_ep_disconnect(struct iscsi_endpoint

*ep)

drivers/scsi/be2iscsi/be_iscsi.c void beiscsi_ep_disconnect(struct iscsi_endpoint

Quoted 11 lines
drivers/scsi/be2iscsi/be_iscsi.c +2 -2
 	}
 
 	if (phba->state & BE_ADAPTER_PCI_ERR) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG,
-			    "BS", "PCI_ERROR Recovery\n");
+		beiscsi_err(phba, BEISCSI_LOG_CONFIG,
+			    "PCI_ERROR Recovery\n");
 		goto free_ep;
 	}
 
@@ -1367,8 +1364,8 @@ void beiscsi_ep_disconnect(struct iscsi_endpoint

*ep)

drivers/scsi/be2iscsi/be_iscsi.c void beiscsi_ep_disconnect(struct iscsi_endpoint *ep)

Quoted 8 lines
drivers/scsi/be2iscsi/be_iscsi.c +2 -2
 					  mgmt_invalidate_flag,
 					  savecfg_flag);
 	if (!tag) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG,
-			    "BS", "mgmt_invalidate_connection Failed for
 cid=%d\n",
+		beiscsi_err(phba, BEISCSI_LOG_CONFIG,
+			    "mgmt_invalidate_connection Failed for

cid=%d\n",

Review

Quoted 4 lines
drivers/scsi/be2iscsi/be_iscsi.c +0 -0
 			    beiscsi_ep->ep_cid);
 	}
(quoted diff) +0 -0

b/drivers/scsi/be2iscsi/be_main.c

drivers/scsi/be2iscsi/be_main.c int · line 82

Quoted 10 lines

index 19c1875..599f3a5 100644

drivers/scsi/be2iscsi/be_main.c +0 -2
@@ -77,14 +77,14 @@ int
 			\
 beiscsi_##_name##_change(struct beiscsi_hba *phba, uint32_t val)	\
 {									\
 	if (val >= _minval && val <= _maxval) {				\
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,		\
-			    "BA", "beiscsi_" #_name " updated from 0x%x

==>

drivers/scsi/be2iscsi/be_main.c int · line 83

Quoted 3 lines
drivers/scsi/be2iscsi/be_main.c +2 -0
 0x%x\n", \
+		beiscsi_err(phba, BEISCSI_LOG_INIT,			\
+			    "beiscsi_" #_name " updated from 0x%x ==>

0x%x\n",

drivers/scsi/be2iscsi/be_main.c int \

Quoted 7 lines
drivers/scsi/be2iscsi/be_main.c +0 -2
 \
 			    phba->attr_##_name, val);			\
 		phba->attr_##_name = val;				\
 		return 0;						\
 	}								\
-	beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,			\
-		    "BA", "beiscsi_" #_name " attribute cannot be updated

to

drivers/scsi/be2iscsi/be_main.c

Quoted 3 lines

0x%x, range allowed is [" #_minval " - " #_maxval "]\n", val); \

drivers/scsi/be2iscsi/be_main.c +2 -0
+	beiscsi_err(phba, BEISCSI_LOG_INIT,				\
+		    "beiscsi_" #_name " attribute cannot be updated to

0x%x,

drivers/scsi/be2iscsi/be_main.c beiscsi_##_name##_init(struct beiscsi_hba *phba, · line 120

Quoted 11 lines

range allowed is [" #_minval " - " #_maxval "]\n", val); \

drivers/scsi/be2iscsi/be_main.c +0 -2
 	return -EINVAL;							\
 }
@@ -115,8 +115,8 @@ beiscsi_##_name##_init(struct beiscsi_hba *phba,
 uint32_t val)		\
 		phba->attr_##_name = val;				\
 		return 0;						\
 	}								\
-	beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,			\
-		    "BA", "beiscsi_" #_name " attribute cannot be updated

to

drivers/scsi/be2iscsi/be_main.c beiscsi_##_name##_init(struct beiscsi_hba *phba, · line 121

Quoted 3 lines
drivers/scsi/be2iscsi/be_main.c +2 -0
 0x%x, range allowed is [" #_minval " - " #_maxval "]\n", \
+	beiscsi_err(phba, BEISCSI_LOG_INIT,				\
+		    "beiscsi_" #_name " attribute cannot be updated to

0x%x,

Quoted 19 lines
drivers/scsi/be2iscsi/be_main.c +0 -0
 range allowed is [" #_minval " - " #_maxval "]\n", \
drivers/scsi/be2iscsi/be_main.c +2 -2
 		    val);						\
 	phba->attr_##_name = _defval;					\
 	return -EINVAL;							\
@@ -262,8 +262,8 @@ static int beiscsi_eh_abort(struct scsi_cmnd *sc)
 				sizeof(struct
 invalidate_commands_params_in),
 				&nonemb_cmd.dma);
 	if (nonemb_cmd.va == NULL) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_EH,
-			    "BM", "Failed to allocate memory for
 mgmt_invalidate_icds\n");
+		beiscsi_err(phba, BEISCSI_LOG_EH,
+			    "Failed to allocate memory for
 mgmt_invalidate_icds\n");
drivers/scsi/be2iscsi/be_main.c +0 -0
 		return FAILED;
 	}
 	nonemb_cmd.size = sizeof(struct invalidate_commands_params_in);

drivers/scsi/be2iscsi/be_main.c static int beiscsi_eh_abort(struct scsi_cmnd *sc) · line 276

Quoted 8 lines
drivers/scsi/be2iscsi/be_main.c +2 -2
@@ -271,8 +271,8 @@ static int beiscsi_eh_abort(struct scsi_cmnd *sc)
 	tag = mgmt_invalidate_icds(phba, inv_tbl, num_invalidate,
 				   cid, &nonemb_cmd);
 	if (!tag) {
-		beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_EH,
-			    "BM", "mgmt_invalidate_icds could not be
 submitted\n");
+		beiscsi_warn(phba, BEISCSI_LOG_EH,
+			     "mgmt_invalidate_icds could not be

submitted\n");

drivers/scsi/be2iscsi/be_main.c static int beiscsi_eh_device_reset(struct scsi_cmnd

Quoted 4 lines
drivers/scsi/be2iscsi/be_main.c +0 -0
 		pci_free_consistent(phba->ctrl.pdev, nonemb_cmd.size,
 				    nonemb_cmd.va, nonemb_cmd.dma);
@@ -342,8 +342,8 @@ static int beiscsi_eh_device_reset(struct scsi_cmnd

*sc)

drivers/scsi/be2iscsi/be_main.c static int beiscsi_eh_device_reset(struct scsi_cmnd

Quoted 14 lines
drivers/scsi/be2iscsi/be_main.c +2 -2
 				sizeof(struct
 invalidate_commands_params_in),
 				&nonemb_cmd.dma);
 	if (nonemb_cmd.va == NULL) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_EH,
-			    "BM", "Failed to allocate memory for
 mgmt_invalidate_icds\n");
+		beiscsi_err(phba, BEISCSI_LOG_EH,
+			    "Failed to allocate memory for
 mgmt_invalidate_icds\n");
drivers/scsi/be2iscsi/be_main.c +0 -0
 		return FAILED;
 	}
 	nonemb_cmd.size = sizeof(struct invalidate_commands_params_in);
@@ -351,8 +351,8 @@ static int beiscsi_eh_device_reset(struct scsi_cmnd

*sc)

drivers/scsi/be2iscsi/be_main.c static int beiscsi_eh_abort(struct scsi_cmnd *sc)

Quoted 8 lines
drivers/scsi/be2iscsi/be_main.c +2 -2
 	tag = mgmt_invalidate_icds(phba, inv_tbl, num_invalidate,
 				   cid, &nonemb_cmd);
 	if (!tag) {
-		beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_EH,
-			    "BM", "mgmt_invalidate_icds could not be
 submitted\n");
+		beiscsi_warn(phba, BEISCSI_LOG_EH,
+			     "mgmt_invalidate_icds could not be

submitted\n");

drivers/scsi/be2iscsi/be_main.c static int beiscsi_init_irqs(struct beiscsi_hba

Quoted 33 lines
drivers/scsi/be2iscsi/be_main.c +0 -0
 		pci_free_consistent(phba->ctrl.pdev, nonemb_cmd.size,
 				    nonemb_cmd.va, nonemb_cmd.dma);
drivers/scsi/be2iscsi/be_main.c +0 -0
 		return FAILED;
@@ -777,16 +777,16 @@ static void beiscsi_get_params(struct beiscsi_hba
 *phba)
 			phba->fw_config.iscsi_icd_count[ulp_num] =

(icd_count -

drivers/scsi/be2iscsi/be_main.c +10 -10
 					icd_count_unavailable);
 
-			beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-					"BM", "Aligned ICD values\n"
-					"\t ICD Start : %d\n"
-					"\t ICD Count : %d\n"
-					"\t ICD Discarded : %d\n",
-					phba->fw_config.
-					iscsi_icd_start[ulp_num],
-					phba->fw_config.
-					iscsi_icd_count[ulp_num],
-					icd_count_unavailable);
+			beiscsi_info(phba, BEISCSI_LOG_INIT,
+				     "Aligned ICD values\n"
+				     "\t ICD Start : %d\n"
+				     "\t ICD Count : %d\n"
+				     "\t ICD Discarded : %d\n",
+				     phba->fw_config.
+				     iscsi_icd_start[ulp_num],
+				     phba->fw_config.
+				     iscsi_icd_count[ulp_num],
+				     icd_count_unavailable);
 			break;
 		}
 	}
@@ -1000,8 +1000,8 @@ static int beiscsi_init_irqs(struct beiscsi_hba

*phba)

drivers/scsi/be2iscsi/be_main.c static int beiscsi_init_irqs(struct beiscsi_hba *phba)

Quoted 6 lines
drivers/scsi/be2iscsi/be_main.c +0 -2
 					  phba->msi_name[i],
 					  &phwi_context->be_eq[i]);
 			if (ret) {
-				beiscsi_log(phba, KERN_ERR,
 BEISCSI_LOG_INIT,
-					    "BM",

"beiscsi_init_irqs-Failed to

drivers/scsi/be2iscsi/be_main.c static int beiscsi_init_irqs(struct beiscsi_hba · line 1006

Quoted 3 lines
drivers/scsi/be2iscsi/be_main.c +2 -0
 register msix for i = %d\n",
+				beiscsi_err(phba, BEISCSI_LOG_INIT,
+					    "beiscsi_init_irqs-Failed to

register

drivers/scsi/be2iscsi/be_main.c static int beiscsi_init_irqs(struct beiscsi_hba

Quoted 5 lines
drivers/scsi/be2iscsi/be_main.c +0 -0
 msix for i = %d\n",
drivers/scsi/be2iscsi/be_main.c +0 -0
 					    i);
 				kfree(phba->msi_name[i]);
 				goto free_msix_irqs;
@@ -1018,8 +1018,8 @@ static int beiscsi_init_irqs(struct beiscsi_hba

*phba)

drivers/scsi/be2iscsi/be_main.c static int beiscsi_init_irqs(struct beiscsi_hba · line 1018

Quoted 1 line
drivers/scsi/be2iscsi/be_main.c +0 -0
 		ret = request_irq(msix_vec, be_isr_mcc, 0,

phba->msi_name[i],

drivers/scsi/be2iscsi/be_main.c static int beiscsi_init_irqs(struct beiscsi_hba *phba)

Quoted 4 lines
drivers/scsi/be2iscsi/be_main.c +0 -2
 				  &phwi_context->be_eq[i]);
 		if (ret) {
-			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT ,
-				    "BM", "beiscsi_init_irqs-Failed to

register

drivers/scsi/be2iscsi/be_main.c static int beiscsi_init_irqs(struct beiscsi_hba

Quoted 8 lines
drivers/scsi/be2iscsi/be_main.c +2 -0
 beiscsi_msix_mcc\n");
+			beiscsi_err(phba, BEISCSI_LOG_INIT,
+				    "beiscsi_init_irqs-Failed to register
 beiscsi_msix_mcc\n");
 			kfree(phba->msi_name[i]);
drivers/scsi/be2iscsi/be_main.c +0 -0
 			goto free_msix_irqs;
 		}
@@ -1028,8 +1028,8 @@ static int beiscsi_init_irqs(struct beiscsi_hba

*phba)

drivers/scsi/be2iscsi/be_main.c static int beiscsi_init_irqs(struct beiscsi_hba *phba)

Quoted 5 lines
drivers/scsi/be2iscsi/be_main.c +0 -2
 		ret = request_irq(pcidev->irq, be_isr, IRQF_SHARED,
 				  "beiscsi", phba);
 		if (ret) {
-			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-				    "BM", "beiscsi_init_irqs-Failed to

register

drivers/scsi/be2iscsi/be_main.c static int beiscsi_init_irqs(struct beiscsi_hba · line 1033

Quoted 3 lines
drivers/scsi/be2iscsi/be_main.c +2 -0
 irq\n");
+			beiscsi_err(phba, BEISCSI_LOG_INIT,
+				    "beiscsi_init_irqs-Failed to register

irq\n");

Quoted 17 lines
drivers/scsi/be2iscsi/be_main.c +0 -0
 			return ret;
 		}
drivers/scsi/be2iscsi/be_main.c +2 -3
 	}
@@ -1089,9 +1089,8 @@ beiscsi_process_async_pdu(struct beiscsi_conn
 *beiscsi_conn,
 	case ISCSI_OP_REJECT:
 		WARN_ON(!pbuffer);
 		WARN_ON(!(buf_len == 48));
-		beiscsi_log(phba, KERN_ERR,
-			    BEISCSI_LOG_CONFIG | BEISCSI_LOG_IO,
-			    "BM", "In ISCSI_OP_REJECT\n");
+		beiscsi_err(phba, BEISCSI_LOG_CONFIG | BEISCSI_LOG_IO,
+			    "In ISCSI_OP_REJECT\n");
 		break;
 	case ISCSI_OP_LOGIN_RSP:
drivers/scsi/be2iscsi/be_main.c +0 -0
 	case ISCSI_OP_TEXT_RSP:

drivers/scsi/be2iscsi/be_main.c beiscsi_process_async_pdu(struct beiscsi_conn · line 1107

Quoted 7 lines
drivers/scsi/be2iscsi/be_main.c +0 -3
@@ -1101,12 +1100,11 @@ beiscsi_process_async_pdu(struct beiscsi_conn
 *beiscsi_conn,
 		login_hdr->itt = io_task->libiscsi_itt;
 		break;
 	default:
-		beiscsi_log(phba, KERN_WARNING,
-			    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-			    "BM", "Unrecognized opcode 0x%x in async

msg\n",

drivers/scsi/be2iscsi/be_main.c beiscsi_process_async_pdu(struct beiscsi_conn · line 1109

Quoted 2 lines
drivers/scsi/be2iscsi/be_main.c +0 -2
-			    (ppdu->
-			     dw[offsetof(struct amap_pdu_base, opcode) /

32]

drivers/scsi/be2iscsi/be_main.c beiscsi_process_async_pdu(struct beiscsi_conn *beiscsi_conn,

Quoted 5 lines
drivers/scsi/be2iscsi/be_main.c +4 -1
-			     & PDUBASE_OPCODE_MASK));
+		beiscsi_warn(phba, BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
+			     "Unrecognized opcode 0x%x in async msg\n",
+			     (ppdu->
+			      dw[offsetof(struct amap_pdu_base, opcode) /

32]

drivers/scsi/be2iscsi/be_main.c static struct sgl_handle

Quoted 5 lines
drivers/scsi/be2iscsi/be_main.c +1 -0
+			      & PDUBASE_OPCODE_MASK));
 		return 1;
 	}
@@ -1122,9 +1120,9 @@ static struct sgl_handle

*alloc_io_sgl_handle(struct

drivers/scsi/be2iscsi/be_main.c static struct sgl_handle *alloc_io_sgl_handle(struct beiscsi_hba *phba)

Quoted 10 lines
drivers/scsi/be2iscsi/be_main.c +2 -3
 beiscsi_hba *phba)
 
 	spin_lock_bh(&phba->io_sgl_lock);
 	if (phba->io_sgl_hndl_avbl) {
-		beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_IO,
-			    "BM", "In alloc_io_sgl_handle,
 io_sgl_alloc_index=%d\n",
-			    phba->io_sgl_alloc_index);
+		beiscsi_info(phba, BEISCSI_LOG_IO,
+			     "In alloc_io_sgl_handle,

io_sgl_alloc_index=%d\n",

drivers/scsi/be2iscsi/be_main.c static void · line 1143

Quoted 6 lines
drivers/scsi/be2iscsi/be_main.c +1 -0
+			     phba->io_sgl_alloc_index);
 
drivers/scsi/be2iscsi/be_main.c +0 -0
 		psgl_handle = phba->io_sgl_hndl_base[phba->
 						io_sgl_alloc_index];
@@ -1145,17 +1143,17 @@ static void
 free_io_sgl_handle(struct beiscsi_hba *phba, struct sgl_handle

*psgl_handle)

Quoted 6 lines
drivers/scsi/be2iscsi/be_main.c +1 -3
 {
 	spin_lock_bh(&phba->io_sgl_lock);
-	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_IO,
-		    "BM", "In free_,io_sgl_free_index=%d\n",
-		    phba->io_sgl_free_index);
+	beiscsi_info(phba, BEISCSI_LOG_IO,

drivers/scsi/be2iscsi/be_main.c static void

Quoted 10 lines
drivers/scsi/be2iscsi/be_main.c +2 -2
+		     "In free_,io_sgl_free_index=%d\n",
+		     phba->io_sgl_free_index);
 
 	if (phba->io_sgl_hndl_base[phba->io_sgl_free_index]) {
 		/*
 		 * this can happen if clean_task is called on a task that
 		 * failed in xmit_task or alloc_pdu.
 		 */
-		 beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_IO,
-			     "BM", "Double Free in IO SGL

io_sgl_free_index=%d,

drivers/scsi/be2iscsi/be_main.c static void · line 1157

Quoted 3 lines
drivers/scsi/be2iscsi/be_main.c +2 -0
 value there=%p\n",
+		beiscsi_info(phba, BEISCSI_LOG_IO,
+			     "Double Free in IO SGL io_sgl_free_index=%d,

value

Quoted 22 lines
drivers/scsi/be2iscsi/be_main.c +0 -0
 there=%p\n",
 			     phba->io_sgl_free_index,
drivers/scsi/be2iscsi/be_main.c +4 -5
 			     phba->io_sgl_hndl_base
 			     [phba->io_sgl_free_index]);
@@ -1241,11 +1239,10 @@ free_wrb_handle(struct beiscsi_hba *phba, struct
 hwi_wrb_context *pwrb_context,
 	beiscsi_put_wrb_handle(pwrb_context,
 			       pwrb_handle,
 			       phba->params.wrbs_per_cxn);
-	beiscsi_log(phba, KERN_INFO,
-		    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-		    "BM", "FREE WRB: pwrb_handle=%p free_index=0x%x
 wrb_handles_available=%d\n",
-		    pwrb_handle, pwrb_context->free_index,
-		    pwrb_context->wrb_handles_available);
+	beiscsi_info(phba, BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
+		     "FREE WRB: pwrb_handle=%p free_index=0x%x
 wrb_handles_available=%d\n",
+		     pwrb_handle, pwrb_context->free_index,
+		     pwrb_context->wrb_handles_available);

}

Quoted 1 line

static struct sgl_handle *alloc_mgmt_sgl_handle(struct beiscsi_hba

*phba)

Quoted 18 lines
drivers/scsi/be2iscsi/be_main.c +4 -4
@@ -1256,10 +1253,10 @@ static struct sgl_handle
 *alloc_mgmt_sgl_handle(struct beiscsi_hba *phba)
 	if (phba->eh_sgl_hndl_avbl) {
 		psgl_handle = phba->eh_sgl_hndl_base[phba-
 >eh_sgl_alloc_index];
 		phba->eh_sgl_hndl_base[phba->eh_sgl_alloc_index] = NULL;
-		beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_CONFIG,
-			    "BM", "mgmt_sgl_alloc_index=%d=0x%x\n",
-			    phba->eh_sgl_alloc_index,
-			    phba->eh_sgl_alloc_index);
+		beiscsi_info(phba, BEISCSI_LOG_CONFIG,
+			     "mgmt_sgl_alloc_index=%d=0x%x\n",
+			     phba->eh_sgl_alloc_index,
+			     phba->eh_sgl_alloc_index);
 
drivers/scsi/be2iscsi/be_main.c +0 -0
 		phba->eh_sgl_hndl_avbl--;
 		if (phba->eh_sgl_alloc_index ==

drivers/scsi/be2iscsi/be_main.c void · line 1283

Quoted 6 lines
drivers/scsi/be2iscsi/be_main.c +0 -2
@@ -1278,18 +1275,18 @@ void
 free_mgmt_sgl_handle(struct beiscsi_hba *phba, struct sgl_handle
 *psgl_handle)
 {
 	spin_lock_bh(&phba->mgmt_sgl_lock);
-	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_CONFIG,
-		    "BM", "In  free_mgmt_sgl_handle,

eh_sgl_free_index=%d\n",

Quoted 6 lines
drivers/scsi/be2iscsi/be_main.c +3 -1
-		    phba->eh_sgl_free_index);
+	beiscsi_info(phba, BEISCSI_LOG_CONFIG,
+		     "In  free_mgmt_sgl_handle, eh_sgl_free_index=%d\n",
+		     phba->eh_sgl_free_index);
 
 	if (phba->eh_sgl_hndl_base[phba->eh_sgl_free_index]) {

drivers/scsi/be2iscsi/be_main.c void

Quoted 10 lines
drivers/scsi/be2iscsi/be_main.c +2 -3
 		/*
 		 * this can happen if clean_task is called on a task that
 		 * failed in xmit_task or alloc_pdu.
 		 */
-		beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_CONFIG,
-			    "BM", "Double Free in eh SGL,
 eh_sgl_free_index=%d\n",
-			    phba->eh_sgl_free_index);
+		beiscsi_warn(phba, BEISCSI_LOG_CONFIG,
+			     "Double Free in eh SGL,

eh_sgl_free_index=%d\n",

Quoted 41 lines
drivers/scsi/be2iscsi/be_main.c +1 -0
+			     phba->eh_sgl_free_index);
 		spin_unlock_bh(&phba->mgmt_sgl_lock);
drivers/scsi/be2iscsi/be_main.c +2 -3
 		return;
 	}
@@ -1575,9 +1572,8 @@ static void hwi_complete_cmd(struct beiscsi_conn
 *beiscsi_conn,
 		break;
 
 	case HWH_TYPE_LOGIN:
-		beiscsi_log(phba, KERN_ERR,
-			    BEISCSI_LOG_CONFIG | BEISCSI_LOG_IO,
-			    "BM", "\t\t No HWH_TYPE_LOGIN Expected in
 hwi_complete_cmd - Solicited path\n");
+		beiscsi_err(phba, BEISCSI_LOG_CONFIG | BEISCSI_LOG_IO,
+			    "\t\t No HWH_TYPE_LOGIN Expected in
 hwi_complete_cmd - Solicited path\n");
drivers/scsi/be2iscsi/be_main.c +5 -6
 		break;
 
 	case HWH_TYPE_NOP:
@@ -1585,12 +1581,11 @@ static void hwi_complete_cmd(struct beiscsi_conn
 *beiscsi_conn,
 		break;
 
 	default:
-		beiscsi_log(phba, KERN_WARNING,
-			    BEISCSI_LOG_CONFIG | BEISCSI_LOG_IO,
-			    "BM", "In hwi_complete_cmd, unknown type = %d
 wrb_index 0x%x CID 0x%x\n",
-			    type,
-			    csol_cqe.wrb_index,
-			    csol_cqe.cid);
+		beiscsi_warn(phba, BEISCSI_LOG_CONFIG | BEISCSI_LOG_IO,
+			     "In hwi_complete_cmd, unknown type = %d
 wrb_index 0x%x CID 0x%x\n",
+			     type,
+			     csol_cqe.wrb_index,
+			     csol_cqe.cid);
drivers/scsi/be2iscsi/be_main.c +0 -0
 		break;
 	}

drivers/scsi/be2iscsi/be_main.c hwi_get_async_handle(struct beiscsi_hba *phba, · line 1662

Quoted 7 lines
drivers/scsi/be2iscsi/be_main.c +0 -4
@@ -1656,11 +1651,10 @@ hwi_get_async_handle(struct beiscsi_hba *phba,
 		break;
 	default:
 		pbusy_list = NULL;
-		beiscsi_log(phba, KERN_WARNING,
-			    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-			    "BM", "Unexpected code=%d\n",
-			    pdpdu_cqe->dw[offsetof(struct

amap_i_t_dpdu_cqe,

drivers/scsi/be2iscsi/be_main.c hwi_get_async_handle(struct beiscsi_hba *phba,

Quoted 4 lines
drivers/scsi/be2iscsi/be_main.c +3 -1
-			    code) / 32] & PDUCQE_CODE_MASK);
+		beiscsi_warn(phba, BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
+			     "Unexpected code=%d\n",
+			     pdpdu_cqe->dw[offsetof(struct

amap_i_t_dpdu_cqe,

Quoted 6 lines
drivers/scsi/be2iscsi/be_main.c +1 -0
+						    code) / 32] &
 PDUCQE_CODE_MASK);
 		return NULL;
 	}

drivers/scsi/be2iscsi/be_main.c hwi_update_async_writables(struct beiscsi_hba · line 1721

Quoted 10 lines
drivers/scsi/be2iscsi/be_main.c +2 -3
@@ -1721,9 +1715,8 @@ hwi_update_async_writables(struct beiscsi_hba
 *phba,
 	}
 
 	if (!writables) {
-		beiscsi_log(phba, KERN_ERR,
-			    BEISCSI_LOG_CONFIG | BEISCSI_LOG_IO,
-			    "BM", "Duplicate notification received - index
 0x%x!!\n",
+		beiscsi_err(phba, BEISCSI_LOG_CONFIG | BEISCSI_LOG_IO,
+			    "Duplicate notification received - index

0x%x!!\n",

drivers/scsi/be2iscsi/be_main.c unsigned int beiscsi_process_cq(struct be_eq_obj · line 2117

Quoted 11 lines
drivers/scsi/be2iscsi/be_main.c +0 -0
 			    cq_index);
drivers/scsi/be2iscsi/be_main.c +0 -3
 		WARN_ON(1);
 	}
@@ -2111,10 +2104,9 @@ unsigned int beiscsi_process_cq(struct be_eq_obj
 *pbe_eq, int budget)
 			/* connection has already been freed
 			 * just move on to next one
 			 */
-			beiscsi_log(phba, KERN_WARNING,
-				    BEISCSI_LOG_INIT,
-				    "BM", "proc cqe of disconn ep: cid

%d\n",

Quoted 60 lines
drivers/scsi/be2iscsi/be_main.c +9 -9
-				    cid);
+			beiscsi_warn(phba, BEISCSI_LOG_INIT,
+				     "proc cqe of disconn ep: cid %d\n",
+				     cid);
 			goto proc_next_cqe;
 		}
@@ -2133,19 +2125,17 @@ unsigned int beiscsi_process_cq(struct be_eq_obj
 *pbe_eq, int budget)
 			hwi_complete_cmd(beiscsi_conn, phba, sol);
 			break;
 		case DRIVERMSG_NOTIFY:
-			beiscsi_log(phba, KERN_INFO,
-				    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-				    "BM", "Received %s[%d] on CID : %d\n",
-				    cqe_desc[code], code, cid);
+			beiscsi_info(phba, BEISCSI_LOG_IO |
 BEISCSI_LOG_CONFIG,
+				     "Received %s[%d] on CID : %d\n",
+				     cqe_desc[code], code, cid);
 
 			dmsg = (struct dmsg_cqe *)sol;
 			hwi_complete_drvr_msgs(beiscsi_conn, phba, sol);
 			break;
 		case UNSOL_HDR_NOTIFY:
-			beiscsi_log(phba, KERN_INFO,
-				    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-				    "BM", "Received %s[%d] on CID : %d\n",
-				    cqe_desc[code], code, cid);
+			beiscsi_info(phba, BEISCSI_LOG_IO |
 BEISCSI_LOG_CONFIG,
+				     "Received %s[%d] on CID : %d\n",
+				     cqe_desc[code], code, cid);
drivers/scsi/be2iscsi/be_main.c +3 -4
 			spin_lock_bh(&phba->async_pdu_lock);
 			hwi_process_default_pdu_ring(beiscsi_conn, phba,
@@ -2153,10 +2143,9 @@ unsigned int beiscsi_process_cq(struct be_eq_obj
 *pbe_eq, int budget)
 			spin_unlock_bh(&phba->async_pdu_lock);
 			break;
 		case UNSOL_DATA_NOTIFY:
-			beiscsi_log(phba, KERN_INFO,
-				    BEISCSI_LOG_CONFIG | BEISCSI_LOG_IO,
-				    "BM", "Received %s[%d] on CID : %d\n",
-				    cqe_desc[code], code, cid);
+			beiscsi_info(phba, BEISCSI_LOG_CONFIG |
 BEISCSI_LOG_IO,
+				     "Received %s[%d] on CID : %d\n",
+				     cqe_desc[code], code, cid);
 
drivers/scsi/be2iscsi/be_main.c +0 -3
 			spin_lock_bh(&phba->async_pdu_lock);
 			hwi_process_default_pdu_ring(beiscsi_conn, phba,
@@ -2166,16 +2155,14 @@ unsigned int beiscsi_process_cq(struct be_eq_obj
 *pbe_eq, int budget)
 		case CXN_INVALIDATE_INDEX_NOTIFY:
 		case CMD_INVALIDATED_NOTIFY:
 		case CXN_INVALIDATE_NOTIFY:
-			beiscsi_log(phba, KERN_ERR,
-				    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-				    "BM", "Ignoring %s[%d] on CID : %d\n",

drivers/scsi/be2iscsi/be_main.c unsigned int beiscsi_process_cq(struct be_eq_obj · line 2180

Quoted 10 lines
drivers/scsi/be2iscsi/be_main.c +2 -3
+			beiscsi_err(phba, BEISCSI_LOG_IO |
 BEISCSI_LOG_CONFIG,
+				    "Ignoring %s[%d] on CID : %d\n",
 				    cqe_desc[code], code, cid);
 			break;
 		case CXN_KILLED_HDR_DIGEST_ERR:
 		case SOL_CMD_KILLED_DATA_DIGEST_ERR:
-			beiscsi_log(phba, KERN_ERR,
-				    BEISCSI_LOG_CONFIG | BEISCSI_LOG_IO,
-				    "BM", "Cmd Notification %s[%d] on CID

:

drivers/scsi/be2iscsi/be_main.c

Quoted 4 lines
drivers/scsi/be2iscsi/be_main.c +1 -0
 %d\n",
+			beiscsi_err(phba, BEISCSI_LOG_CONFIG |

BEISCSI_LOG_IO,

drivers/scsi/be2iscsi/be_main.c +1 -0
+				    "Cmd Notification %s[%d] on CID :

%d\n",

drivers/scsi/be2iscsi/be_main.c unsigned int beiscsi_process_cq(struct be_eq_obj · line 2191

Quoted 11 lines
drivers/scsi/be2iscsi/be_main.c +0 -3
 				    cqe_desc[code], code,  cid);
 			break;
 		case CMD_KILLED_INVALID_STATSN_RCVD:
@@ -2185,15 +2172,13 @@ unsigned int beiscsi_process_cq(struct be_eq_obj
 *pbe_eq, int budget)
 		case CMD_CXN_KILLED_ITT_INVALID:
 		case CMD_CXN_KILLED_SEQ_OUTOFORDER:
 		case CMD_CXN_KILLED_INVALID_DATASN_RCVD:
-			beiscsi_log(phba, KERN_ERR,
-				    BEISCSI_LOG_CONFIG | BEISCSI_LOG_IO,
-				    "BM", "Cmd Notification %s[%d] on CID

:

drivers/scsi/be2iscsi/be_main.c unsigned int beiscsi_process_cq(struct be_eq_obj · line 2179

Quoted 4 lines
drivers/scsi/be2iscsi/be_main.c +2 -0
 %d\n",
+			beiscsi_err(phba, BEISCSI_LOG_CONFIG |
 BEISCSI_LOG_IO,
+				    "Cmd Notification %s[%d] on CID :

%d\n",

Quoted 25 lines
drivers/scsi/be2iscsi/be_main.c +0 -3
 				    cqe_desc[code], code,  cid);
 			break;
 		case UNSOL_DATA_DIGEST_ERROR_NOTIFY:
-			beiscsi_log(phba, KERN_ERR,
-				    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-				    "BM", "Dropping %s[%d] on DPDU ring on

CID : %d\n",

drivers/scsi/be2iscsi/be_main.c +1 -0
+			beiscsi_err(phba, BEISCSI_LOG_IO |

BEISCSI_LOG_CONFIG,

drivers/scsi/be2iscsi/be_main.c +1 -0
+				    "Dropping %s[%d] on DPDU ring on CID :

%d\n",

drivers/scsi/be2iscsi/be_main.c +1 -3
 				    cqe_desc[code], code, cid);
 			spin_lock_bh(&phba->async_pdu_lock);
 			hwi_flush_default_pdu_buffer(phba, beiscsi_conn,
@@ -2215,18 +2200,16 @@ unsigned int beiscsi_process_cq(struct be_eq_obj
 *pbe_eq, int budget)
 		case CXN_KILLED_OVER_RUN_RESIDUAL:
 		case CXN_KILLED_UNDER_RUN_RESIDUAL:
 		case CXN_KILLED_CMND_DATA_NOT_ON_SAME_CONN:
-			beiscsi_log(phba, KERN_ERR,
-				    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-				    "BM", "Event %s[%d] received on CID :
 %d\n",
+			beiscsi_err(phba, BEISCSI_LOG_IO |
 BEISCSI_LOG_CONFIG,

drivers/scsi/be2iscsi/be_main.c unsigned int beiscsi_process_cq(struct be_eq_obj · line 2232

Quoted 10 lines
drivers/scsi/be2iscsi/be_main.c +1 -3
+				    "Event %s[%d] received on CID : %d\n",
 				    cqe_desc[code], code, cid);
 			if (beiscsi_conn)
 				iscsi_conn_failure(beiscsi_conn->conn,
 						   ISCSI_ERR_CONN_FAILED);
 			break;
 		default:
-			beiscsi_log(phba, KERN_ERR,
-				    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-				    "BM", "Invalid CQE Event Received Code

: %d

drivers/scsi/be2iscsi/be_main.c

Quoted 4 lines

CID 0x%x...\n",

drivers/scsi/be2iscsi/be_main.c +1 -0
+			beiscsi_err(phba, BEISCSI_LOG_IO |

BEISCSI_LOG_CONFIG,

drivers/scsi/be2iscsi/be_main.c +1 -0
+				    "Invalid CQE Event Received Code : %d

CID

drivers/scsi/be2iscsi/be_main.c static int be_iopoll(struct irq_poll *iop, int

Quoted 5 lines

0x%x...\n",

drivers/scsi/be2iscsi/be_main.c +0 -0
 				    code, cid);
 			break;
 		}
@@ -2303,10 +2286,9 @@ static int be_iopoll(struct irq_poll *iop, int

budget)

drivers/scsi/be2iscsi/be_main.c static int beiscsi_init_wrb_handle(struct

Quoted 14 lines
drivers/scsi/be2iscsi/be_main.c +3 -4
 	pbe_eq->cq_count += ret;
 	if (ret < budget) {
 		irq_poll_complete(iop);
-		beiscsi_log(phba, KERN_INFO,
-			    BEISCSI_LOG_CONFIG | BEISCSI_LOG_IO,
-			    "BM", "rearm pbe_eq->q.id =%d ret %d\n",
-			    pbe_eq->q.id, ret);
+		beiscsi_info(phba, BEISCSI_LOG_CONFIG | BEISCSI_LOG_IO,
+			     "rearm pbe_eq->q.id =%d ret %d\n",
+			     pbe_eq->q.id, ret);
 		hwi_ring_eq_db(phba, pbe_eq->q.id, 0, 0, 1, 1);
 	}
 	return ret;
@@ -2862,8 +2844,8 @@ static int beiscsi_init_wrb_handle(struct

beiscsi_hba

Quoted 12 lines
drivers/scsi/be2iscsi/be_main.c +2 -2
 *phba)
 				     phba->params.cxns_per_ctrl,
 				     GFP_KERNEL);
 	if (!phwi_ctxt->be_wrbq) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM", "WRBQ Mem Alloc Failed\n");
+		beiscsi_err(phba, BEISCSI_LOG_INIT,
+			    "WRBQ Mem Alloc Failed\n");
 		return -ENOMEM;
 	}

drivers/scsi/be2iscsi/be_main.c static int beiscsi_init_wrb_handle(struct · line 2879

Quoted 7 lines
drivers/scsi/be2iscsi/be_main.c +0 -2
@@ -2873,16 +2855,16 @@ static int beiscsi_init_wrb_handle(struct
 beiscsi_hba *phba)
 				kzalloc(sizeof(struct wrb_handle *) *
 					phba->params.wrbs_per_cxn,
 GFP_KERNEL);
 		if (!pwrb_context->pwrb_handle_base) {
-			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-				    "BM", "Mem Alloc Failed. Failing to

load\n");

drivers/scsi/be2iscsi/be_main.c static int beiscsi_init_wrb_handle(struct · line 2861

Quoted 2 lines
drivers/scsi/be2iscsi/be_main.c +2 -0
+			beiscsi_err(phba, BEISCSI_LOG_INIT,
+				    "Mem Alloc Failed. Failing to

load\n");

drivers/scsi/be2iscsi/be_main.c static int beiscsi_init_wrb_handle(struct beiscsi_hba *phba)

Quoted 9 lines
drivers/scsi/be2iscsi/be_main.c +0 -2
 			goto init_wrb_hndl_failed;
 		}
 		pwrb_context->pwrb_handle_basestd =
 				kzalloc(sizeof(struct wrb_handle *) *
 					phba->params.wrbs_per_cxn,
 GFP_KERNEL);
 		if (!pwrb_context->pwrb_handle_basestd) {
-			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-				    "BM", "Mem Alloc Failed. Failing to

load\n");

drivers/scsi/be2iscsi/be_main.c static int beiscsi_init_wrb_handle(struct · line 2870

Quoted 2 lines
drivers/scsi/be2iscsi/be_main.c +2 -0
+			beiscsi_err(phba, BEISCSI_LOG_INIT,
+				    "Mem Alloc Failed. Failing to

load\n");

Quoted 16 lines
drivers/scsi/be2iscsi/be_main.c +1 -5
 			goto init_wrb_hndl_failed;
 		}
 		if (!num_cxn_wrbh) {
@@ -2978,16 +2960,15 @@ static int hwi_init_async_pdu_ctx(struct
 beiscsi_hba *phba)
 			mem_descr += HWI_MEM_ASYNC_HEADER_BUF_ULP0
+
 				(ulp_num * MEM_DESCR_OFFSET);
 			if (mem_descr->mem_array[0].virtual_address) {
-				beiscsi_log(phba, KERN_INFO,
 BEISCSI_LOG_INIT,
-					    "BM", "hwi_init_async_pdu_ctx
 HWI_MEM_ASYNC_HEADER_BUF_ULP%d va=%p\n",
-					    ulp_num,
-					    mem_descr->mem_array[0].
-					    virtual_address);

drivers/scsi/be2iscsi/be_main.c static int hwi_init_async_pdu_ctx(struct · line 2993

Quoted 10 lines
drivers/scsi/be2iscsi/be_main.c +5 -3
+				beiscsi_info(phba, BEISCSI_LOG_INIT,
+					     "hwi_init_async_pdu_ctx
 HWI_MEM_ASYNC_HEADER_BUF_ULP%d va=%p\n",
+					     ulp_num,
+					     mem_descr->mem_array[0].
+					     virtual_address);
 			} else
-				beiscsi_log(phba, KERN_WARNING,
-					    BEISCSI_LOG_INIT,
-					    "BM", "No Virtual address for

ULP :

drivers/scsi/be2iscsi/be_main.c static int hwi_init_async_pdu_ctx(struct beiscsi_hba *phba)

Quoted 4 lines

%d\n",

drivers/scsi/be2iscsi/be_main.c +2 -1
-					    ulp_num);
+				beiscsi_warn(phba, BEISCSI_LOG_INIT,
+					     "No Virtual address for ULP :

%d\n",

Quoted 20 lines
drivers/scsi/be2iscsi/be_main.c +1 -0
+					     ulp_num);
 
 			pasync_ctx->async_header.va_base =
 				mem_descr->mem_array[0].virtual_address;
@@ -3000,16 +2981,15 @@ static int hwi_init_async_pdu_ctx(struct
 beiscsi_hba *phba)
 			mem_descr +=

HWI_MEM_ASYNC_HEADER_RING_ULP0 +

drivers/scsi/be2iscsi/be_main.c +0 -1
 				     (ulp_num * MEM_DESCR_OFFSET);
 			if (mem_descr->mem_array[0].virtual_address) {
-				beiscsi_log(phba, KERN_INFO,

BEISCSI_LOG_INIT,

drivers/scsi/be2iscsi/be_main.c +0 -1
-					    "BM", "hwi_init_async_pdu_ctx

HWI_MEM_ASYNC_HEADER_RING_ULP%d va=%p\n",

drivers/scsi/be2iscsi/be_main.c +2 -3
-					    ulp_num,
-					    mem_descr->mem_array[0].
-					    virtual_address);
+				beiscsi_info(phba, BEISCSI_LOG_INIT,
+					     "hwi_init_async_pdu_ctx

HWI_MEM_ASYNC_HEADER_RING_ULP%d va=%p\n",

drivers/scsi/be2iscsi/be_main.c static int hwi_init_async_pdu_ctx(struct beiscsi_hba *phba)

Quoted 7 lines
drivers/scsi/be2iscsi/be_main.c +3 -3
+					     ulp_num,
+					     mem_descr->mem_array[0].
+					     virtual_address);
 			} else
-				beiscsi_log(phba, KERN_WARNING,
-					    BEISCSI_LOG_INIT,
-					    "BM", "No Virtual address for

ULP :

drivers/scsi/be2iscsi/be_main.c static int hwi_init_async_pdu_ctx(struct beiscsi_hba *phba)

Quoted 4 lines

%d\n",

drivers/scsi/be2iscsi/be_main.c +2 -1
-					    ulp_num);
+				beiscsi_warn(phba, BEISCSI_LOG_INIT,
+					     "No Virtual address for ULP :

%d\n",

Quoted 20 lines
drivers/scsi/be2iscsi/be_main.c +1 -0
+					     ulp_num);
 
 			pasync_ctx->async_header.ring_base =
 				mem_descr->mem_array[0].virtual_address;
@@ -3018,16 +2998,15 @@ static int hwi_init_async_pdu_ctx(struct
 beiscsi_hba *phba)
 			mem_descr +=

HWI_MEM_ASYNC_HEADER_HANDLE_ULP0 +

drivers/scsi/be2iscsi/be_main.c +0 -1
 				     (ulp_num * MEM_DESCR_OFFSET);
 			if (mem_descr->mem_array[0].virtual_address) {
-				beiscsi_log(phba, KERN_INFO,

BEISCSI_LOG_INIT,

drivers/scsi/be2iscsi/be_main.c +0 -1
-					    "BM", "hwi_init_async_pdu_ctx

HWI_MEM_ASYNC_HEADER_HANDLE_ULP%d va=%p\n",

drivers/scsi/be2iscsi/be_main.c +2 -3
-					    ulp_num,
-					    mem_descr->mem_array[0].
-					    virtual_address);
+				beiscsi_info(phba, BEISCSI_LOG_INIT,
+					     "hwi_init_async_pdu_ctx

HWI_MEM_ASYNC_HEADER_HANDLE_ULP%d va=%p\n",

drivers/scsi/be2iscsi/be_main.c static int hwi_init_async_pdu_ctx(struct beiscsi_hba *phba)

Quoted 7 lines
drivers/scsi/be2iscsi/be_main.c +3 -3
+					     ulp_num,
+					     mem_descr->mem_array[0].
+					     virtual_address);
 			} else
-				beiscsi_log(phba, KERN_WARNING,
-					    BEISCSI_LOG_INIT,
-					    "BM", "No Virtual address for

ULP :

drivers/scsi/be2iscsi/be_main.c static int hwi_init_async_pdu_ctx(struct beiscsi_hba *phba)

Quoted 4 lines

%d\n",

drivers/scsi/be2iscsi/be_main.c +2 -1
-					    ulp_num);
+				beiscsi_warn(phba, BEISCSI_LOG_INIT,
+					     "No Virtual address for ULP :

%d\n",

Quoted 16 lines
drivers/scsi/be2iscsi/be_main.c +1 -5
+					     ulp_num);
 
 			pasync_ctx->async_header.handle_base =
 				mem_descr->mem_array[0].virtual_address;
@@ -3038,16 +3017,15 @@ static int hwi_init_async_pdu_ctx(struct
 beiscsi_hba *phba)
 			mem_descr += HWI_MEM_ASYNC_DATA_RING_ULP0 +
 				     (ulp_num * MEM_DESCR_OFFSET);
 			if (mem_descr->mem_array[0].virtual_address) {
-				beiscsi_log(phba, KERN_INFO,
 BEISCSI_LOG_INIT,
-					    "BM", "hwi_init_async_pdu_ctx
 HWI_MEM_ASYNC_DATA_RING_ULP%d va=%p\n",
-					    ulp_num,
-					    mem_descr->mem_array[0].
-					    virtual_address);

drivers/scsi/be2iscsi/be_main.c static int hwi_init_async_pdu_ctx(struct · line 3053

Quoted 10 lines
drivers/scsi/be2iscsi/be_main.c +5 -3
+				beiscsi_info(phba, BEISCSI_LOG_INIT,
+					     "hwi_init_async_pdu_ctx
 HWI_MEM_ASYNC_DATA_RING_ULP%d va=%p\n",
+					     ulp_num,
+					     mem_descr->mem_array[0].
+					     virtual_address);
 			} else
-				beiscsi_log(phba, KERN_WARNING,
-					    BEISCSI_LOG_INIT,
-					    "BM", "No Virtual address for

ULP :

drivers/scsi/be2iscsi/be_main.c static int hwi_init_async_pdu_ctx(struct beiscsi_hba *phba)

Quoted 4 lines

%d\n",

drivers/scsi/be2iscsi/be_main.c +2 -1
-					    ulp_num);
+				beiscsi_warn(phba, BEISCSI_LOG_INIT,
+					     "No Virtual address for ULP :

%d\n",

drivers/scsi/be2iscsi/be_main.c static int hwi_init_async_pdu_ctx(struct

Quoted 5 lines
drivers/scsi/be2iscsi/be_main.c +1 -0
+					     ulp_num);
 
 			pasync_ctx->async_data.ring_base =
 				mem_descr->mem_array[0].virtual_address;
@@ -3056,10 +3034,9 @@ static int hwi_init_async_pdu_ctx(struct

beiscsi_hba

drivers/scsi/be2iscsi/be_main.c static int hwi_init_async_pdu_ctx(struct beiscsi_hba *phba)

Quoted 8 lines
drivers/scsi/be2iscsi/be_main.c +0 -0
 *phba)
 			mem_descr +=

HWI_MEM_ASYNC_DATA_HANDLE_ULP0 +

drivers/scsi/be2iscsi/be_main.c +0 -3
 				     (ulp_num * MEM_DESCR_OFFSET);
 			if (!mem_descr->mem_array[0].virtual_address)
-				beiscsi_log(phba, KERN_WARNING,
-					    BEISCSI_LOG_INIT,
-					    "BM", "No Virtual address for

ULP :

drivers/scsi/be2iscsi/be_main.c static int hwi_init_async_pdu_ctx(struct beiscsi_hba *phba)

Quoted 4 lines

%d\n",

drivers/scsi/be2iscsi/be_main.c +2 -1
-					    ulp_num);
+				beiscsi_warn(phba, BEISCSI_LOG_INIT,
+					     "No Virtual address for ULP :

%d\n",

Quoted 16 lines
drivers/scsi/be2iscsi/be_main.c +1 -5
+					     ulp_num);
 
 			pasync_ctx->async_data.handle_base =
 				mem_descr->mem_array[0].virtual_address;
@@ -3077,16 +3054,15 @@ static int hwi_init_async_pdu_ctx(struct
 beiscsi_hba *phba)
 			mem_descr += HWI_MEM_ASYNC_DATA_BUF_ULP0 +
 				     (ulp_num * MEM_DESCR_OFFSET);
 			if (mem_descr->mem_array[0].virtual_address) {
-				beiscsi_log(phba, KERN_INFO,
 BEISCSI_LOG_INIT,
-					    "BM", "hwi_init_async_pdu_ctx
 HWI_MEM_ASYNC_DATA_BUF_ULP%d va=%p\n",
-					    ulp_num,
-					    mem_descr->mem_array[0].
-					    virtual_address);

drivers/scsi/be2iscsi/be_main.c static int hwi_init_async_pdu_ctx(struct · line 3092

Quoted 10 lines
drivers/scsi/be2iscsi/be_main.c +5 -3
+				beiscsi_info(phba, BEISCSI_LOG_INIT,
+					     "hwi_init_async_pdu_ctx
 HWI_MEM_ASYNC_DATA_BUF_ULP%d va=%p\n",
+					     ulp_num,
+					     mem_descr->mem_array[0].
+					     virtual_address);
 			} else
-				beiscsi_log(phba, KERN_WARNING,
-					    BEISCSI_LOG_INIT,
-					    "BM", "No Virtual address for

ULP :

drivers/scsi/be2iscsi/be_main.c static int hwi_init_async_pdu_ctx(struct beiscsi_hba *phba)

Quoted 4 lines

%d\n",

drivers/scsi/be2iscsi/be_main.c +2 -1
-					    ulp_num);
+				beiscsi_warn(phba, BEISCSI_LOG_INIT,
+					     "No Virtual address for ULP :

%d\n",

drivers/scsi/be2iscsi/be_main.c static int beiscsi_create_eqs(struct beiscsi_hba · line 3250

Quoted 8 lines
drivers/scsi/be2iscsi/be_main.c +1 -0
+					     ulp_num);
 
 			idx = 0;
 			pasync_ctx->async_data.va_base =
@@ -3272,8 +3248,8 @@ static int beiscsi_create_eqs(struct beiscsi_hba
 *phba,
 		ret = be_fill_queue(eq, phba->params.num_eq_entries,
 				    sizeof(struct be_eq_entry),

eq_vaddress);

drivers/scsi/be2iscsi/be_main.c static int beiscsi_init_irqs(struct beiscsi_hba *phba)

Quoted 3 lines
drivers/scsi/be2iscsi/be_main.c +0 -2
 		if (ret) {
-			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-				    "BM", "be_fill_queue Failed for

EQ\n");

drivers/scsi/be2iscsi/be_main.c static int beiscsi_create_eqs(struct beiscsi_hba · line 3286

Quoted 12 lines
drivers/scsi/be2iscsi/be_main.c +2 -2
+			beiscsi_err(phba, BEISCSI_LOG_INIT,
+				    "be_fill_queue Failed for EQ\n");
 			goto create_eq_error;
 		}
@@ -3281,14 +3257,14 @@ static int beiscsi_create_eqs(struct beiscsi_hba
 *phba,
 		ret = beiscsi_cmd_eq_create(&phba->ctrl, eq,
 					    phwi_context->cur_eqd);
 		if (ret) {
-			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-				    "BM", "beiscsi_cmd_eq_create Failed

for

drivers/scsi/be2iscsi/be_main.c static int beiscsi_create_eqs(struct beiscsi_hba · line 3263

Quoted 3 lines
drivers/scsi/be2iscsi/be_main.c +2 -0
 EQ\n");
+			beiscsi_err(phba, BEISCSI_LOG_INIT,
+				    "beiscsi_cmd_eq_create Failed for

EQ\n");

drivers/scsi/be2iscsi/be_main.c static int beiscsi_create_cqs(struct beiscsi_hba

Quoted 13 lines
drivers/scsi/be2iscsi/be_main.c +3 -3
 			goto create_eq_error;
 		}
 
-		beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-			    "BM", "eqid = %d\n",
-			    phwi_context->be_eq[i].q.id);
+		beiscsi_info(phba, BEISCSI_LOG_INIT,
+			     "eqid = %d\n",
+			     phwi_context->be_eq[i].q.id);
 	}
drivers/scsi/be2iscsi/be_main.c +0 -0
 	return 0;
@@ -3336,8 +3312,8 @@ static int beiscsi_create_cqs(struct beiscsi_hba

*phba,

drivers/scsi/be2iscsi/be_main.c static int beiscsi_create_cqs(struct beiscsi_hba *phba,

Quoted 5 lines
drivers/scsi/be2iscsi/be_main.c +0 -2
 		ret = be_fill_queue(cq, phba->params.num_cq_entries,
 				    sizeof(struct sol_cqe), cq_vaddress);
 		if (ret) {
-			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-				    "BM", "be_fill_queue Failed for ISCSI

CQ\n");

drivers/scsi/be2iscsi/be_main.c static int beiscsi_create_cqs(struct beiscsi_hba · line 3316

Quoted 2 lines
drivers/scsi/be2iscsi/be_main.c +2 -0
+			beiscsi_err(phba, BEISCSI_LOG_INIT,
+				    "be_fill_queue Failed for ISCSI

CQ\n");

drivers/scsi/be2iscsi/be_main.c static int beiscsi_create_cqs(struct beiscsi_hba · line 3350

Quoted 10 lines
drivers/scsi/be2iscsi/be_main.c +0 -2
 			goto create_cq_error;
 		}
 
@@ -3345,13 +3321,13 @@ static int beiscsi_create_cqs(struct beiscsi_hba
 *phba,
 		ret = beiscsi_cmd_cq_create(&phba->ctrl, cq, eq, false,
 					    false, 0);
 		if (ret) {
-			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-				    "BM", "beiscsi_cmd_eq_create Failed

for

drivers/scsi/be2iscsi/be_main.c static int beiscsi_create_cqs(struct beiscsi_hba · line 3327

Quoted 3 lines
drivers/scsi/be2iscsi/be_main.c +2 -0
 ISCSI CQ\n");
+			beiscsi_err(phba, BEISCSI_LOG_INIT,
+				    "beiscsi_cmd_eq_create Failed for

ISCSI

Quoted 13 lines
drivers/scsi/be2iscsi/be_main.c +3 -3
 CQ\n");
 			goto create_cq_error;
 		}
-		beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-			    "BM", "iscsi cq_id is %d for eq_id %d\n"
-			    "iSCSI CQ CREATED\n", cq->id, eq->id);
+		beiscsi_info(phba, BEISCSI_LOG_INIT,
+			     "iscsi cq_id is %d for eq_id %d\n"
+			     "iSCSI CQ CREATED\n", cq->id, eq->id);
drivers/scsi/be2iscsi/be_main.c +0 -0
 	}
 	return 0;

drivers/scsi/be2iscsi/be_main.c beiscsi_create_def_hdr(struct beiscsi_hba *phba, · line 3397

Quoted 5 lines
drivers/scsi/be2iscsi/be_main.c +0 -2
@@ -3393,8 +3369,8 @@ beiscsi_create_def_hdr(struct beiscsi_hba *phba,
 			    sizeof(struct phys_addr),
 			    sizeof(struct phys_addr), dq_vaddress);
 	if (ret) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM", "be_fill_queue Failed for DEF PDU HDR on

ULP

Quoted 34 lines
drivers/scsi/be2iscsi/be_main.c +2 -0
 : %d\n",
+		beiscsi_err(phba, BEISCSI_LOG_INIT,
+			    "be_fill_queue Failed for DEF PDU HDR on ULP :
 %d\n",
 			    ulp_num);
drivers/scsi/be2iscsi/be_main.c +6 -6
 		return ret;
@@ -3406,17 +3382,17 @@ beiscsi_create_def_hdr(struct beiscsi_hba *phba,
 					      phba->params.defpdu_hdr_sz,
 					      BEISCSI_DEFQ_HDR, ulp_num);
 	if (ret) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM", "be_cmd_create_default_pdu_queue Failed
 DEFHDR on ULP : %d\n",
+		beiscsi_err(phba, BEISCSI_LOG_INIT,
+			    "be_cmd_create_default_pdu_queue Failed DEFHDR
 on ULP : %d\n",
 			    ulp_num);
 
 		return ret;
 	}
 
-	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-		    "BM", "iscsi hdr def pdu id for ULP : %d is %d\n",
-		    ulp_num,
-		    phwi_context->be_def_hdrq[ulp_num].id);
+	beiscsi_info(phba, BEISCSI_LOG_INIT,
+		     "iscsi hdr def pdu id for ULP : %d is %d\n",
+		     ulp_num,
+		     phwi_context->be_def_hdrq[ulp_num].id);
 	hwi_post_async_buffers(phba, BEISCSI_DEFQ_HDR, ulp_num);
drivers/scsi/be2iscsi/be_main.c +0 -0
 	return 0;
 }

drivers/scsi/be2iscsi/be_main.c beiscsi_create_def_data(struct beiscsi_hba *phba, · line 3450

Quoted 5 lines
drivers/scsi/be2iscsi/be_main.c +0 -2
@@ -3446,8 +3422,8 @@ beiscsi_create_def_data(struct beiscsi_hba *phba,
 			    sizeof(struct phys_addr),
 			    sizeof(struct phys_addr), dq_vaddress);
 	if (ret) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM", "be_fill_queue Failed for DEF PDU DATA

on

drivers/scsi/be2iscsi/be_main.c beiscsi_create_def_data(struct beiscsi_hba *phba, · line 3427

Quoted 3 lines
drivers/scsi/be2iscsi/be_main.c +2 -0
 ULP : %d\n",
+		beiscsi_err(phba, BEISCSI_LOG_INIT,
+			    "be_fill_queue Failed for DEF PDU DATA on ULP

:

drivers/scsi/be2iscsi/be_main.c beiscsi_create_def_data(struct beiscsi_hba

Quoted 5 lines
drivers/scsi/be2iscsi/be_main.c +0 -0
 %d\n",
 			    ulp_num);
drivers/scsi/be2iscsi/be_main.c +0 -0
 		return ret;
@@ -3459,21 +3435,21 @@ beiscsi_create_def_data(struct beiscsi_hba

*phba,

drivers/scsi/be2iscsi/be_main.c beiscsi_create_def_data(struct beiscsi_hba *phba,

Quoted 8 lines
drivers/scsi/be2iscsi/be_main.c +2 -2
 					      phba->params.defpdu_data_sz,
 					      BEISCSI_DEFQ_DATA, ulp_num);
 	if (ret) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM", "be_cmd_create_default_pdu_queue Failed
 for DEF PDU DATA on ULP : %d\n",
+		beiscsi_err(phba, BEISCSI_LOG_INIT,
+			    "be_cmd_create_default_pdu_queue Failed for

DEF

Quoted 25 lines
drivers/scsi/be2iscsi/be_main.c +7 -7
 PDU DATA on ULP : %d\n",
 			    ulp_num);
 		return ret;
 	}
 
-	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-		    "BM", "iscsi def data id on ULP : %d is  %d\n",
-		    ulp_num,
-		    phwi_context->be_def_dataq[ulp_num].id);
+	beiscsi_info(phba, BEISCSI_LOG_INIT,
+		     "iscsi def data id on ULP : %d is  %d\n",
+		     ulp_num,
+		     phwi_context->be_def_dataq[ulp_num].id);
 
 	hwi_post_async_buffers(phba, BEISCSI_DEFQ_DATA, ulp_num);
-	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-		    "BM", "DEFAULT PDU DATA RING CREATED on ULP : %d\n",
-		    ulp_num);
+	beiscsi_info(phba, BEISCSI_LOG_INIT,
+		     "DEFAULT PDU DATA RING CREATED on ULP : %d\n",
+		     ulp_num);
 
drivers/scsi/be2iscsi/be_main.c +0 -0
 	return 0;
 }

drivers/scsi/be2iscsi/be_main.c beiscsi_post_template_hdr(struct beiscsi_hba · line 3505

Quoted 7 lines
drivers/scsi/be2iscsi/be_main.c +0 -2
@@ -3499,15 +3475,15 @@ beiscsi_post_template_hdr(struct beiscsi_hba
 *phba)
 				 &phba->ctrl, &sgl);
 
 			if (status != 0) {
-				beiscsi_log(phba, KERN_ERR,
 BEISCSI_LOG_INIT,
-					    "BM", "Post Template HDR

Failed for

Quoted 20 lines
drivers/scsi/be2iscsi/be_main.c +2 -2
 ULP_%d\n",
+				beiscsi_err(phba, BEISCSI_LOG_INIT,
+					    "Post Template HDR Failed for
 ULP_%d\n",
 					    ulp_num);
 				return status;
 			}
 
-			beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-				    "BM", "Template HDR Pages Posted for

ULP_%d\n",

drivers/scsi/be2iscsi/be_main.c +2 -1
-				    ulp_num);
+			beiscsi_info(phba, BEISCSI_LOG_INIT,
+				     "Template HDR Pages Posted for

ULP_%d\n",

drivers/scsi/be2iscsi/be_main.c +1 -0
+				     ulp_num);
 		}
 	}
 	return 0;

drivers/scsi/be2iscsi/be_main.c beiscsi_post_pages(struct beiscsi_hba *phba) · line 3515

Quoted 1 line
drivers/scsi/be2iscsi/be_main.c +0 -0
@@ -3539,14 +3515,14 @@ beiscsi_post_pages(struct beiscsi_hba *phba)
 						(pm_arr->size /

PAGE_SIZE));

Quoted 18 lines
drivers/scsi/be2iscsi/be_main.c +4 -4
 		page_offset += pm_arr->size / PAGE_SIZE;
 		if (status != 0) {
-			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-				    "BM", "post sgl failed.\n");
+			beiscsi_err(phba, BEISCSI_LOG_INIT,
+				    "post sgl failed.\n");
 			return status;
 		}
 		pm_arr++;
 	}
-	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-		    "BM", "POSTED PAGES\n");
+	beiscsi_info(phba, BEISCSI_LOG_INIT,
+		     "POSTED PAGES\n");
 	return 0;
 }
 

drivers/scsi/be2iscsi/be_main.c beiscsi_create_wrb_rings(struct beiscsi_hba *phba, · line 3602

Quoted 5 lines
drivers/scsi/be2iscsi/be_main.c +0 -2
@@ -3598,8 +3574,8 @@ beiscsi_create_wrb_rings(struct beiscsi_hba *phba,
 	pwrb_arr = kmalloc(sizeof(*pwrb_arr) * phba->params.cxns_per_ctrl,
 			   GFP_KERNEL);
 	if (!pwrb_arr) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM", "Memory alloc failed in create wrb

ring.\n");

drivers/scsi/be2iscsi/be_main.c static int hwi_init_port(struct beiscsi_hba

Quoted 28 lines
drivers/scsi/be2iscsi/be_main.c +6 -4
+		beiscsi_err(phba, BEISCSI_LOG_INIT,
+			    "Memory alloc failed in create wrb ring.\n");
 		return -ENOMEM;
 	}
 	wrb_vaddr = mem_descr->mem_array[idx].virtual_address;
@@ -3666,8 +3642,8 @@ beiscsi_create_wrb_rings(struct beiscsi_hba *phba,
 					    &phwi_ctrlr->wrb_context[i],
 					    ulp_base_num);
 		if (status != 0) {
-			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-				    "BM", "wrbq create failed.\n");
+			beiscsi_err(phba, BEISCSI_LOG_INIT,
+				    "wrbq create failed.\n");
 			kfree(pwrb_arr);
 			return status;
 		}
@@ -3872,8 +3848,8 @@ static int hwi_init_port(struct beiscsi_hba *phba)
 
 	status = beiscsi_create_eqs(phba, phwi_context);
 	if (status != 0) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM", "EQ not created\n");
+		beiscsi_err(phba, BEISCSI_LOG_INIT,
+			    "EQ not created\n");
 		goto error;
 	}
 
@@ -3883,15 +3859,15 @@ static int hwi_init_port(struct beiscsi_hba

*phba)

Quoted 20 lines
drivers/scsi/be2iscsi/be_main.c +4 -4
 	status = mgmt_check_supported_fw(ctrl, phba);
 	if (status != 0) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM", "Unsupported fw version\n");
+		beiscsi_err(phba, BEISCSI_LOG_INIT,
+			    "Unsupported fw version\n");
 		goto error;
 	}
 
 	status = beiscsi_create_cqs(phba, phwi_context);
 	if (status != 0) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM", "CQ not created\n");
+		beiscsi_err(phba, BEISCSI_LOG_INIT,
+			    "CQ not created\n");
 		goto error;
 	}
 

drivers/scsi/be2iscsi/be_main.c static int hwi_init_port(struct beiscsi_hba *phba) · line 3912

Quoted 6 lines
drivers/scsi/be2iscsi/be_main.c +0 -2
@@ -3907,8 +3883,8 @@ static int hwi_init_port(struct beiscsi_hba *phba)
 							def_pdu_ring_sz,
 							ulp_num);
 			if (status != 0) {
-				beiscsi_log(phba, KERN_ERR,
 BEISCSI_LOG_INIT,
-					    "BM", "Default Header not

created

drivers/scsi/be2iscsi/be_main.c static int hwi_init_port(struct beiscsi_hba *phba) · line 3889

Quoted 3 lines
drivers/scsi/be2iscsi/be_main.c +2 -0
 for ULP : %d\n",
+				beiscsi_err(phba, BEISCSI_LOG_INIT,
+					    "Default Header not created

for ULP

drivers/scsi/be2iscsi/be_main.c static int hwi_init_port(struct beiscsi_hba *phba) · line 3923

Quoted 11 lines
drivers/scsi/be2iscsi/be_main.c +0 -0
 : %d\n",
drivers/scsi/be2iscsi/be_main.c +0 -2
 					    ulp_num);
 				goto error;
 			}
@@ -3918,8 +3894,8 @@ static int hwi_init_port(struct beiscsi_hba *phba)
 							 def_pdu_ring_sz,
 							 ulp_num);
 			if (status != 0) {
-				beiscsi_log(phba, KERN_ERR,
 BEISCSI_LOG_INIT,
-					    "BM", "Default Data not

created for

drivers/scsi/be2iscsi/be_main.c static int hwi_init_port(struct beiscsi_hba *phba) · line 3900

Quoted 3 lines
drivers/scsi/be2iscsi/be_main.c +2 -0
 ULP : %d\n",
+				beiscsi_err(phba, BEISCSI_LOG_INIT,
+					    "Default Data not created for

ULP :

drivers/scsi/be2iscsi/be_main.c static int hwi_init_port(struct beiscsi_hba

Quoted 5 lines
drivers/scsi/be2iscsi/be_main.c +0 -0
 %d\n",
drivers/scsi/be2iscsi/be_main.c +0 -0
 					    ulp_num);
 				goto error;
 			}
@@ -3928,21 +3904,21 @@ static int hwi_init_port(struct beiscsi_hba

*phba)

Quoted 4 lines
drivers/scsi/be2iscsi/be_main.c +0 -1
 	status = beiscsi_post_pages(phba);
 	if (status != 0) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,

drivers/scsi/be2iscsi/be_main.c static int hwi_init_port(struct beiscsi_hba *phba)

Quoted 10 lines
drivers/scsi/be2iscsi/be_main.c +2 -3
-			    "BM", "Post SGL Pages Failed\n");
+		beiscsi_err(phba, BEISCSI_LOG_INIT,
+			    "Post SGL Pages Failed\n");
 		goto error;
 	}
 
 	status = beiscsi_post_template_hdr(phba);
 	if (status != 0) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM", "Template HDR Posting for CXN

Failed\n");

drivers/scsi/be2iscsi/be_main.c static int hwi_init_port(struct beiscsi_hba

Quoted 14 lines
drivers/scsi/be2iscsi/be_main.c +4 -2
+		beiscsi_err(phba, BEISCSI_LOG_INIT,
+			    "Template HDR Posting for CXN Failed\n");
 	}
 
 	status = beiscsi_create_wrb_rings(phba,	phwi_context, phwi_ctrlr);
 	if (status != 0) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM", "WRB Rings not created\n");
+		beiscsi_err(phba, BEISCSI_LOG_INIT,
+			    "WRB Rings not created\n");
 		goto error;
 	}
 
@@ -3966,13 +3942,13 @@ static int hwi_init_port(struct beiscsi_hba

*phba)

drivers/scsi/be2iscsi/be_main.c static int hwi_init_controller(struct

Quoted 18 lines
drivers/scsi/be2iscsi/be_main.c +4 -4
 		}
 	}
 
-	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-		    "BM", "hwi_init_port success\n");
+	beiscsi_info(phba, BEISCSI_LOG_INIT,
+		     "hwi_init_port success\n");
 	return 0;
 
 error:
-	beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-		    "BM", "hwi_init_port failed\n");
+	beiscsi_err(phba, BEISCSI_LOG_INIT,
+		    "hwi_init_port failed\n");
 	hwi_cleanup(phba);
 	return status;
 }
@@ -3985,12 +3961,12 @@ static int hwi_init_controller(struct

beiscsi_hba

drivers/scsi/be2iscsi/be_main.c static int hwi_init_controller(struct · line 3963

Quoted 3 lines
drivers/scsi/be2iscsi/be_main.c +0 -0
 *phba)
 	if (1 == phba->init_mem[HWI_MEM_ADDN_CONTEXT].num_elements) {
 		phwi_ctrlr->phwi_ctxt = (struct hwi_context_memory

*)phba->

drivers/scsi/be2iscsi/be_main.c static int hwi_init_controller(struct

Quoted 19 lines
drivers/scsi/be2iscsi/be_main.c +5 -5
 init_mem[HWI_MEM_ADDN_CONTEXT].mem_array[0].virtual_address;
-		beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-			    "BM", "phwi_ctrlr->phwi_ctxt=%p\n",
-			    phwi_ctrlr->phwi_ctxt);
+		beiscsi_info(phba, BEISCSI_LOG_INIT,
+			     "phwi_ctrlr->phwi_ctxt=%p\n",
+			     phwi_ctrlr->phwi_ctxt);
 	} else {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM", "HWI_MEM_ADDN_CONTEXT is more than
 one element.Failing to load\n");
+		beiscsi_err(phba, BEISCSI_LOG_INIT,
+			    "HWI_MEM_ADDN_CONTEXT is more than one
 element.Failing to load\n");
drivers/scsi/be2iscsi/be_main.c +0 -0
 		return -ENOMEM;
 	}
@@ -3999,14 +3975,14 @@ static int hwi_init_controller(struct

beiscsi_hba

drivers/scsi/be2iscsi/be_main.c static int beiscsi_init_controller(struct

Quoted 20 lines
drivers/scsi/be2iscsi/be_main.c +4 -4
 *phba)
 		return -ENOMEM;
 
 	if (hwi_init_async_pdu_ctx(phba)) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM", "hwi_init_async_pdu_ctx failed\n");
+		beiscsi_err(phba, BEISCSI_LOG_INIT,
+			    "hwi_init_async_pdu_ctx failed\n");
 		return -ENOMEM;
 	}
 
 	if (hwi_init_port(phba) != 0) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM", "hwi_init_controller failed\n");
+		beiscsi_err(phba, BEISCSI_LOG_INIT,
+			    "hwi_init_controller failed\n");
 
 		return -ENOMEM;
drivers/scsi/be2iscsi/be_main.c +0 -0
 	}
@@ -4044,16 +4020,16 @@ static int beiscsi_init_controller(struct

beiscsi_hba

Quoted 8 lines
drivers/scsi/be2iscsi/be_main.c +1 -2
 *phba)
 
 	ret = beiscsi_get_memory(phba);
 	if (ret < 0) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM", "beiscsi_dev_probe -Failed in
 beiscsi_alloc_memory\n");
+		beiscsi_err(phba, BEISCSI_LOG_INIT,

drivers/scsi/be2iscsi/be_main.c static int beiscsi_init_controller(struct beiscsi_hba *phba)

Quoted 10 lines
drivers/scsi/be2iscsi/be_main.c +1 -2
+			    "beiscsi_dev_probe -Failed in
 beiscsi_alloc_memory\n");
 		return ret;
 	}
 
 	ret = hwi_init_controller(phba);
 	if (ret)
 		goto free_init;
-	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-		    "BM", "Return success from

beiscsi_init_controller\n");

drivers/scsi/be2iscsi/be_main.c static int beiscsi_init_sgl_handle(struct

Quoted 6 lines
drivers/scsi/be2iscsi/be_main.c +2 -0
+	beiscsi_info(phba, BEISCSI_LOG_INIT,
+		     "Return success from beiscsi_init_controller\n");
drivers/scsi/be2iscsi/be_main.c +0 -0
 	return 0;
@@ -4080,8 +4056,8 @@ static int beiscsi_init_sgl_handle(struct

beiscsi_hba

drivers/scsi/be2iscsi/be_main.c static int beiscsi_init_sgl_handle(struct · line 4057

Quoted 2 lines
drivers/scsi/be2iscsi/be_main.c +0 -0
 *phba)
 

phba->params.ios_per_ctrl,

drivers/scsi/be2iscsi/be_main.c static int beiscsi_init_sgl_handle(struct beiscsi_hba *phba)

Quoted 4 lines
drivers/scsi/be2iscsi/be_main.c +0 -2
 						 GFP_KERNEL);
 		if (!phba->io_sgl_hndl_base) {
-			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-				    "BM", "Mem Alloc Failed. Failing to

load\n");

drivers/scsi/be2iscsi/be_main.c static int beiscsi_init_sgl_handle(struct · line 4061

Quoted 2 lines
drivers/scsi/be2iscsi/be_main.c +2 -0
+			beiscsi_err(phba, BEISCSI_LOG_INIT,
+				    "Mem Alloc Failed. Failing to

load\n");

Quoted 3 lines
drivers/scsi/be2iscsi/be_main.c +0 -0
 			return -ENOMEM;
 		}

phba->eh_sgl_hndl_base = kzalloc(sizeof(struct sgl_handle

*) *

drivers/scsi/be2iscsi/be_main.c static int beiscsi_init_sgl_handle(struct

Quoted 1 line
drivers/scsi/be2iscsi/be_main.c +0 -0
@@ -4090,13 +4066,13 @@ static int beiscsi_init_sgl_handle(struct

beiscsi_hba

drivers/scsi/be2iscsi/be_main.c static int beiscsi_init_sgl_handle(struct beiscsi_hba *phba)

Quoted 6 lines
drivers/scsi/be2iscsi/be_main.c +0 -2
 *phba)
 						 GFP_KERNEL);
 		if (!phba->eh_sgl_hndl_base) {
 			kfree(phba->io_sgl_hndl_base);
-			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-				    "BM", "Mem Alloc Failed. Failing to

load\n");

drivers/scsi/be2iscsi/be_main.c static int beiscsi_init_sgl_handle(struct · line 4071

Quoted 2 lines
drivers/scsi/be2iscsi/be_main.c +2 -0
+			beiscsi_err(phba, BEISCSI_LOG_INIT,
+				    "Mem Alloc Failed. Failing to

load\n");

drivers/scsi/be2iscsi/be_main.c static int beiscsi_init_sgl_handle(struct beiscsi_hba *phba)

Quoted 8 lines
drivers/scsi/be2iscsi/be_main.c +2 -2
 			return -ENOMEM;
 		}
 	} else {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM", "HWI_MEM_SGLH is more than one element.
 Failing to load\n");
+		beiscsi_err(phba, BEISCSI_LOG_INIT,
+			    "HWI_MEM_SGLH is more than one element.

Failing

drivers/scsi/be2iscsi/be_main.c static int beiscsi_init_sgl_handle(struct

Quoted 5 lines
drivers/scsi/be2iscsi/be_main.c +0 -0
 to load\n");
drivers/scsi/be2iscsi/be_main.c +0 -0
 		return -ENOMEM;
 	}
@@ -4122,16 +4098,16 @@ static int beiscsi_init_sgl_handle(struct

beiscsi_hba

Quoted 27 lines
drivers/scsi/be2iscsi/be_main.c +7 -7
 *phba)
 		}
 		idx++;
 	}
-	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-		    "BM", "phba->io_sgl_hndl_avbl=%d phba-
 >eh_sgl_hndl_avbl=%d\n",
-		    phba->io_sgl_hndl_avbl,
-		    phba->eh_sgl_hndl_avbl);
+	beiscsi_info(phba, BEISCSI_LOG_INIT,
+		     "phba->io_sgl_hndl_avbl=%d phba-
 >eh_sgl_hndl_avbl=%d\n",
+		     phba->io_sgl_hndl_avbl,
+		     phba->eh_sgl_hndl_avbl);
 
 	mem_descr_sg = phba->init_mem;
 	mem_descr_sg += HWI_MEM_SGE;
-	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-		    "BM", "mem_descr_sg->num_elements=%d\n",
-		    mem_descr_sg->num_elements);
+	beiscsi_info(phba, BEISCSI_LOG_INIT,
+		     "mem_descr_sg->num_elements=%d\n",
+		     mem_descr_sg->num_elements);
drivers/scsi/be2iscsi/be_main.c +0 -0
 	for (ulp_num = 0; ulp_num < BEISCSI_ULP_COUNT; ulp_num++)
 		if (test_bit(ulp_num, &phba->fw_config.ulp_supported))

drivers/scsi/be2iscsi/be_main.c static int hba_setup_cid_tbls(struct beiscsi_hba · line 4186

Quoted 7 lines
drivers/scsi/be2iscsi/be_main.c +0 -2
@@ -4180,8 +4156,8 @@ static int hba_setup_cid_tbls(struct beiscsi_hba
 *phba)
 					       GFP_KERNEL);
 
 			if (!ptr_cid_info) {
-				beiscsi_log(phba, KERN_ERR,
 BEISCSI_LOG_INIT,
-					    "BM", "Failed to allocate

memory for

Quoted 8 lines
drivers/scsi/be2iscsi/be_main.c +2 -0
 ULP_CID_INFO for ULP : %d\n",
+				beiscsi_err(phba, BEISCSI_LOG_INIT,
+					    "Failed to allocate memory for

ULP_CID_INFO for ULP : %d\n",

drivers/scsi/be2iscsi/be_main.c +0 -0
 					    ulp_num);
 				ret = -ENOMEM;
 				goto free_memory;

drivers/scsi/be2iscsi/be_main.c static int hba_setup_cid_tbls(struct beiscsi_hba · line 4200

Quoted 8 lines
drivers/scsi/be2iscsi/be_main.c +0 -2
@@ -4193,8 +4169,8 @@ static int hba_setup_cid_tbls(struct beiscsi_hba
 *phba)
 
 BEISCSI_GET_CID_COUNT(phba,
 						  ulp_num), GFP_KERNEL);
 			if (!ptr_cid_info->cid_array) {
-				beiscsi_log(phba, KERN_ERR,
 BEISCSI_LOG_INIT,
-					    "BM", "Failed to allocate

memory for

Quoted 22 lines

CID_ARRAY for ULP : %d\n",

drivers/scsi/be2iscsi/be_main.c +2 -0
+				beiscsi_err(phba, BEISCSI_LOG_INIT,
+					    "Failed to allocate memory for

CID_ARRAY for ULP : %d\n",

drivers/scsi/be2iscsi/be_main.c +2 -2
 					    ulp_num);
 				kfree(ptr_cid_info);
 				ptr_cid_info = NULL;
@@ -4212,8 +4188,8 @@ static int hba_setup_cid_tbls(struct beiscsi_hba
 *phba)
 	phba->ep_array = kzalloc(sizeof(struct iscsi_endpoint *) *
 				 phba->params.cxns_per_ctrl, GFP_KERNEL);
 	if (!phba->ep_array) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM", "Failed to allocate memory in
 hba_setup_cid_tbls\n");
+		beiscsi_err(phba, BEISCSI_LOG_INIT,
+			    "Failed to allocate memory in
 hba_setup_cid_tbls\n");
drivers/scsi/be2iscsi/be_main.c +0 -0
 		ret = -ENOMEM;
 
 		goto free_memory;

drivers/scsi/be2iscsi/be_main.c static int hba_setup_cid_tbls(struct beiscsi_hba · line 4200

Quoted 3 lines
drivers/scsi/be2iscsi/be_main.c +0 -0
@@ -4222,8 +4198,8 @@ static int hba_setup_cid_tbls(struct beiscsi_hba
 *phba)
 	phba->conn_table = kzalloc(sizeof(struct beiscsi_conn *) *
 				   phba->params.cxns_per_ctrl,

GFP_KERNEL);

drivers/scsi/be2iscsi/be_main.c static void hwi_disable_intr(struct beiscsi_hba

Quoted 41 lines
drivers/scsi/be2iscsi/be_main.c +2 -2
 	if (!phba->conn_table) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM", "Failed to allocate memory in
 hba_setup_cid_tbls\n");
+		beiscsi_err(phba, BEISCSI_LOG_INIT,
+			    "Failed to allocate memory in
 hba_setup_cid_tbls\n");
drivers/scsi/be2iscsi/be_main.c +6 -6
 		kfree(phba->ep_array);
 		phba->ep_array = NULL;
@@ -4287,22 +4263,22 @@ static void hwi_enable_intr(struct beiscsi_hba
 *phba)
 	enabled = reg & MEMBAR_CTRL_INT_CTRL_HOSTINTR_MASK;
 	if (!enabled) {
 		reg |= MEMBAR_CTRL_INT_CTRL_HOSTINTR_MASK;
-		beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-			    "BM", "reg =x%08x addr=%p\n", reg, addr);
+		beiscsi_info(phba, BEISCSI_LOG_INIT,
+			     "reg =x%08x addr=%p\n", reg, addr);
 		iowrite32(reg, addr);
 	}
 
 	if (!phba->msix_enabled) {
 		eq = &phwi_context->be_eq[0].q;
-		beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-			    "BM", "eq->id=%d\n", eq->id);
+		beiscsi_info(phba, BEISCSI_LOG_INIT,
+			     "eq->id=%d\n", eq->id);
 
 		hwi_ring_eq_db(phba, eq->id, 0, 0, 1, 1);
 	} else {
 		for (i = 0; i <= phba->num_cpus; i++) {
 			eq = &phwi_context->be_eq[i].q;
-			beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-				    "BM", "eq->id=%d\n", eq->id);
+			beiscsi_info(phba, BEISCSI_LOG_INIT,
+				     "eq->id=%d\n", eq->id);
 			hwi_ring_eq_db(phba, eq->id, 0, 0, 1, 1);
 		}
drivers/scsi/be2iscsi/be_main.c +0 -0
 	}
@@ -4320,8 +4296,8 @@ static void hwi_disable_intr(struct beiscsi_hba

*phba)

drivers/scsi/be2iscsi/be_main.c static void hwi_disable_intr(struct beiscsi_hba *phba)

Quoted 5 lines
drivers/scsi/be2iscsi/be_main.c +0 -2
 		reg &= ~MEMBAR_CTRL_INT_CTRL_HOSTINTR_MASK;
 		iowrite32(reg, addr);
 	} else
-		beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_INIT,
-			    "BM", "In hwi_disable_intr, Already

Disabled\n");

drivers/scsi/be2iscsi/be_main.c static int beiscsi_get_boot_info(struct

Quoted 6 lines
drivers/scsi/be2iscsi/be_main.c +2 -0
+		beiscsi_warn(phba, BEISCSI_LOG_INIT,
+			     "In hwi_disable_intr, Already Disabled\n");
 }
 
 /**
@@ -4345,9 +4321,8 @@ static int beiscsi_get_boot_info(struct

beiscsi_hba

drivers/scsi/be2iscsi/be_main.c static int beiscsi_get_boot_info(struct

Quoted 13 lines
drivers/scsi/be2iscsi/be_main.c +2 -3
 *phba)
 	/* Get the session handle of the boot target */
 	ret = be_mgmt_get_boot_shandle(phba, &s_handle);
 	if (ret) {
-		beiscsi_log(phba, KERN_ERR,
-			    BEISCSI_LOG_INIT | BEISCSI_LOG_CONFIG,
-			    "BM", "No boot session\n");
+		beiscsi_err(phba, BEISCSI_LOG_INIT | BEISCSI_LOG_CONFIG,
+			    "No boot session\n");
 
 		if (ret == -ENXIO)
drivers/scsi/be2iscsi/be_main.c +0 -0
 			phba->get_boot = 0;
@@ -4360,9 +4335,8 @@ static int beiscsi_get_boot_info(struct

beiscsi_hba

drivers/scsi/be2iscsi/be_main.c static int beiscsi_get_boot_info(struct

Quoted 15 lines
drivers/scsi/be2iscsi/be_main.c +2 -3
 *phba)
 					      sizeof(*session_resp),
 					      &nonemb_cmd.dma);
 	if (nonemb_cmd.va == NULL) {
-		beiscsi_log(phba, KERN_ERR,
-			    BEISCSI_LOG_INIT | BEISCSI_LOG_CONFIG,
-			    "BM", "Failed to allocate memory for
 beiscsi_get_session_info\n");
+		beiscsi_err(phba, BEISCSI_LOG_INIT | BEISCSI_LOG_CONFIG,
+			    "Failed to allocate memory for
 beiscsi_get_session_info\n");
drivers/scsi/be2iscsi/be_main.c +0 -0
 		return -ENOMEM;
 	}
@@ -4370,18 +4344,16 @@ static int beiscsi_get_boot_info(struct

beiscsi_hba

Quoted 56 lines
drivers/scsi/be2iscsi/be_main.c +4 -6
 *phba)
 	tag = mgmt_get_session_info(phba, s_handle,
 				    &nonemb_cmd);
 	if (!tag) {
-		beiscsi_log(phba, KERN_ERR,
-			    BEISCSI_LOG_INIT | BEISCSI_LOG_CONFIG,
-			    "BM", "beiscsi_get_session_info Failed\n");
+		beiscsi_err(phba, BEISCSI_LOG_INIT | BEISCSI_LOG_CONFIG,
+			    "beiscsi_get_session_info Failed\n");
 
 		goto boot_freemem;
 	}
 
 	ret = beiscsi_mccq_compl_wait(phba, tag, NULL, &nonemb_cmd);
 	if (ret) {
-		beiscsi_log(phba, KERN_ERR,
-			    BEISCSI_LOG_INIT | BEISCSI_LOG_CONFIG,
-			    "BM", "beiscsi_get_session_info Failed\n");
+		beiscsi_err(phba, BEISCSI_LOG_INIT | BEISCSI_LOG_CONFIG,
+			    "beiscsi_get_session_info Failed\n");
 
 		if (ret != -EBUSY)
drivers/scsi/be2iscsi/be_main.c +6 -6
 			goto boot_freemem;
@@ -4471,20 +4443,20 @@ static int beiscsi_init_port(struct beiscsi_hba
 *phba)
 
 	ret = beiscsi_init_controller(phba);
 	if (ret < 0) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM", "beiscsi_dev_probe - Failed in
 beiscsi_init_controller\n");
+		beiscsi_err(phba, BEISCSI_LOG_INIT,
+			    "beiscsi_dev_probe - Failed in
 beiscsi_init_controller\n");
 		return ret;
 	}
 	ret = beiscsi_init_sgl_handle(phba);
 	if (ret < 0) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM", "beiscsi_dev_probe - Failed in
 beiscsi_init_sgl_handle\n");
+		beiscsi_err(phba, BEISCSI_LOG_INIT,
+			    "beiscsi_dev_probe - Failed in
 beiscsi_init_sgl_handle\n");
 		goto do_cleanup_ctrlr;
 	}
 
 	if (hba_setup_cid_tbls(phba)) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM", "Failed in hba_setup_cid_tbls\n");
+		beiscsi_err(phba, BEISCSI_LOG_INIT,
+			    "Failed in hba_setup_cid_tbls\n");
 		kfree(phba->io_sgl_hndl_base);
 		kfree(phba->eh_sgl_hndl_base);
 		goto do_cleanup_ctrlr;

drivers/scsi/be2iscsi/be_main.c static void beiscsi_clean_port(struct beiscsi_hba · line 4512

Quoted 2 lines
drivers/scsi/be2iscsi/be_main.c +0 -0
@@ -4539,10 +4511,9 @@ static void beiscsi_clean_port(struct beiscsi_hba
 *phba)
 		if (test_bit(ulp_num, (void

*)&phba->fw_config.ulp_supported))

drivers/scsi/be2iscsi/be_main.c static void beiscsi_clean_port(struct beiscsi_hba *phba)

Quoted 6 lines
drivers/scsi/be2iscsi/be_main.c +0 -3
 {
 			mgmt_status = mgmt_epfw_cleanup(phba, ulp_num);
 			if (mgmt_status)
-				beiscsi_log(phba, KERN_WARNING,
-					    BEISCSI_LOG_INIT,
-					    "BM", "mgmt_epfw_cleanup

FAILED

drivers/scsi/be2iscsi/be_main.c static int beiscsi_alloc_pdu(struct iscsi_task

Quoted 29 lines
drivers/scsi/be2iscsi/be_main.c +2 -1
 for ULP_%d\n",
-					    ulp_num);
+				beiscsi_warn(phba, BEISCSI_LOG_INIT,
+					     "mgmt_epfw_cleanup FAILED for

ULP_%d\n",

drivers/scsi/be2iscsi/be_main.c +5 -5
+					     ulp_num);
 		}
 	}
@@ -4711,11 +4682,10 @@ beiscsi_offload_connection(struct beiscsi_conn
 *beiscsi_conn,
 	 */
 	beiscsi_put_wrb_handle(pwrb_context, pwrb_handle,
 			       phba->params.wrbs_per_cxn);
-	beiscsi_log(phba, KERN_INFO,
-		    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-		    "BM", "put CONTEXT_UPDATE pwrb_handle=%p
 free_index=0x%x wrb_handles_available=%d\n",
-		    pwrb_handle, pwrb_context->free_index,
-		    pwrb_context->wrb_handles_available);
+	beiscsi_info(phba, BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
+		     "put CONTEXT_UPDATE pwrb_handle=%p free_index=0x%x
 wrb_handles_available=%d\n",
+		     pwrb_handle, pwrb_context->free_index,
+		     pwrb_context->wrb_handles_available);

}

static void beiscsi_parse_pdu(struct iscsi_conn *conn, itt_t itt,

drivers/scsi/be2iscsi/be_main.c +0 -0
@@ -4765,9 +4735,8 @@ static int beiscsi_alloc_pdu(struct iscsi_task

*task,

drivers/scsi/be2iscsi/be_main.c static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)

Quoted 7 lines
drivers/scsi/be2iscsi/be_main.c +0 -3
 uint8_t opcode)
 	if (task->sc) {
 		io_task->psgl_handle = alloc_io_sgl_handle(phba);
 		if (!io_task->psgl_handle) {
-			beiscsi_log(phba, KERN_ERR,
-				    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-				    "BM", "Alloc of IO_SGL_ICD Failed for

the

drivers/scsi/be2iscsi/be_main.c static int beiscsi_alloc_pdu(struct iscsi_task · line 4742

Quoted 4 lines
drivers/scsi/be2iscsi/be_main.c +2 -0
 CID : %d\n",
+			beiscsi_err(phba, BEISCSI_LOG_IO |
 BEISCSI_LOG_CONFIG,
+				    "Alloc of IO_SGL_ICD Failed for the

CID :

drivers/scsi/be2iscsi/be_main.c static int beiscsi_alloc_pdu(struct iscsi_task

Quoted 5 lines

%d\n",

drivers/scsi/be2iscsi/be_main.c +0 -0
 				    beiscsi_conn->beiscsi_conn_cid);
 			goto free_hndls;
 		}
@@ -4775,9 +4744,8 @@ static int beiscsi_alloc_pdu(struct iscsi_task

*task,

drivers/scsi/be2iscsi/be_main.c static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)

Quoted 7 lines
drivers/scsi/be2iscsi/be_main.c +0 -3
 uint8_t opcode)
 					beiscsi_conn->beiscsi_conn_cid,
 					&io_task->pwrb_context);
 		if (!io_task->pwrb_handle) {
-			beiscsi_log(phba, KERN_ERR,
-				    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-				    "BM", "Alloc of WRB_HANDLE Failed for

the

drivers/scsi/be2iscsi/be_main.c static int beiscsi_alloc_pdu(struct iscsi_task · line 4751

Quoted 4 lines
drivers/scsi/be2iscsi/be_main.c +2 -0
 CID : %d\n",
+			beiscsi_err(phba, BEISCSI_LOG_IO |
 BEISCSI_LOG_CONFIG,
+				    "Alloc of WRB_HANDLE Failed for the

CID :

drivers/scsi/be2iscsi/be_main.c static int beiscsi_alloc_pdu(struct iscsi_task

Quoted 5 lines

%d\n",

drivers/scsi/be2iscsi/be_main.c +0 -0
 				    beiscsi_conn->beiscsi_conn_cid);
 			goto free_io_hndls;
 		}
@@ -4789,10 +4757,10 @@ static int beiscsi_alloc_pdu(struct iscsi_task

*task,

drivers/scsi/be2iscsi/be_main.c static int beiscsi_alloc_pdu(struct iscsi_task · line 4758

Quoted 2 lines
drivers/scsi/be2iscsi/be_main.c +0 -0
 uint8_t opcode)
 				io_task->psgl_handle = (struct sgl_handle

*)

Quoted 1 line

alloc_mgmt_sgl_handle(phba);

drivers/scsi/be2iscsi/be_main.c static int beiscsi_alloc_pdu(struct iscsi_task

Quoted 13 lines
drivers/scsi/be2iscsi/be_main.c +1 -2
 				if (!io_task->psgl_handle) {
-					beiscsi_log(phba, KERN_ERR,
+					beiscsi_err(phba,
 						    BEISCSI_LOG_IO |
 						    BEISCSI_LOG_CONFIG,
-						    "BM", "Alloc of

MGMT_SGL_ICD Failed for the CID : %d\n",

drivers/scsi/be2iscsi/be_main.c +1 -0
+						    "Alloc of MGMT_SGL_ICD

Failed for the CID : %d\n",

drivers/scsi/be2iscsi/be_main.c +0 -0
 						    beiscsi_conn->
 						    beiscsi_conn_cid);
 					goto free_hndls;
@@ -4806,10 +4774,10 @@ static int beiscsi_alloc_pdu(struct iscsi_task

*task,

drivers/scsi/be2iscsi/be_main.c static int beiscsi_alloc_pdu(struct iscsi_task

Quoted 16 lines
drivers/scsi/be2iscsi/be_main.c +2 -2
 uint8_t opcode)
 					beiscsi_conn->beiscsi_conn_cid,
 					&io_task->pwrb_context);
 				if (!io_task->pwrb_handle) {
-					beiscsi_log(phba, KERN_ERR,
+					beiscsi_err(phba,
 						    BEISCSI_LOG_IO |
 						    BEISCSI_LOG_CONFIG,
-						    "BM", "Alloc of
 WRB_HANDLE Failed for the CID : %d\n",
+						    "Alloc of WRB_HANDLE
 Failed for the CID : %d\n",
drivers/scsi/be2iscsi/be_main.c +0 -0
 						    beiscsi_conn->
 						    beiscsi_conn_cid);
 					goto free_mgmt_hndls;
@@ -4826,12 +4794,10 @@ static int beiscsi_alloc_pdu(struct iscsi_task

*task,

drivers/scsi/be2iscsi/be_main.c static int beiscsi_alloc_pdu(struct iscsi_task · line 4796

Quoted 3 lines
drivers/scsi/be2iscsi/be_main.c +0 -0
 uint8_t opcode)
 		} else {
 			io_task->psgl_handle =

alloc_mgmt_sgl_handle(phba);

drivers/scsi/be2iscsi/be_main.c static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)

Quoted 12 lines
drivers/scsi/be2iscsi/be_main.c +3 -6
 			if (!io_task->psgl_handle) {
-				beiscsi_log(phba, KERN_ERR,
-					    BEISCSI_LOG_IO |
-					    BEISCSI_LOG_CONFIG,
-					    "BM", "Alloc of MGMT_SGL_ICD
 Failed for the CID : %d\n",
-					    beiscsi_conn->
-					    beiscsi_conn_cid);
+				beiscsi_err(phba,
+					    BEISCSI_LOG_IO |
 BEISCSI_LOG_CONFIG,
+					    "Alloc of MGMT_SGL_ICD Failed

for

Quoted 2 lines

the CID : %d\n",
+

beiscsi_conn->beiscsi_conn_cid);

drivers/scsi/be2iscsi/be_main.c static int beiscsi_alloc_pdu(struct iscsi_task

Quoted 4 lines
drivers/scsi/be2iscsi/be_main.c +0 -0
 				goto free_hndls;
 			}
 			io_task->pwrb_handle =
@@ -4839,9 +4805,9 @@ static int beiscsi_alloc_pdu(struct iscsi_task

*task,

drivers/scsi/be2iscsi/be_main.c static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)

Quoted 9 lines
drivers/scsi/be2iscsi/be_main.c +1 -2
 uint8_t opcode)
 					beiscsi_conn->beiscsi_conn_cid,
 					&io_task->pwrb_context);
 			if (!io_task->pwrb_handle) {
-				beiscsi_log(phba, KERN_ERR,
+				beiscsi_err(phba,
 					    BEISCSI_LOG_IO |
 BEISCSI_LOG_CONFIG,
-					    "BM", "Alloc of WRB_HANDLE

Failed

drivers/scsi/be2iscsi/be_main.c static int beiscsi_alloc_pdu(struct iscsi_task · line 4813

Quoted 2 lines
drivers/scsi/be2iscsi/be_main.c +1 -0
 for the CID : %d\n",
+					    "Alloc of WRB_HANDLE Failed

for

Quoted 2 lines

the CID : %d\n",

beiscsi_conn->beiscsi_conn_cid);

drivers/scsi/be2iscsi/be_main.c static int beiscsi_task_xmit(struct iscsi_task

Quoted 14 lines
drivers/scsi/be2iscsi/be_main.c +2 -2
 				goto free_mgmt_hndls;
 			}
@@ -5092,8 +5058,8 @@ static int beiscsi_mtask(struct iscsi_task *task)
 		break;
 
 	default:
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG,
-			    "BM", "opcode =%d Not supported\n",
+		beiscsi_err(phba, BEISCSI_LOG_CONFIG,
+			    "opcode =%d Not supported\n",
 			    task->hdr->opcode & ISCSI_OPCODE_MASK);
 
 		return -EINVAL;
@@ -5135,9 +5101,8 @@ static int beiscsi_task_xmit(struct iscsi_task

*task)

drivers/scsi/be2iscsi/be_main.c static int beiscsi_task_xmit(struct iscsi_task *task)

Quoted 6 lines
drivers/scsi/be2iscsi/be_main.c +0 -3
 	num_sg = scsi_dma_map(sc);
 	phba = io_task->conn->phba;
 	if (num_sg < 0) {
-		beiscsi_log(phba, KERN_ERR,
-			    BEISCSI_LOG_IO | BEISCSI_LOG_ISCSI,
-			    "BM", "scsi_dma_map Failed Driver_ITT : 0x%x

ITT :

drivers/scsi/be2iscsi/be_main.c static int beiscsi_task_xmit(struct iscsi_task · line 5106

Quoted 3 lines
drivers/scsi/be2iscsi/be_main.c +2 -0
 0x%x Xferlen : 0x%x\n",
+		beiscsi_err(phba, BEISCSI_LOG_IO | BEISCSI_LOG_ISCSI,
+			    "scsi_dma_map Failed Driver_ITT : 0x%x ITT :

0x%x

drivers/scsi/be2iscsi/be_main.c static int beiscsi_bsg_request(struct bsg_job

Quoted 5 lines
drivers/scsi/be2iscsi/be_main.c +0 -0
 Xferlen : 0x%x\n",
 			    be32_to_cpu(io_task->cmd_bhs->iscsi_hdr.itt),
drivers/scsi/be2iscsi/be_main.c +0 -0
 			    io_task->libiscsi_itt, scsi_bufflen(sc));
@@ -5178,15 +5143,15 @@ static int beiscsi_bsg_request(struct bsg_job

*job)

drivers/scsi/be2iscsi/be_main.c static int beiscsi_bsg_request(struct bsg_job

Quoted 24 lines
drivers/scsi/be2iscsi/be_main.c +4 -4
 					job->request_payload.payload_len,
 					&nonemb_cmd.dma);
 		if (nonemb_cmd.va == NULL) {
-			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG,
-				    "BM", "Failed to allocate memory for
 beiscsi_bsg_request\n");
+			beiscsi_err(phba, BEISCSI_LOG_CONFIG,
+				    "Failed to allocate memory for
 beiscsi_bsg_request\n");
 			return -ENOMEM;
 		}
 		tag = mgmt_vendor_specific_fw_cmd(&phba->ctrl, phba, job,
 						  &nonemb_cmd);
 		if (!tag) {
-			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG,
-				    "BM", "MBX Tag Allocation Failed\n");
+			beiscsi_err(phba, BEISCSI_LOG_CONFIG,
+				    "MBX Tag Allocation Failed\n");
 

pci_free_consistent(phba->ctrl.pdev,
nonemb_cmd.size,
nonemb_cmd.va,
nonemb_cmd.dma);

drivers/scsi/be2iscsi/be_main.c +0 -0
@@ -5214,8 +5179,8 @@ static int beiscsi_bsg_request(struct bsg_job

*job)

drivers/scsi/be2iscsi/be_main.c static int beiscsi_bsg_request(struct bsg_job *job)

Quoted 8 lines
drivers/scsi/be2iscsi/be_main.c +2 -2
 		pci_free_consistent(phba->ctrl.pdev, nonemb_cmd.size,
 				    nonemb_cmd.va, nonemb_cmd.dma);
 		if (status || extd_status) {
-			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG,
-				    "BM", "MBX Cmd Failed status = %d
 extd_status = %d\n",
+			beiscsi_err(phba, BEISCSI_LOG_CONFIG,
+				    "MBX Cmd Failed status = %d

extd_status =

drivers/scsi/be2iscsi/be_main.c static int beiscsi_bsg_request(struct bsg_job

Quoted 5 lines
drivers/scsi/be2iscsi/be_main.c +0 -0
 %d\n",
 				    status, extd_status);
drivers/scsi/be2iscsi/be_main.c +0 -0
 			return -EIO;
@@ -5225,9 +5190,9 @@ static int beiscsi_bsg_request(struct bsg_job

*job)

drivers/scsi/be2iscsi/be_main.c static void be_eqd_update(struct beiscsi_hba

Quoted 13 lines
drivers/scsi/be2iscsi/be_main.c +3 -3
 		break;
 
 	default:
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG,
-				"BM", "Unsupported bsg command: 0x%x\n",
-				bsg_req->msgcode);
+		beiscsi_err(phba, BEISCSI_LOG_CONFIG,
+			    "Unsupported bsg command: 0x%x\n",
+			    bsg_req->msgcode);
 		break;
 	}
 
@@ -5383,8 +5348,8 @@ static void be_eqd_update(struct beiscsi_hba

*phba)

drivers/scsi/be2iscsi/be_main.c static void be_eqd_update(struct beiscsi_hba *phba)

Quoted 5 lines
drivers/scsi/be2iscsi/be_main.c +0 -2
 static void be_check_boot_session(struct beiscsi_hba *phba)
 {
 	if (beiscsi_setup_boot_info(phba))
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM", "Could not set up iSCSI boot info on

async

drivers/scsi/be2iscsi/be_main.c static void be_eqd_update(struct beiscsi_hba · line 5353

Quoted 3 lines
drivers/scsi/be2iscsi/be_main.c +2 -0
 event.\n");
+		beiscsi_err(phba, BEISCSI_LOG_INIT,
+			    "Could not set up iSCSI boot info on async

event.\n");

drivers/scsi/be2iscsi/be_main.c static void beiscsi_eeh_resume(struct pci_dev

Quoted 74 lines
drivers/scsi/be2iscsi/be_main.c +0 -0
 }
 

/*

drivers/scsi/be2iscsi/be_main.c +6 -6
@@ -5428,14 +5393,14 @@ static pci_ers_result_t
 beiscsi_eeh_err_detected(struct pci_dev *pdev,
 	phba = (struct beiscsi_hba *)pci_get_drvdata(pdev);
 	phba->state |= BE_ADAPTER_PCI_ERR;
 
-	beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-		    "BM", "EEH error detected\n");
+	beiscsi_err(phba, BEISCSI_LOG_INIT,
+		    "EEH error detected\n");
 
 	beiscsi_quiesce(phba, BEISCSI_EEH_UNLOAD);
 
 	if (state == pci_channel_io_perm_failure) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM", "EEH : State PERM Failure\n");
+		beiscsi_err(phba, BEISCSI_LOG_INIT,
+			    "EEH : State PERM Failure\n");
 		return PCI_ERS_RESULT_DISCONNECT;
 	}
@@ -5460,8 +5425,8 @@ static pci_ers_result_t beiscsi_eeh_reset(struct
 pci_dev *pdev)
 
 	phba = (struct beiscsi_hba *)pci_get_drvdata(pdev);
 
-	beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-		    "BM", "EEH Reset\n");
+	beiscsi_err(phba, BEISCSI_LOG_INIT,
+		    "EEH Reset\n");
 
 	status = pci_enable_device(pdev);
drivers/scsi/be2iscsi/be_main.c +8 -8
 	if (status)
@@ -5474,11 +5439,11 @@ static pci_ers_result_t beiscsi_eeh_reset(struct
 pci_dev *pdev)
 	/* Wait for the CHIP Reset to complete */
 	status = be_chk_reset_complete(phba);
 	if (!status) {
-		beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_INIT,
-			    "BM", "EEH Reset Completed\n");
+		beiscsi_warn(phba, BEISCSI_LOG_INIT,
+			     "EEH Reset Completed\n");
 	} else {
-		beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_INIT,
-			    "BM", "EEH Reset Completion Failure\n");
+		beiscsi_warn(phba, BEISCSI_LOG_INIT,
+			     "EEH Reset Completion Failure\n");
 		return PCI_ERS_RESULT_DISCONNECT;
 	}
@@ -5510,15 +5475,15 @@ static void beiscsi_eeh_resume(struct pci_dev
 *pdev)
 
 	ret = beiscsi_cmd_reset_function(phba);
 	if (ret) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM", "Reset Failed\n");
+		beiscsi_err(phba, BEISCSI_LOG_INIT,
+			    "Reset Failed\n");
 		goto ret_err;
 	}
 
 	ret = be_chk_reset_complete(phba);
 	if (ret) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM", "Failed to get out of reset.\n");
+		beiscsi_err(phba, BEISCSI_LOG_INIT,
+			    "Failed to get out of reset.\n");
 		goto ret_err;
 	}
@@ -5527,8 +5492,8 @@ static void beiscsi_eeh_resume(struct pci_dev

*pdev)

drivers/scsi/be2iscsi/be_main.c static void beiscsi_eeh_resume(struct pci_dev *pdev)

Quoted 5 lines
drivers/scsi/be2iscsi/be_main.c +0 -2
 	phba->shost->can_queue = phba->params.ios_per_ctrl;
 	ret = hwi_init_controller(phba);
 	if (ret) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM", "beiscsi_eeh_resume - Failed to

initialize

drivers/scsi/be2iscsi/be_main.c static void beiscsi_eeh_resume(struct pci_dev

Quoted 8 lines
drivers/scsi/be2iscsi/be_main.c +2 -0
 beiscsi_hba.\n");
+		beiscsi_err(phba, BEISCSI_LOG_INIT,
+			    "beiscsi_eeh_resume - Failed to initialize
 beiscsi_hba.\n");
 		goto ret_err;
drivers/scsi/be2iscsi/be_main.c +0 -0
 	}
@@ -5555,8 +5520,8 @@ static void beiscsi_eeh_resume(struct pci_dev

*pdev)

drivers/scsi/be2iscsi/be_main.c static void beiscsi_eeh_resume(struct pci_dev *pdev)

Quoted 8 lines
drivers/scsi/be2iscsi/be_main.c +2 -2
 	ret = beiscsi_init_irqs(phba);
 	if (ret < 0) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM", "beiscsi_eeh_resume - Failed to
 beiscsi_init_irqs\n");
+		beiscsi_err(phba, BEISCSI_LOG_INIT,
+			    "beiscsi_eeh_resume - Failed to

beiscsi_init_irqs\n");

drivers/scsi/be2iscsi/be_main.c static void beiscsi_eeh_resume(struct pci_dev

Quoted 4 lines
drivers/scsi/be2iscsi/be_main.c +0 -0
 		goto ret_err;
 	}
 
@@ -5565,8 +5530,8 @@ static void beiscsi_eeh_resume(struct pci_dev

*pdev)

drivers/scsi/be2iscsi/be_main.c static int beiscsi_dev_probe(struct pci_dev

Quoted 11 lines
drivers/scsi/be2iscsi/be_main.c +2 -2
 	return;
 ret_err:
-	beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-		    "BM", "AER EEH Resume Failed\n");
+	beiscsi_err(phba, BEISCSI_LOG_INIT,
+		    "AER EEH Resume Failed\n");
 }
 
 static int beiscsi_dev_probe(struct pci_dev *pcidev,
@@ -5596,8 +5561,8 @@ static int beiscsi_dev_probe(struct pci_dev

*pcidev,

drivers/scsi/be2iscsi/be_main.c static int beiscsi_dev_probe(struct pci_dev *pcidev,

Quoted 5 lines
drivers/scsi/be2iscsi/be_main.c +0 -2
 	/* Enable EEH reporting */
 	ret = pci_enable_pcie_error_reporting(pcidev);
 	if (ret)
-		beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_INIT,
-			    "BM", "PCIe Error Reporting Enabling

Failed\n");

drivers/scsi/be2iscsi/be_main.c static int beiscsi_dev_probe(struct pci_dev

Quoted 6 lines
drivers/scsi/be2iscsi/be_main.c +2 -0
+		beiscsi_warn(phba, BEISCSI_LOG_INIT,
+			     "PCIe Error Reporting Enabling Failed\n");
 
 	pci_save_state(pcidev);
 
@@ -5630,8 +5595,8 @@ static int beiscsi_dev_probe(struct pci_dev

*pcidev,

drivers/scsi/be2iscsi/be_main.c static int beiscsi_dev_probe(struct pci_dev *pcidev,

Quoted 5 lines
drivers/scsi/be2iscsi/be_main.c +0 -2
 	ret = be_ctrl_init(phba, pcidev);
 	if (ret) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM", "beiscsi_dev_probe-Failed in

be_ctrl_init\n");

drivers/scsi/be2iscsi/be_main.c static int beiscsi_dev_probe(struct pci_dev

Quoted 6 lines
drivers/scsi/be2iscsi/be_main.c +2 -0
+		beiscsi_err(phba, BEISCSI_LOG_INIT,
+			    "beiscsi_dev_probe-Failed in be_ctrl_init\n");
 		goto hba_free;
 	}
 
@@ -5640,14 +5605,14 @@ static int beiscsi_dev_probe(struct pci_dev

*pcidev,

drivers/scsi/be2iscsi/be_main.c static int beiscsi_dev_probe(struct pci_dev

Quoted 19 lines
drivers/scsi/be2iscsi/be_main.c +4 -4
 	 */
 	ret = beiscsi_cmd_reset_function(phba);
 	if (ret) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM", "Reset Failed\n");
+		beiscsi_err(phba, BEISCSI_LOG_INIT,
+			    "Reset Failed\n");
 		goto hba_free;
 	}
 	ret = be_chk_reset_complete(phba);
 	if (ret) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM", "Failed to get out of reset.\n");
+		beiscsi_err(phba, BEISCSI_LOG_INIT,
+			    "Failed to get out of reset.\n");
 		goto hba_free;
 	}
 
@@ -5657,8 +5622,8 @@ static int beiscsi_dev_probe(struct pci_dev

*pcidev,

drivers/scsi/be2iscsi/be_main.c static int beiscsi_dev_probe(struct pci_dev

Quoted 11 lines
drivers/scsi/be2iscsi/be_main.c +2 -2
 	spin_lock_init(&phba->async_pdu_lock);
 	ret = mgmt_get_fw_config(&phba->ctrl, phba);
 	if (ret != 0) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM", "Error getting fw config\n");
+		beiscsi_err(phba, BEISCSI_LOG_INIT,
+			    "Error getting fw config\n");
 		goto free_port;
 	}
 	mgmt_get_port_name(&phba->ctrl, phba);
@@ -5669,9 +5634,9 @@ static int beiscsi_dev_probe(struct pci_dev

*pcidev,

drivers/scsi/be2iscsi/be_main.c static int beiscsi_dev_probe(struct pci_dev

Quoted 13 lines
drivers/scsi/be2iscsi/be_main.c +3 -3
 	else
 		phba->num_cpus = 1;
 
-	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-		    "BM", "num_cpus = %d\n",
-		    phba->num_cpus);
+	beiscsi_info(phba, BEISCSI_LOG_INIT,
+		     "num_cpus = %d\n",
+		     phba->num_cpus);
 
 	if (enable_msix) {
 		beiscsi_msix_enable(phba);
@@ -5683,8 +5648,8 @@ static int beiscsi_dev_probe(struct pci_dev

*pcidev,

drivers/scsi/be2iscsi/be_main.c static int beiscsi_dev_probe(struct pci_dev *pcidev,

Quoted 8 lines
drivers/scsi/be2iscsi/be_main.c +2 -2
 	phba->shost->can_queue = phba->params.ios_per_ctrl;
 	ret = beiscsi_init_port(phba);
 	if (ret < 0) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM", "beiscsi_dev_probe-Failed in
 beiscsi_init_port\n");
+		beiscsi_err(phba, BEISCSI_LOG_INIT,
+			    "beiscsi_dev_probe-Failed in

beiscsi_init_port\n");

drivers/scsi/be2iscsi/be_main.c static int beiscsi_dev_probe(struct pci_dev

Quoted 4 lines
drivers/scsi/be2iscsi/be_main.c +0 -0
 		goto free_port;
 	}
@@ -5703,8 +5668,8 @@ static int beiscsi_dev_probe(struct pci_dev

*pcidev,

drivers/scsi/be2iscsi/be_main.c static int beiscsi_dev_probe(struct pci_dev *pcidev,

Quoted 6 lines
drivers/scsi/be2iscsi/be_main.c +0 -2
 		 phba->shost->host_no);
 	phba->wq = alloc_workqueue("%s", WQ_MEM_RECLAIM, 1, phba-
 >wq_name);
 	if (!phba->wq) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM", "beiscsi_dev_probe-Failed to allocate

work

drivers/scsi/be2iscsi/be_main.c static int beiscsi_dev_probe(struct pci_dev

Quoted 8 lines
drivers/scsi/be2iscsi/be_main.c +2 -0
 queue\n");
+		beiscsi_err(phba, BEISCSI_LOG_INIT,
+			    "beiscsi_dev_probe-Failed to allocate work
 queue\n");
drivers/scsi/be2iscsi/be_main.c +0 -0
 		ret = -ENOMEM;
 		goto free_twq;
 	}
@@ -5728,8 +5693,8 @@ static int beiscsi_dev_probe(struct pci_dev

*pcidev,

drivers/scsi/be2iscsi/be_main.c static void beiscsi_eeh_resume(struct pci_dev *pdev)

Quoted 8 lines
drivers/scsi/be2iscsi/be_main.c +2 -2
 	ret = beiscsi_init_irqs(phba);
 	if (ret < 0) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM", "beiscsi_dev_probe-Failed to
 beiscsi_init_irqs\n");
+		beiscsi_err(phba, BEISCSI_LOG_INIT,
+			    "beiscsi_dev_probe-Failed to

beiscsi_init_irqs\n");

drivers/scsi/be2iscsi/be_main.c static int beiscsi_dev_probe(struct pci_dev

Quoted 4 lines
drivers/scsi/be2iscsi/be_main.c +0 -0
 		goto free_blkenbld;
 	}
 	hwi_enable_intr(phba);
@@ -5742,15 +5707,15 @@ static int beiscsi_dev_probe(struct pci_dev

*pcidev,

Review

Quoted 20 lines
drivers/scsi/be2iscsi/be_main.c +4 -4
 		 * log error but continue, because we may not be using
 		 * iscsi boot.
 		 */
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM", "Could not set up iSCSI boot info.\n");
+		beiscsi_err(phba, BEISCSI_LOG_INIT,
+			    "Could not set up iSCSI boot info.\n");
 
 	beiscsi_create_def_ifaces(phba);
 	schedule_delayed_work(&phba->beiscsi_hw_check_task,
 			      msecs_to_jiffies(1000));
 
-	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-		    "BM", "SUCCESS - DRIVER LOADED\n");
+	beiscsi_info(phba, BEISCSI_LOG_INIT,
+		     "SUCCESS - DRIVER LOADED\n");
 	return 0;
 
 free_blkenbld:
(quoted diff) +0 -0

b/drivers/scsi/be2iscsi/be_main.h

drivers/scsi/be2iscsi/be_main.h struct hwi_context_memory { · line 1082

Quoted 6 lines

index aa9c682..7cce6e3 100644

drivers/scsi/be2iscsi/be_main.h +0 -0
@@ -1081,15 +1081,19 @@ struct hwi_context_memory {
 #define BEISCSI_LOG_CONFIG	0x0020	/* CONFIG Code Path */
 #define BEISCSI_LOG_ISCSI	0x0040	/* SCSI/iSCSI Protocol related

Logs */

drivers/scsi/be2iscsi/be_main.h struct hwi_context_memory { · line 1087

Quoted 13 lines
drivers/scsi/be2iscsi/be_main.h +3 -8
-#define __beiscsi_log(phba, level, fmt, ...)				\
-	shost_printk(level, phba->shost, fmt, ##__VA_ARGS__)
-
-#define beiscsi_log(phba, level, mask, prefix, fmt, ...)		\
+#define beiscsi_printk(level, phba, mask, fmt, ...)			\
 do {									\
-	uint32_t log_value = phba->attr_log_enable;			\
-	if (((mask) & log_value) || (level[1] <= '3'))			\
-		__beiscsi_log(phba, level, prefix "_%d: " fmt,		\
-			      __LINE__, ##__VA_ARGS__);			\
+	if ((mask) & (phba)->attr_log_enable)				\
+		shost_printk(level, phba->shost,			\

[JB] PCI dev_printk would be more useful with SCSI host_no included by default in the message.
- phba->shost->host_no
- phba->pcidev->dev

Review

Quoted 13 lines
drivers/scsi/be2iscsi/be_main.h +9 -0
+			     "%s_" __stringify(__LINE__) ": " fmt,	\
+			     kbasename(__FILE__), ##__VA_ARGS__);	\
 } while (0)
 
+#define beiscsi_err(phba, mask, fmt, ...)				\
+	beiscsi_printk(KERN_ERR, phba, mask, fmt, ##__VA_ARGS__)
+#define beiscsi_warn(phba, mask, fmt, ...)				\
+	beiscsi_printk(KERN_WARNING, phba, mask, fmt, ##__VA_ARGS__)
+#define beiscsi_info(phba, mask, fmt, ...)				\
+	beiscsi_printk(KERN_INFO, phba, mask, fmt, ##__VA_ARGS__)
+
 #endif
(quoted diff) +0 -0

b/drivers/scsi/be2iscsi/be_mgmt.c

drivers/scsi/be2iscsi/be_mgmt.c unsigned int mgmt_get_session_info(struct

Quoted 64 lines

index 44b69ef..3b23c41 100644

drivers/scsi/be2iscsi/be_mgmt.c +8 -12
@@ -129,17 +129,15 @@ void beiscsi_ue_detect(struct beiscsi_hba *phba)
 
 	if (ue_lo || ue_hi) {
 		phba->ue_detected = true;
-		beiscsi_log(phba, KERN_ERR,
-			    BEISCSI_LOG_CONFIG | BEISCSI_LOG_MBOX,
-			    "BG", "Error detected on the adapter\n");
+		beiscsi_err(phba, BEISCSI_LOG_CONFIG | BEISCSI_LOG_MBOX,
+			    "Error detected on the adapter\n");
 	}
 
 	if (ue_lo) {
 		for (i = 0; ue_lo; ue_lo >>= 1, i++) {
 			if (ue_lo & 1)
-				beiscsi_log(phba, KERN_ERR,
-					    BEISCSI_LOG_CONFIG,
-					    "BG", "UE_LOW %s bit set\n",
+				beiscsi_err(phba, BEISCSI_LOG_CONFIG,
+					    "UE_LOW %s bit set\n",
 					    desc_ue_status_low[i]);
 		}
 	}
@@ -147,9 +145,8 @@ void beiscsi_ue_detect(struct beiscsi_hba *phba)
 	if (ue_hi) {
 		for (i = 0; ue_hi; ue_hi >>= 1, i++) {
 			if (ue_hi & 1)
-				beiscsi_log(phba, KERN_ERR,
-					    BEISCSI_LOG_CONFIG,
-					    "BG", "UE_HIGH %s bit set\n",
+				beiscsi_err(phba, BEISCSI_LOG_CONFIG,
+					    "UE_HIGH %s bit set\n",
 					    desc_ue_status_hi[i]);
 		}
 	}
@@ -208,9 +205,8 @@ unsigned int mgmt_reopen_session(struct beiscsi_hba
 *phba,
 	struct be_cmd_reopen_session_req *req;
 	unsigned int tag;
 
-	beiscsi_log(phba, KERN_INFO,
-		    BEISCSI_LOG_CONFIG | BEISCSI_LOG_MBOX,
-		    "BG", "In bescsi_get_boot_target\n");
+	beiscsi_info(phba, BEISCSI_LOG_CONFIG | BEISCSI_LOG_MBOX,
+		     "In bescsi_get_boot_target\n");
 
 	mutex_lock(&ctrl->mbox_lock);
drivers/scsi/be2iscsi/be_mgmt.c +2 -3
 	wrb = alloc_mcc_wrb(phba, &tag);
@@ -241,9 +237,8 @@ unsigned int mgmt_get_boot_target(struct beiscsi_hba
 *phba)
 	struct be_cmd_get_boot_target_req *req;
 	unsigned int tag;
 
-	beiscsi_log(phba, KERN_INFO,
-		    BEISCSI_LOG_CONFIG | BEISCSI_LOG_MBOX,
-		    "BG", "In bescsi_get_boot_target\n");
+	beiscsi_info(phba, BEISCSI_LOG_CONFIG | BEISCSI_LOG_MBOX,
+		     "In bescsi_get_boot_target\n");
 
 	mutex_lock(&ctrl->mbox_lock);
drivers/scsi/be2iscsi/be_mgmt.c +0 -0
 	wrb = alloc_mcc_wrb(phba, &tag);
@@ -274,9 +269,8 @@ unsigned int mgmt_get_session_info(struct

beiscsi_hba

Quoted 107 lines
drivers/scsi/be2iscsi/be_mgmt.c +2 -3
 *phba,
 	struct be_cmd_get_session_resp *resp;
 	struct be_sge *sge;
 
-	beiscsi_log(phba, KERN_INFO,
-		    BEISCSI_LOG_CONFIG | BEISCSI_LOG_MBOX,
-		    "BG", "In beiscsi_get_session_info\n");
+	beiscsi_info(phba, BEISCSI_LOG_CONFIG | BEISCSI_LOG_MBOX,
+		     "In beiscsi_get_session_info\n");
 
 	mutex_lock(&ctrl->mbox_lock);
drivers/scsi/be2iscsi/be_mgmt.c +26 -30
 	wrb = alloc_mcc_wrb(phba, &tag);
@@ -333,9 +327,9 @@ int mgmt_get_port_name(struct be_ctrl_info *ctrl,
 		phba->port_name = ioctl->p.resp.port_names >>
 				  (phba->fw_config.phys_port * 8) & 0xff;
 	} else {
-		beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-			    "BG", "GET_PORT_NAME ret 0x%x status 0x%x\n",
-			    ret, ioctl->h.resp_hdr.status);
+		beiscsi_info(phba, BEISCSI_LOG_INIT,
+			     "GET_PORT_NAME ret 0x%x status 0x%x\n",
+			     ret, ioctl->h.resp_hdr.status);
 	}
 
 	if (phba->port_name == 0)
@@ -375,16 +369,16 @@ int mgmt_get_fw_config(struct be_ctrl_info *ctrl,
 			   EMBED_MBX_MAX_PAYLOAD_SIZE);
 
 	if (be_mbox_notify(ctrl)) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BG", "Failed in mgmt_get_fw_config\n");
+		beiscsi_err(phba, BEISCSI_LOG_INIT,
+			    "Failed in mgmt_get_fw_config\n");
 		goto fail_init;
 	}
 
 	/* FW response formats depend on port id */
 	phba->fw_config.phys_port = pfw_cfg->phys_port;
 	if (phba->fw_config.phys_port >= BEISCSI_PHYS_PORT_MAX) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BG", "invalid physical port id %d\n",
+		beiscsi_err(phba, BEISCSI_LOG_INIT,
+			    "invalid physical port id %d\n",
 			    phba->fw_config.phys_port);
 		goto fail_init;
 	}
@@ -395,22 +389,22 @@ int mgmt_get_fw_config(struct be_ctrl_info *ctrl,
 		phba->fw_config.cqid_count = pfw_cfg->cqid_count;
 		if (phba->fw_config.eqid_count == 0 ||
 		    phba->fw_config.eqid_count > 2048) {
-			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-				    "BG", "invalid EQ count %d\n",
+			beiscsi_err(phba, BEISCSI_LOG_INIT,
+				    "invalid EQ count %d\n",
 				    phba->fw_config.eqid_count);
 			goto fail_init;
 		}
 		if (phba->fw_config.cqid_count == 0 ||
 		    phba->fw_config.cqid_count > 4096) {
-			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-				    "BG", "invalid CQ count %d\n",
+			beiscsi_err(phba, BEISCSI_LOG_INIT,
+				    "invalid CQ count %d\n",
 				    phba->fw_config.cqid_count);
 			goto fail_init;
 		}
-		beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-			    "BG", "EQ_Count : %d CQ_Count : %d\n",
-			    phba->fw_config.eqid_count,
-			    phba->fw_config.cqid_count);
+		beiscsi_info(phba, BEISCSI_LOG_INIT,
+			     "EQ_Count : %d CQ_Count : %d\n",
+			     phba->fw_config.eqid_count,
+			     phba->fw_config.cqid_count);
 	}
 
 	/**
@@ -440,27 +434,27 @@ int mgmt_get_fw_config(struct be_ctrl_info *ctrl,
 			phba->fw_config.iscsi_chain_count[ulp_num] =
 				pfw_cfg->chain_icd[ulp_num].chain_count;
 
-			beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-				    "BG", "Function loaded on ULP : %d\n"
-				    "\tiscsi_cid_count : %d\n"
-				    "\tiscsi_cid_start : %d\n"
-				    "\t iscsi_icd_count : %d\n"
-				    "\t iscsi_icd_start : %d\n",
-				    ulp_num,
-				    phba->fw_config.
-				    iscsi_cid_count[ulp_num],
-				    phba->fw_config.
-				    iscsi_cid_start[ulp_num],
-				    phba->fw_config.
-				    iscsi_icd_count[ulp_num],
-				    phba->fw_config.
-				    iscsi_icd_start[ulp_num]);
+			beiscsi_info(phba, BEISCSI_LOG_INIT,
+				     "Function loaded on ULP : %d\n"
+				     "\tiscsi_cid_count : %d\n"
+				     "\tiscsi_cid_start : %d\n"
+				     "\t iscsi_icd_count : %d\n"
+				     "\t iscsi_icd_start : %d\n",
+				     ulp_num,
+				     phba->fw_config.
+				     iscsi_cid_count[ulp_num],
+				     phba->fw_config.
+				     iscsi_cid_start[ulp_num],

drivers/scsi/be2iscsi/be_mgmt.c int mgmt_get_fw_config(struct be_ctrl_info *ctrl, · line 463

Quoted 10 lines
drivers/scsi/be2iscsi/be_mgmt.c +4 -2
+				     phba->fw_config.
+				     iscsi_icd_count[ulp_num],
+				     phba->fw_config.
+				     iscsi_icd_start[ulp_num]);
 		}
 	}
 
 	if (phba->fw_config.ulp_supported == 0) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BG", "iSCSI initiator mode not set: ULP0 %x

ULP1

drivers/scsi/be2iscsi/be_mgmt.c int mgmt_get_fw_config(struct be_ctrl_info *ctrl, · line 458

Quoted 3 lines
drivers/scsi/be2iscsi/be_mgmt.c +2 -0
 %x\n",
+		beiscsi_err(phba, BEISCSI_LOG_INIT,
+			    "iSCSI initiator mode not set: ULP0 %x ULP1

%x\n",

drivers/scsi/be2iscsi/be_mgmt.c int mgmt_check_supported_fw(struct be_ctrl_info

Quoted 38 lines
drivers/scsi/be2iscsi/be_mgmt.c +0 -0
 			    pfw_cfg->ulp[BEISCSI_ULP0].ulp_mode,
 			    pfw_cfg->ulp[BEISCSI_ULP1].ulp_mode);
drivers/scsi/be2iscsi/be_mgmt.c +7 -7
 		goto fail_init;
@@ -474,16 +468,16 @@ int mgmt_get_fw_config(struct be_ctrl_info *ctrl,
 			break;
 	icd_count = phba->fw_config.iscsi_icd_count[ulp_num];
 	if (icd_count == 0 || icd_count > 65536) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BG", "invalid ICD count %d\n", icd_count);
+		beiscsi_err(phba, BEISCSI_LOG_INIT,
+			    "invalid ICD count %d\n", icd_count);
 		goto fail_init;
 	}
 
 	cid_count = BEISCSI_GET_CID_COUNT(phba, BEISCSI_ULP0) +
 		    BEISCSI_GET_CID_COUNT(phba, BEISCSI_ULP1);
 	if (cid_count == 0 || cid_count > 4096) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BG", "invalid CID count %d\n", cid_count);
+		beiscsi_err(phba, BEISCSI_LOG_INIT,
+			    "invalid CID count %d\n", cid_count);
 		goto fail_init;
 	}
 
@@ -494,9 +488,9 @@ int mgmt_get_fw_config(struct be_ctrl_info *ctrl,
 	phba->fw_config.dual_ulp_aware = (pfw_cfg->function_mode &
 					  BEISCSI_FUNC_DUA_MODE);
 
-	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-		    "BG", "DUA Mode : 0x%x\n",
-		    phba->fw_config.dual_ulp_aware);
+	beiscsi_info(phba, BEISCSI_LOG_INIT,
+		     "DUA Mode : 0x%x\n",
+		     phba->fw_config.dual_ulp_aware);
 
 	/* all set, continue using this FW config */
 	status = 0;
@@ -518,8 +512,8 @@ int mgmt_check_supported_fw(struct be_ctrl_info

*ctrl,

drivers/scsi/be2iscsi/be_mgmt.c int mgmt_check_supported_fw(struct be_ctrl_info · line 512

Quoted 1 line
drivers/scsi/be2iscsi/be_mgmt.c +0 -0
 				sizeof(struct

be_mgmt_controller_attributes),

Quoted 12 lines
drivers/scsi/be2iscsi/be_mgmt.c +2 -2
 				&nonemb_cmd.dma);
 	if (nonemb_cmd.va == NULL) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BG", "Failed to allocate memory for
 mgmt_check_supported_fw\n");
+		beiscsi_err(phba, BEISCSI_LOG_INIT,
+			    "Failed to allocate memory for
 mgmt_check_supported_fw\n");
 		return -ENOMEM;
drivers/scsi/be2iscsi/be_mgmt.c +0 -0
 	}
 	nonemb_cmd.size = sizeof(struct be_mgmt_controller_attributes);

drivers/scsi/be2iscsi/be_mgmt.c int mgmt_check_supported_fw(struct be_ctrl_info · line 544

Quoted 9 lines
drivers/scsi/be2iscsi/be_mgmt.c +0 -4
@@ -536,25 +530,25 @@ int mgmt_check_supported_fw(struct be_ctrl_info
 *ctrl,
 	status = be_mbox_notify(ctrl);
 	if (!status) {
 		struct be_mgmt_controller_attributes_resp *resp =
 nonemb_cmd.va;
-		beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-			    "BG", "Firmware Version of CMD : %s\n"
-			    "Firmware Version is : %s\n"
-			    "Developer Build, not performing version

check...\n",

drivers/scsi/be2iscsi/be_mgmt.c int mgmt_check_supported_fw(struct be_ctrl_info *ctrl,

Quoted 8 lines
drivers/scsi/be2iscsi/be_mgmt.c +4 -4
-			    resp->params.hba_attribs
-			    .flashrom_version_string,
-			    resp->params.hba_attribs.
-			    firmware_version_string);
+		beiscsi_info(phba, BEISCSI_LOG_INIT,
+			     "Firmware Version of CMD : %s\n"
+			     "Firmware Version is : %s\n"
+			     "Developer Build, not performing version

check...\n",

Quoted 99 lines
drivers/scsi/be2iscsi/be_mgmt.c +9 -5
+			     resp->params.hba_attribs
+			     .flashrom_version_string,
+			     resp->params.hba_attribs.
+			     firmware_version_string);
 
 		phba->fw_config.iscsi_features =
 				resp->params.hba_attribs.iscsi_features;
-		beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-			    "BM", "phba->fw_config.iscsi_features = %d\n",
-			    phba->fw_config.iscsi_features);
+		beiscsi_info(phba, BEISCSI_LOG_INIT,
+			     "phba->fw_config.iscsi_features = %d\n",
+			     phba->fw_config.iscsi_features);
 		memcpy(phba->fw_ver_str, resp->params.hba_attribs.
 		       firmware_version_string, BEISCSI_VER_STRLEN);
 	} else
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BG", " Failed in mgmt_check_supported_fw\n");
+		beiscsi_err(phba, BEISCSI_LOG_INIT,
+			    " Failed in mgmt_check_supported_fw\n");
 	mutex_unlock(&ctrl->mbox_lock);
drivers/scsi/be2iscsi/be_mgmt.c +3 -3
 	if (nonemb_cmd.va)
 		pci_free_consistent(ctrl->pdev, nonemb_cmd.size,
@@ -603,9 +597,9 @@ unsigned int mgmt_vendor_specific_fw_cmd(struct
 be_ctrl_info *ctrl,
 			   OPCODE_COMMON_READ_FLASH, sizeof(*req));
 		break;
 	default:
-		beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_CONFIG,
-			    "BG", "Unsupported cmd = 0x%x\n\n",
-			    bsg_req->rqst_data.h_vendor.vendor_cmd[0]);
+		beiscsi_warn(phba, BEISCSI_LOG_CONFIG,
+			     "Unsupported cmd = 0x%x\n\n",
+			     bsg_req->rqst_data.h_vendor.vendor_cmd[0]);
 
 		mutex_unlock(&ctrl->mbox_lock);
drivers/scsi/be2iscsi/be_mgmt.c +2 -2
 		return -ENOSYS;
@@ -666,8 +660,8 @@ int mgmt_epfw_cleanup(struct beiscsi_hba *phba,
 unsigned short ulp_num)
 	be_mcc_notify(phba, tag);
 	status = be_mcc_compl_poll(phba, tag);
 	if (status)
-		beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_INIT,
-			    "BG", "mgmt_epfw_cleanup , FAILED\n");
+		beiscsi_warn(phba, BEISCSI_LOG_INIT,
+			     "mgmt_epfw_cleanup , FAILED\n");
 	mutex_unlock(&ctrl->mbox_lock);
 	return status;

}

drivers/scsi/be2iscsi/be_mgmt.c +2 -2
@@ -809,8 +803,8 @@ int mgmt_open_connection(struct beiscsi_hba *phba,
 	struct be_sge *sge;
 
 	if (dst_addr->sa_family != PF_INET && dst_addr->sa_family !=
 PF_INET6) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG,
-			    "BG", "unknown addr family %d\n",
+		beiscsi_err(phba, BEISCSI_LOG_CONFIG,
+			    "unknown addr family %d\n",
 			    dst_addr->sa_family);
 		return -EINVAL;
drivers/scsi/be2iscsi/be_mgmt.c +6 -7
 	}
@@ -868,8 +862,8 @@ int mgmt_open_connection(struct beiscsi_hba *phba,
 	if (phba->nxt_cqid == phba->num_cpus)
 		phba->nxt_cqid = 0;
 	req->cq_id = phwi_context->be_cq[i].id;
-	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_CONFIG,
-		    "BG", "i=%d cq_id=%d\n", i, req->cq_id);
+	beiscsi_info(phba, BEISCSI_LOG_CONFIG,
+		     "i=%d cq_id=%d\n", i, req->cq_id);
 	req->defq_id = def_hdr_id;
 	req->hdr_ring_id = def_hdr_id;
 	req->data_ring_id = def_data_id;
@@ -918,8 +912,8 @@ unsigned int mgmt_get_all_if_id(struct beiscsi_hba
 *phba)
 
 	status = beiscsi_mccq_compl_wait(phba, tag, &wrb, NULL);
 	if (status) {
-		beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_CONFIG,
-			    "BG", "Failed in mgmt_get_all_if_id\n");
+		beiscsi_warn(phba, BEISCSI_LOG_CONFIG,
+			     "Failed in mgmt_get_all_if_id\n");
 		return -EBUSY;
 	}
@@ -974,9 +968,8 @@ static int mgmt_exec_nonemb_cmd(struct beiscsi_hba
 *phba,
 		if (rc == -EAGAIN)
 			return rc;
 
-		beiscsi_log(phba, KERN_WARNING,
-			    BEISCSI_LOG_CONFIG | BEISCSI_LOG_MBOX,
-			    "BG", "mgmt_exec_nonemb_cmd Failed status\n");
+		beiscsi_warn(phba, BEISCSI_LOG_CONFIG |
 BEISCSI_LOG_MBOX,
+			     "mgmt_exec_nonemb_cmd Failed status\n");
 
drivers/scsi/be2iscsi/be_mgmt.c +0 -0
 		if (rc != -EBUSY)
 			goto free_cmd;

drivers/scsi/be2iscsi/be_mgmt.c static int mgmt_alloc_cmd_data(struct beiscsi_hba · line 999

Quoted 6 lines
drivers/scsi/be2iscsi/be_mgmt.c +0 -2
@@ -994,8 +987,8 @@ static int mgmt_alloc_cmd_data(struct beiscsi_hba
 *phba, struct be_dma_mem *cmd,
 {
 	cmd->va = pci_zalloc_consistent(phba->ctrl.pdev, size, &cmd->dma);
 	if (!cmd->va) {
-		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG,
-			    "BG", "Failed to allocate memory for if

info\n");

drivers/scsi/be2iscsi/be_mgmt.c mgmt_static_ip_modify(struct beiscsi_hba *phba, · line 1057

Quoted 11 lines
drivers/scsi/be2iscsi/be_mgmt.c +2 -0
+		beiscsi_err(phba, BEISCSI_LOG_CONFIG,
+			    "Failed to allocate memory for if info\n");
 		return -ENOMEM;
 	}
drivers/scsi/be2iscsi/be_mgmt.c +0 -2
 	cmd->size = size;
@@ -1053,8 +1046,8 @@ mgmt_static_ip_modify(struct beiscsi_hba *phba,
 
 	rc = mgmt_exec_nonemb_cmd(phba, &nonemb_cmd, NULL, 0);
 	if (rc < 0)
-		beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_CONFIG,
-			    "BG", "Failed to Modify existing IP

Address\n");

Quoted 18 lines
drivers/scsi/be2iscsi/be_mgmt.c +4 -2
+		beiscsi_warn(phba, BEISCSI_LOG_CONFIG,
+			     "Failed to Modify existing IP Address\n");
 	return rc;
 }
 
@@ -1108,8 +1101,8 @@ int mgmt_set_ip(struct beiscsi_hba *phba,
 
 	if (boot_proto == ISCSI_BOOTPROTO_DHCP) {
 		if (if_info->dhcp_state) {
-			beiscsi_log(phba, KERN_WARNING,
 BEISCSI_LOG_CONFIG,
-				    "BG", "DHCP Already Enabled\n");
+			beiscsi_warn(phba, BEISCSI_LOG_CONFIG,
+				     "DHCP Already Enabled\n");
 			goto exit;
 		}
drivers/scsi/be2iscsi/be_mgmt.c +0 -0
 		/* The ip_param->len is 1 in DHCP case. Setting

drivers/scsi/be2iscsi/be_mgmt.c int mgmt_set_ip(struct beiscsi_hba *phba, · line 1142

Quoted 7 lines
drivers/scsi/be2iscsi/be_mgmt.c +0 -3
@@ -1136,9 +1129,8 @@ int mgmt_set_ip(struct beiscsi_hba *phba,
 
 			rc = mgmt_exec_nonemb_cmd(phba, &nonemb_cmd,
 NULL, 0);
 			if (rc < 0) {
-				beiscsi_log(phba, KERN_WARNING,
-					    BEISCSI_LOG_CONFIG,
-					    "BG", "Failed to Delete

existing

drivers/scsi/be2iscsi/be_mgmt.c int mgmt_set_ip(struct beiscsi_hba *phba, · line 1135

Quoted 3 lines
drivers/scsi/be2iscsi/be_mgmt.c +2 -0
 dhcp\n");
+				beiscsi_warn(phba, BEISCSI_LOG_CONFIG,
+					     "Failed to Delete existing

dhcp\n");

Quoted 16 lines
drivers/scsi/be2iscsi/be_mgmt.c +0 -0
 				goto exit;
drivers/scsi/be2iscsi/be_mgmt.c +2 -2
 			}
 		}
@@ -1157,8 +1149,8 @@ int mgmt_set_ip(struct beiscsi_hba *phba,
 		memset(&gtway_addr_set, 0, sizeof(gtway_addr_set));
 		rc = mgmt_get_gateway(phba, BE2_IPV4, &gtway_addr_set);
 		if (rc) {
-			beiscsi_log(phba, KERN_WARNING,
 BEISCSI_LOG_CONFIG,
-				    "BG", "Failed to Get Gateway Addr\n");
+			beiscsi_warn(phba, BEISCSI_LOG_CONFIG,
+				     "Failed to Get Gateway Addr\n");
 			goto exit;
 		}

drivers/scsi/be2iscsi/be_mgmt.c int mgmt_set_ip(struct beiscsi_hba *phba, · line 1160

Quoted 1 line
drivers/scsi/be2iscsi/be_mgmt.c +0 -0
@@ -1168,9 +1160,8 @@ int mgmt_set_ip(struct beiscsi_hba *phba,
 						 IP_ACTION_DEL,

IP_V4_LEN);

drivers/scsi/be2iscsi/be_mgmt.c int mgmt_set_ip(struct beiscsi_hba *phba,

Quoted 5 lines
drivers/scsi/be2iscsi/be_mgmt.c +0 -3
 			if (rc) {
-				beiscsi_log(phba, KERN_WARNING,
-					    BEISCSI_LOG_CONFIG,
-					    "BG", "Failed to clear Gateway

Addr

Quoted 19 lines
drivers/scsi/be2iscsi/be_mgmt.c +2 -0
 Set\n");
+				beiscsi_warn(phba, BEISCSI_LOG_CONFIG,
+					     "Failed to clear Gateway Addr
 Set\n");
 				goto exit;
 			}
drivers/scsi/be2iscsi/be_mgmt.c +2 -2
 		}
@@ -1211,8 +1202,8 @@ int mgmt_set_gateway(struct beiscsi_hba *phba,
 	memset(&gtway_addr_set, 0, sizeof(gtway_addr_set));
 	rt_val = mgmt_get_gateway(phba, BE2_IPV4, &gtway_addr_set);
 	if (rt_val) {
-		beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_CONFIG,
-			    "BG", "Failed to Get Gateway Addr\n");
+		beiscsi_warn(phba, BEISCSI_LOG_CONFIG,
+			     "Failed to Get Gateway Addr\n");
 		return rt_val;
 	}
 

drivers/scsi/be2iscsi/be_mgmt.c int mgmt_set_gateway(struct beiscsi_hba *phba, · line 1227

Quoted 7 lines
drivers/scsi/be2iscsi/be_mgmt.c +0 -2
@@ -1221,8 +1212,8 @@ int mgmt_set_gateway(struct beiscsi_hba *phba,
 		rt_val = mgmt_modify_gateway(phba, gtway_addr,
 IP_ACTION_DEL,
 					     gateway_param->len);
 		if (rt_val) {
-			beiscsi_log(phba, KERN_WARNING,
 BEISCSI_LOG_CONFIG,
-				    "BG", "Failed to clear Gateway Addr

Set\n");

drivers/scsi/be2iscsi/be_mgmt.c int mgmt_set_gateway(struct beiscsi_hba *phba, · line 1218

Quoted 2 lines
drivers/scsi/be2iscsi/be_mgmt.c +2 -0
+			beiscsi_warn(phba, BEISCSI_LOG_CONFIG,
+				     "Failed to clear Gateway Addr

Set\n");

drivers/scsi/be2iscsi/be_mgmt.c int mgmt_get_if_info(struct beiscsi_hba *phba,

Quoted 15 lines
drivers/scsi/be2iscsi/be_mgmt.c +0 -0
 			return rt_val;
drivers/scsi/be2iscsi/be_mgmt.c +2 -2
 		}
 	}
@@ -1232,8 +1223,8 @@ int mgmt_set_gateway(struct beiscsi_hba *phba,
 				     gateway_param->len);
 
 	if (rt_val)
-		beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_CONFIG,
-			    "BG", "Failed to Set Gateway Addr\n");
+		beiscsi_warn(phba, BEISCSI_LOG_CONFIG,
+			     "Failed to Set Gateway Addr\n");
 
 	return rt_val;
 }
@@ -1284,11 +1275,10 @@ int mgmt_get_if_info(struct beiscsi_hba *phba,

int

drivers/scsi/be2iscsi/be_mgmt.c int mgmt_get_if_info(struct beiscsi_hba *phba, int ip_type,

Quoted 12 lines
drivers/scsi/be2iscsi/be_mgmt.c +2 -4
 ip_type,
 		/* Allocate memory for if_info */
 		*if_info = kzalloc(ioctl_size, GFP_KERNEL);
 		if (!*if_info) {
-			beiscsi_log(phba, KERN_ERR,
-				    BEISCSI_LOG_INIT | BEISCSI_LOG_CONFIG,
-				    "BG", "Memory Allocation Failure\n");
+			beiscsi_err(phba, BEISCSI_LOG_INIT |
 BEISCSI_LOG_CONFIG,
+				    "Memory Allocation Failure\n");
 
-				/* Free the DMA memory for the IOCTL

issuing

drivers/scsi/be2iscsi/be_mgmt.c int be_mgmt_get_boot_shandle(struct beiscsi_hba · line 1396

Quoted 13 lines
drivers/scsi/be2iscsi/be_mgmt.c +1 -0
 */
+			/* Free the DMA memory for the IOCTL issuing */
drivers/scsi/be2iscsi/be_mgmt.c +0 -3
 				pci_free_consistent(phba->ctrl.pdev,
 						    nonemb_cmd.size,
 						    nonemb_cmd.va,
@@ -1390,17 +1380,15 @@ int be_mgmt_get_boot_shandle(struct beiscsi_hba
 *phba,
 		/* Get the Boot Target Session Handle and Count*/
 		tag = mgmt_get_boot_target(phba);
 		if (!tag) {
-			beiscsi_log(phba, KERN_ERR,
-				    BEISCSI_LOG_CONFIG | BEISCSI_LOG_INIT,
-				    "BG", "Getting Boot Target Info

Failed\n");

drivers/scsi/be2iscsi/be_mgmt.c int be_mgmt_get_boot_shandle(struct beiscsi_hba *phba,

Quoted 11 lines
drivers/scsi/be2iscsi/be_mgmt.c +2 -3
+			beiscsi_err(phba, BEISCSI_LOG_CONFIG |
 BEISCSI_LOG_INIT,
+				    "Getting Boot Target Info Failed\n");
 			return -EAGAIN;
 		}
 
 		rc = beiscsi_mccq_compl_wait(phba, tag, &wrb, NULL);
 		if (rc) {
-			beiscsi_log(phba, KERN_ERR,
-				    BEISCSI_LOG_INIT | BEISCSI_LOG_CONFIG,
-				    "BG", "MBX CMD get_boot_target

Failed\n");

Quoted 7 lines
drivers/scsi/be2iscsi/be_mgmt.c +2 -0
+			beiscsi_err(phba, BEISCSI_LOG_INIT |
 BEISCSI_LOG_CONFIG,
+				    "MBX CMD get_boot_target Failed\n");
drivers/scsi/be2iscsi/be_mgmt.c +0 -0
 			return -EBUSY;
 		}

drivers/scsi/be2iscsi/be_mgmt.c int be_mgmt_get_boot_shandle(struct beiscsi_hba · line 1401

Quoted 9 lines
drivers/scsi/be2iscsi/be_mgmt.c +2 -3
@@ -1408,9 +1396,9 @@ int be_mgmt_get_boot_shandle(struct beiscsi_hba
 *phba,
 
 		/* Check if the there are any Boot targets configured */
 		if (!boot_resp->boot_session_count) {
-			beiscsi_log(phba, KERN_INFO,
-				    BEISCSI_LOG_INIT | BEISCSI_LOG_CONFIG,
-				    "BG", "No boot targets configured\n");
+			beiscsi_info(phba,
+				     BEISCSI_LOG_INIT |

BEISCSI_LOG_CONFIG,

Quoted 120 lines
drivers/scsi/be2iscsi/be_mgmt.c +15 -21
+				     "No boot targets configured\n");
 			return -ENXIO;
 		}
@@ -1424,25 +1412,22 @@ int be_mgmt_get_boot_shandle(struct beiscsi_hba
 *phba,
 		tag = mgmt_reopen_session(phba,
 BE_REOPEN_BOOT_SESSIONS,
 					  INVALID_SESS_HANDLE);
 		if (!tag) {
-			beiscsi_log(phba, KERN_ERR,
-				    BEISCSI_LOG_INIT | BEISCSI_LOG_CONFIG,
-				    "BG", "mgmt_reopen_session Failed\n");
+			beiscsi_err(phba, BEISCSI_LOG_INIT |
 BEISCSI_LOG_CONFIG,
+				    "mgmt_reopen_session Failed\n");
 			return -EAGAIN;
 		}
 
 		rc = beiscsi_mccq_compl_wait(phba, tag, NULL, NULL);
 		if (rc) {
-			beiscsi_log(phba, KERN_ERR,
-				    BEISCSI_LOG_INIT | BEISCSI_LOG_CONFIG,
-				    "BG", "mgmt_reopen_session Failed");
+			beiscsi_err(phba, BEISCSI_LOG_INIT |
 BEISCSI_LOG_CONFIG,
+				    "mgmt_reopen_session Failed");
 			return rc;
 		}
 	} while (--boot_retry);
 
 	/* Couldn't log into the boot target */
-	beiscsi_log(phba, KERN_ERR,
-		    BEISCSI_LOG_INIT | BEISCSI_LOG_CONFIG,
-		    "BG", "Login to Boot Target Failed\n");
+	beiscsi_err(phba, BEISCSI_LOG_INIT | BEISCSI_LOG_CONFIG,
+		    "Login to Boot Target Failed\n");
 	return -ENXIO;
 }
@@ -1466,17 +1451,15 @@ int mgmt_set_vlan(struct beiscsi_hba *phba,
 
 	tag = be_cmd_set_vlan(phba, vlan_tag);
 	if (!tag) {
-		beiscsi_log(phba, KERN_ERR,
-			    (BEISCSI_LOG_CONFIG | BEISCSI_LOG_MBOX),
-			    "BG", "VLAN Setting Failed\n");
+		beiscsi_err(phba, BEISCSI_LOG_CONFIG | BEISCSI_LOG_MBOX,
+			    "VLAN Setting Failed\n");
 		return -EBUSY;
 	}
 
 	rc = beiscsi_mccq_compl_wait(phba, tag, NULL, NULL);
 	if (rc) {
-		beiscsi_log(phba, KERN_ERR,
-			    (BEISCSI_LOG_CONFIG | BEISCSI_LOG_MBOX),
-			    "BS", "VLAN MBX Cmd Failed\n");
+		beiscsi_err(phba, BEISCSI_LOG_CONFIG | BEISCSI_LOG_MBOX,
+			    "VLAN MBX Cmd Failed\n");
 		return rc;
 	}
[… more lines in the raw message]

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

drivers/scsi/be2iscsi/be_mgmt.c +2 -5

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

0x%x\n",

drivers/scsi/be2iscsi/be_mgmt.c +2 -1

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

2.8.0.rc4.16.g56331f8

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Part of the diff is not shown here. View the raw message.

#19 lore raw

Re: [PATCH] be2iscsi: Use a more current logging style

Quoted 2 lines · Jitendra Bhivare

Thanks Joe for taking this up. It has been pending for long time from our side.

Thanks, not a problem, it took ~10 minutes.

There was a bit of an issue about your reply though.

First there was ~50 k of quoted stuff without any content

Quoted 1 line

[ hundreds and hundreds of quoted lines ]

and then this happened:

Quoted 12 lines

Review

Quoted 1 line
(quoted diff) +0 -0

b/drivers/scsi/be2iscsi/be_main.h

drivers/scsi/be2iscsi/be_main.h struct hwi_context_memory { · line 1082

Quoted 7 lines

index aa9c682..7cce6e3 100644

drivers/scsi/be2iscsi/be_main.h +0 -0
@@ -1081,15 +1081,19 @@ struct hwi_context_memory {
  #define BEISCSI_LOG_CONFIG	0x0020	/* CONFIG Code Path */
  #define BEISCSI_LOG_ISCSI	0x0040	/* SCSI/iSCSI Protocol related

Logs */

Quoted 2 lines
Quoted 14 lines

drivers/scsi/be2iscsi/be_main.h struct hwi_context_memory { · line 1087

Quoted 12 lines
drivers/scsi/be2iscsi/be_main.h +1 -4
-#define __beiscsi_log(phba, level, fmt, ...)				\
-	shost_printk(level, phba->shost, fmt, ##__VA_ARGS__)
-
-#define beiscsi_log(phba, level, mask, prefix, fmt, ...)		\
+#define beiscsi_printk(level, phba, mask, fmt, ...)			\

 do { \

drivers/scsi/be2iscsi/be_main.h +2 -4
-	uint32_t log_value = phba->attr_log_enable;			\
-	if (((mask) & log_value) || (level[1] <= '3'))			\
-		__beiscsi_log(phba, level, prefix "_%d: " fmt,		\
-			      __LINE__, ##__VA_ARGS__);			\
+	if ((mask) & (phba)->attr_log_enable)				\
+		shost_printk(level, phba->shost,			\

[JB] PCI dev_printk would be more useful with SCSI host_no included by default in the message.

This is a good note that seems simple enough, but I almost missed this.

Given the reply at the top and the _very_ long uncommented quoted block, I just about assumed it was a useless block quote that you didn't bother to trim.

Please make it easier to find your replies and notes by deleting irrelevant quoted stuff.

Also, I think I misread the code.

The original code is <= '3' i.e.: show all KERN_ERR. That is not correct in the new code.

I don't know the code well and don't have a test bed with the hardware.

Is it possible for a beiscsi_<level> message to be called before phba->pcidev is set to a valid value in beiscsi_hba_alloc?   It appears the code is careful to only use dev_<level> logging calls before probe.

#20 lore raw

RE: [PATCH] be2iscsi: Use a more current logging style

Quoted 4 lines

-----Original Message-----
From: Joe Perches [mailto:[email protected]]
Sent: Tuesday, August 16, 2016 3:57 PM
To: Jitendra Bhivare; Christophe JAILLET; Jayamohan Kallickal; Ketan

Mukadam

Quoted 21 lines

Cc: Bart Van Assche; James E.J. Bottomley; Martin K. Petersen; linux- [email protected]; [email protected]
Subject: Re: [PATCH] be2iscsi: Use a more current logging style

Quoted 2 lines · Jitendra Bhivare

Thanks Joe for taking this up. It has been pending for long time from our side.

Thanks, not a problem, it took ~10 minutes.

There was a bit of an issue about your reply though.

First there was ~50 k of quoted stuff without any content

Quoted 1 line

[ hundreds and hundreds of quoted lines ]

and then this happened:

Quoted 3 lines

Review

Quoted 1 line
(quoted diff) +0 -0

b/drivers/scsi/be2iscsi/be_main.h

Quoted 1 line
Quoted 6 lines
Quoted 6 lines

drivers/scsi/be2iscsi/be_main.h struct hwi_context_memory { · line 1082

Quoted 6 lines

index aa9c682..7cce6e3 100644

drivers/scsi/be2iscsi/be_main.h +0 -0
@@ -1081,15 +1081,19 @@ struct hwi_context_memory {
  #define BEISCSI_LOG_CONFIG	0x0020	/* CONFIG Code Path */
  #define BEISCSI_LOG_ISCSI	0x0040	/* SCSI/iSCSI Protocol

related

Quoted 4 lines
Quoted 4 lines

Logs */

Quoted 3 lines
drivers/scsi/be2iscsi/be_main.h +0 -1
-#define __beiscsi_log(phba, level, fmt, ...)

\

Quoted 4 lines
Quoted 4 lines

drivers/scsi/be2iscsi/be_main.h struct hwi_context_memory {

Quoted 4 lines
drivers/scsi/be2iscsi/be_main.h +1 -3
-	shost_printk(level, phba->shost, fmt, ##__VA_ARGS__)
-
-#define beiscsi_log(phba, level, mask, prefix, fmt, ...)		\
+#define beiscsi_printk(level, phba, mask, fmt, ...)

\

Quoted 11 lines
Quoted 1 line

drivers/scsi/be2iscsi/be_main.h struct hwi_context_memory { · line 1084

Quoted 1 line
drivers/scsi/be2iscsi/be_main.h +0 -0
  do {
	\
Quoted 8 lines

drivers/scsi/be2iscsi/be_main.h struct hwi_context_memory { · line 1087

Quoted 6 lines
drivers/scsi/be2iscsi/be_main.h +2 -4
-	uint32_t log_value = phba->attr_log_enable;			\
-	if (((mask) & log_value) || (level[1] <= '3'))			\
-		__beiscsi_log(phba, level, prefix "_%d: " fmt,		\
-			      __LINE__, ##__VA_ARGS__);			\
+	if ((mask) & (phba)->attr_log_enable)				\
+		shost_printk(level, phba->shost,			\

[JB] PCI dev_printk would be more useful with SCSI host_no included by default in the message.

Quoted 3 lines

This is a good note that seems simple enough, but I almost missed this.

Given the reply at the top and the _very_ long uncommented quoted block,

I just

Quoted 1 line

about assumed it was a useless block quote that you didn't bother to

trim.

Quoted 2 lines

Please make it easier to find your replies and notes by deleting

irrelevant quoted

Quoted 10 lines

stuff.

Also, I think I misread the code.

The original code is <= '3' i.e.: show all KERN_ERR. That is not correct in the new code.

I don't know the code well and don't have a test bed with the hardware.

Is it possible for a beiscsi_<level> message to be called before

phba->pcidev is

Quoted 1 line

set to a valid value in beiscsi_hba_alloc?   It appears the code is

careful to only

Quoted 1 line

use dev_<level> logging calls before probe.

[JB] KERN_ERR messages need to be logged irrespective of the masks. I understand, that in some places, mask is unnecessarily passed. I had made sure to call __beiscsi_log in some places.
Can we please keep it that way? So beiscsi_err calls dev_err directly or is replaced with dev_err.

It's safe to assume pcidev will be valid for all beiscsi_log calls. Will test your change on my setup before ack'ing.

Actually, we too wanted to get rid of BC_/BM_... line# way and replace with
ABCD = error identifier.
A <category>
B <subcategory>
CD <error code>

But that will be substantial change with some testing requirements. For now, this looks good.

#21 lore raw

Re: [PATCH] be2iscsi: Use a more current logging style

Quoted 93 lines · Jitendra Bhivare
Quoted 5 lines

-----Original Message-----
From: Joe Perches [mailto:[email protected]]
Sent: Tuesday, August 16, 2016 3:57 PM
To: Jitendra Bhivare; Christophe JAILLET; Jayamohan Kallickal; Ketan

Mukadam

Quoted 25 lines

Cc: Bart Van Assche; James E.J. Bottomley; Martin K. Petersen; linux- [email protected]; [email protected]
Subject: Re: [PATCH] be2iscsi: Use a more current logging style

Quoted 3 lines · Jitendra Bhivare

Thanks Joe for taking this up. It has been pending for long time from our side.

Thanks, not a problem, it took ~10 minutes.

There was a bit of an issue about your reply though.

First there was ~50 k of quoted stuff without any content

Quoted 2 lines

[ hundreds and hundreds of quoted lines ]

and then this happened:

Quoted 6 lines

Review

Quoted 3 lines
(quoted diff) +0 -0

b/drivers/scsi/be2iscsi/be_main.h

Quoted 2 lines
Quoted 6 lines
Quoted 6 lines

drivers/scsi/be2iscsi/be_main.h struct hwi_context_memory { · line 1082

Quoted 6 lines

index aa9c682..7cce6e3 100644

drivers/scsi/be2iscsi/be_main.h +0 -0
@@ -1081,15 +1081,19 @@ struct hwi_context_memory {
  #define BEISCSI_LOG_CONFIG	0x0020	/* CONFIG Code Path */
  #define BEISCSI_LOG_ISCSI	0x0040	/* SCSI/iSCSI Protocol

related

Quoted 7 lines
Quoted 7 lines

Logs */

Quoted 4 lines
drivers/scsi/be2iscsi/be_main.h +0 -1
-#define __beiscsi_log(phba, level, fmt, ...)

\

Quoted 7 lines
Quoted 7 lines

drivers/scsi/be2iscsi/be_main.h struct hwi_context_memory {

Quoted 7 lines
drivers/scsi/be2iscsi/be_main.h +1 -3
-	shost_printk(level, phba->shost, fmt, ##__VA_ARGS__)
-
-#define beiscsi_log(phba, level, mask, prefix, fmt, ...)		\
+#define beiscsi_printk(level, phba, mask, fmt, ...)

\

Quoted 15 lines
Quoted 4 lines

drivers/scsi/be2iscsi/be_main.h struct hwi_context_memory { · line 1084

Quoted 4 lines
drivers/scsi/be2iscsi/be_main.h +0 -0
  do {
	\
Quoted 10 lines

drivers/scsi/be2iscsi/be_main.h struct hwi_context_memory { · line 1087

Quoted 8 lines
drivers/scsi/be2iscsi/be_main.h +2 -4
-	uint32_t log_value = phba->attr_log_enable;			\
-	if (((mask) & log_value) || (level[1] <= '3'))			\
-		__beiscsi_log(phba, level, prefix "_%d: " fmt,		\
-			      __LINE__, ##__VA_ARGS__);			\
+	if ((mask) & (phba)->attr_log_enable)				\
+		shost_printk(level, phba->shost,			\

[JB] PCI dev_printk would be more useful with SCSI host_no included by default in the message.

Quoted 3 lines

This is a good note that seems simple enough, but I almost missed this.

Given the reply at the top and the _very_ long uncommented quoted block,

I just

Quoted 2 lines

about assumed it was a useless block quote that you didn't bother to

trim.

Quoted 3 lines

Please make it easier to find your replies and notes by deleting

irrelevant quoted

Quoted 11 lines

stuff.

Also, I think I misread the code.

The original code is <= '3' i.e.: show all KERN_ERR. That is not correct in the new code.

I don't know the code well and don't have a test bed with the hardware.

Is it possible for a beiscsi_ message to be called before

phba->pcidev is

Quoted 1 line
Quoted 7 lines
Quoted 1 line

set to a valid value in beiscsi_hba_alloc?   It appears the code is

careful to only

Quoted 2 lines

use dev_ logging calls before probe.

[JB] KERN_ERR messages need to be logged irrespective of the masks. I understand, that in some places, mask is unnecessarily passed. I had made sure to call __beiscsi_log in some places.

I did as well.

Quoted 2 lines

Can we please keep it that way? So beiscsi_err calls dev_err directly or is replaced with dev_err.

No worries, I'll respin the series after Christophe's patches are applied.

Quoted 2 lines

It's safe to assume pcidev will be valid for all beiscsi_log calls. Will test your change on my setup before ack'ing.

Don't bother until you get another patchset.

I suggest you fix your email client when sending
replies to me and to lkml.

What I received is very difficult to read due to
the odd line wrapping.

#22 lore raw

PATCH 1/2 be2iscsi: Coalesce split strings and formats

In reply to Joe Perches

Split strings are not preferred for ease of grep.

---
 drivers/scsi/be2iscsi/be_cmds.c  |  15 ++--
 drivers/scsi/be2iscsi/be_iscsi.c |  33 +++----
 drivers/scsi/be2iscsi/be_main.c  | 180 ++++++++++++++-------------------------
 drivers/scsi/be2iscsi/be_mgmt.c  |   3 +-
 4 files changed, 85 insertions(+), 146 deletions(-)
drivers/scsi/be2iscsi/be_cmds.c +6 -9
index a55eaee..cefa342 100644
@@ -96,8 +96,8 @@ int be_chk_reset_complete(struct beiscsi_hba *phba)
 
 	if ((status & 0x80000000) || (!num_loop)) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BC_%d : Failed in be_chk_reset_complete"
-			    "status = 0x%x\n", status);
+			    "BC_%d : Failed in be_chk_reset_complete status = 0x%x\n",
+			    status);
 		return -EIO;
 	}
 
@@ -292,9 +292,7 @@ int beiscsi_mccq_compl_wait(struct beiscsi_hba *phba,
 		beiscsi_log(phba, KERN_WARNING,
 			    BEISCSI_LOG_INIT | BEISCSI_LOG_EH |
 			    BEISCSI_LOG_CONFIG,
-			    "BC_%d : MBX Cmd Failed for "
-			    "Subsys : %d Opcode : %d with "
-			    "Status : %d and Extd_Status : %d\n",
+			    "BC_%d : MBX Cmd Failed for Subsys : %d Opcode : %d with Status : %d and Extd_Status : %d\n",
 			    mbx_hdr->subsystem,
 			    mbx_hdr->opcode,
 			    status, addl_status);
@@ -304,8 +302,7 @@ int beiscsi_mccq_compl_wait(struct beiscsi_hba *phba,
 			beiscsi_log(phba, KERN_WARNING,
 				    BEISCSI_LOG_INIT | BEISCSI_LOG_EH |
 				    BEISCSI_LOG_CONFIG,
-				    "BC_%d : Insufficient Buffer Error "
-				    "Resp_Len : %d Actual_Resp_Len : %d\n",
+				    "BC_%d : Insufficient Buffer Error Resp_Len : %d Actual_Resp_Len : %d\n",
 				    mbx_resp_hdr->response_length,
 				    mbx_resp_hdr->actual_resp_len);
 			rc = -EAGAIN;
@@ -1035,8 +1032,8 @@ int beiscsi_cmd_q_destroy(struct be_ctrl_info *ctrl, struct be_queue_info *q,
 	int status;
 
 	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-		    "BC_%d : In beiscsi_cmd_q_destroy "
-		    "queue_type : %d\n", queue_type);
+		    "BC_%d : In beiscsi_cmd_q_destroy queue_type : %d\n",
+		    queue_type);
 
 	mutex_lock(&ctrl->mbox_lock);
 	memset(wrb, 0, sizeof(*wrb));
drivers/scsi/be2iscsi/be_iscsi.c +14 -19
index 09f89a3..d28ac23 100644
@@ -70,9 +70,8 @@ struct iscsi_cls_session *beiscsi_session_create(struct iscsi_endpoint *ep,
 
 	if (cmds_max > beiscsi_ep->phba->params.wrbs_per_cxn) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG,
-			    "BS_%d : Cannot handle %d cmds."
-			    "Max cmds per session supported is %d. Using %d."
-			    "\n", cmds_max,
+			    "BS_%d : Cannot handle %d cmds.Max cmds per session supported is %d. Using %d.\n",
+			    cmds_max,
 			    beiscsi_ep->phba->params.wrbs_per_cxn,
 			    beiscsi_ep->phba->params.wrbs_per_cxn);
 
@@ -139,8 +138,8 @@ beiscsi_conn_create(struct iscsi_cls_session *cls_session, u32 cid)
 	phba = iscsi_host_priv(shost);
 
 	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_CONFIG,
-		    "BS_%d : In beiscsi_conn_create ,cid"
-		    "from iscsi layer=%d\n", cid);
+		    "BS_%d : In beiscsi_conn_create ,cidfrom iscsi layer=%d\n",
+		    cid);
 
 	cls_conn = iscsi_conn_setup(cls_session, sizeof(*beiscsi_conn), cid);
 	if (!cls_conn)
@@ -248,8 +247,7 @@ static int beiscsi_create_ipv4_iface(struct beiscsi_hba *phba)
 					      0, 0);
 	if (!phba->ipv4_iface) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG,
-			    "BS_%d : Could not "
-			    "create default IPv4 address.\n");
+			    "BS_%d : Could not create default IPv4 address.\n");
 		return -ENODEV;
 	}
 
@@ -267,8 +265,7 @@ static int beiscsi_create_ipv6_iface(struct beiscsi_hba *phba)
 					      0, 0);
 	if (!phba->ipv6_iface) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG,
-			    "BS_%d : Could not "
-			    "create default IPv6 address.\n");
+			    "BS_%d : Could not create default IPv6 address.\n");
 		return -ENODEV;
 	}
 
@@ -505,8 +502,7 @@ int be2iscsi_iface_set_param(struct Scsi_Host *shost,
 		 */
 		if (iface_param->iface_num) {
 			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG,
-				    "BS_%d : Invalid iface_num %d."
-				    "Only iface_num 0 is supported.\n",
+				    "BS_%d : Invalid iface_num %d.Only iface_num 0 is supported.\n",
 				    iface_param->iface_num);
 
 			return -EINVAL;
@@ -651,8 +647,8 @@ int beiscsi_ep_get_param(struct iscsi_endpoint *ep,
 
 	beiscsi_log(beiscsi_ep->phba, KERN_INFO,
 		    BEISCSI_LOG_CONFIG,
-		    "BS_%d : In beiscsi_ep_get_param,"
-		    " param= %d\n", param);
+		    "BS_%d : In beiscsi_ep_get_param, param= %d\n",
+		    param);
 
 	switch (param) {
 	case ISCSI_PARAM_CONN_PORT:
@@ -680,8 +676,8 @@ int beiscsi_set_param(struct iscsi_cls_conn *cls_conn,
 
 	phba = ((struct beiscsi_conn *)conn->dd_data)->phba;
 	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_CONFIG,
-		    "BS_%d : In beiscsi_conn_set_param,"
-		    " param= %d\n", param);
+		    "BS_%d : In beiscsi_conn_set_param, param= %d\n",
+		    param);
 
 	ret = iscsi_set_param(cls_conn, param, buf, buflen);
 	if (ret)
@@ -817,8 +813,8 @@ int beiscsi_get_host_param(struct Scsi_Host *shost,
 		return -EBUSY;
 	} else {
 		beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_CONFIG,
-			    "BS_%d : In beiscsi_get_host_param,"
-			    " param = %d\n", param);
+			    "BS_%d : In beiscsi_get_host_param, param = %d\n",
+			    param);
 	}
 
 	switch (param) {
@@ -1123,8 +1119,7 @@ static int beiscsi_open_conn(struct iscsi_endpoint *ep,
 	if (nonemb_cmd.va == NULL) {
 
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG,
-			    "BS_%d : Failed to allocate memory for"
-			    " mgmt_open_connection\n");
+			    "BS_%d : Failed to allocate memory for mgmt_open_connection\n");
 
 		beiscsi_free_ep(beiscsi_ep);
 		return -ENOMEM;
drivers/scsi/be2iscsi/be_main.c +64 -116

525 lines not on this page · raw message

drivers/scsi/be2iscsi/be_mgmt.c +1 -2
index 83926e2..888567b 100644
@@ -519,8 +519,7 @@ int mgmt_check_supported_fw(struct be_ctrl_info *ctrl,
 				&nonemb_cmd.dma);
 	if (nonemb_cmd.va == NULL) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BG_%d : Failed to allocate memory for "
-			    "mgmt_check_supported_fw\n");
+			    "BG_%d : Failed to allocate memory for mgmt_check_supported_fw\n");
 		return -ENOMEM;
 	}
 	nonemb_cmd.size = sizeof(struct be_mgmt_controller_attributes);
Signature · 1 line
2.8.0.rc4.16.g56331f8
#23 lore raw

PATCH 2/2 be2iscsi: Use a standard logging style

In reply to Joe Perches

Neaten all the beiscsi_log uses.

Remove the leading 'B<type>_%d" prefixes and make the format and arguments match without an implied __LINE__.

---
 drivers/scsi/be2iscsi/be_cmds.c  |  54 +++----
 drivers/scsi/be2iscsi/be_iscsi.c | 100 ++++++------
 drivers/scsi/be2iscsi/be_main.c  | 332 +++++++++++++++++++--------------------
 drivers/scsi/be2iscsi/be_main.h  |  19 +--
 drivers/scsi/be2iscsi/be_mgmt.c  |  98 ++++++------
 5 files changed, 300 insertions(+), 303 deletions(-)
drivers/scsi/be2iscsi/be_cmds.c +27 -27
index cefa342..a51bc0e 100644
@@ -96,7 +96,7 @@ int be_chk_reset_complete(struct beiscsi_hba *phba)
 
 	if ((status & 0x80000000) || (!num_loop)) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BC_%d : Failed in be_chk_reset_complete status = 0x%x\n",
+			    "BC", "Failed in be_chk_reset_complete status = 0x%x\n",
 			    status);
 		return -EIO;
 	}
@@ -137,7 +137,7 @@ struct be_mcc_wrb *alloc_mcc_wrb(struct beiscsi_hba *phba,
 	if (mccq->used == mccq->len) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT |
 			    BEISCSI_LOG_CONFIG | BEISCSI_LOG_MBOX,
-			    "BC_%d : MCC queue full: WRB used %u tag avail %u\n",
+			    "BC", "MCC queue full: WRB used %u tag avail %u\n",
 			    mccq->used, phba->ctrl.mcc_tag_available);
 		goto alloc_failed;
 	}
@@ -149,7 +149,7 @@ struct be_mcc_wrb *alloc_mcc_wrb(struct beiscsi_hba *phba,
 	if (!tag) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT |
 			    BEISCSI_LOG_CONFIG | BEISCSI_LOG_MBOX,
-			    "BC_%d : MCC tag 0 allocated: tag avail %u alloc index %u\n",
+			    "BC", "MCC tag 0 allocated: tag avail %u alloc index %u\n",
 			    phba->ctrl.mcc_tag_available,
 			    phba->ctrl.mcc_alloc_index);
 		goto alloc_failed;
@@ -266,7 +266,7 @@ int beiscsi_mccq_compl_wait(struct beiscsi_hba *phba,
 		beiscsi_log(phba, KERN_ERR,
 			    BEISCSI_LOG_INIT | BEISCSI_LOG_EH |
 			    BEISCSI_LOG_CONFIG,
-			    "BC_%d : MBX Cmd Completion timed out\n");
+			    "BC", "MBX Cmd Completion timed out\n");
 		return -EBUSY;
 	}
 
@@ -292,7 +292,7 @@ int beiscsi_mccq_compl_wait(struct beiscsi_hba *phba,
 		beiscsi_log(phba, KERN_WARNING,
 			    BEISCSI_LOG_INIT | BEISCSI_LOG_EH |
 			    BEISCSI_LOG_CONFIG,
-			    "BC_%d : MBX Cmd Failed for Subsys : %d Opcode : %d with Status : %d and Extd_Status : %d\n",
+			    "BC", "MBX Cmd Failed for Subsys : %d Opcode : %d with Status : %d and Extd_Status : %d\n",
 			    mbx_hdr->subsystem,
 			    mbx_hdr->opcode,
 			    status, addl_status);
@@ -302,7 +302,7 @@ int beiscsi_mccq_compl_wait(struct beiscsi_hba *phba,
 			beiscsi_log(phba, KERN_WARNING,
 				    BEISCSI_LOG_INIT | BEISCSI_LOG_EH |
 				    BEISCSI_LOG_CONFIG,
-				    "BC_%d : Insufficient Buffer Error Resp_Len : %d Actual_Resp_Len : %d\n",
+				    "BC", "Insufficient Buffer Error Resp_Len : %d Actual_Resp_Len : %d\n",
 				    mbx_resp_hdr->response_length,
 				    mbx_resp_hdr->actual_resp_len);
 			rc = -EAGAIN;
@@ -341,7 +341,7 @@ static int beiscsi_process_mbox_compl(struct be_ctrl_info *ctrl,
 	if (!compl->flags) {
 		beiscsi_log(phba, KERN_ERR,
 				BEISCSI_LOG_CONFIG | BEISCSI_LOG_MBOX,
-				"BC_%d : BMBX busy, no completion\n");
+				"BC", "BMBX busy, no completion\n");
 		return -EBUSY;
 	}
 	compl->flags = le32_to_cpu(compl->flags);
@@ -363,7 +363,7 @@ static int beiscsi_process_mbox_compl(struct be_ctrl_info *ctrl,
 		return 0;
 
 	beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG | BEISCSI_LOG_MBOX,
-		    "BC_%d : error in cmd completion: Subsystem : %d Opcode : %d status(compl/extd)=%d/%d\n",
+		    "BC", "error in cmd completion: Subsystem : %d Opcode : %d status(compl/extd)=%d/%d\n",
 		    hdr->subsystem, hdr->opcode, compl_status, extd_status);
 
 	if (compl_status == MCC_STATUS_INSUFFICIENT_BUFFER) {
@@ -391,13 +391,13 @@ static void beiscsi_process_async_link(struct beiscsi_hba *phba,
 		phba->state = BE_ADAPTER_LINK_UP | BE_ADAPTER_CHECK_BOOT;
 		phba->get_boot = BE_GET_BOOT_RETRIES;
 		__beiscsi_log(phba, KERN_ERR,
-			      "BC_%d : Link Up on Port %d tag 0x%x\n",
-			      evt->physical_port, evt->event_tag);
+			      "BC%d: Link Up on Port %d tag 0x%x\n",
+			      __LINE__, evt->physical_port, evt->event_tag);
 	} else {
 		phba->state = BE_ADAPTER_LINK_DOWN;
 		__beiscsi_log(phba, KERN_ERR,
-			      "BC_%d : Link Down on Port %d tag 0x%x\n",
-			      evt->physical_port, evt->event_tag);
+			      "BC%d: Link Down on Port %d tag 0x%x\n",
+			      __LINE__, evt->physical_port, evt->event_tag);
 		iscsi_host_for_each_session(phba->shost,
 					    beiscsi_fail_session);
 	}
@@ -439,8 +439,8 @@ static void beiscsi_process_async_sli(struct beiscsi_hba *phba,
 	if (state >= ARRAY_SIZE(beiscsi_port_misconf_event_msg)) {
 		/* fw is reporting a state we don't know, log and return */
 		__beiscsi_log(phba, KERN_ERR,
-			    "BC_%d : Port %c: Unrecognized optic state 0x%x\n",
-			    phba->port_name, async_sli->event_data1);
+			      "BC%d: Port %c: Unrecognized optic state 0x%x\n",
+			      __LINE__, phba->port_name, async_sli->event_data1);
 		return;
 	}
 
@@ -459,8 +459,8 @@ static void beiscsi_process_async_sli(struct beiscsi_hba *phba,
 	}
 
 	if (old_state != phba->optic_state)
-		__beiscsi_log(phba, sev, "BC_%d : Port %c: %s%s\n",
-			      phba->port_name,
+		__beiscsi_log(phba, sev, "BC%d: Port %c: %s%s\n",
+			      __LINE__, phba->port_name,
 			      beiscsi_port_misconf_event_msg[state],
 			      !msg ? "" : msg);
 }
@@ -492,7 +492,7 @@ void beiscsi_process_async_event(struct beiscsi_hba *phba,
 	}
 
 	beiscsi_log(phba, sev, BEISCSI_LOG_CONFIG | BEISCSI_LOG_MBOX,
-		    "BC_%d : ASYNC Event %x: status 0x%08x flags 0x%08x\n",
+		    "BC", "ASYNC Event %x: status 0x%08x flags 0x%08x\n",
 		    evt_code, compl->status, compl->flags);
 }
 
@@ -512,7 +512,7 @@ int beiscsi_process_mcc_compl(struct be_ctrl_info *ctrl,
 		      &ctrl->ptag_state[tag].tag_state)) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_MBOX |
 			    BEISCSI_LOG_INIT | BEISCSI_LOG_CONFIG,
-			    "BC_%d : MBX cmd completed but not posted\n");
+			    "BC", "MBX cmd completed but not posted\n");
 		return 0;
 	}
 
@@ -520,7 +520,7 @@ int beiscsi_process_mcc_compl(struct be_ctrl_info *ctrl,
 		beiscsi_log(phba, KERN_WARNING,
 			    BEISCSI_LOG_MBOX | BEISCSI_LOG_INIT |
 			    BEISCSI_LOG_CONFIG,
-			    "BC_%d : MBX Completion for timeout Command from FW\n");
+			    "BC", "MBX Completion for timeout Command from FW\n");
 		/**
 		 * Check for the size before freeing resource.
 		 * Only for non-embedded cmd, PCI resource is allocated.
@@ -573,7 +573,7 @@ int be_mcc_compl_poll(struct beiscsi_hba *phba, unsigned int tag)
 		      &ctrl->ptag_state[tag].tag_state)) {
 		beiscsi_log(phba, KERN_ERR,
 			    BEISCSI_LOG_CONFIG | BEISCSI_LOG_MBOX,
-			    "BC_%d: tag %u state not running\n", tag);
+			    "BC", "tag %u state not running\n", tag);
 		return 0;
 	}
 	for (i = 0; i < mcc_timeout; i++) {
@@ -594,7 +594,7 @@ int be_mcc_compl_poll(struct beiscsi_hba *phba, unsigned int tag)
 		return 0;
 
 	beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG | BEISCSI_LOG_MBOX,
-		    "BC_%d : FW Timed Out\n");
+		    "BC", "FW Timed Out\n");
 	phba->fw_timeout = true;
 	beiscsi_ue_detect(phba);
 	return -EBUSY;
@@ -657,7 +657,7 @@ static int be_mbox_db_ready_poll(struct be_ctrl_info *ctrl)
 
 	beiscsi_log(phba, KERN_ERR,
 			BEISCSI_LOG_CONFIG | BEISCSI_LOG_MBOX,
-			"BC_%d : FW Timed Out\n");
+			"BC", "FW Timed Out\n");
 
 	phba->fw_timeout = true;
 	beiscsi_ue_detect(phba);
@@ -850,7 +850,7 @@ int be_cmd_fw_initialize(struct be_ctrl_info *ctrl)
 	status = be_mbox_notify(ctrl);
 	if (status)
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BC_%d : be_cmd_fw_initialize Failed\n");
+			    "BC", "be_cmd_fw_initialize Failed\n");
 
 	mutex_unlock(&ctrl->mbox_lock);
 	return status;
@@ -891,7 +891,7 @@ int be_cmd_fw_uninit(struct be_ctrl_info *ctrl)
 	status = be_mbox_notify(ctrl);
 	if (status)
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BC_%d : be_cmd_fw_uninit Failed\n");
+			    "BC", "be_cmd_fw_uninit Failed\n");
 
 	mutex_unlock(&ctrl->mbox_lock);
 	return status;
@@ -956,7 +956,7 @@ int beiscsi_cmd_cq_create(struct be_ctrl_info *ctrl,
 		cq->created = true;
 	} else
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BC_%d : In be_cmd_cq_create, status=ox%08x\n",
+			    "BC", "In be_cmd_cq_create, status=ox%08x\n",
 			    status);
 
 	mutex_unlock(&ctrl->mbox_lock);
@@ -1032,7 +1032,7 @@ int beiscsi_cmd_q_destroy(struct be_ctrl_info *ctrl, struct be_queue_info *q,
 	int status;
 
 	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-		    "BC_%d : In beiscsi_cmd_q_destroy queue_type : %d\n",
+		    "BC", "In beiscsi_cmd_q_destroy queue_type : %d\n",
 		    queue_type);
 
 	mutex_lock(&ctrl->mbox_lock);
@@ -1328,7 +1328,7 @@ int be_cmd_iscsi_post_sgl_pages(struct be_ctrl_info *ctrl,
 		status = be_mbox_notify(ctrl);
 		if (status) {
 			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-				    "BC_%d : FW CMD to map iscsi frags failed.\n");
+				    "BC", "FW CMD to map iscsi frags failed.\n");
 
 			goto error;
 		}
drivers/scsi/be2iscsi/be_iscsi.c +50 -50

381 lines not on this page · raw message

drivers/scsi/be2iscsi/be_main.c +164 -168

1,139 lines not on this page · raw message

drivers/scsi/be2iscsi/be_main.h +10 -9
index 30a4606..aa9c682 100644
@@ -1075,20 +1075,21 @@ struct hwi_context_memory {
 /* Logging related definitions */
 #define BEISCSI_LOG_INIT	0x0001	/* Initialization events */
 #define BEISCSI_LOG_MBOX	0x0002	/* Mailbox Events */
-#define BEISCSI_LOG_MISC	0x0004	/* Miscllaneous Events */
+#define BEISCSI_LOG_MISC	0x0004	/* Miscellaneous Events */
 #define BEISCSI_LOG_EH		0x0008	/* Error Handler */
 #define BEISCSI_LOG_IO		0x0010	/* IO Code Path */
 #define BEISCSI_LOG_CONFIG	0x0020	/* CONFIG Code Path */
 #define BEISCSI_LOG_ISCSI	0x0040	/* SCSI/iSCSI Protocol related Logs */
 
-#define __beiscsi_log(phba, level, fmt, arg...) \
-	shost_printk(level, phba->shost, fmt, __LINE__, ##arg)
+#define __beiscsi_log(phba, level, fmt, ...)				\
+	shost_printk(level, phba->shost, fmt, ##__VA_ARGS__)
 
-#define beiscsi_log(phba, level, mask, fmt, arg...) \
-do { \
-	uint32_t log_value = phba->attr_log_enable; \
-		if (((mask) & log_value) || (level[1] <= '3')) \
-			__beiscsi_log(phba, level, fmt, ##arg); \
-} while (0);
+#define beiscsi_log(phba, level, mask, prefix, fmt, ...)		\
+do {									\
+	uint32_t log_value = phba->attr_log_enable;			\
+	if (((mask) & log_value) || (level[1] <= '3'))			\
+		__beiscsi_log(phba, level, prefix "_%d: " fmt,		\
+			      __LINE__, ##__VA_ARGS__);			\
+} while (0)
 
 #endif
drivers/scsi/be2iscsi/be_mgmt.c +49 -49

389 lines not on this page · raw message

Signature · 1 line
2.8.0.rc4.16.g56331f8