diff options
author | Henry Orosco | 2016-11-30 22:14:15 +0100 |
---|---|---|
committer | Doug Ledford | 2016-12-05 22:09:44 +0100 |
commit | 78300cf8152f87adb20fbe71a600e0d8d72aabe8 (patch) | |
tree | dbdd3837f42e0720c8e7cc0ca6992b5bf3928ebc /drivers/infiniband/hw/i40iw/i40iw_utils.c | |
parent | i40iw: Code cleanup, remove check of PBLE pages (diff) | |
download | kernel-qcow2-linux-78300cf8152f87adb20fbe71a600e0d8d72aabe8.tar.gz kernel-qcow2-linux-78300cf8152f87adb20fbe71a600e0d8d72aabe8.tar.xz kernel-qcow2-linux-78300cf8152f87adb20fbe71a600e0d8d72aabe8.zip |
i40iw: Add request for reset on CQP timeout
When CQP times out, send a request to LAN driver for reset.
Signed-off-by: Mustafa Ismail <mustafa.ismail@intel.com>
Signed-off-by: Henry Orosco <henry.orosco@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/i40iw/i40iw_utils.c')
-rw-r--r-- | drivers/infiniband/hw/i40iw/i40iw_utils.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/i40iw/i40iw_utils.c b/drivers/infiniband/hw/i40iw/i40iw_utils.c index 641f00f3dda1..4a08ffb75d2e 100644 --- a/drivers/infiniband/hw/i40iw/i40iw_utils.c +++ b/drivers/infiniband/hw/i40iw/i40iw_utils.c @@ -396,7 +396,10 @@ static int i40iw_wait_event(struct i40iw_device *iwdev, i40iw_pr_err("error cqp command 0x%x timed out ret = %d\n", info->cqp_cmd, timeout_ret); err_code = -ETIME; - i40iw_request_reset(iwdev); + if (!iwdev->reset) { + iwdev->reset = true; + i40iw_request_reset(iwdev); + } goto done; } cqp_error = cqp_request->compl_info.error; @@ -426,6 +429,11 @@ enum i40iw_status_code i40iw_handle_cqp_op(struct i40iw_device *iwdev, struct cqp_commands_info *info = &cqp_request->info; int err_code = 0; + if (iwdev->reset) { + i40iw_free_cqp_request(&iwdev->cqp, cqp_request); + return I40IW_ERR_CQP_COMPL_ERROR; + } + status = i40iw_process_cqp_cmd(dev, info); if (status) { i40iw_pr_err("error cqp command 0x%x failed\n", info->cqp_cmd); |