src/dpdk/drivers/net/ixgbe/base/ixgbe_82599.c
void ixgbe_set_hard_rate_select_speed(struct ixgbe_hw *hw,
					ixgbe_link_speed speed)
{
	u32 esdp_reg = IXGBE_READ_REG(hw, IXGBE_ESDP);

	switch (speed) {
	case IXGBE_LINK_SPEED_10GB_FULL:
		esdp_reg |= (IXGBE_ESDP_SDP5_DIR | IXGBE_ESDP_SDP5);
		break;
	case IXGBE_LINK_SPEED_1GB_FULL:
		esdp_reg &= ~IXGBE_ESDP_SDP5;
		esdp_reg |= IXGBE_ESDP_SDP5_DIR;
		break;
	default:
		DEBUGOUT("Invalid fixed module speed\n");
		return;
	}

	IXGBE_WRITE_REG(hw, IXGBE_ESDP, esdp_reg);
	IXGBE_WRITE_FLUSH(hw);
}
/**
 * ixgbe_set_hard_rate_select_speed - Set module link speed
 * @hw: pointer to hardware structure
 * @speed: link speed to set
 *
 * Set module link speed via RS0/RS1 rate select pins.
 */
Set module link speed
@hw: pointer to hardware structure
@speed: link speed to set

Set module link speed via RS0/RS1 rate select pins.
Set module link speed @hw : pointer to hardware structure @speed : link speed to set Set module link speed via RS0 / RS1 rate select pins .
void ixgbe_set_hard_rate_select_speed(struct ixgbe_hw *hw,
					ixgbe_link_speed speed)
{
	u32 esdp_reg = IXGBE_READ_REG(hw, IXGBE_ESDP);
	switch (speed) {
	case IXGBE_LINK_SPEED_10GB_FULL:
		esdp_reg |= (IXGBE_ESDP_SDP5_DIR | IXGBE_ESDP_SDP5);
		break;
	case IXGBE_LINK_SPEED_1GB_FULL:
		esdp_reg &= ~IXGBE_ESDP_SDP5;
		esdp_reg |= IXGBE_ESDP_SDP5_DIR;
		break;
	default:
		DEBUGOUT("Invalid fixed module speed\n");
		return;
	}
	IXGBE_WRITE_REG(hw, IXGBE_ESDP, esdp_reg);
	IXGBE_WRITE_FLUSH(hw);
}
void ixgbe_set_hard_rate_select_speed ( struct ixgbe_hw * hw , ixgbe_link_speed speed ) { u32 esdp_reg = IXGBE_READ_REG ( hw , IXGBE_ESDP ) ; switch ( speed ) { case IXGBE_LINK_SPEED_10GB_FULL : esdp_reg |= ( IXGBE_ESDP_SDP5_DIR | IXGBE_ESDP_SDP5 ) ; break ; case IXGBE_LINK_SPEED_1GB_FULL : esdp_reg &= ~ IXGBE_ESDP_SDP5 ; esdp_reg |= IXGBE_ESDP_SDP5_DIR ; break ; default : DEBUGOUT ( " \n " ) ; return ; } IXGBE_WRITE_REG ( hw , IXGBE_ESDP , esdp_reg ) ; IXGBE_WRITE_FLUSH ( hw ) ; }
ixgbe_set_hard_rate_select_speed - Set module link speed
 @hw: pointer to hardware structure
 @speed: link speed to set
ixgbe_set_hard_rate_select_speed - Set module link speed @hw : pointer to hardware structure @speed : link speed to set