From: Dan Murphy <dmurphy@ti.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: <f.fainelli@gmail.com>, <hkallweit1@gmail.com>,
<davem@davemloft.net>, <robh@kernel.org>,
<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<devicetree@vger.kernel.org>
Subject: Re: [PATCH net-next v2 2/2] net: phy: DP83822: Add ability to advertise Fiber connection
Date: Mon, 13 Jul 2020 10:50:29 -0500 [thread overview]
Message-ID: <2d1d297c-e252-98df-bf96-d6630dd9a423@ti.com> (raw)
In-Reply-To: <20200711185421.GS1014141@lunn.ch>
Andrew
On 7/11/20 1:54 PM, Andrew Lunn wrote:
>> @@ -302,6 +357,48 @@ static int dp83822_config_init(struct phy_device *phydev)
>> }
>> }
>>
>> + if (dp83822->fx_enabled) {
>> + err = phy_modify(phydev, MII_DP83822_CTRL_2,
>> + DP83822_FX_ENABLE, 1);
>> + if (err < 0)
>> + return err;
>> +
>> + linkmode_set_bit(ETHTOOL_LINK_MODE_FIBRE_BIT,
>> + phydev->supported);
>> + linkmode_set_bit(ETHTOOL_LINK_MODE_FIBRE_BIT,
>> + phydev->advertising);
>> +
>> + /* Auto neg is not supported in fiber mode */
>> + bmcr = phy_read(phydev, MII_BMCR);
>> + if (bmcr < 0)
>> + return bmcr;
>> +
>> + if (bmcr & BMCR_ANENABLE) {
>> + err = phy_modify(phydev, MII_BMCR, BMCR_ANENABLE, 0);
>> + if (err < 0)
>> + return err;
>> + }
>> + phydev->autoneg = AUTONEG_DISABLE;
> You should also be removing ETHTOOL_LINK_MODE_Autoneg_BIT from
> phydev->supported, to make it clear autoneg is not supported. Assuming
> genphy_read_abilities() cannot figure this out for itself.
In our testing we are finding that it cannot determine that for itself
so I will have to clear the bit.
Dan
prev parent reply other threads:[~2020-07-13 15:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-10 14:37 [PATCH net-next v2 0/2] DP83822 Fiber enablement Dan Murphy
2020-07-10 14:37 ` [PATCH net-next v2 1/2] dt-bindings: net: dp83822: Add TI dp83822 phy Dan Murphy
2020-07-13 15:36 ` Rob Herring
2020-07-10 14:37 ` [PATCH net-next v2 2/2] net: phy: DP83822: Add ability to advertise Fiber connection Dan Murphy
2020-07-11 18:45 ` Andrew Lunn
2020-07-13 15:51 ` Dan Murphy
2020-07-11 18:54 ` Andrew Lunn
2020-07-13 15:50 ` Dan Murphy [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2d1d297c-e252-98df-bf96-d6630dd9a423@ti.com \
--to=dmurphy@ti.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome