lkml.org 
[lkml]   [2020]   [May]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH net-next 2/2] net: phy: DP83822: Add ability to advertise Fiber connection
From
Date
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

\
 
 \ /
  Last update: 2020-05-14 23:54    [W:0.059 / U:0.632 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site