]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
RDMA/bnxt_re: Fix qp async event reporting
authorDevesh Sharma <devesh.sharma@broadcom.com>
Mon, 8 Oct 2018 10:28:01 +0000 (03:28 -0700)
committerMarcelo Henrique Cerri <marcelo.cerri@canonical.com>
Fri, 17 Jan 2020 17:20:48 +0000 (14:20 -0300)
BugLink: https://bugs.launchpad.net/bugs/1854975
[ Upstream commit 4c01f2e3a906a0d2d798be5751c331cf501bc129 ]

Reports affiliated async event on the qp-async event channel instead of
global event channel.

Signed-off-by: Devesh Sharma <devesh.sharma@broadcom.com>
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/infiniband/hw/bnxt_re/main.c

index 5d8fbed4f26d35b70ef8f66638b38b23bb2517fb..a568da1f08f9a9590f8ae6abd2438a8bd85a8bf0 100644 (file)
@@ -762,12 +762,17 @@ static void bnxt_re_dispatch_event(struct ib_device *ibdev, struct ib_qp *qp,
        struct ib_event ib_event;
 
        ib_event.device = ibdev;
-       if (qp)
+       if (qp) {
                ib_event.element.qp = qp;
-       else
+               ib_event.event = event;
+               if (qp->event_handler)
+                       qp->event_handler(&ib_event, qp->qp_context);
+
+       } else {
                ib_event.element.port_num = port_num;
-       ib_event.event = event;
-       ib_dispatch_event(&ib_event);
+               ib_event.event = event;
+               ib_dispatch_event(&ib_event);
+       }
 }
 
 #define HWRM_QUEUE_PRI2COS_QCFG_INPUT_FLAGS_IVLAN      0x02