diff options
author | Michael Brown <mcb30@etherboot.org> | 2009-07-07 18:30:15 +0100 |
---|---|---|
committer | Michael Brown <mcb30@etherboot.org> | 2009-07-17 23:06:34 +0100 |
commit | 165074c1881e7ce86e4d6d2e3caa20231f42560b (patch) | |
tree | 12ead5a76c154e17bfffd0a7c195345609ea9937 /src/net/infiniband.c | |
parent | 8a852280eb84ff6a43f8c08aeb52c3e21a5da31b (diff) | |
download | ipxe-165074c1881e7ce86e4d6d2e3caa20231f42560b.tar.gz |
[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.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/net/infiniband.c b/src/net/infiniband.c index e71b3bcca..38aaf9fc2 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 |