All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] atl1c: fix Mikrotik 10/25G NIC detection
@ 2021-07-08  9:49 Gatis Peisenieks
  2021-07-08 20:40 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Gatis Peisenieks @ 2021-07-08  9:49 UTC (permalink / raw)
  To: chris.snook, davem, kuba, hkallweit1, jesse.brandeburg,
	dchickles, tully, eric.dumazet
  Cc: netdev, linux-kernel, Gatis Peisenieks

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.

Signed-off-by: Gatis Peisenieks <gatis@mikrotik.com>
---
 drivers/net/ethernet/atheros/atl1c/atl1c_hw.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/ethernet/atheros/atl1c/atl1c_hw.c b/drivers/net/ethernet/atheros/atl1c/atl1c_hw.c
index 7dff20350865..f19370c33444 100644
--- a/drivers/net/ethernet/atheros/atl1c/atl1c_hw.c
+++ b/drivers/net/ethernet/atheros/atl1c/atl1c_hw.c
@@ -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");
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net] atl1c: fix Mikrotik 10/25G NIC detection
  2021-07-08  9:49 [PATCH net] atl1c: fix Mikrotik 10/25G NIC detection Gatis Peisenieks
@ 2021-07-08 20:40 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-07-08 20:40 UTC (permalink / raw)
  To: Gatis Peisenieks
  Cc: chris.snook, davem, kuba, hkallweit1, jesse.brandeburg,
	dchickles, tully, eric.dumazet, netdev, linux-kernel

Hello:

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

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



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-07-08 20:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-08  9:49 [PATCH net] atl1c: fix Mikrotik 10/25G NIC detection Gatis Peisenieks
2021-07-08 20:40 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.