summaryrefslogtreecommitdiffstats
path: root/src/net/infiniband
diff options
context:
space:
mode:
authorMichael Brown2010-09-22 01:28:36 +0200
committerMichael Brown2010-09-22 18:11:29 +0200
commit9e036d32ba1b111192503341995043293f3136c6 (patch)
tree6493006712d69187e380ddfeea7a7a727969d9f7 /src/net/infiniband
parent[aoe] Add support for identifying the underlying hardware device (diff)
downloadipxe-9e036d32ba1b111192503341995043293f3136c6.tar.gz
ipxe-9e036d32ba1b111192503341995043293f3136c6.tar.xz
ipxe-9e036d32ba1b111192503341995043293f3136c6.zip
[infiniband] Add support for identifying the underlying hardware device
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/net/infiniband')
-rw-r--r--src/net/infiniband/ib_cmrc.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/net/infiniband/ib_cmrc.c b/src/net/infiniband/ib_cmrc.c
index 011ff3e0..ed388b2f 100644
--- a/src/net/infiniband/ib_cmrc.c
+++ b/src/net/infiniband/ib_cmrc.c
@@ -334,6 +334,17 @@ static size_t ib_cmrc_xfer_window ( struct ib_cmrc_connection *cmrc ) {
return ( cmrc->connected ? IB_MAX_PAYLOAD_SIZE : 0 );
}
+/**
+ * Identify device underlying CMRC connection
+ *
+ * @v cmrc CMRC connection
+ * @ret device Underlying device
+ */
+static struct device *
+ib_cmrc_identify_device ( struct ib_cmrc_connection *cmrc ) {
+ return cmrc->ibdev->dev;
+}
+
/** CMRC data transfer interface operations */
static struct interface_operation ib_cmrc_xfer_operations[] = {
INTF_OP ( xfer_deliver, struct ib_cmrc_connection *,
@@ -341,6 +352,8 @@ static struct interface_operation ib_cmrc_xfer_operations[] = {
INTF_OP ( xfer_window, struct ib_cmrc_connection *,
ib_cmrc_xfer_window ),
INTF_OP ( intf_close, struct ib_cmrc_connection *, ib_cmrc_close ),
+ INTF_OP ( identify_device, struct ib_cmrc_connection *,
+ ib_cmrc_identify_device ),
};
/** CMRC data transfer interface descriptor */