Messages in this thread | | | Date | Sat, 11 Jun 2022 17:12:07 +0200 | From | Andrew Lunn <> | Subject | Re: [PATCH net-next v3 2/3] net: phy: dp83td510: add cable testing support |
| |
> + } else { > + /* Most probably we have active link partner */ > + stat = ETHTOOL_A_CABLE_RESULT_CODE_UNSPEC; > + }
So drivers will make a few attempts to get a valid result. Have you tried that?
> + > + *finished = true; > + > + ethnl_cable_test_result(phydev, ETHTOOL_A_CABLE_PAIR_A, stat); > + > + /* Reset state machine, otherwise at least other TDR attempts may > + * provide not reliable results. > + */ > + return phy_set_bits(phydev, MII_BMCR, BMCR_RESET);
I thought i made the comment that you should use the helper? The helper will wait around for the bit to clear indicating the PHY is ready for further configuration.
Andrew
| |