mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-14 09:11:27 +00:00
ib_srpt: Avoid waiting for missing error completions
Apparently with mlx4 firmware up to and including 2.30.8000 it is not guaranteed that for a QP associated with an SRQ error completions are generated for all pending work requests. Avoid triggering srpt_pending_cmd_timeout() for missing error completions. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5370 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -1398,6 +1398,19 @@ out:
|
||||
TRACE_EXIT();
|
||||
}
|
||||
|
||||
void srpt_on_abort_cmd(struct scst_cmd *cmd)
|
||||
{
|
||||
struct srpt_send_ioctx *ioctx = scst_cmd_get_tgt_priv(cmd);
|
||||
struct srpt_rdma_ch *ch = ioctx->ch;
|
||||
|
||||
if (ch->state >= CH_DISCONNECTED) {
|
||||
PRINT_ERROR("Cmd %p: IB completion for idx %u has not"
|
||||
" been received in time (SRPT command state %d)",
|
||||
cmd, ioctx->ioctx.index, ioctx->state);
|
||||
srpt_abort_cmd(ioctx, SCST_CONTEXT_THREAD);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* srpt_handle_send_err_comp() - Process an IB_WC_SEND error completion.
|
||||
*/
|
||||
@@ -3761,6 +3774,7 @@ static struct scst_tgt_template srpt_template = {
|
||||
.close_session = srpt_close_session,
|
||||
.xmit_response = srpt_xmit_response,
|
||||
.rdy_to_xfer = srpt_rdy_to_xfer,
|
||||
.on_abort_cmd = srpt_on_abort_cmd,
|
||||
.on_hw_pending_cmd_timeout = srpt_pending_cmd_timeout,
|
||||
.on_free_cmd = srpt_on_free_cmd,
|
||||
.task_mgmt_fn_done = srpt_tsk_mgmt_done,
|
||||
|
||||
Reference in New Issue
Block a user