diff options
author | Steve Wise <swise@opengridcomputing.com> | 2008-04-29 16:46:51 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2008-04-29 16:46:51 -0400 |
commit | 989a1780698c65dfe093a6aa89ceeff84c31f528 (patch) | |
tree | 9fe0ca81bfbdbc9f7618fc6b09c1c0c9e3234057 /drivers/infiniband/hw/cxgb3/iwch_qp.c | |
parent | e463c7b197dbe64b8a99b0612c65f286937e5bf1 (diff) |
RDMA/cxgb3: Correctly serialize peer abort path
Open MPI and other stress testing exposed a few bad bugs in handling
aborts in the middle of a normal close. Fix these by:
- serializing abort reply and peer abort processing with disconnect
processing
- warning (and ignoring) if ep timer is stopped when it wasn't running
- cleaning up disconnect path to correctly deal with aborting and
dead endpoints
- in iwch_modify_qp(), taking a ref on the ep before releasing the qp
lock if iwch_ep_disconnect() will be called. The ref is dropped
after calling disconnect.
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/cxgb3/iwch_qp.c')
-rw-r--r-- | drivers/infiniband/hw/cxgb3/iwch_qp.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/cxgb3/iwch_qp.c b/drivers/infiniband/hw/cxgb3/iwch_qp.c index 8891c3b0a3d5..6cd484e11c11 100644 --- a/drivers/infiniband/hw/cxgb3/iwch_qp.c +++ b/drivers/infiniband/hw/cxgb3/iwch_qp.c | |||
@@ -832,6 +832,7 @@ int iwch_modify_qp(struct iwch_dev *rhp, struct iwch_qp *qhp, | |||
832 | abort=0; | 832 | abort=0; |
833 | disconnect = 1; | 833 | disconnect = 1; |
834 | ep = qhp->ep; | 834 | ep = qhp->ep; |
835 | get_ep(&ep->com); | ||
835 | } | 836 | } |
836 | flush_qp(qhp, &flag); | 837 | flush_qp(qhp, &flag); |
837 | break; | 838 | break; |
@@ -848,6 +849,7 @@ int iwch_modify_qp(struct iwch_dev *rhp, struct iwch_qp *qhp, | |||
848 | abort=1; | 849 | abort=1; |
849 | disconnect = 1; | 850 | disconnect = 1; |
850 | ep = qhp->ep; | 851 | ep = qhp->ep; |
852 | get_ep(&ep->com); | ||
851 | } | 853 | } |
852 | goto err; | 854 | goto err; |
853 | break; | 855 | break; |
@@ -929,8 +931,10 @@ out: | |||
929 | * on the EP. This can be a normal close (RTS->CLOSING) or | 931 | * on the EP. This can be a normal close (RTS->CLOSING) or |
930 | * an abnormal close (RTS/CLOSING->ERROR). | 932 | * an abnormal close (RTS/CLOSING->ERROR). |
931 | */ | 933 | */ |
932 | if (disconnect) | 934 | if (disconnect) { |
933 | iwch_ep_disconnect(ep, abort, GFP_KERNEL); | 935 | iwch_ep_disconnect(ep, abort, GFP_KERNEL); |
936 | put_ep(&ep->com); | ||
937 | } | ||
934 | 938 | ||
935 | /* | 939 | /* |
936 | * If free is 1, then we've disassociated the EP from the QP | 940 | * If free is 1, then we've disassociated the EP from the QP |