Skip to content

Commit 4d45b75

Browse files
bharatpotnuridledford
authored andcommitted
iw_cxgb4: change pr_debug to appropriate log level
Error logs of iw_cxgb4 needs to be printed by default. This patch changes the necessary pr_debug() to appropriate pr_<log level>. Signed-off-by: Potnuri Bharat Teja <[email protected]> Reviewed-by: Steve Wise <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
1 parent 548ddb1 commit 4d45b75

File tree

5 files changed

+32
-32
lines changed

5 files changed

+32
-32
lines changed

drivers/infiniband/hw/cxgb4/cm.c

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ static int c4iw_l2t_send(struct c4iw_rdev *rdev, struct sk_buff *skb,
212212

213213
if (c4iw_fatal_error(rdev)) {
214214
kfree_skb(skb);
215-
pr_debug("%s - device in error state - dropping\n", __func__);
215+
pr_err("%s - device in error state - dropping\n", __func__);
216216
return -EIO;
217217
}
218218
error = cxgb4_l2t_send(rdev->lldi.ports[0], skb, l2e);
@@ -229,7 +229,7 @@ int c4iw_ofld_send(struct c4iw_rdev *rdev, struct sk_buff *skb)
229229

230230
if (c4iw_fatal_error(rdev)) {
231231
kfree_skb(skb);
232-
pr_debug("%s - device in error state - dropping\n", __func__);
232+
pr_err("%s - device in error state - dropping\n", __func__);
233233
return -EIO;
234234
}
235235
error = cxgb4_ofld_send(rdev->lldi.ports[0], skb);
@@ -263,8 +263,8 @@ static void set_emss(struct c4iw_ep *ep, u16 opt)
263263
if (ep->emss < 128)
264264
ep->emss = 128;
265265
if (ep->emss & 7)
266-
pr_debug("Warning: misaligned mtu idx %u mss %u emss=%u\n",
267-
TCPOPT_MSS_G(opt), ep->mss, ep->emss);
266+
pr_warn("Warning: misaligned mtu idx %u mss %u emss=%u\n",
267+
TCPOPT_MSS_G(opt), ep->mss, ep->emss);
268268
pr_debug("mss_idx %u mss %u emss=%u\n", TCPOPT_MSS_G(opt), ep->mss,
269269
ep->emss);
270270
}
@@ -2314,7 +2314,7 @@ static int pass_open_rpl(struct c4iw_dev *dev, struct sk_buff *skb)
23142314
struct c4iw_listen_ep *ep = get_ep_from_stid(dev, stid);
23152315

23162316
if (!ep) {
2317-
pr_debug("%s stid %d lookup failure!\n", __func__, stid);
2317+
pr_warn("%s stid %d lookup failure!\n", __func__, stid);
23182318
goto out;
23192319
}
23202320
pr_debug("ep %p status %d error %d\n", ep,
@@ -2332,7 +2332,7 @@ static int close_listsrv_rpl(struct c4iw_dev *dev, struct sk_buff *skb)
23322332
struct c4iw_listen_ep *ep = get_ep_from_stid(dev, stid);
23332333

23342334
if (!ep) {
2335-
pr_debug("%s stid %d lookup failure!\n", __func__, stid);
2335+
pr_warn("%s stid %d lookup failure!\n", __func__, stid);
23362336
goto out;
23372337
}
23382338
pr_debug("ep %p\n", ep);
@@ -2464,13 +2464,13 @@ static int pass_accept_req(struct c4iw_dev *dev, struct sk_buff *skb)
24642464

24652465
parent_ep = (struct c4iw_ep *)get_ep_from_stid(dev, stid);
24662466
if (!parent_ep) {
2467-
pr_debug("%s connect request on invalid stid %d\n",
2468-
__func__, stid);
2467+
pr_err("%s connect request on invalid stid %d\n",
2468+
__func__, stid);
24692469
goto reject;
24702470
}
24712471

24722472
if (state_read(&parent_ep->com) != LISTEN) {
2473-
pr_debug("%s - listening ep not in LISTEN\n", __func__);
2473+
pr_err("%s - listening ep not in LISTEN\n", __func__);
24742474
goto reject;
24752475
}
24762476

@@ -2739,9 +2739,9 @@ static int peer_abort(struct c4iw_dev *dev, struct sk_buff *skb)
27392739
return 0;
27402740

27412741
if (cxgb_is_neg_adv(req->status)) {
2742-
pr_debug("%s Negative advice on abort- tid %u status %d (%s)\n",
2743-
__func__, ep->hwtid, req->status,
2744-
neg_adv_str(req->status));
2742+
pr_warn("%s Negative advice on abort- tid %u status %d (%s)\n",
2743+
__func__, ep->hwtid, req->status,
2744+
neg_adv_str(req->status));
27452745
ep->stats.abort_neg_adv++;
27462746
mutex_lock(&dev->rdev.stats.lock);
27472747
dev->rdev.stats.neg_adv++;
@@ -2781,8 +2781,8 @@ static int peer_abort(struct c4iw_dev *dev, struct sk_buff *skb)
27812781
* do some housekeeping so as to re-initiate the
27822782
* connection
27832783
*/
2784-
pr_debug("%s: mpa_rev=%d. Retrying with mpav1\n",
2785-
__func__, mpa_rev);
2784+
pr_info("%s: mpa_rev=%d. Retrying with mpav1\n",
2785+
__func__, mpa_rev);
27862786
ep->retry_with_mpa_v1 = 1;
27872787
}
27882788
break;
@@ -2808,7 +2808,7 @@ static int peer_abort(struct c4iw_dev *dev, struct sk_buff *skb)
28082808
case ABORTING:
28092809
break;
28102810
case DEAD:
2811-
pr_debug("%s PEER_ABORT IN DEAD STATE!!!!\n", __func__);
2811+
pr_warn("%s PEER_ABORT IN DEAD STATE!!!!\n", __func__);
28122812
mutex_unlock(&ep->com.mutex);
28132813
goto deref_ep;
28142814
default:
@@ -3218,7 +3218,7 @@ int c4iw_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
32183218
ep->com.dev = dev;
32193219
ep->com.qp = get_qhp(dev, conn_param->qpn);
32203220
if (!ep->com.qp) {
3221-
pr_debug("%s qpn 0x%x not found!\n", __func__, conn_param->qpn);
3221+
pr_warn("%s qpn 0x%x not found!\n", __func__, conn_param->qpn);
32223222
err = -EINVAL;
32233223
goto fail2;
32243224
}
@@ -3571,8 +3571,8 @@ int c4iw_ep_disconnect(struct c4iw_ep *ep, int abrupt, gfp_t gfp)
35713571
case MORIBUND:
35723572
case ABORTING:
35733573
case DEAD:
3574-
pr_debug("%s ignoring disconnect ep %p state %u\n",
3575-
__func__, ep, ep->com.state);
3574+
pr_info("%s ignoring disconnect ep %p state %u\n",
3575+
__func__, ep, ep->com.state);
35763576
break;
35773577
default:
35783578
BUG();
@@ -3676,7 +3676,7 @@ static void passive_ofld_conn_reply(struct c4iw_dev *dev, struct sk_buff *skb,
36763676
rpl_skb = (struct sk_buff *)(unsigned long)req->cookie;
36773677
BUG_ON(!rpl_skb);
36783678
if (req->retval) {
3679-
pr_debug("%s passive open failure %d\n", __func__, req->retval);
3679+
pr_err("%s passive open failure %d\n", __func__, req->retval);
36803680
mutex_lock(&dev->rdev.stats.lock);
36813681
dev->rdev.stats.pas_ofld_conn_fails++;
36823682
mutex_unlock(&dev->rdev.stats.lock);
@@ -3893,8 +3893,8 @@ static int rx_pkt(struct c4iw_dev *dev, struct sk_buff *skb)
38933893

38943894
lep = (struct c4iw_ep *)get_ep_from_stid(dev, stid);
38953895
if (!lep) {
3896-
pr_debug("%s connect request on invalid stid %d\n",
3897-
__func__, stid);
3896+
pr_warn("%s connect request on invalid stid %d\n",
3897+
__func__, stid);
38983898
goto reject;
38993899
}
39003900

@@ -4209,8 +4209,8 @@ static int peer_abort_intr(struct c4iw_dev *dev, struct sk_buff *skb)
42094209
return 0;
42104210
}
42114211
if (cxgb_is_neg_adv(req->status)) {
4212-
pr_debug("%s Negative advice on abort- tid %u status %d (%s)\n",
4213-
__func__, ep->hwtid, req->status,
4212+
pr_warn("%s Negative advice on abort- tid %u status %d (%s)\n",
4213+
__func__, ep->hwtid, req->status,
42144214
neg_adv_str(req->status));
42154215
goto out;
42164216
}

drivers/infiniband/hw/cxgb4/ev.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ int c4iw_ev_handler(struct c4iw_dev *dev, u32 qid)
234234
if (atomic_dec_and_test(&chp->refcnt))
235235
wake_up(&chp->wait);
236236
} else {
237-
pr_debug("%s unknown cqid 0x%x\n", __func__, qid);
237+
pr_warn("%s unknown cqid 0x%x\n", __func__, qid);
238238
spin_unlock_irqrestore(&dev->lock, flag);
239239
}
240240
return 0;

drivers/infiniband/hw/cxgb4/iw_cxgb4.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,8 @@ static inline int c4iw_wait_for_reply(struct c4iw_rdev *rdev,
230230

231231
ret = wait_for_completion_timeout(&wr_waitp->completion, C4IW_WR_TO);
232232
if (!ret) {
233-
pr_debug("%s - Device %s not responding (disabling device) - tid %u qpid %u\n",
234-
func, pci_name(rdev->lldi.pdev), hwtid, qpid);
233+
pr_err("%s - Device %s not responding (disabling device) - tid %u qpid %u\n",
234+
func, pci_name(rdev->lldi.pdev), hwtid, qpid);
235235
rdev->flags |= T4_FATAL_ERROR;
236236
wr_waitp->ret = -EIO;
237237
}

drivers/infiniband/hw/cxgb4/qp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -958,8 +958,8 @@ int c4iw_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
958958
c4iw_invalidate_mr(qhp->rhp, wr->ex.invalidate_rkey);
959959
break;
960960
default:
961-
pr_debug("%s post of type=%d TBD!\n", __func__,
962-
wr->opcode);
961+
pr_warn("%s post of type=%d TBD!\n", __func__,
962+
wr->opcode);
963963
err = -EINVAL;
964964
}
965965
if (err) {

drivers/infiniband/hw/cxgb4/t4.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -597,8 +597,8 @@ static inline void t4_swcq_produce(struct t4_cq *cq)
597597
{
598598
cq->sw_in_use++;
599599
if (cq->sw_in_use == cq->size) {
600-
pr_debug("%s cxgb4 sw cq overflow cqid %u\n",
601-
__func__, cq->cqid);
600+
pr_warn("%s cxgb4 sw cq overflow cqid %u\n",
601+
__func__, cq->cqid);
602602
cq->error = 1;
603603
BUG_ON(1);
604604
}
@@ -669,8 +669,8 @@ static inline int t4_next_hw_cqe(struct t4_cq *cq, struct t4_cqe **cqe)
669669
static inline struct t4_cqe *t4_next_sw_cqe(struct t4_cq *cq)
670670
{
671671
if (cq->sw_in_use == cq->size) {
672-
pr_debug("%s cxgb4 sw cq overflow cqid %u\n",
673-
__func__, cq->cqid);
672+
pr_warn("%s cxgb4 sw cq overflow cqid %u\n",
673+
__func__, cq->cqid);
674674
cq->error = 1;
675675
BUG_ON(1);
676676
return NULL;

0 commit comments

Comments
 (0)