From 08ee072a1396ac2c28983878dbc6b02feb035787 Mon Sep 17 00:00:00 2001 From: Sean Hefty Date: Fri, 10 Apr 2009 08:07:32 -0700 Subject: [PATCH] The WinOF HCA driver cannot handle transitioning from RTS -> RESET -> INIT -> ERROR. Simply delete the QP and re-create it to reinitialize the endpoint until the bug is fixed. Signed-off-by: Sean Hefty --- dapl/openib_scm/dapl_ib_qp.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/dapl/openib_scm/dapl_ib_qp.c b/dapl/openib_scm/dapl_ib_qp.c index 9c8a881..14a951e 100644 --- a/dapl/openib_scm/dapl_ib_qp.c +++ b/dapl/openib_scm/dapl_ib_qp.c @@ -288,6 +288,19 @@ dapls_ib_qp_modify ( * void * */ +#if defined(_WIN32) || defined(_WIN64) +void +dapls_ib_reinit_ep ( + IN DAPL_EP *ep_ptr) +{ + /* work around bug in low level driver - 3/24/09 */ + /* RTS -> RESET -> INIT -> ERROR QP transition crashes system */ + if (ep_ptr->qp_handle != IB_INVALID_HANDLE) { + dapls_ib_qp_free(ep_ptr->header.owner_ia, ep_ptr); + dapls_ib_qp_alloc(ep_ptr->header.owner_ia, ep_ptr, ep_ptr); + } +} +#else // _WIN32 || _WIN64 void dapls_ib_reinit_ep ( IN DAPL_EP *ep_ptr) @@ -299,6 +312,7 @@ dapls_ib_reinit_ep ( dapls_modify_qp_state(ep_ptr->qp_handle, IBV_QPS_INIT, 0); } } +#endif // _WIN32 || _WIN64 /* * Generic QP modify for init, reset, error, RTS, RTR -- 2.41.0