[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200514185217.GX499265@lunn.ch>
Date: Thu, 14 May 2020 20:52:17 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Dan Murphy <dmurphy@...com>
Cc: f.fainelli@...il.com, hkallweit1@...il.com, davem@...emloft.net,
robh@...nel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, devicetree@...r.kernel.org
Subject: Re: [PATCH net-next 2/2] net: phy: DP83822: Add ability to advertise
Fiber connection
> +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?
Andrew
Powered by blists - more mailing lists