summaryrefslogtreecommitdiffstats
path: root/src/net/infiniband.c
diff options
context:
space:
mode:
authorMichael Brown2009-07-07 19:30:15 +0200
committerMichael Brown2009-07-18 00:06:34 +0200
commit165074c1881e7ce86e4d6d2e3caa20231f42560b (patch)
tree12ead5a76c154e17bfffd0a7c195345609ea9937 /src/net/infiniband.c
parent[infiniband] Pass GMA as a parameter to GMA MAD handlers (diff)
downloadipxe-165074c1881e7ce86e4d6d2e3caa20231f42560b.tar.gz
ipxe-165074c1881e7ce86e4d6d2e3caa20231f42560b.tar.xz
ipxe-165074c1881e7ce86e4d6d2e3caa20231f42560b.zip
[infiniband] Implement SMA as an instance of a GMA
The GMA code was based upon the SMA code. We can save space by making the SMA simply an instance of the GMA.
Diffstat (limited to 'src/net/infiniband.c')
-rw-r--r--src/net/infiniband.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/net/infiniband.c b/src/net/infiniband.c
index e71b3bcc..38aaf9fc 100644
--- a/src/net/infiniband.c
+++ b/src/net/infiniband.c
@@ -644,6 +644,31 @@ int ib_get_hca_info ( struct ib_device *ibdev,
return num_ports;
}
+/** Set port information
+ *
+ * @v ibdev Infiniband device
+ * @v port_info New port information
+ */
+int ib_set_port_info ( struct ib_device *ibdev,
+ const struct ib_port_info *port_info ) {
+ int rc;
+
+ /* Adapters with embedded SMAs do not need to support this method */
+ if ( ! ibdev->op->set_port_info ) {
+ DBGC ( ibdev, "IBDEV %p does not support setting port "
+ "information\n", ibdev );
+ return -ENOTSUP;
+ }
+
+ if ( ( rc = ibdev->op->set_port_info ( ibdev, port_info ) ) != 0 ) {
+ DBGC ( ibdev, "IBDEV %p could not set port information: %s\n",
+ ibdev, strerror ( rc ) );
+ return rc;
+ }
+
+ return 0;
+};
+
/***************************************************************************
*
* Event queues