Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[SCSI] bnx2fc: Replace printks with KERN_ALERT to KERN_ERR/KERN_INFO

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>

authored by

Bhanu Prakash Gollapudi and committed by
James Bottomley
b2a554ff 0ac2377b

+52 -51
+8 -8
drivers/scsi/bnx2fc/bnx2fc_debug.h
··· 21 21 22 22 #define BNX2FC_ELS_DBG(fmt, arg...) \ 23 23 BNX2FC_CHK_LOGGING(LOG_ELS, \ 24 - printk(KERN_ALERT PFX fmt, ##arg)) 24 + printk(KERN_INFO PFX fmt, ##arg)) 25 25 26 26 #define BNX2FC_MISC_DBG(fmt, arg...) \ 27 27 BNX2FC_CHK_LOGGING(LOG_MISC, \ 28 - printk(KERN_ALERT PFX fmt, ##arg)) 28 + printk(KERN_INFO PFX fmt, ##arg)) 29 29 30 30 #define BNX2FC_IO_DBG(io_req, fmt, arg...) \ 31 31 do { \ 32 32 if (!io_req || !io_req->port || !io_req->port->lport || \ 33 33 !io_req->port->lport->host) \ 34 34 BNX2FC_CHK_LOGGING(LOG_IO, \ 35 - printk(KERN_ALERT PFX "NULL " fmt, ##arg)); \ 35 + printk(KERN_INFO PFX "NULL " fmt, ##arg)); \ 36 36 else \ 37 37 BNX2FC_CHK_LOGGING(LOG_IO, \ 38 - shost_printk(KERN_ALERT, \ 38 + shost_printk(KERN_INFO, \ 39 39 (io_req)->port->lport->host, \ 40 40 PFX "xid:0x%x " fmt, \ 41 41 (io_req)->xid, ##arg)); \ ··· 46 46 if (!tgt || !tgt->port || !tgt->port->lport || \ 47 47 !tgt->port->lport->host || !tgt->rport) \ 48 48 BNX2FC_CHK_LOGGING(LOG_TGT, \ 49 - printk(KERN_ALERT PFX "NULL " fmt, ##arg)); \ 49 + printk(KERN_INFO PFX "NULL " fmt, ##arg)); \ 50 50 else \ 51 51 BNX2FC_CHK_LOGGING(LOG_TGT, \ 52 - shost_printk(KERN_ALERT, \ 52 + shost_printk(KERN_INFO, \ 53 53 (tgt)->port->lport->host, \ 54 54 PFX "port:%x " fmt, \ 55 55 (tgt)->rport->port_id, ##arg)); \ ··· 60 60 do { \ 61 61 if (!lport || !lport->host) \ 62 62 BNX2FC_CHK_LOGGING(LOG_HBA, \ 63 - printk(KERN_ALERT PFX "NULL " fmt, ##arg)); \ 63 + printk(KERN_INFO PFX "NULL " fmt, ##arg)); \ 64 64 else \ 65 65 BNX2FC_CHK_LOGGING(LOG_HBA, \ 66 - shost_printk(KERN_ALERT, lport->host, \ 66 + shost_printk(KERN_INFO, lport->host, \ 67 67 PFX fmt, ##arg)); \ 68 68 } while (0) 69 69
+4 -4
drivers/scsi/bnx2fc/bnx2fc_els.c
··· 274 274 275 275 rc = fc_remote_port_chkready(rport); 276 276 if (rc) { 277 - printk(KERN_ALERT PFX "els 0x%x: rport not ready\n", op); 277 + printk(KERN_ERR PFX "els 0x%x: rport not ready\n", op); 278 278 rc = -EINVAL; 279 279 goto els_err; 280 280 } 281 281 if (lport->state != LPORT_ST_READY || !(lport->link_up)) { 282 - printk(KERN_ALERT PFX "els 0x%x: link is not ready\n", op); 282 + printk(KERN_ERR PFX "els 0x%x: link is not ready\n", op); 283 283 rc = -EINVAL; 284 284 goto els_err; 285 285 } ··· 305 305 mp_req = (struct bnx2fc_mp_req *)&(els_req->mp_req); 306 306 rc = bnx2fc_init_mp_req(els_req); 307 307 if (rc == FAILED) { 308 - printk(KERN_ALERT PFX "ELS MP request init failed\n"); 308 + printk(KERN_ERR PFX "ELS MP request init failed\n"); 309 309 spin_lock_bh(&tgt->tgt_lock); 310 310 kref_put(&els_req->refcount, bnx2fc_cmd_release); 311 311 spin_unlock_bh(&tgt->tgt_lock); ··· 324 324 if ((op >= ELS_LS_RJT) && (op <= ELS_AUTH_ELS)) { 325 325 memcpy(mp_req->req_buf, data, data_len); 326 326 } else { 327 - printk(KERN_ALERT PFX "Invalid ELS op 0x%x\n", op); 327 + printk(KERN_ERR PFX "Invalid ELS op 0x%x\n", op); 328 328 els_req->cb_func = NULL; 329 329 els_req->cb_arg = NULL; 330 330 spin_lock_bh(&tgt->tgt_lock);
+4 -4
drivers/scsi/bnx2fc/bnx2fc_fcoe.c
··· 387 387 lport = hba->ctlr.lp; 388 388 389 389 if (unlikely(lport == NULL)) { 390 - printk(KERN_ALERT PFX "bnx2fc_rcv: lport is NULL\n"); 390 + printk(KERN_ERR PFX "bnx2fc_rcv: lport is NULL\n"); 391 391 goto err; 392 392 } 393 393 394 394 if (unlikely(eth_hdr(skb)->h_proto != htons(ETH_P_FCOE))) { 395 - printk(KERN_ALERT PFX "bnx2fc_rcv: Wrong FC type frame\n"); 395 + printk(KERN_ERR PFX "bnx2fc_rcv: Wrong FC type frame\n"); 396 396 goto err; 397 397 } 398 398 ··· 469 469 fr = fcoe_dev_from_skb(skb); 470 470 lport = fr->fr_dev; 471 471 if (unlikely(lport == NULL)) { 472 - printk(KERN_ALERT PFX "Invalid lport struct\n"); 472 + printk(KERN_ERR PFX "Invalid lport struct\n"); 473 473 kfree_skb(skb); 474 474 return; 475 475 } ··· 1782 1782 rc = dev->register_device(dev, CNIC_ULP_FCOE, 1783 1783 (void *) hba); 1784 1784 if (rc) 1785 - printk(KERN_ALERT PFX "register_device failed, rc = %d\n", rc); 1785 + printk(KERN_ERR PFX "register_device failed, rc = %d\n", rc); 1786 1786 else 1787 1787 set_bit(BNX2FC_CNIC_REGISTERED, &hba->reg_with_cnic); 1788 1788 }
+12 -11
drivers/scsi/bnx2fc/bnx2fc_hwi.c
··· 781 781 spin_lock_bh(&tgt->tgt_lock); 782 782 xid = wqe & FCOE_PEND_WQ_CQE_TASK_ID; 783 783 if (xid >= BNX2FC_MAX_TASKS) { 784 - printk(KERN_ALERT PFX "ERROR:xid out of range\n"); 784 + printk(KERN_ERR PFX "ERROR:xid out of range\n"); 785 785 spin_unlock_bh(&tgt->tgt_lock); 786 786 return; 787 787 } ··· 983 983 struct bnx2fc_rport *tgt = hba->tgt_ofld_list[conn_id]; 984 984 985 985 if (!tgt) { 986 - printk(KERN_ALERT PFX "conn_id 0x%x not valid\n", conn_id); 986 + printk(KERN_ERR PFX "conn_id 0x%x not valid\n", conn_id); 987 987 return; 988 988 } 989 989 ··· 1012 1012 context_id = ofld_kcqe->fcoe_conn_context_id; 1013 1013 tgt = hba->tgt_ofld_list[conn_id]; 1014 1014 if (!tgt) { 1015 - printk(KERN_ALERT PFX "ERROR:ofld_cmpl: No pending ofld req\n"); 1015 + printk(KERN_ERR PFX "ERROR:ofld_cmpl: No pending ofld req\n"); 1016 1016 return; 1017 1017 } 1018 1018 BNX2FC_TGT_DBG(tgt, "Entered ofld compl - context_id = 0x%x\n", ··· 1040 1040 /* now enable the session */ 1041 1041 rc = bnx2fc_send_session_enable_req(port, tgt); 1042 1042 if (rc) { 1043 - printk(KERN_ALERT PFX "enable session failed\n"); 1043 + printk(KERN_ERR PFX "enable session failed\n"); 1044 1044 goto ofld_cmpl_err; 1045 1045 } 1046 1046 } ··· 1070 1070 conn_id = ofld_kcqe->fcoe_conn_id; 1071 1071 tgt = hba->tgt_ofld_list[conn_id]; 1072 1072 if (!tgt) { 1073 - printk(KERN_ALERT PFX "ERROR:enbl_cmpl: No pending ofld req\n"); 1073 + printk(KERN_ERR PFX "ERROR:enbl_cmpl: No pending ofld req\n"); 1074 1074 return; 1075 1075 } 1076 1076 ··· 1082 1082 * and enable 1083 1083 */ 1084 1084 if (tgt->context_id != context_id) { 1085 - printk(KERN_ALERT PFX "context id mis-match\n"); 1085 + printk(KERN_ERR PFX "context id mis-match\n"); 1086 1086 return; 1087 1087 } 1088 1088 if (hba != tgt->port->priv) { ··· 1114 1114 conn_id = disable_kcqe->fcoe_conn_id; 1115 1115 tgt = hba->tgt_ofld_list[conn_id]; 1116 1116 if (!tgt) { 1117 - printk(KERN_ALERT PFX "ERROR: disable_cmpl: No disable req\n"); 1117 + printk(KERN_ERR PFX "ERROR: disable_cmpl: No disable req\n"); 1118 1118 return; 1119 1119 } 1120 1120 1121 1121 BNX2FC_TGT_DBG(tgt, PFX "disable_cmpl: conn_id %d\n", conn_id); 1122 1122 1123 1123 if (disable_kcqe->completion_status) { 1124 - printk(KERN_ALERT PFX "ERROR: Disable failed with cmpl status %d\n", 1124 + printk(KERN_ERR PFX "Disable failed with cmpl status %d\n", 1125 1125 disable_kcqe->completion_status); 1126 1126 return; 1127 1127 } else { ··· 1143 1143 conn_id = destroy_kcqe->fcoe_conn_id; 1144 1144 tgt = hba->tgt_ofld_list[conn_id]; 1145 1145 if (!tgt) { 1146 - printk(KERN_ALERT PFX "destroy_cmpl: No destroy req\n"); 1146 + printk(KERN_ERR PFX "destroy_cmpl: No destroy req\n"); 1147 1147 return; 1148 1148 } 1149 1149 1150 1150 BNX2FC_TGT_DBG(tgt, "destroy_cmpl: conn_id %d\n", conn_id); 1151 1151 1152 1152 if (destroy_kcqe->completion_status) { 1153 - printk(KERN_ALERT PFX "Destroy conn failed, cmpl status %d\n", 1153 + printk(KERN_ERR PFX "Destroy conn failed, cmpl status %d\n", 1154 1154 destroy_kcqe->completion_status); 1155 1155 return; 1156 1156 } else { ··· 1182 1182 break; 1183 1183 case FCOE_KCQE_COMPLETION_STATUS_WRONG_HSI_VERSION: 1184 1184 printk(KERN_ERR PFX "init failure due to HSI mismatch\n"); 1185 + break; 1185 1186 default: 1186 1187 printk(KERN_ERR PFX "Unknown Error code %d\n", err_code); 1187 1188 } ··· 1263 1262 case FCOE_KCQE_OPCODE_FCOE_ERROR: 1264 1263 /* fall thru */ 1265 1264 default: 1266 - printk(KERN_ALERT PFX "unknown opcode 0x%x\n", 1265 + printk(KERN_ERR PFX "unknown opcode 0x%x\n", 1267 1266 kcqe->op_code); 1268 1267 } 1269 1268 }
+12 -12
drivers/scsi/bnx2fc/bnx2fc_io.c
··· 702 702 hba = port->priv; 703 703 704 704 if (rport == NULL) { 705 - printk(KERN_ALERT PFX "device_reset: rport is NULL\n"); 705 + printk(KERN_ERR PFX "device_reset: rport is NULL\n"); 706 706 rc = FAILED; 707 707 goto tmf_err; 708 708 } ··· 806 806 spin_unlock_bh(&tgt->tgt_lock); 807 807 808 808 if (!rc) { 809 - printk(KERN_ERR PFX "task mgmt command failed...\n"); 809 + BNX2FC_TGT_DBG(tgt, "task mgmt command failed...\n"); 810 810 rc = FAILED; 811 811 } else { 812 - printk(KERN_ERR PFX "task mgmt command success...\n"); 812 + BNX2FC_TGT_DBG(tgt, "task mgmt command success...\n"); 813 813 rc = SUCCESS; 814 814 } 815 815 tmf_err: ··· 849 849 } 850 850 851 851 if (rport == NULL) { 852 - printk(KERN_ALERT PFX "initiate_abts: rport is NULL\n"); 852 + printk(KERN_ERR PFX "initiate_abts: rport is NULL\n"); 853 853 rc = FAILED; 854 854 goto abts_err; 855 855 } ··· 1031 1031 1032 1032 lport = shost_priv(sc_cmd->device->host); 1033 1033 if ((lport->state != LPORT_ST_READY) || !(lport->link_up)) { 1034 - printk(KERN_ALERT PFX "eh_abort: link not ready\n"); 1034 + printk(KERN_ERR PFX "eh_abort: link not ready\n"); 1035 1035 return rc; 1036 1036 } 1037 1037 ··· 1062 1062 * io_req is no longer in the active_q. 1063 1063 */ 1064 1064 if (tgt->flush_in_prog) { 1065 - printk(KERN_ALERT PFX "eh_abort: io_req (xid = 0x%x) " 1065 + printk(KERN_ERR PFX "eh_abort: io_req (xid = 0x%x) " 1066 1066 "flush in progress\n", io_req->xid); 1067 1067 kref_put(&io_req->refcount, bnx2fc_cmd_release); 1068 1068 spin_unlock_bh(&tgt->tgt_lock); ··· 1070 1070 } 1071 1071 1072 1072 if (io_req->on_active_queue == 0) { 1073 - printk(KERN_ALERT PFX "eh_abort: io_req (xid = 0x%x) " 1073 + printk(KERN_ERR PFX "eh_abort: io_req (xid = 0x%x) " 1074 1074 "not on active_q\n", io_req->xid); 1075 1075 /* 1076 1076 * This condition can happen only due to the FW bug, ··· 1108 1108 set_bit(BNX2FC_FLAG_EH_ABORT, &io_req->req_flags); 1109 1109 rc = bnx2fc_initiate_abts(io_req); 1110 1110 } else { 1111 - printk(KERN_ALERT PFX "eh_abort: io_req (xid = 0x%x) " 1111 + printk(KERN_ERR PFX "eh_abort: io_req (xid = 0x%x) " 1112 1112 "already in abts processing\n", io_req->xid); 1113 1113 kref_put(&io_req->refcount, bnx2fc_cmd_release); 1114 1114 spin_unlock_bh(&tgt->tgt_lock); ··· 1378 1378 fc_hdr->fh_r_ctl); 1379 1379 } 1380 1380 if (!sc_cmd->SCp.ptr) { 1381 - printk(KERN_ALERT PFX "tm_compl: SCp.ptr is NULL\n"); 1381 + printk(KERN_ERR PFX "tm_compl: SCp.ptr is NULL\n"); 1382 1382 return; 1383 1383 } 1384 1384 switch (io_req->fcp_status) { ··· 1410 1410 io_req->on_tmf_queue = 0; 1411 1411 } else { 1412 1412 1413 - printk(KERN_ALERT PFX "Command not on active_cmd_queue!\n"); 1413 + printk(KERN_ERR PFX "Command not on active_cmd_queue!\n"); 1414 1414 return; 1415 1415 } 1416 1416 ··· 1597 1597 1598 1598 if (rq_buff_len > num_rq * BNX2FC_RQ_BUF_SZ) { 1599 1599 /* Invalid sense sense length. */ 1600 - printk(KERN_ALERT PFX "invalid sns length %d\n", 1600 + printk(KERN_ERR PFX "invalid sns length %d\n", 1601 1601 rq_buff_len); 1602 1602 /* reset rq_buff_len */ 1603 1603 rq_buff_len = num_rq * BNX2FC_RQ_BUF_SZ; ··· 1780 1780 scsi_set_resid(sc_cmd, io_req->fcp_resid); 1781 1781 break; 1782 1782 default: 1783 - printk(KERN_ALERT PFX "scsi_cmd_compl: fcp_status = %d\n", 1783 + printk(KERN_ERR PFX "scsi_cmd_compl: fcp_status = %d\n", 1784 1784 io_req->fcp_status); 1785 1785 break; 1786 1786 }
+12 -12
drivers/scsi/bnx2fc/bnx2fc_tgt.c
··· 403 403 switch (event) { 404 404 case RPORT_EV_READY: 405 405 if (!rport) { 406 - printk(KERN_ALERT PFX "rport is NULL: ERROR!\n"); 406 + printk(KERN_ERR PFX "rport is NULL: ERROR!\n"); 407 407 break; 408 408 } 409 409 ··· 415 415 * We should not come here, as lport will 416 416 * take care of fabric login 417 417 */ 418 - printk(KERN_ALERT PFX "%x - rport_event_handler ERROR\n", 418 + printk(KERN_ERR PFX "%x - rport_event_handler ERROR\n", 419 419 rdata->ids.port_id); 420 420 break; 421 421 } ··· 483 483 break; 484 484 485 485 if (!rport) { 486 - printk(KERN_ALERT PFX "%x - rport not created Yet!!\n", 486 + printk(KERN_INFO PFX "%x - rport not created Yet!!\n", 487 487 port_id); 488 488 break; 489 489 } ··· 633 633 tgt->sq = dma_alloc_coherent(&hba->pcidev->dev, tgt->sq_mem_size, 634 634 &tgt->sq_dma, GFP_KERNEL); 635 635 if (!tgt->sq) { 636 - printk(KERN_ALERT PFX "unable to allocate SQ memory %d\n", 636 + printk(KERN_ERR PFX "unable to allocate SQ memory %d\n", 637 637 tgt->sq_mem_size); 638 638 goto mem_alloc_failure; 639 639 } ··· 646 646 tgt->cq = dma_alloc_coherent(&hba->pcidev->dev, tgt->cq_mem_size, 647 647 &tgt->cq_dma, GFP_KERNEL); 648 648 if (!tgt->cq) { 649 - printk(KERN_ALERT PFX "unable to allocate CQ memory %d\n", 649 + printk(KERN_ERR PFX "unable to allocate CQ memory %d\n", 650 650 tgt->cq_mem_size); 651 651 goto mem_alloc_failure; 652 652 } ··· 659 659 tgt->rq = dma_alloc_coherent(&hba->pcidev->dev, tgt->rq_mem_size, 660 660 &tgt->rq_dma, GFP_KERNEL); 661 661 if (!tgt->rq) { 662 - printk(KERN_ALERT PFX "unable to allocate RQ memory %d\n", 662 + printk(KERN_ERR PFX "unable to allocate RQ memory %d\n", 663 663 tgt->rq_mem_size); 664 664 goto mem_alloc_failure; 665 665 } ··· 671 671 tgt->rq_pbl = dma_alloc_coherent(&hba->pcidev->dev, tgt->rq_pbl_size, 672 672 &tgt->rq_pbl_dma, GFP_KERNEL); 673 673 if (!tgt->rq_pbl) { 674 - printk(KERN_ALERT PFX "unable to allocate RQ PBL %d\n", 674 + printk(KERN_ERR PFX "unable to allocate RQ PBL %d\n", 675 675 tgt->rq_pbl_size); 676 676 goto mem_alloc_failure; 677 677 } ··· 697 697 tgt->xferq = dma_alloc_coherent(&hba->pcidev->dev, tgt->xferq_mem_size, 698 698 &tgt->xferq_dma, GFP_KERNEL); 699 699 if (!tgt->xferq) { 700 - printk(KERN_ALERT PFX "unable to allocate XFERQ %d\n", 700 + printk(KERN_ERR PFX "unable to allocate XFERQ %d\n", 701 701 tgt->xferq_mem_size); 702 702 goto mem_alloc_failure; 703 703 } ··· 711 711 tgt->confq = dma_alloc_coherent(&hba->pcidev->dev, tgt->confq_mem_size, 712 712 &tgt->confq_dma, GFP_KERNEL); 713 713 if (!tgt->confq) { 714 - printk(KERN_ALERT PFX "unable to allocate CONFQ %d\n", 714 + printk(KERN_ERR PFX "unable to allocate CONFQ %d\n", 715 715 tgt->confq_mem_size); 716 716 goto mem_alloc_failure; 717 717 } ··· 726 726 tgt->confq_pbl_size, 727 727 &tgt->confq_pbl_dma, GFP_KERNEL); 728 728 if (!tgt->confq_pbl) { 729 - printk(KERN_ALERT PFX "unable to allocate CONFQ PBL %d\n", 729 + printk(KERN_ERR PFX "unable to allocate CONFQ PBL %d\n", 730 730 tgt->confq_pbl_size); 731 731 goto mem_alloc_failure; 732 732 } ··· 751 751 tgt->conn_db_mem_size, 752 752 &tgt->conn_db_dma, GFP_KERNEL); 753 753 if (!tgt->conn_db) { 754 - printk(KERN_ALERT PFX "unable to allocate conn_db %d\n", 754 + printk(KERN_ERR PFX "unable to allocate conn_db %d\n", 755 755 tgt->conn_db_mem_size); 756 756 goto mem_alloc_failure; 757 757 } ··· 767 767 &tgt->lcq_dma, GFP_KERNEL); 768 768 769 769 if (!tgt->lcq) { 770 - printk(KERN_ALERT PFX "unable to allocate lcq %d\n", 770 + printk(KERN_ERR PFX "unable to allocate lcq %d\n", 771 771 tgt->lcq_mem_size); 772 772 goto mem_alloc_failure; 773 773 }