Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 261675
b: refs/heads/master
c: b2a554f
h: refs/heads/master
i:
  261673: 35b2d33
  261671: 2b9952e
v: v3
  • Loading branch information
Bhanu Prakash Gollapudi authored and James Bottomley committed Jul 26, 2011
1 parent 1515093 commit 7f118e8
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 52 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0ac2377b61089e160d8e13b03cfdec89572cd741
refs/heads/master: b2a554ff9ad5cdd8d00dac168f2bb3db7ccedb61
16 changes: 8 additions & 8 deletions trunk/drivers/scsi/bnx2fc/bnx2fc_debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,21 @@ extern unsigned int bnx2fc_debug_level;

#define BNX2FC_ELS_DBG(fmt, arg...) \
BNX2FC_CHK_LOGGING(LOG_ELS, \
printk(KERN_ALERT PFX fmt, ##arg))
printk(KERN_INFO PFX fmt, ##arg))

#define BNX2FC_MISC_DBG(fmt, arg...) \
BNX2FC_CHK_LOGGING(LOG_MISC, \
printk(KERN_ALERT PFX fmt, ##arg))
printk(KERN_INFO PFX fmt, ##arg))

#define BNX2FC_IO_DBG(io_req, fmt, arg...) \
do { \
if (!io_req || !io_req->port || !io_req->port->lport || \
!io_req->port->lport->host) \
BNX2FC_CHK_LOGGING(LOG_IO, \
printk(KERN_ALERT PFX "NULL " fmt, ##arg)); \
printk(KERN_INFO PFX "NULL " fmt, ##arg)); \
else \
BNX2FC_CHK_LOGGING(LOG_IO, \
shost_printk(KERN_ALERT, \
shost_printk(KERN_INFO, \
(io_req)->port->lport->host, \
PFX "xid:0x%x " fmt, \
(io_req)->xid, ##arg)); \
Expand All @@ -46,10 +46,10 @@ extern unsigned int bnx2fc_debug_level;
if (!tgt || !tgt->port || !tgt->port->lport || \
!tgt->port->lport->host || !tgt->rport) \
BNX2FC_CHK_LOGGING(LOG_TGT, \
printk(KERN_ALERT PFX "NULL " fmt, ##arg)); \
printk(KERN_INFO PFX "NULL " fmt, ##arg)); \
else \
BNX2FC_CHK_LOGGING(LOG_TGT, \
shost_printk(KERN_ALERT, \
shost_printk(KERN_INFO, \
(tgt)->port->lport->host, \
PFX "port:%x " fmt, \
(tgt)->rport->port_id, ##arg)); \
Expand All @@ -60,10 +60,10 @@ extern unsigned int bnx2fc_debug_level;
do { \
if (!lport || !lport->host) \
BNX2FC_CHK_LOGGING(LOG_HBA, \
printk(KERN_ALERT PFX "NULL " fmt, ##arg)); \
printk(KERN_INFO PFX "NULL " fmt, ##arg)); \
else \
BNX2FC_CHK_LOGGING(LOG_HBA, \
shost_printk(KERN_ALERT, lport->host, \
shost_printk(KERN_INFO, lport->host, \
PFX fmt, ##arg)); \
} while (0)

Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/scsi/bnx2fc/bnx2fc_els.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,12 +274,12 @@ static int bnx2fc_initiate_els(struct bnx2fc_rport *tgt, unsigned int op,

rc = fc_remote_port_chkready(rport);
if (rc) {
printk(KERN_ALERT PFX "els 0x%x: rport not ready\n", op);
printk(KERN_ERR PFX "els 0x%x: rport not ready\n", op);
rc = -EINVAL;
goto els_err;
}
if (lport->state != LPORT_ST_READY || !(lport->link_up)) {
printk(KERN_ALERT PFX "els 0x%x: link is not ready\n", op);
printk(KERN_ERR PFX "els 0x%x: link is not ready\n", op);
rc = -EINVAL;
goto els_err;
}
Expand All @@ -305,7 +305,7 @@ static int bnx2fc_initiate_els(struct bnx2fc_rport *tgt, unsigned int op,
mp_req = (struct bnx2fc_mp_req *)&(els_req->mp_req);
rc = bnx2fc_init_mp_req(els_req);
if (rc == FAILED) {
printk(KERN_ALERT PFX "ELS MP request init failed\n");
printk(KERN_ERR PFX "ELS MP request init failed\n");
spin_lock_bh(&tgt->tgt_lock);
kref_put(&els_req->refcount, bnx2fc_cmd_release);
spin_unlock_bh(&tgt->tgt_lock);
Expand All @@ -324,7 +324,7 @@ static int bnx2fc_initiate_els(struct bnx2fc_rport *tgt, unsigned int op,
if ((op >= ELS_LS_RJT) && (op <= ELS_AUTH_ELS)) {
memcpy(mp_req->req_buf, data, data_len);
} else {
printk(KERN_ALERT PFX "Invalid ELS op 0x%x\n", op);
printk(KERN_ERR PFX "Invalid ELS op 0x%x\n", op);
els_req->cb_func = NULL;
els_req->cb_arg = NULL;
spin_lock_bh(&tgt->tgt_lock);
Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
Original file line number Diff line number Diff line change
Expand Up @@ -387,12 +387,12 @@ static int bnx2fc_rcv(struct sk_buff *skb, struct net_device *dev,
lport = hba->ctlr.lp;

if (unlikely(lport == NULL)) {
printk(KERN_ALERT PFX "bnx2fc_rcv: lport is NULL\n");
printk(KERN_ERR PFX "bnx2fc_rcv: lport is NULL\n");
goto err;
}

if (unlikely(eth_hdr(skb)->h_proto != htons(ETH_P_FCOE))) {
printk(KERN_ALERT PFX "bnx2fc_rcv: Wrong FC type frame\n");
printk(KERN_ERR PFX "bnx2fc_rcv: Wrong FC type frame\n");
goto err;
}

Expand Down Expand Up @@ -469,7 +469,7 @@ static void bnx2fc_recv_frame(struct sk_buff *skb)
fr = fcoe_dev_from_skb(skb);
lport = fr->fr_dev;
if (unlikely(lport == NULL)) {
printk(KERN_ALERT PFX "Invalid lport struct\n");
printk(KERN_ERR PFX "Invalid lport struct\n");
kfree_skb(skb);
return;
}
Expand Down Expand Up @@ -1782,7 +1782,7 @@ static void bnx2fc_ulp_init(struct cnic_dev *dev)
rc = dev->register_device(dev, CNIC_ULP_FCOE,
(void *) hba);
if (rc)
printk(KERN_ALERT PFX "register_device failed, rc = %d\n", rc);
printk(KERN_ERR PFX "register_device failed, rc = %d\n", rc);
else
set_bit(BNX2FC_CNIC_REGISTERED, &hba->reg_with_cnic);
}
Expand Down
23 changes: 12 additions & 11 deletions trunk/drivers/scsi/bnx2fc/bnx2fc_hwi.c
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ void bnx2fc_process_cq_compl(struct bnx2fc_rport *tgt, u16 wqe)
spin_lock_bh(&tgt->tgt_lock);
xid = wqe & FCOE_PEND_WQ_CQE_TASK_ID;
if (xid >= BNX2FC_MAX_TASKS) {
printk(KERN_ALERT PFX "ERROR:xid out of range\n");
printk(KERN_ERR PFX "ERROR:xid out of range\n");
spin_unlock_bh(&tgt->tgt_lock);
return;
}
Expand Down Expand Up @@ -983,7 +983,7 @@ static void bnx2fc_fastpath_notification(struct bnx2fc_hba *hba,
struct bnx2fc_rport *tgt = hba->tgt_ofld_list[conn_id];

if (!tgt) {
printk(KERN_ALERT PFX "conn_id 0x%x not valid\n", conn_id);
printk(KERN_ERR PFX "conn_id 0x%x not valid\n", conn_id);
return;
}

Expand Down Expand Up @@ -1012,7 +1012,7 @@ static void bnx2fc_process_ofld_cmpl(struct bnx2fc_hba *hba,
context_id = ofld_kcqe->fcoe_conn_context_id;
tgt = hba->tgt_ofld_list[conn_id];
if (!tgt) {
printk(KERN_ALERT PFX "ERROR:ofld_cmpl: No pending ofld req\n");
printk(KERN_ERR PFX "ERROR:ofld_cmpl: No pending ofld req\n");
return;
}
BNX2FC_TGT_DBG(tgt, "Entered ofld compl - context_id = 0x%x\n",
Expand Down Expand Up @@ -1040,7 +1040,7 @@ static void bnx2fc_process_ofld_cmpl(struct bnx2fc_hba *hba,
/* now enable the session */
rc = bnx2fc_send_session_enable_req(port, tgt);
if (rc) {
printk(KERN_ALERT PFX "enable session failed\n");
printk(KERN_ERR PFX "enable session failed\n");
goto ofld_cmpl_err;
}
}
Expand Down Expand Up @@ -1070,7 +1070,7 @@ static void bnx2fc_process_enable_conn_cmpl(struct bnx2fc_hba *hba,
conn_id = ofld_kcqe->fcoe_conn_id;
tgt = hba->tgt_ofld_list[conn_id];
if (!tgt) {
printk(KERN_ALERT PFX "ERROR:enbl_cmpl: No pending ofld req\n");
printk(KERN_ERR PFX "ERROR:enbl_cmpl: No pending ofld req\n");
return;
}

Expand All @@ -1082,7 +1082,7 @@ static void bnx2fc_process_enable_conn_cmpl(struct bnx2fc_hba *hba,
* and enable
*/
if (tgt->context_id != context_id) {
printk(KERN_ALERT PFX "context id mis-match\n");
printk(KERN_ERR PFX "context id mis-match\n");
return;
}
if (hba != tgt->port->priv) {
Expand Down Expand Up @@ -1114,14 +1114,14 @@ static void bnx2fc_process_conn_disable_cmpl(struct bnx2fc_hba *hba,
conn_id = disable_kcqe->fcoe_conn_id;
tgt = hba->tgt_ofld_list[conn_id];
if (!tgt) {
printk(KERN_ALERT PFX "ERROR: disable_cmpl: No disable req\n");
printk(KERN_ERR PFX "ERROR: disable_cmpl: No disable req\n");
return;
}

BNX2FC_TGT_DBG(tgt, PFX "disable_cmpl: conn_id %d\n", conn_id);

if (disable_kcqe->completion_status) {
printk(KERN_ALERT PFX "ERROR: Disable failed with cmpl status %d\n",
printk(KERN_ERR PFX "Disable failed with cmpl status %d\n",
disable_kcqe->completion_status);
return;
} else {
Expand All @@ -1143,14 +1143,14 @@ static void bnx2fc_process_conn_destroy_cmpl(struct bnx2fc_hba *hba,
conn_id = destroy_kcqe->fcoe_conn_id;
tgt = hba->tgt_ofld_list[conn_id];
if (!tgt) {
printk(KERN_ALERT PFX "destroy_cmpl: No destroy req\n");
printk(KERN_ERR PFX "destroy_cmpl: No destroy req\n");
return;
}

BNX2FC_TGT_DBG(tgt, "destroy_cmpl: conn_id %d\n", conn_id);

if (destroy_kcqe->completion_status) {
printk(KERN_ALERT PFX "Destroy conn failed, cmpl status %d\n",
printk(KERN_ERR PFX "Destroy conn failed, cmpl status %d\n",
destroy_kcqe->completion_status);
return;
} else {
Expand Down Expand Up @@ -1182,6 +1182,7 @@ static void bnx2fc_init_failure(struct bnx2fc_hba *hba, u32 err_code)
break;
case FCOE_KCQE_COMPLETION_STATUS_WRONG_HSI_VERSION:
printk(KERN_ERR PFX "init failure due to HSI mismatch\n");
break;
default:
printk(KERN_ERR PFX "Unknown Error code %d\n", err_code);
}
Expand Down Expand Up @@ -1262,7 +1263,7 @@ void bnx2fc_indicate_kcqe(void *context, struct kcqe *kcq[],
case FCOE_KCQE_OPCODE_FCOE_ERROR:
/* fall thru */
default:
printk(KERN_ALERT PFX "unknown opcode 0x%x\n",
printk(KERN_ERR PFX "unknown opcode 0x%x\n",
kcqe->op_code);
}
}
Expand Down
24 changes: 12 additions & 12 deletions trunk/drivers/scsi/bnx2fc/bnx2fc_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ static int bnx2fc_initiate_tmf(struct scsi_cmnd *sc_cmd, u8 tm_flags)
hba = port->priv;

if (rport == NULL) {
printk(KERN_ALERT PFX "device_reset: rport is NULL\n");
printk(KERN_ERR PFX "device_reset: rport is NULL\n");
rc = FAILED;
goto tmf_err;
}
Expand Down Expand Up @@ -806,10 +806,10 @@ static int bnx2fc_initiate_tmf(struct scsi_cmnd *sc_cmd, u8 tm_flags)
spin_unlock_bh(&tgt->tgt_lock);

if (!rc) {
printk(KERN_ERR PFX "task mgmt command failed...\n");
BNX2FC_TGT_DBG(tgt, "task mgmt command failed...\n");
rc = FAILED;
} else {
printk(KERN_ERR PFX "task mgmt command success...\n");
BNX2FC_TGT_DBG(tgt, "task mgmt command success...\n");
rc = SUCCESS;
}
tmf_err:
Expand Down Expand Up @@ -849,7 +849,7 @@ int bnx2fc_initiate_abts(struct bnx2fc_cmd *io_req)
}

if (rport == NULL) {
printk(KERN_ALERT PFX "initiate_abts: rport is NULL\n");
printk(KERN_ERR PFX "initiate_abts: rport is NULL\n");
rc = FAILED;
goto abts_err;
}
Expand Down Expand Up @@ -1031,7 +1031,7 @@ int bnx2fc_eh_abort(struct scsi_cmnd *sc_cmd)

lport = shost_priv(sc_cmd->device->host);
if ((lport->state != LPORT_ST_READY) || !(lport->link_up)) {
printk(KERN_ALERT PFX "eh_abort: link not ready\n");
printk(KERN_ERR PFX "eh_abort: link not ready\n");
return rc;
}

Expand Down Expand Up @@ -1062,15 +1062,15 @@ int bnx2fc_eh_abort(struct scsi_cmnd *sc_cmd)
* io_req is no longer in the active_q.
*/
if (tgt->flush_in_prog) {
printk(KERN_ALERT PFX "eh_abort: io_req (xid = 0x%x) "
printk(KERN_ERR PFX "eh_abort: io_req (xid = 0x%x) "
"flush in progress\n", io_req->xid);
kref_put(&io_req->refcount, bnx2fc_cmd_release);
spin_unlock_bh(&tgt->tgt_lock);
return SUCCESS;
}

if (io_req->on_active_queue == 0) {
printk(KERN_ALERT PFX "eh_abort: io_req (xid = 0x%x) "
printk(KERN_ERR PFX "eh_abort: io_req (xid = 0x%x) "
"not on active_q\n", io_req->xid);
/*
* This condition can happen only due to the FW bug,
Expand Down Expand Up @@ -1108,7 +1108,7 @@ int bnx2fc_eh_abort(struct scsi_cmnd *sc_cmd)
set_bit(BNX2FC_FLAG_EH_ABORT, &io_req->req_flags);
rc = bnx2fc_initiate_abts(io_req);
} else {
printk(KERN_ALERT PFX "eh_abort: io_req (xid = 0x%x) "
printk(KERN_ERR PFX "eh_abort: io_req (xid = 0x%x) "
"already in abts processing\n", io_req->xid);
kref_put(&io_req->refcount, bnx2fc_cmd_release);
spin_unlock_bh(&tgt->tgt_lock);
Expand Down Expand Up @@ -1378,7 +1378,7 @@ void bnx2fc_process_tm_compl(struct bnx2fc_cmd *io_req,
fc_hdr->fh_r_ctl);
}
if (!sc_cmd->SCp.ptr) {
printk(KERN_ALERT PFX "tm_compl: SCp.ptr is NULL\n");
printk(KERN_ERR PFX "tm_compl: SCp.ptr is NULL\n");
return;
}
switch (io_req->fcp_status) {
Expand Down Expand Up @@ -1410,7 +1410,7 @@ void bnx2fc_process_tm_compl(struct bnx2fc_cmd *io_req,
io_req->on_tmf_queue = 0;
} else {

printk(KERN_ALERT PFX "Command not on active_cmd_queue!\n");
printk(KERN_ERR PFX "Command not on active_cmd_queue!\n");
return;
}

Expand Down Expand Up @@ -1597,7 +1597,7 @@ static void bnx2fc_parse_fcp_rsp(struct bnx2fc_cmd *io_req,

if (rq_buff_len > num_rq * BNX2FC_RQ_BUF_SZ) {
/* Invalid sense sense length. */
printk(KERN_ALERT PFX "invalid sns length %d\n",
printk(KERN_ERR PFX "invalid sns length %d\n",
rq_buff_len);
/* reset rq_buff_len */
rq_buff_len = num_rq * BNX2FC_RQ_BUF_SZ;
Expand Down Expand Up @@ -1780,7 +1780,7 @@ void bnx2fc_process_scsi_cmd_compl(struct bnx2fc_cmd *io_req,
scsi_set_resid(sc_cmd, io_req->fcp_resid);
break;
default:
printk(KERN_ALERT PFX "scsi_cmd_compl: fcp_status = %d\n",
printk(KERN_ERR PFX "scsi_cmd_compl: fcp_status = %d\n",
io_req->fcp_status);
break;
}
Expand Down
Loading

0 comments on commit 7f118e8

Please sign in to comment.