RDMA/irdma: Fix setting of QP context err_rq_idx_valid field
Setting err_rq_idx_valid field in QP context when the AE source of the
AEQE is not associated with an RQ causes the firmware flush to fail.
Set err_rq_idx_valid field in QP context only if it is associated with an
RQ. Additionally, cleanup the redundant setting of this field in
irdma_process_aeq.
Fixes: 44d9e52977
("RDMA/irdma: Implement device initialization definitions")
Link: https://lore.kernel.org/r/20220705230815.265-8-shiraz.saleem@intel.com
Signed-off-by: Mustafa Ismail <mustafa.ismail@intel.com>
Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
This commit is contained in:
parent
82ab2b5265
commit
3a844596ed
@ -257,10 +257,6 @@ static void irdma_process_aeq(struct irdma_pci_f *rf)
|
||||
iwqp->last_aeq = info->ae_id;
|
||||
spin_unlock_irqrestore(&iwqp->lock, flags);
|
||||
ctx_info = &iwqp->ctx_info;
|
||||
if (rdma_protocol_roce(&iwqp->iwdev->ibdev, 1))
|
||||
ctx_info->roce_info->err_rq_idx_valid = true;
|
||||
else
|
||||
ctx_info->iwarp_info->err_rq_idx_valid = true;
|
||||
} else {
|
||||
if (info->ae_id != IRDMA_AE_CQ_OPERATION_ERROR)
|
||||
continue;
|
||||
@ -370,16 +366,12 @@ static void irdma_process_aeq(struct irdma_pci_f *rf)
|
||||
case IRDMA_AE_LCE_FUNCTION_CATASTROPHIC:
|
||||
case IRDMA_AE_LCE_CQ_CATASTROPHIC:
|
||||
case IRDMA_AE_UDA_XMIT_DGRAM_TOO_LONG:
|
||||
if (rdma_protocol_roce(&iwdev->ibdev, 1))
|
||||
ctx_info->roce_info->err_rq_idx_valid = false;
|
||||
else
|
||||
ctx_info->iwarp_info->err_rq_idx_valid = false;
|
||||
fallthrough;
|
||||
default:
|
||||
ibdev_err(&iwdev->ibdev, "abnormal ae_id = 0x%x bool qp=%d qp_id = %d, ae_src=%d\n",
|
||||
info->ae_id, info->qp, info->qp_cq_id, info->ae_src);
|
||||
if (rdma_protocol_roce(&iwdev->ibdev, 1)) {
|
||||
if (!info->sq && ctx_info->roce_info->err_rq_idx_valid) {
|
||||
ctx_info->roce_info->err_rq_idx_valid = info->rq;
|
||||
if (info->rq) {
|
||||
ctx_info->roce_info->err_rq_idx = info->wqe_idx;
|
||||
irdma_sc_qp_setctx_roce(&iwqp->sc_qp, iwqp->host_ctx.va,
|
||||
ctx_info);
|
||||
@ -388,7 +380,8 @@ static void irdma_process_aeq(struct irdma_pci_f *rf)
|
||||
irdma_cm_disconn(iwqp);
|
||||
break;
|
||||
}
|
||||
if (!info->sq && ctx_info->iwarp_info->err_rq_idx_valid) {
|
||||
ctx_info->iwarp_info->err_rq_idx_valid = info->rq;
|
||||
if (info->rq) {
|
||||
ctx_info->iwarp_info->err_rq_idx = info->wqe_idx;
|
||||
ctx_info->tcp_info_valid = false;
|
||||
ctx_info->iwarp_info_valid = true;
|
||||
|
Loading…
Reference in New Issue
Block a user