Wangxun bug fixes
cover Wangxun bug fixes
Fix some bugs for txgbe and ngbe.
Zaiyu Wang (2):
net/ngbe: fix WOL and NCSI capability error net/txgbe: remove meaningless choice for SW-FW sync
drivers/net/ngbe/base/ngbe_hw.c | 8 +++++--- drivers/net/txgbe/base/txgbe_phy.c | 8 ++------ 2 files changed, 7 insertions(+), 9 deletions(-)
Signature · 1 line
2.21.0.windows.1
PATCH 1/2 net/ngbe: fix WOL and NCSI capability error
When determining NIC's WOL and NCSI capability via sub-system ID, flag matching must be exact, not inclusive. Misidentifying WOL/NCSI capability will skip PHY configuration, causing link-up failure.
Fixes 5f1ab0d529fc ("net/ngbe: add WOL and NCSI capability")
Signed-off-by Zaiyu Wang <[email protected]>
--- drivers/net/ngbe/base/ngbe_hw.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/net/ngbe/base/ngbe_hw.c +5 -3
@@ -1922,6 +1922,8 @@ void ngbe_read_efuse(struct ngbe_hw *hw)void ngbe_map_device_id (struct ngbe_hw *hw) {u16 oem = hw->sub_system_id &NGBE_OEM_MASK ; +u16 ncsi = hw->sub_system_id &NGBE_NCSI_SUP_MASK ; +u16 wol = hw->sub_system_id &NGBE_WOL_SUP_MASK ; hw->is_pf = true;
@@ -1982,9 +1984,9 @@ void ngbe_map_device_id(struct ngbe_hw *hw) oem == NGBE_LY_YT8521S_SFP) hw->gpio_ctl = true; - hw->wol_enabled = (hw->sub_system_id &NGBE_WOL_SUP_MASK ) ? true : false; - hw->ncsi_enabled = (hw->sub_system_id &NGBE_NCSI_SUP_MASK || - hw->sub_system_id &NGBE_OCP_CARD ) ? true : false; + hw->wol_enabled = (wol ==NGBE_WOL_SUP_MASK ) ? true : false; + hw->ncsi_enabled = (ncsi ==NGBE_NCSI_SUP_MASK || + oem ==NGBE_OCP_CARD ) ? true : false; }/**
Signature · 1 line
2.21.0.windows.1
PATCH 2/2 net/txgbe: remove meaningless choice for SW-FW sync
In reply to Zaiyu WangRemove superfluous 'if' and 'else' for SW-FW sync.
Bugzilla ID: 1581
Fixes 5364a1ce30df ("net/txgbe: add PHY init")
Signed-off-by Zaiyu Wang <[email protected]>
--- drivers/net/txgbe/base/txgbe_phy.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
drivers/net/txgbe/base/txgbe_phy.c +2 -6
@@ -80,12 +80,8 @@ static s32 txgbe_read_phy_if(struct txgbe_hw *hw)if (hw->phy.nw_mng_if_sel &TXGBE_ETHPHYIF_MDIO_ACT ) hw->phy.addr =TXGBE_ETHPHYIF_MDIO_BASE (hw->phy.nw_mng_if_sel); -if (!hw->phy.phy_semaphore_mask) { -if (hw->bus.lan_id) - hw->phy.phy_semaphore_mask =TXGBE_MNGSEM_SWPHY ; -else - hw->phy.phy_semaphore_mask =TXGBE_MNGSEM_SWPHY ; - } +if (!hw->phy.phy_semaphore_mask) + hw->phy.phy_semaphore_mask =TXGBE_MNGSEM_SWPHY ;return 0 ; }
Signature · 1 line
2.21.0.windows.1