[hermon] Add infrastructure for Ethernet devices
Add PRM structures to support Hermon Ethernet devices. Signed-off-by: Itay Gazit <itaygazit@gmail.com> Modified-by: Michael Brown <mcb30@ipxe.org> Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
committed by
Michael Brown
parent
f62c433d66
commit
ed0ea7cfc2
@@ -305,7 +305,7 @@ hermon_cmd_close_port ( struct hermon *hermon, unsigned int port ) {
|
||||
|
||||
static inline int
|
||||
hermon_cmd_set_port ( struct hermon *hermon, unsigned int port,
|
||||
struct hermonprm_set_port *set_port ) {
|
||||
union hermonprm_set_port *set_port ) {
|
||||
return hermon_cmd ( hermon,
|
||||
HERMON_HCR_IN_CMD ( HERMON_HCR_SET_PORT,
|
||||
1, sizeof ( *set_port ) ),
|
||||
@@ -1939,7 +1939,7 @@ static int hermon_sense_port_type ( struct ib_device *ibdev ) {
|
||||
*/
|
||||
static int hermon_open ( struct ib_device *ibdev ) {
|
||||
struct hermon *hermon = ib_get_drvdata ( ibdev );
|
||||
struct hermonprm_set_port set_port;
|
||||
union hermonprm_set_port set_port;
|
||||
int port_type;
|
||||
int rc;
|
||||
|
||||
@@ -1954,7 +1954,7 @@ static int hermon_open ( struct ib_device *ibdev ) {
|
||||
|
||||
/* Set port parameters */
|
||||
memset ( &set_port, 0, sizeof ( set_port ) );
|
||||
MLX_FILL_7 ( &set_port, 0,
|
||||
MLX_FILL_7 ( &set_port.ib, 0,
|
||||
mmc, 1,
|
||||
mvc, 1,
|
||||
mp, 1,
|
||||
@@ -1962,7 +1962,7 @@ static int hermon_open ( struct ib_device *ibdev ) {
|
||||
mtu_cap, IB_MTU_2048,
|
||||
vl_cap, IB_VL_0,
|
||||
rcm, 1 );
|
||||
MLX_FILL_2 ( &set_port, 10,
|
||||
MLX_FILL_2 ( &set_port.ib, 10,
|
||||
max_pkey, 1,
|
||||
max_gid, 1 );
|
||||
if ( ( rc = hermon_cmd_set_port ( hermon, ibdev->port,
|
||||
|
||||
Reference in New Issue
Block a user