aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHariprasad Shenai <hariprasad@chelsio.com>2014-07-21 11:25:13 -0400
committerDavid S. Miller <davem@davemloft.net>2014-07-21 23:23:59 -0400
commitdd92b12453b34850912ccdeefa740a2c96f870c2 (patch)
tree1b9dc58f234399c8d3696f214764579588158a9d
parent822dd8a85c27913da7b58e8fed947529c9965e55 (diff)
iw_cxgb4: log detailed warnings for negative advice
Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/infiniband/hw/cxgb4/cm.c29
1 files changed, 23 insertions, 6 deletions
diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c
index df5bd3df08a2..6d61a16d1f5c 100644
--- a/drivers/infiniband/hw/cxgb4/cm.c
+++ b/drivers/infiniband/hw/cxgb4/cm.c
@@ -1813,6 +1813,20 @@ static int is_neg_adv(unsigned int status)
1813 status == CPL_ERR_KEEPALV_NEG_ADVICE; 1813 status == CPL_ERR_KEEPALV_NEG_ADVICE;
1814} 1814}
1815 1815
1816static char *neg_adv_str(unsigned int status)
1817{
1818 switch (status) {
1819 case CPL_ERR_RTX_NEG_ADVICE:
1820 return "Retransmit timeout";
1821 case CPL_ERR_PERSIST_NEG_ADVICE:
1822 return "Persist timeout";
1823 case CPL_ERR_KEEPALV_NEG_ADVICE:
1824 return "Keepalive timeout";
1825 default:
1826 return "Unknown";
1827 }
1828}
1829
1816static void set_tcp_window(struct c4iw_ep *ep, struct port_info *pi) 1830static void set_tcp_window(struct c4iw_ep *ep, struct port_info *pi)
1817{ 1831{
1818 ep->snd_win = snd_win; 1832 ep->snd_win = snd_win;
@@ -2011,8 +2025,9 @@ static int act_open_rpl(struct c4iw_dev *dev, struct sk_buff *skb)
2011 status, status2errno(status)); 2025 status, status2errno(status));
2012 2026
2013 if (is_neg_adv(status)) { 2027 if (is_neg_adv(status)) {
2014 printk(KERN_WARNING MOD "Connection problems for atid %u\n", 2028 dev_warn(&dev->rdev.lldi.pdev->dev,
2015 atid); 2029 "Connection problems for atid %u status %u (%s)\n",
2030 atid, status, neg_adv_str(status));
2016 return 0; 2031 return 0;
2017 } 2032 }
2018 2033
@@ -2488,8 +2503,9 @@ static int peer_abort(struct c4iw_dev *dev, struct sk_buff *skb)
2488 2503
2489 ep = lookup_tid(t, tid); 2504 ep = lookup_tid(t, tid);
2490 if (is_neg_adv(req->status)) { 2505 if (is_neg_adv(req->status)) {
2491 PDBG("%s neg_adv_abort ep %p tid %u\n", __func__, ep, 2506 dev_warn(&dev->rdev.lldi.pdev->dev,
2492 ep->hwtid); 2507 "Negative advice on abort - tid %u status %d (%s)\n",
2508 ep->hwtid, req->status, neg_adv_str(req->status));
2493 return 0; 2509 return 0;
2494 } 2510 }
2495 PDBG("%s ep %p tid %u state %u\n", __func__, ep, ep->hwtid, 2511 PDBG("%s ep %p tid %u state %u\n", __func__, ep, ep->hwtid,
@@ -3894,8 +3910,9 @@ static int peer_abort_intr(struct c4iw_dev *dev, struct sk_buff *skb)
3894 return 0; 3910 return 0;
3895 } 3911 }
3896 if (is_neg_adv(req->status)) { 3912 if (is_neg_adv(req->status)) {
3897 PDBG("%s neg_adv_abort ep %p tid %u\n", __func__, ep, 3913 dev_warn(&dev->rdev.lldi.pdev->dev,
3898 ep->hwtid); 3914 "Negative advice on abort - tid %u status %d (%s)\n",
3915 ep->hwtid, req->status, neg_adv_str(req->status));
3899 kfree_skb(skb); 3916 kfree_skb(skb);
3900 return 0; 3917 return 0;
3901 } 3918 }