Skip to contentSkip to conversation

atl1c: fix Mikrotik 10/25G NIC detection

PATCH Applied Gatis Peisenieks 2 participants 2 messages Jul 8, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 atl1c: fix Mikrotik 10/25G NIC detection

Since Mikrotik 10/25G NIC MDIO op emulation is not 100% reliable, on rare occasions it can happen that some physical functions of the NIC do not get initialized due to timeouted early MDIO op.

This changes the atl1c probe on Mikrotik 10/25G NIC not to depend on MDIO op emulation.

---
 drivers/net/ethernet/atheros/atl1c/atl1c_hw.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/net/ethernet/atheros/atl1c/atl1c_hw.c +5 -0
index 7dff20350865..f19370c33444 100644
@@ -594,6 +594,11 @@ int atl1c_phy_init(struct atl1c_hw *hw)
 	int ret_val;
 	u16 mii_bmcr_data = BMCR_RESET;
 
+	if (hw->nic_type == athr_mt) {
+		hw->phy_configured = true;
+		return 0;
+	}
+
 	if ((atl1c_read_phy_reg(hw, MII_PHYSID1, &hw->phy_id1) != 0) ||
 		(atl1c_read_phy_reg(hw, MII_PHYSID2, &hw->phy_id2) != 0)) {
 		dev_err(&pdev->dev, "Error get phy ID\n");
Signature · 1 line
2.31.1
#1 lore raw
This patch was applied to netdev/net.git (refs/heads/master):

Hello:

This patch was applied to netdev/net.git (refs/heads/master):

Quoted 8 lines · On Thu, 8 Jul 2021 12:49:04 +0300 you wrote:

Since Mikrotik 10/25G NIC MDIO op emulation is not 100% reliable, on rare occasions it can happen that some physical functions of the NIC do not get initialized due to timeouted early MDIO op.

This changes the atl1c probe on Mikrotik 10/25G NIC not to depend on MDIO op emulation.

[...]

Here is the summary with links:
- [net] atl1c: fix Mikrotik 10/25G NIC detection

    https://git.kernel.org/netdev/net/c/b9d233ea21f1

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html