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)
committerJason Gunthorpe <jgg@mellanox.com>
Tue, 16 Oct 2018 06:03:50 +0000 (00:03 -0600)
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>
drivers/infiniband/hw/bnxt_re/main.c

index 7f273255875f510f2a354be4e2c309cbc64eec9d..2b1d00d78ad17a326c76471ba315cf7c22e7ca1f 100644 (file)
@@ -988,12 +988,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