summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGatis Peisenieks <gatis@mikrotik.com>2021-07-08 12:49:04 +0300
committerDavid S. Miller <davem@davemloft.net>2021-07-08 13:31:43 -0700
commitb9d233ea21f192702f8bbf3f5f640e2dde308b25 (patch)
treeef3bb8f5a19fa1a8ad5d5a385ca555fc7d10a4d5
parentdebdd8e31895fdd1e2cfeb7a5aff1c83e49a91ba (diff)
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. Signed-off-by: Gatis Peisenieks <gatis@mikrotik.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/atheros/atl1c/atl1c_hw.c5
1 files changed, 5 insertions, 0 deletions
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");