Andrew
On 5/14/20 1:52 PM, Andrew Lunn wrote:
+static int dp83822_config_init(struct phy_device *phydev)
+{
+ struct dp83822_private *dp83822 = phydev->priv;
+ int err = 0;
+
+ if (dp83822->fx_enabled) {
+ linkmode_set_bit(ETHTOOL_LINK_MODE_FIBRE_BIT,
+ phydev->supported);
+ linkmode_set_bit(ETHTOOL_LINK_MODE_FIBRE_BIT,
+ phydev->advertising);
+
+ /* Auto negotiation is not available in fiber mode */
+ phydev->autoneg = AUTONEG_DISABLE;
+ phydev->speed = SPEED_100;
+ phydev->duplex = DUPLEX_FULL;
Hi Dan
This is normally determined by reading the ability registers,
genphy_read_abilities(). When strapped to fibre mode, does it still
indicate all the usual copper capabilities, which it can not actually
do?
Auto negotiation is not available when in Fiber mode for this PHY. The
Speed is locked at 100Mbps for fiber.
Duplex can be either FULL or HALF so that should be removed.
I am verifying with the PHY team on the BMSR register but I do not see
any bits for FX there.
If we remove these settings then I will need to read the PHY_STS
register to manage the speed and mode of the fiber. This register
reports the PHY link status regardless of the mode.
Dan
Andrew