[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

@@ -272,11 +272,6 @@ static int linda_set_port_info ( struct ib_device *ibdev,
return 0;
}
/** Linda subnet management operations */
static struct ib_sma_operations linda_sma_operations = {
.set_port_info = linda_set_port_info,
};
/***************************************************************************
*
* Context allocation
@@ -1464,6 +1459,7 @@ static struct ib_device_operations linda_ib_operations = {
.close = linda_close,
.mcast_attach = linda_mcast_attach,
.mcast_detach = linda_mcast_detach,
.set_port_info = linda_set_port_info,
};
/***************************************************************************
@@ -2340,11 +2336,10 @@ static int linda_probe ( struct pci_device *pci,
goto err_init_ib_serdes;
/* Create the SMA */
if ( ( rc = ib_create_sma ( &linda->sma, ibdev,
&linda_sma_operations ) ) != 0 )
if ( ( rc = ib_create_sma ( &linda->sma, ibdev ) ) != 0 )
goto err_create_sma;
/* If the SMA doesn't get context 0, we're screwed */
assert ( linda_qpn_to_ctx ( linda->sma.qp->qpn ) == 0 );
assert ( linda_qpn_to_ctx ( linda->sma.gma.qp->qpn ) == 0 );
/* Register Infiniband device */
if ( ( rc = register_ibdev ( ibdev ) ) != 0 ) {