aboutsummaryrefslogtreecommitdiffstats
path: root/include/rdma
diff options
context:
space:
mode:
authorRalph Campbell <ralph.campbell@qlogic.com>2010-05-06 20:03:25 -0400
committerRoland Dreier <rolandd@cisco.com>2010-05-21 13:34:44 -0400
commit9a6edb60ec10d86b1025a0cdad68fd89f1ddaf02 (patch)
tree8727118d511e8336f038e618cfc6d4aa6b73aaaf /include/rdma
parenta0fe3cc5d36a5f5b4f60abfe1a4b1caf4a5cce5a (diff)
IB/core: Allow device-specific per-port sysfs files
Add a new parameter to ib_register_device() so that low-level device drivers can pass in a pointer to a callback function that will be called for each port that is registered in sysfs. This allows low-level device drivers to create files in /sys/class/infiniband/<hca>/ports/<N>/ without having to poke through the internals of the RDMA sysfs handling. There is no need for an unregister function since the kobject reference will go to zero when ib_unregister_device() is called. Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'include/rdma')
-rw-r--r--include/rdma/ib_verbs.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
index 310d31474034..f3e8f3c07725 100644
--- a/include/rdma/ib_verbs.h
+++ b/include/rdma/ib_verbs.h
@@ -1172,7 +1172,9 @@ struct ib_client {
1172struct ib_device *ib_alloc_device(size_t size); 1172struct ib_device *ib_alloc_device(size_t size);
1173void ib_dealloc_device(struct ib_device *device); 1173void ib_dealloc_device(struct ib_device *device);
1174 1174
1175int ib_register_device (struct ib_device *device); 1175int ib_register_device(struct ib_device *device,
1176 int (*port_callback)(struct ib_device *,
1177 u8, struct kobject *));
1176void ib_unregister_device(struct ib_device *device); 1178void ib_unregister_device(struct ib_device *device);
1177 1179
1178int ib_register_client (struct ib_client *client); 1180int ib_register_client (struct ib_client *client);