diff options
Diffstat (limited to 'drivers/infiniband/hw/cxgb3/iwch_cm.c')
-rw-r--r-- | drivers/infiniband/hw/cxgb3/iwch_cm.c | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/drivers/infiniband/hw/cxgb3/iwch_cm.c b/drivers/infiniband/hw/cxgb3/iwch_cm.c index 239184138994..0a5008fbebac 100644 --- a/drivers/infiniband/hw/cxgb3/iwch_cm.c +++ b/drivers/infiniband/hw/cxgb3/iwch_cm.c | |||
@@ -914,7 +914,7 @@ static void process_mpa_reply(struct iwch_ep *ep, struct sk_buff *skb) | |||
914 | goto err; | 914 | goto err; |
915 | 915 | ||
916 | if (peer2peer && iwch_rqes_posted(ep->com.qp) == 0) { | 916 | if (peer2peer && iwch_rqes_posted(ep->com.qp) == 0) { |
917 | iwch_post_zb_read(ep->com.qp); | 917 | iwch_post_zb_read(ep); |
918 | } | 918 | } |
919 | 919 | ||
920 | goto out; | 920 | goto out; |
@@ -1078,6 +1078,8 @@ static int tx_ack(struct t3cdev *tdev, struct sk_buff *skb, void *ctx) | |||
1078 | struct iwch_ep *ep = ctx; | 1078 | struct iwch_ep *ep = ctx; |
1079 | struct cpl_wr_ack *hdr = cplhdr(skb); | 1079 | struct cpl_wr_ack *hdr = cplhdr(skb); |
1080 | unsigned int credits = ntohs(hdr->credits); | 1080 | unsigned int credits = ntohs(hdr->credits); |
1081 | unsigned long flags; | ||
1082 | int post_zb = 0; | ||
1081 | 1083 | ||
1082 | PDBG("%s ep %p credits %u\n", __func__, ep, credits); | 1084 | PDBG("%s ep %p credits %u\n", __func__, ep, credits); |
1083 | 1085 | ||
@@ -1087,28 +1089,34 @@ static int tx_ack(struct t3cdev *tdev, struct sk_buff *skb, void *ctx) | |||
1087 | return CPL_RET_BUF_DONE; | 1089 | return CPL_RET_BUF_DONE; |
1088 | } | 1090 | } |
1089 | 1091 | ||
1092 | spin_lock_irqsave(&ep->com.lock, flags); | ||
1090 | BUG_ON(credits != 1); | 1093 | BUG_ON(credits != 1); |
1091 | dst_confirm(ep->dst); | 1094 | dst_confirm(ep->dst); |
1092 | if (!ep->mpa_skb) { | 1095 | if (!ep->mpa_skb) { |
1093 | PDBG("%s rdma_init wr_ack ep %p state %u\n", | 1096 | PDBG("%s rdma_init wr_ack ep %p state %u\n", |
1094 | __func__, ep, state_read(&ep->com)); | 1097 | __func__, ep, ep->com.state); |
1095 | if (ep->mpa_attr.initiator) { | 1098 | if (ep->mpa_attr.initiator) { |
1096 | PDBG("%s initiator ep %p state %u\n", | 1099 | PDBG("%s initiator ep %p state %u\n", |
1097 | __func__, ep, state_read(&ep->com)); | 1100 | __func__, ep, ep->com.state); |
1098 | if (peer2peer) | 1101 | if (peer2peer && ep->com.state == FPDU_MODE) |
1099 | iwch_post_zb_read(ep->com.qp); | 1102 | post_zb = 1; |
1100 | } else { | 1103 | } else { |
1101 | PDBG("%s responder ep %p state %u\n", | 1104 | PDBG("%s responder ep %p state %u\n", |
1102 | __func__, ep, state_read(&ep->com)); | 1105 | __func__, ep, ep->com.state); |
1103 | ep->com.rpl_done = 1; | 1106 | if (ep->com.state == MPA_REQ_RCVD) { |
1104 | wake_up(&ep->com.waitq); | 1107 | ep->com.rpl_done = 1; |
1108 | wake_up(&ep->com.waitq); | ||
1109 | } | ||
1105 | } | 1110 | } |
1106 | } else { | 1111 | } else { |
1107 | PDBG("%s lsm ack ep %p state %u freeing skb\n", | 1112 | PDBG("%s lsm ack ep %p state %u freeing skb\n", |
1108 | __func__, ep, state_read(&ep->com)); | 1113 | __func__, ep, ep->com.state); |
1109 | kfree_skb(ep->mpa_skb); | 1114 | kfree_skb(ep->mpa_skb); |
1110 | ep->mpa_skb = NULL; | 1115 | ep->mpa_skb = NULL; |
1111 | } | 1116 | } |
1117 | spin_unlock_irqrestore(&ep->com.lock, flags); | ||
1118 | if (post_zb) | ||
1119 | iwch_post_zb_read(ep); | ||
1112 | return CPL_RET_BUF_DONE; | 1120 | return CPL_RET_BUF_DONE; |
1113 | } | 1121 | } |
1114 | 1122 | ||