mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-19 03:37:58 +07:00
i40e: Save link FEC info from link up event
Store the FEC status bits from the link up event into the hw_link_info structure. Change-ID: I9a7b256f6dfb0dce89c2f503075d0d383526832e Signed-off-by: Henry Tieman <henry.w.tieman@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
This commit is contained in:
parent
b3f028fc8a
commit
3e03d7ccf4
@ -1838,6 +1838,8 @@ i40e_status i40e_aq_get_link_info(struct i40e_hw *hw,
|
||||
hw_link_info->link_speed = (enum i40e_aq_link_speed)resp->link_speed;
|
||||
hw_link_info->link_info = resp->link_info;
|
||||
hw_link_info->an_info = resp->an_info;
|
||||
hw_link_info->fec_info = resp->config & (I40E_AQ_CONFIG_FEC_KR_ENA |
|
||||
I40E_AQ_CONFIG_FEC_RS_ENA);
|
||||
hw_link_info->ext_info = resp->ext_info;
|
||||
hw_link_info->loopback = resp->loopback;
|
||||
hw_link_info->max_frame_size = le16_to_cpu(resp->max_frame_size);
|
||||
|
@ -5272,6 +5272,8 @@ void i40e_print_link_message(struct i40e_vsi *vsi, bool isup)
|
||||
enum i40e_aq_link_speed new_speed;
|
||||
char *speed = "Unknown";
|
||||
char *fc = "Unknown";
|
||||
char *fec = "";
|
||||
char *an = "";
|
||||
|
||||
new_speed = vsi->back->hw.phy.link_info.link_speed;
|
||||
|
||||
@ -5331,8 +5333,23 @@ void i40e_print_link_message(struct i40e_vsi *vsi, bool isup)
|
||||
break;
|
||||
}
|
||||
|
||||
netdev_info(vsi->netdev, "NIC Link is Up %sbps Full Duplex, Flow Control: %s\n",
|
||||
speed, fc);
|
||||
if (vsi->back->hw.phy.link_info.link_speed == I40E_LINK_SPEED_25GB) {
|
||||
fec = ", FEC: None";
|
||||
an = ", Autoneg: False";
|
||||
|
||||
if (vsi->back->hw.phy.link_info.an_info & I40E_AQ_AN_COMPLETED)
|
||||
an = ", Autoneg: True";
|
||||
|
||||
if (vsi->back->hw.phy.link_info.fec_info &
|
||||
I40E_AQ_CONFIG_FEC_KR_ENA)
|
||||
fec = ", FEC: CL74 FC-FEC/BASE-R";
|
||||
else if (vsi->back->hw.phy.link_info.fec_info &
|
||||
I40E_AQ_CONFIG_FEC_RS_ENA)
|
||||
fec = ", FEC: CL108 RS-FEC";
|
||||
}
|
||||
|
||||
netdev_info(vsi->netdev, "NIC Link is Up, %sbps Full Duplex%s%s, Flow Control: %s\n",
|
||||
speed, fec, an, fc);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -184,6 +184,7 @@ struct i40e_link_status {
|
||||
enum i40e_aq_link_speed link_speed;
|
||||
u8 link_info;
|
||||
u8 an_info;
|
||||
u8 fec_info;
|
||||
u8 ext_info;
|
||||
u8 loopback;
|
||||
/* is Link Status Event notification to SW enabled */
|
||||
|
@ -158,6 +158,7 @@ struct i40e_link_status {
|
||||
enum i40e_aq_link_speed link_speed;
|
||||
u8 link_info;
|
||||
u8 an_info;
|
||||
u8 fec_info;
|
||||
u8 ext_info;
|
||||
u8 loopback;
|
||||
/* is Link Status Event notification to SW enabled */
|
||||
|
Loading…
Reference in New Issue
Block a user