iPXE
Typedefs | Functions
ib_smc.h File Reference

Infiniband Subnet Management Client. More...

#include <ipxe/infiniband.h>

Go to the source code of this file.

Typedefs

typedef int(* ib_local_mad_t )(struct ib_device *ibdev, union ib_mad *mad)

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
int ib_smc_init (struct ib_device *ibdev, ib_local_mad_t local_mad)
 Initialise Infiniband parameters using SMC.
int ib_smc_update (struct ib_device *ibdev, ib_local_mad_t local_mad)
 Update Infiniband parameters using SMC.

Detailed Description

Infiniband Subnet Management Client.

Definition in file ib_smc.h.


Typedef Documentation

typedef int( * ib_local_mad_t)(struct ib_device *ibdev, union ib_mad *mad)

Definition at line 14 of file ib_smc.h.


Function Documentation

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )
int ib_smc_init ( struct ib_device ibdev,
ib_local_mad_t  local_mad 
)

Initialise Infiniband parameters using SMC.

Parameters:
ibdevInfiniband device
local_madMethod for issuing local MADs
Return values:
rcReturn status code

Definition at line 232 of file ib_smc.c.

References ib_smc_get(), and rc.

Referenced by arbel_probe(), and hermon_register_ibdev().

                                                                      {
        int rc;

        /* Get MAD parameters */
        if ( ( rc = ib_smc_get ( ibdev, local_mad ) ) != 0 )
                return rc;

        return 0;
}
int ib_smc_update ( struct ib_device ibdev,
ib_local_mad_t  local_mad 
)

Update Infiniband parameters using SMC.

Parameters:
ibdevInfiniband device
local_madMethod for issuing local MADs
Return values:
rcReturn status code

Definition at line 249 of file ib_smc.c.

References ib_link_state_changed(), ib_smc_get(), and rc.

Referenced by arbel_event_port_state_change(), arbel_ib_open(), arbel_inform_sma(), arbel_poll_eq(), hermon_ib_open(), hermon_inform_sma(), hermon_poll_eq(), and hermon_state_change_ibdev().

                                                                        {
        int rc;

        /* Get MAD parameters */
        if ( ( rc = ib_smc_get ( ibdev, local_mad ) ) != 0 )
                return rc;

        /* Notify Infiniband core of potential link state change */
        ib_link_state_changed ( ibdev );

        return 0;
}