提交 1557967b 编写于 作者: V Vipul Pandya 提交者: Roland Dreier

RDMA/cxgb4: Display streaming mode error only if detected in RTS

With later firmware, the chances of getting streaming mode data after
we exit RTS is likely, so we don't need to warn for it.  The only real
case where we don't expect it is when the QP is in RTS.

Move QP to ERROR when streaming mode data received.
Signed-off-by: NVipul Pandya <vipul@chelsio.com>
Signed-off-by: NRoland Dreier <roland@purestorage.com>
上级 91e9c071
...@@ -1403,21 +1403,23 @@ static int rx_data(struct c4iw_dev *dev, struct sk_buff *skb) ...@@ -1403,21 +1403,23 @@ static int rx_data(struct c4iw_dev *dev, struct sk_buff *skb)
ep->rcv_seq += dlen; ep->rcv_seq += dlen;
process_mpa_request(ep, skb); process_mpa_request(ep, skb);
break; break;
default: case FPDU_MODE: {
pr_err("%s Unexpected streaming data." \ struct c4iw_qp_attributes attrs;
" ep %p state %d tid %u status %d\n", BUG_ON(!ep->com.qp);
__func__, ep, state_read(&ep->com), ep->hwtid, status); if (ep->com.qp->attr.state == C4IW_QP_STATE_RTS)
pr_err("%s Unexpected streaming data." \
if (ep->com.qp) { " ep %p state %d tid %u status %d\n",
struct c4iw_qp_attributes attrs; __func__, ep, state_read(&ep->com),
ep->hwtid, status);
attrs.next_state = C4IW_QP_STATE_ERROR; attrs.next_state = C4IW_QP_STATE_ERROR;
c4iw_modify_qp(ep->com.qp->rhp, ep->com.qp, c4iw_modify_qp(ep->com.qp->rhp, ep->com.qp,
C4IW_QP_ATTR_NEXT_STATE, &attrs, 1); C4IW_QP_ATTR_NEXT_STATE, &attrs, 1);
}
c4iw_ep_disconnect(ep, 1, GFP_KERNEL); c4iw_ep_disconnect(ep, 1, GFP_KERNEL);
break; break;
} }
default:
break;
}
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册