aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/cxgb3/iwch_cm.c
diff options
context:
space:
mode:
authorSteve Wise <swise@opengridcomputing.com>2007-03-06 15:43:56 -0500
committerRoland Dreier <rolandd@cisco.com>2007-03-06 15:50:37 -0500
commit42e31753546d2186d4a675e7d00daa02ea7c8e85 (patch)
tree5b2e4f31e6d91f7a8dc628e64de8cb3d770b53ce /drivers/infiniband/hw/cxgb3/iwch_cm.c
parentc3bb1092c80fa2b9117cb0382d136a409496a07f (diff)
RDMA/cxgb3: Fixes for "normal close" failures
Fixes for "normal close" failures: - Start normal close timer when moving to CLOSING state. - Handle ABORTING state in close_con_rpl(). - Stop timer correctly on abort during a normal close. Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/cxgb3/iwch_cm.c')
-rw-r--r--drivers/infiniband/hw/cxgb3/iwch_cm.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/cxgb3/iwch_cm.c b/drivers/infiniband/hw/cxgb3/iwch_cm.c
index 135f80044de5..869761fed59b 100644
--- a/drivers/infiniband/hw/cxgb3/iwch_cm.c
+++ b/drivers/infiniband/hw/cxgb3/iwch_cm.c
@@ -1415,6 +1415,7 @@ static int peer_close(struct t3cdev *tdev, struct sk_buff *skb, void *ctx)
1415 wake_up(&ep->com.waitq); 1415 wake_up(&ep->com.waitq);
1416 break; 1416 break;
1417 case FPDU_MODE: 1417 case FPDU_MODE:
1418 start_ep_timer(ep);
1418 __state_set(&ep->com, CLOSING); 1419 __state_set(&ep->com, CLOSING);
1419 attrs.next_state = IWCH_QP_STATE_CLOSING; 1420 attrs.next_state = IWCH_QP_STATE_CLOSING;
1420 iwch_modify_qp(ep->com.qp->rhp, ep->com.qp, 1421 iwch_modify_qp(ep->com.qp->rhp, ep->com.qp,
@@ -1425,7 +1426,6 @@ static int peer_close(struct t3cdev *tdev, struct sk_buff *skb, void *ctx)
1425 disconnect = 0; 1426 disconnect = 0;
1426 break; 1427 break;
1427 case CLOSING: 1428 case CLOSING:
1428 start_ep_timer(ep);
1429 __state_set(&ep->com, MORIBUND); 1429 __state_set(&ep->com, MORIBUND);
1430 disconnect = 0; 1430 disconnect = 0;
1431 break; 1431 break;
@@ -1507,9 +1507,10 @@ static int peer_abort(struct t3cdev *tdev, struct sk_buff *skb, void *ctx)
1507 get_ep(&ep->com); 1507 get_ep(&ep->com);
1508 break; 1508 break;
1509 case MORIBUND: 1509 case MORIBUND:
1510 case CLOSING:
1510 stop_ep_timer(ep); 1511 stop_ep_timer(ep);
1512 /*FALLTHROUGH*/
1511 case FPDU_MODE: 1513 case FPDU_MODE:
1512 case CLOSING:
1513 if (ep->com.cm_id && ep->com.qp) { 1514 if (ep->com.cm_id && ep->com.qp) {
1514 attrs.next_state = IWCH_QP_STATE_ERROR; 1515 attrs.next_state = IWCH_QP_STATE_ERROR;
1515 ret = iwch_modify_qp(ep->com.qp->rhp, 1516 ret = iwch_modify_qp(ep->com.qp->rhp,
@@ -1570,7 +1571,6 @@ static int close_con_rpl(struct t3cdev *tdev, struct sk_buff *skb, void *ctx)
1570 spin_lock_irqsave(&ep->com.lock, flags); 1571 spin_lock_irqsave(&ep->com.lock, flags);
1571 switch (ep->com.state) { 1572 switch (ep->com.state) {
1572 case CLOSING: 1573 case CLOSING:
1573 start_ep_timer(ep);
1574 __state_set(&ep->com, MORIBUND); 1574 __state_set(&ep->com, MORIBUND);
1575 break; 1575 break;
1576 case MORIBUND: 1576 case MORIBUND:
@@ -1586,6 +1586,8 @@ static int close_con_rpl(struct t3cdev *tdev, struct sk_buff *skb, void *ctx)
1586 __state_set(&ep->com, DEAD); 1586 __state_set(&ep->com, DEAD);
1587 release = 1; 1587 release = 1;
1588 break; 1588 break;
1589 case ABORTING:
1590 break;
1589 case DEAD: 1591 case DEAD:
1590 default: 1592 default:
1591 BUG_ON(1); 1593 BUG_ON(1);
@@ -1659,6 +1661,7 @@ static void ep_timeout(unsigned long arg)
1659 break; 1661 break;
1660 case MPA_REQ_WAIT: 1662 case MPA_REQ_WAIT:
1661 break; 1663 break;
1664 case CLOSING:
1662 case MORIBUND: 1665 case MORIBUND:
1663 if (ep->com.cm_id && ep->com.qp) { 1666 if (ep->com.cm_id && ep->com.qp) {
1664 attrs.next_state = IWCH_QP_STATE_ERROR; 1667 attrs.next_state = IWCH_QP_STATE_ERROR;
@@ -1956,11 +1959,11 @@ int iwch_ep_disconnect(struct iwch_ep *ep, int abrupt, gfp_t gfp)
1956 case MPA_REQ_RCVD: 1959 case MPA_REQ_RCVD:
1957 case MPA_REP_SENT: 1960 case MPA_REP_SENT:
1958 case FPDU_MODE: 1961 case FPDU_MODE:
1962 start_ep_timer(ep);
1959 ep->com.state = CLOSING; 1963 ep->com.state = CLOSING;
1960 close = 1; 1964 close = 1;
1961 break; 1965 break;
1962 case CLOSING: 1966 case CLOSING:
1963 start_ep_timer(ep);
1964 ep->com.state = MORIBUND; 1967 ep->com.state = MORIBUND;
1965 close = 1; 1968 close = 1;
1966 break; 1969 break;