[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.
This commit is contained in:
Michael Brown
2009-07-07 18:30:15 +01:00
parent 8a852280eb
commit 165074c188
8 changed files with 194 additions and 364 deletions

View File

@@ -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