[PATCH v1 07/15] net/ixgbe/base: fix media type handling for E610
Anatoly Burakov
anatoly.burakov at intel.com
Thu Aug 29 11:00:12 CEST 2024
From: Krzysztof Galazka <krzysztof.galazka at intel.com>
Media type information should not be updated by ixgbe_aci_get_link_info
function because it will be incorrectly set as unknown when link is down.
Do it only in ixgbe_get_media_type_E610.
Signed-off-by: Krzysztof Galazka <krzysztof.galazka at intel.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov at intel.com>
---
drivers/net/ixgbe/base/ixgbe_e610.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ixgbe/base/ixgbe_e610.c b/drivers/net/ixgbe/base/ixgbe_e610.c
index 1f3a4532da..b9b1ba32c3 100644
--- a/drivers/net/ixgbe/base/ixgbe_e610.c
+++ b/drivers/net/ixgbe/base/ixgbe_e610.c
@@ -1683,7 +1683,6 @@ s32 ixgbe_aci_get_link_info(struct ixgbe_hw *hw, bool ena_lse,
struct ixgbe_aci_cmd_get_link_status *resp;
struct ixgbe_link_status *li_old, *li;
struct ixgbe_fc_info *hw_fc_info;
- enum ixgbe_media_type *hw_media_type;
struct ixgbe_aci_desc desc;
bool tx_pause, rx_pause;
u8 cmd_flags;
@@ -1693,7 +1692,6 @@ s32 ixgbe_aci_get_link_info(struct ixgbe_hw *hw, bool ena_lse,
return IXGBE_ERR_PARAM;
li_old = &hw->link.link_info_old;
- hw_media_type = &hw->phy.media_type;
li = &hw->link.link_info;
hw_fc_info = &hw->fc;
@@ -1714,7 +1712,6 @@ s32 ixgbe_aci_get_link_info(struct ixgbe_hw *hw, bool ena_lse,
li->link_speed = IXGBE_LE16_TO_CPU(link_data.link_speed);
li->phy_type_low = IXGBE_LE64_TO_CPU(link_data.phy_type_low);
li->phy_type_high = IXGBE_LE64_TO_CPU(link_data.phy_type_high);
- *hw_media_type = ixgbe_get_media_type_from_phy_type(hw);
li->link_info = link_data.link_info;
li->link_cfg_err = link_data.link_cfg_err;
li->an_info = link_data.an_info;
@@ -3664,10 +3661,11 @@ enum ixgbe_media_type ixgbe_get_media_type_E610(struct ixgbe_hw *hw)
}
}
- /* Based on search above try to discover media type */
- hw->phy.media_type = ixgbe_get_media_type_from_phy_type(hw);
}
+ /* Based on link status or search above try to discover media type */
+ hw->phy.media_type = ixgbe_get_media_type_from_phy_type(hw);
+
return hw->phy.media_type;
}
--
2.43.5
More information about the dev
mailing list