Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 358860
b: refs/heads/master
c: 7c0a33d
h: refs/heads/master
v: v3
  • Loading branch information
Vipul Pandya authored and Roland Dreier committed Feb 14, 2013
1 parent c62b0c3 commit 9e9336a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 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: fe7e0a4dd0304745b57e08827fde13e1c2376e66
refs/heads/master: 7c0a33d61187a413f29f63d106b503b9c91680e8
12 changes: 11 additions & 1 deletion trunk/drivers/infiniband/hw/cxgb4/cm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1300,11 +1300,13 @@ static void process_mpa_request(struct c4iw_ep *ep, struct sk_buff *skb)
if (mpa->revision > mpa_rev) {
printk(KERN_ERR MOD "%s MPA version mismatch. Local = %d,"
" Received = %d\n", __func__, mpa_rev, mpa->revision);
stop_ep_timer(ep);
abort_connection(ep, skb, GFP_KERNEL);
return;
}

if (memcmp(mpa->key, MPA_KEY_REQ, sizeof(mpa->key))) {
stop_ep_timer(ep);
abort_connection(ep, skb, GFP_KERNEL);
return;
}
Expand All @@ -1315,6 +1317,7 @@ static void process_mpa_request(struct c4iw_ep *ep, struct sk_buff *skb)
* Fail if there's too much private data.
*/
if (plen > MPA_MAX_PRIVATE_DATA) {
stop_ep_timer(ep);
abort_connection(ep, skb, GFP_KERNEL);
return;
}
Expand All @@ -1323,6 +1326,7 @@ static void process_mpa_request(struct c4iw_ep *ep, struct sk_buff *skb)
* If plen does not account for pkt size
*/
if (ep->mpa_pkt_len > (sizeof(*mpa) + plen)) {
stop_ep_timer(ep);
abort_connection(ep, skb, GFP_KERNEL);
return;
}
Expand Down Expand Up @@ -3286,8 +3290,14 @@ static int peer_abort_intr(struct c4iw_dev *dev, struct sk_buff *skb)

/*
* Wake up any threads in rdma_init() or rdma_fini().
* However, if we are on MPAv2 and want to retry with MPAv1
* then, don't wake up yet.
*/
c4iw_wake_up(&ep->com.wr_wait, -ECONNRESET);
if (mpa_rev == 2 && !ep->tried_with_mpa_v1) {
if (ep->com.state != MPA_REQ_SENT)
c4iw_wake_up(&ep->com.wr_wait, -ECONNRESET);
} else
c4iw_wake_up(&ep->com.wr_wait, -ECONNRESET);
sched(dev, skb);
return 0;
}
Expand Down

0 comments on commit 9e9336a

Please sign in to comment.