diff options
author | Steve Wise <swise@opengridcomputing.com> | 2014-03-14 12:22:07 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-03-14 22:44:11 -0400 |
commit | 7a2cea2aaae2d5eb5c00c49c52180c7c2c66130a (patch) | |
tree | e6bf84ac49ea626a47436f30c14c95932091c93e /drivers/infiniband/hw/cxgb4 | |
parent | 57a7744e09867ebcfa0ccf1d6d529caa7728d552 (diff) |
cxgb4/iw_cxgb4: Treat CPL_ERR_KEEPALV_NEG_ADVICE as negative advice
Based on original work by Anand Priyadarshee <anandp@chelsio.com>.
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/infiniband/hw/cxgb4')
-rw-r--r-- | drivers/infiniband/hw/cxgb4/cm.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c index d286bdebe2ab..7e98a58aacfd 100644 --- a/drivers/infiniband/hw/cxgb4/cm.c +++ b/drivers/infiniband/hw/cxgb4/cm.c | |||
@@ -1647,6 +1647,15 @@ static inline int act_open_has_tid(int status) | |||
1647 | status != CPL_ERR_ARP_MISS; | 1647 | status != CPL_ERR_ARP_MISS; |
1648 | } | 1648 | } |
1649 | 1649 | ||
1650 | /* Returns whether a CPL status conveys negative advice. | ||
1651 | */ | ||
1652 | static int is_neg_adv(unsigned int status) | ||
1653 | { | ||
1654 | return status == CPL_ERR_RTX_NEG_ADVICE || | ||
1655 | status == CPL_ERR_PERSIST_NEG_ADVICE || | ||
1656 | status == CPL_ERR_KEEPALV_NEG_ADVICE; | ||
1657 | } | ||
1658 | |||
1650 | #define ACT_OPEN_RETRY_COUNT 2 | 1659 | #define ACT_OPEN_RETRY_COUNT 2 |
1651 | 1660 | ||
1652 | static int import_ep(struct c4iw_ep *ep, int iptype, __u8 *peer_ip, | 1661 | static int import_ep(struct c4iw_ep *ep, int iptype, __u8 *peer_ip, |
@@ -1835,7 +1844,7 @@ static int act_open_rpl(struct c4iw_dev *dev, struct sk_buff *skb) | |||
1835 | PDBG("%s ep %p atid %u status %u errno %d\n", __func__, ep, atid, | 1844 | PDBG("%s ep %p atid %u status %u errno %d\n", __func__, ep, atid, |
1836 | status, status2errno(status)); | 1845 | status, status2errno(status)); |
1837 | 1846 | ||
1838 | if (status == CPL_ERR_RTX_NEG_ADVICE) { | 1847 | if (is_neg_adv(status)) { |
1839 | printk(KERN_WARNING MOD "Connection problems for atid %u\n", | 1848 | printk(KERN_WARNING MOD "Connection problems for atid %u\n", |
1840 | atid); | 1849 | atid); |
1841 | return 0; | 1850 | return 0; |
@@ -2265,15 +2274,6 @@ static int peer_close(struct c4iw_dev *dev, struct sk_buff *skb) | |||
2265 | return 0; | 2274 | return 0; |
2266 | } | 2275 | } |
2267 | 2276 | ||
2268 | /* | ||
2269 | * Returns whether an ABORT_REQ_RSS message is a negative advice. | ||
2270 | */ | ||
2271 | static int is_neg_adv_abort(unsigned int status) | ||
2272 | { | ||
2273 | return status == CPL_ERR_RTX_NEG_ADVICE || | ||
2274 | status == CPL_ERR_PERSIST_NEG_ADVICE; | ||
2275 | } | ||
2276 | |||
2277 | static int peer_abort(struct c4iw_dev *dev, struct sk_buff *skb) | 2277 | static int peer_abort(struct c4iw_dev *dev, struct sk_buff *skb) |
2278 | { | 2278 | { |
2279 | struct cpl_abort_req_rss *req = cplhdr(skb); | 2279 | struct cpl_abort_req_rss *req = cplhdr(skb); |
@@ -2287,7 +2287,7 @@ static int peer_abort(struct c4iw_dev *dev, struct sk_buff *skb) | |||
2287 | unsigned int tid = GET_TID(req); | 2287 | unsigned int tid = GET_TID(req); |
2288 | 2288 | ||
2289 | ep = lookup_tid(t, tid); | 2289 | ep = lookup_tid(t, tid); |
2290 | if (is_neg_adv_abort(req->status)) { | 2290 | if (is_neg_adv(req->status)) { |
2291 | PDBG("%s neg_adv_abort ep %p tid %u\n", __func__, ep, | 2291 | PDBG("%s neg_adv_abort ep %p tid %u\n", __func__, ep, |
2292 | ep->hwtid); | 2292 | ep->hwtid); |
2293 | return 0; | 2293 | return 0; |
@@ -3570,7 +3570,7 @@ static int peer_abort_intr(struct c4iw_dev *dev, struct sk_buff *skb) | |||
3570 | kfree_skb(skb); | 3570 | kfree_skb(skb); |
3571 | return 0; | 3571 | return 0; |
3572 | } | 3572 | } |
3573 | if (is_neg_adv_abort(req->status)) { | 3573 | if (is_neg_adv(req->status)) { |
3574 | PDBG("%s neg_adv_abort ep %p tid %u\n", __func__, ep, | 3574 | PDBG("%s neg_adv_abort ep %p tid %u\n", __func__, ep, |
3575 | ep->hwtid); | 3575 | ep->hwtid); |
3576 | kfree_skb(skb); | 3576 | kfree_skb(skb); |