diff options
author | Dennis Dalessandro <dennis.dalessandro@intel.com> | 2016-01-06 19:04:23 +0100 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-03-11 02:37:14 +0100 |
commit | b036db83c0ec8d1e81df19410a494be4cfe0b186 (patch) | |
tree | 230d9f953db6d1d5706dbf0745b477032770a91a /drivers | |
parent | IB/rdmavt: Add an ibport data structure to rdmavt (diff) | |
download | linux-b036db83c0ec8d1e81df19410a494be4cfe0b186.tar.xz 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')
-rw-r--r-- | drivers/infiniband/sw/rdmavt/ah.c | 7 |
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; } |