summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/sw
diff options
context:
space:
mode:
authorDennis Dalessandro <dennis.dalessandro@intel.com>2016-01-06 10:04:23 -0800
committerDoug Ledford <dledford@redhat.com>2016-03-10 20:37:14 -0500
commitb036db83c0ec8d1e81df19410a494be4cfe0b186 (patch)
tree230d9f953db6d1d5706dbf0745b477032770a91a /drivers/infiniband/sw
parentf3d01bbcdc47a728336008a9254732c1652aeddd (diff)
downloadtalos-obmc-linux-b036db83c0ec8d1e81df19410a494be4cfe0b186.tar.gz
talos-obmc-linux-b036db83c0ec8d1e81df19410a494be4cfe0b186.zip
IB/rdmavt: Add driver notification for new AH
Drivers may need to do some work once an address handle has been created. Add a driver function for this purpose. Reviewed-by: Ira Weiny <ira.weiny@intel.com> Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Reviewed-by: Harish Chegondi <harish.chegondi@intel.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/sw')
-rw-r--r--drivers/infiniband/sw/rdmavt/ah.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/infiniband/sw/rdmavt/ah.c b/drivers/infiniband/sw/rdmavt/ah.c
index 2519db98be6c..621afc305183 100644
--- a/drivers/infiniband/sw/rdmavt/ah.c
+++ b/drivers/infiniband/sw/rdmavt/ah.c
@@ -83,8 +83,8 @@ int rvt_check_ah(struct ib_device *ibdev,
!(ah_attr->ah_flags & IB_AH_GRH))
return -EINVAL;
}
- if (rdi->driver_f.check_ah(ibdev, ah_attr))
- return -EINVAL;
+ if (rdi->driver_f.check_ah)
+ return rdi->driver_f.check_ah(ibdev, ah_attr);
return 0;
}
EXPORT_SYMBOL(rvt_check_ah);
@@ -123,6 +123,9 @@ struct ib_ah *rvt_create_ah(struct ib_pd *pd,
ah->attr = *ah_attr;
atomic_set(&ah->refcount, 0);
+ if (dev->driver_f.notify_new_ah)
+ dev->driver_f.notify_new_ah(pd->device, ah_attr, ah);
+
return &ah->ibah;
}
OpenPOWER on IntegriCloud