aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ocrdma/ocrdma_main.c
diff options
context:
space:
mode:
authorDevesh Sharma <devesh.sharma@avagotech.com>2015-12-24 13:14:06 -0500
committerDoug Ledford <dledford@redhat.com>2016-01-19 14:00:47 -0500
commitd310a344e18c1d9a6a2ab11ef15f2954418c493d (patch)
tree72bded094632e4b309646f6ace3c7ab8d4f6baef /drivers/infiniband/hw/ocrdma/ocrdma_main.c
parentRDMA/ocrdma: Fix vlan-id assignment in qp parameters (diff)
downloadlinux-dev-d310a344e18c1d9a6a2ab11ef15f2954418c493d.tar.xz
linux-dev-d310a344e18c1d9a6a2ab11ef15f2954418c493d.zip
RDMA/ocrdma: Dispatch only port event when port state changes
Dispatch only port event to IB stack when port state changes. Don't explicitly modify qps to error. Let application listen to port events on async event queue or let QP fail with retry-exceeded completion error. Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@avagotech.com> Signed-off-by: Devesh Sharma <devesh.sharma@avagotech.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to '')
-rw-r--r--drivers/infiniband/hw/ocrdma/ocrdma_main.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_main.c b/drivers/infiniband/hw/ocrdma/ocrdma_main.c
index fe759c9f2a0a..d47df97449ae 100644
--- a/drivers/infiniband/hw/ocrdma/ocrdma_main.c
+++ b/drivers/infiniband/hw/ocrdma/ocrdma_main.c
@@ -385,30 +385,7 @@ static int ocrdma_open(struct ocrdma_dev *dev)
static int ocrdma_close(struct ocrdma_dev *dev)
{
- int i;
- struct ocrdma_qp *qp, **cur_qp;
struct ib_event err_event;
- struct ib_qp_attr attrs;
- int attr_mask = IB_QP_STATE;
-
- attrs.qp_state = IB_QPS_ERR;
- mutex_lock(&dev->dev_lock);
- if (dev->qp_tbl) {
- cur_qp = dev->qp_tbl;
- for (i = 0; i < OCRDMA_MAX_QP; i++) {
- qp = cur_qp[i];
- if (qp && qp->ibqp.qp_type != IB_QPT_GSI) {
- /* change the QP state to ERROR */
- _ocrdma_modify_qp(&qp->ibqp, &attrs, attr_mask);
-
- err_event.event = IB_EVENT_QP_FATAL;
- err_event.element.qp = &qp->ibqp;
- err_event.device = &dev->ibdev;
- ib_dispatch_event(&err_event);
- }
- }
- }
- mutex_unlock(&dev->dev_lock);
err_event.event = IB_EVENT_PORT_ERR;
err_event.element.port_num = 1;