diff options
author | Vipul Pandya <vipul@chelsio.com> | 2013-01-07 08:11:52 -0500 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2013-02-14 18:51:55 -0500 |
commit | 1557967bf921e787f0c9236c2899603d85f44d31 (patch) | |
tree | 75df934f20c995ddc766112bd353383a0113638e /drivers/infiniband/hw/cxgb4 | |
parent | 91e9c07195032bbde47489b8b423053cff5f413d (diff) |
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: Vipul Pandya <vipul@chelsio.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband/hw/cxgb4')
-rw-r--r-- | drivers/infiniband/hw/cxgb4/cm.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c index 3dce47a63709..31d1fac605d3 100644 --- a/drivers/infiniband/hw/cxgb4/cm.c +++ b/drivers/infiniband/hw/cxgb4/cm.c | |||
@@ -1403,21 +1403,23 @@ static int rx_data(struct c4iw_dev *dev, struct sk_buff *skb) | |||
1403 | ep->rcv_seq += dlen; | 1403 | ep->rcv_seq += dlen; |
1404 | process_mpa_request(ep, skb); | 1404 | process_mpa_request(ep, skb); |
1405 | break; | 1405 | break; |
1406 | default: | 1406 | case FPDU_MODE: { |
1407 | pr_err("%s Unexpected streaming data." \ | 1407 | struct c4iw_qp_attributes attrs; |
1408 | " ep %p state %d tid %u status %d\n", | 1408 | BUG_ON(!ep->com.qp); |
1409 | __func__, ep, state_read(&ep->com), ep->hwtid, status); | 1409 | if (ep->com.qp->attr.state == C4IW_QP_STATE_RTS) |
1410 | 1410 | pr_err("%s Unexpected streaming data." \ | |
1411 | if (ep->com.qp) { | 1411 | " ep %p state %d tid %u status %d\n", |
1412 | struct c4iw_qp_attributes attrs; | 1412 | __func__, ep, state_read(&ep->com), |
1413 | 1413 | ep->hwtid, status); | |
1414 | attrs.next_state = C4IW_QP_STATE_ERROR; | 1414 | attrs.next_state = C4IW_QP_STATE_ERROR; |
1415 | c4iw_modify_qp(ep->com.qp->rhp, ep->com.qp, | 1415 | c4iw_modify_qp(ep->com.qp->rhp, ep->com.qp, |
1416 | C4IW_QP_ATTR_NEXT_STATE, &attrs, 1); | 1416 | C4IW_QP_ATTR_NEXT_STATE, &attrs, 1); |
1417 | } | ||
1418 | c4iw_ep_disconnect(ep, 1, GFP_KERNEL); | 1417 | c4iw_ep_disconnect(ep, 1, GFP_KERNEL); |
1419 | break; | 1418 | break; |
1420 | } | 1419 | } |
1420 | default: | ||
1421 | break; | ||
1422 | } | ||
1421 | return 0; | 1423 | return 0; |
1422 | } | 1424 | } |
1423 | 1425 | ||