net/ixgbe/base: add media type of fixed fiber
This patch adds new media type support of fixed fiber. Signed-off-by: Qiming Yang <qiming.yang@intel.com> Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
This commit is contained in:
parent
e0f10b0874
commit
34265096e0
@ -87,6 +87,9 @@ void ixgbe_init_mac_link_ops_82599(struct ixgbe_hw *hw)
|
||||
mac->ops.setup_mac_link = ixgbe_setup_mac_link_82599;
|
||||
mac->ops.set_rate_select_speed =
|
||||
ixgbe_set_hard_rate_select_speed;
|
||||
if (ixgbe_get_media_type(hw) == ixgbe_media_type_fiber_fixed)
|
||||
mac->ops.set_rate_select_speed =
|
||||
ixgbe_set_soft_rate_select_speed;
|
||||
} else {
|
||||
if ((ixgbe_get_media_type(hw) == ixgbe_media_type_backplane) &&
|
||||
(hw->phy.smart_speed == ixgbe_smart_speed_auto ||
|
||||
@ -564,6 +567,10 @@ enum ixgbe_media_type ixgbe_get_media_type_82599(struct ixgbe_hw *hw)
|
||||
case IXGBE_DEV_ID_82599_QSFP_SF_QP:
|
||||
media_type = ixgbe_media_type_fiber_qsfp;
|
||||
break;
|
||||
case IXGBE_DEV_ID_82599_BYPASS:
|
||||
media_type = ixgbe_media_type_fiber_fixed;
|
||||
hw->phy.multispeed_fiber = true;
|
||||
break;
|
||||
default:
|
||||
media_type = ixgbe_media_type_unknown;
|
||||
break;
|
||||
|
@ -178,6 +178,7 @@ s32 ixgbe_set_mac_type(struct ixgbe_hw *hw)
|
||||
case IXGBE_DEV_ID_82599EN_SFP:
|
||||
case IXGBE_DEV_ID_82599_CX4:
|
||||
case IXGBE_DEV_ID_82599_LS:
|
||||
case IXGBE_DEV_ID_82599_BYPASS:
|
||||
case IXGBE_DEV_ID_82599_T3_LOM:
|
||||
hw->mac.type = ixgbe_mac_82599EB;
|
||||
break;
|
||||
@ -192,6 +193,7 @@ s32 ixgbe_set_mac_type(struct ixgbe_hw *hw)
|
||||
break;
|
||||
case IXGBE_DEV_ID_X540T:
|
||||
case IXGBE_DEV_ID_X540T1:
|
||||
case IXGBE_DEV_ID_X540_BYPASS:
|
||||
hw->mac.type = ixgbe_mac_X540;
|
||||
hw->mvals = ixgbe_mvals_X540;
|
||||
break;
|
||||
|
@ -167,6 +167,7 @@ bool ixgbe_device_supports_autoneg_fc(struct ixgbe_hw *hw)
|
||||
DEBUGFUNC("ixgbe_device_supports_autoneg_fc");
|
||||
|
||||
switch (hw->phy.media_type) {
|
||||
case ixgbe_media_type_fiber_fixed:
|
||||
case ixgbe_media_type_fiber_qsfp:
|
||||
case ixgbe_media_type_fiber:
|
||||
/* flow control autoneg black list */
|
||||
@ -200,6 +201,7 @@ bool ixgbe_device_supports_autoneg_fc(struct ixgbe_hw *hw)
|
||||
case IXGBE_DEV_ID_82599_T3_LOM:
|
||||
case IXGBE_DEV_ID_X540T:
|
||||
case IXGBE_DEV_ID_X540T1:
|
||||
case IXGBE_DEV_ID_X540_BYPASS:
|
||||
case IXGBE_DEV_ID_X550T:
|
||||
case IXGBE_DEV_ID_X550T1:
|
||||
case IXGBE_DEV_ID_X550EM_X_10G_T:
|
||||
@ -265,6 +267,7 @@ s32 ixgbe_setup_fc_generic(struct ixgbe_hw *hw)
|
||||
goto out;
|
||||
|
||||
/* fall through - only backplane uses autoc */
|
||||
case ixgbe_media_type_fiber_fixed:
|
||||
case ixgbe_media_type_fiber_qsfp:
|
||||
case ixgbe_media_type_fiber:
|
||||
reg = IXGBE_READ_REG(hw, IXGBE_PCS1GANA);
|
||||
@ -3124,6 +3127,7 @@ void ixgbe_fc_autoneg(struct ixgbe_hw *hw)
|
||||
|
||||
switch (hw->phy.media_type) {
|
||||
/* Autoneg flow control on fiber adapters */
|
||||
case ixgbe_media_type_fiber_fixed:
|
||||
case ixgbe_media_type_fiber_qsfp:
|
||||
case ixgbe_media_type_fiber:
|
||||
if (speed == IXGBE_LINK_SPEED_1GB_FULL)
|
||||
@ -5263,6 +5267,7 @@ s32 ixgbe_setup_mac_link_multispeed_fiber(struct ixgbe_hw *hw,
|
||||
|
||||
/* Set the module link speed */
|
||||
switch (hw->phy.media_type) {
|
||||
case ixgbe_media_type_fiber_fixed:
|
||||
case ixgbe_media_type_fiber:
|
||||
ixgbe_set_rate_select_speed(hw,
|
||||
IXGBE_LINK_SPEED_10GB_FULL);
|
||||
@ -5313,6 +5318,7 @@ s32 ixgbe_setup_mac_link_multispeed_fiber(struct ixgbe_hw *hw,
|
||||
|
||||
/* Set the module link speed */
|
||||
switch (hw->phy.media_type) {
|
||||
case ixgbe_media_type_fiber_fixed:
|
||||
case ixgbe_media_type_fiber:
|
||||
ixgbe_set_rate_select_speed(hw,
|
||||
IXGBE_LINK_SPEED_1GB_FULL);
|
||||
|
@ -444,17 +444,6 @@ STATIC s32 ixgbe_write_mbx_vf(struct ixgbe_hw *hw, u32 *msg, u16 size,
|
||||
for (i = 0; i < size; i++)
|
||||
IXGBE_WRITE_REG_ARRAY(hw, IXGBE_VFMBMEM, i, msg[i]);
|
||||
|
||||
/*
|
||||
* Complete the remaining mailbox data registers with zero to reset
|
||||
* the data sent in a previous exchange (in either side) with the PF,
|
||||
* including exchanges performed by another Guest OS to which that VF
|
||||
* was previously assigned.
|
||||
*/
|
||||
while (i < hw->mbx.size) {
|
||||
IXGBE_WRITE_REG_ARRAY(hw, IXGBE_VFMBMEM, i, 0);
|
||||
i++;
|
||||
}
|
||||
|
||||
/* update stats */
|
||||
hw->mbx.stats.msgs_tx++;
|
||||
|
||||
@ -693,17 +682,6 @@ STATIC s32 ixgbe_write_mbx_pf(struct ixgbe_hw *hw, u32 *msg, u16 size,
|
||||
for (i = 0; i < size; i++)
|
||||
IXGBE_WRITE_REG_ARRAY(hw, IXGBE_PFMBMEM(vf_number), i, msg[i]);
|
||||
|
||||
/*
|
||||
* Complete the remaining mailbox data registers with zero to reset
|
||||
* the data sent in a previous exchange (in either side) with the VF,
|
||||
* including exchanges performed by another Guest OS to which that VF
|
||||
* was previously assigned.
|
||||
*/
|
||||
while (i < hw->mbx.size) {
|
||||
IXGBE_WRITE_REG_ARRAY(hw, IXGBE_PFMBMEM(vf_number), i, 0);
|
||||
i++;
|
||||
}
|
||||
|
||||
/* Interrupt VF to tell it a message has been sent and release buffer*/
|
||||
IXGBE_WRITE_REG(hw, IXGBE_PFMAILBOX(vf_number), IXGBE_PFMAILBOX_STS);
|
||||
|
||||
|
@ -123,9 +123,11 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
#define IXGBE_DEV_ID_82599_VF 0x10ED
|
||||
#define IXGBE_DEV_ID_82599_VF_HV 0x152E
|
||||
#define IXGBE_DEV_ID_82599_LS 0x154F
|
||||
#define IXGBE_DEV_ID_82599_BYPASS 0x155D
|
||||
#define IXGBE_DEV_ID_X540T 0x1528
|
||||
#define IXGBE_DEV_ID_X540_VF 0x1515
|
||||
#define IXGBE_DEV_ID_X540_VF_HV 0x1530
|
||||
#define IXGBE_DEV_ID_X540_BYPASS 0x155C
|
||||
#define IXGBE_DEV_ID_X540T1 0x1560
|
||||
#define IXGBE_DEV_ID_X550T 0x1563
|
||||
#define IXGBE_DEV_ID_X550T1 0x15D1
|
||||
@ -271,7 +273,6 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
#define IXGBE_I2C_BB_EN_X550 0x00000100
|
||||
#define IXGBE_I2C_BB_EN_X550EM_x IXGBE_I2C_BB_EN_X550
|
||||
#define IXGBE_I2C_BB_EN_X550EM_a IXGBE_I2C_BB_EN_X550
|
||||
|
||||
#define IXGBE_I2C_BB_EN_BY_MAC(_hw) IXGBE_BY_MAC((_hw), I2C_BB_EN)
|
||||
|
||||
#define IXGBE_I2C_CLK_OE_N_EN 0
|
||||
@ -3754,6 +3755,7 @@ enum ixgbe_sfp_type {
|
||||
enum ixgbe_media_type {
|
||||
ixgbe_media_type_unknown = 0,
|
||||
ixgbe_media_type_fiber,
|
||||
ixgbe_media_type_fiber_fixed,
|
||||
ixgbe_media_type_fiber_qsfp,
|
||||
ixgbe_media_type_fiber_lco,
|
||||
ixgbe_media_type_copper,
|
||||
|
Loading…
Reference in New Issue
Block a user