From: Heiner Kallweit <hkallweit1@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>,
Alexandru Ardelean <alexandru.ardelean@analog.com>
Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, davem@davemloft.net,
robh+dt@kernel.org, mark.rutland@arm.com, f.fainelli@gmail.com
Subject: Re: [PATCH v2 02/15] net: phy: adin: hook genphy_read_abilities() to get_features
Date: Thu, 8 Aug 2019 21:32:57 +0200 [thread overview]
Message-ID: <eeda87c9-bdba-8ef7-6043-85a16bd2cfc2@gmail.com> (raw)
In-Reply-To: <20190808152403.GB27917@lunn.ch>
On 08.08.2019 17:24, Andrew Lunn wrote:
> On Thu, Aug 08, 2019 at 03:30:13PM +0300, Alexandru Ardelean wrote:
>> The ADIN PHYs can operate with Clause 45, however they are not typical for
>> how phylib considers Clause 45 PHYs.
>>
>> If the `features` field & the `get_features` hook are unspecified, and the
>> device wants to operate via Clause 45, it would also try to read features
>> via the `genphy_c45_pma_read_abilities()`, which will try to read PMA regs
>> that are unsupported.
>>
>> Hooking the `genphy_read_abilities()` function to the `get_features` hook
>> will ensure that this does not happen and the PHY features are read
>> correctly regardless of Clause 22 or Clause 45 operation.
>
> I think we need to stop and think about a PHY which supports both C22
> and C45.
>
> How does bus enumeration work? Is it discovered twice? I've always
> considered phydev->is_c45 means everything is c45, not that some
> registers can be accessed via c45. But the driver is mixing c22 and
> c45. Does the driver actually require c45? Are some features which are
> only accessibly via C45? What does C45 actually bring us for this
> device?
>
genphy_c45_pma_read_abilities() is only called if phydev->is_c45 is set.
And this flag means that the PHY complies with Clause 45 incl. all the
standard devices like PMA. In the case here only some vendor-specific
registers can be accessed via Clause 45 and therefore is_c45 shouldn't
bet set. As a consequence this patch isn't needed.
> Andrew
>
Heiner
next prev parent reply other threads:[~2019-08-08 19:38 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-08 12:30 [PATCH v2 00/15] net: phy: adin: add support for Analog Devices PHYs Alexandru Ardelean
2019-08-08 12:30 ` [PATCH v2 01/15] " Alexandru Ardelean
2019-08-08 15:13 ` Andrew Lunn
2019-08-08 12:30 ` [PATCH v2 02/15] net: phy: adin: hook genphy_read_abilities() to get_features Alexandru Ardelean
2019-08-08 15:24 ` Andrew Lunn
2019-08-08 19:32 ` Heiner Kallweit [this message]
2019-08-09 12:00 ` Ardelean, Alexandru
2019-08-08 12:30 ` [PATCH v2 03/15] net: phy: adin: hook genphy_{suspend,resume} into the driver Alexandru Ardelean
2019-08-08 15:24 ` Andrew Lunn
2019-08-08 12:30 ` [PATCH v2 04/15] net: phy: adin: add support for interrupts Alexandru Ardelean
2019-08-08 15:25 ` Andrew Lunn
2019-08-08 12:30 ` [PATCH v2 05/15] net: phy: adin: add {write,read}_mmd hooks Alexandru Ardelean
2019-08-08 15:35 ` Andrew Lunn
2019-08-09 12:05 ` Ardelean, Alexandru
2019-08-08 12:30 ` [PATCH v2 06/15] net: phy: adin: configure RGMII/RMII/MII modes on config Alexandru Ardelean
2019-08-08 15:38 ` Andrew Lunn
2019-08-08 12:30 ` [PATCH v2 07/15] net: phy: adin: make RGMII internal delays configurable Alexandru Ardelean
2019-08-08 15:40 ` Andrew Lunn
2019-08-08 12:30 ` [PATCH v2 08/15] net: phy: adin: make RMII fifo depth configurable Alexandru Ardelean
2019-08-08 15:42 ` Andrew Lunn
2019-08-08 12:30 ` [PATCH v2 09/15] net: phy: adin: add support MDI/MDIX/Auto-MDI selection Alexandru Ardelean
2019-08-08 12:30 ` [PATCH v2 10/15] net: phy: adin: add EEE translation layer from Clause 45 to Clause 22 Alexandru Ardelean
2019-08-08 12:30 ` [PATCH v2 11/15] net: phy: adin: implement PHY subsystem software reset Alexandru Ardelean
2019-08-08 12:30 ` [PATCH v2 12/15] net: phy: adin: implement Energy Detect Powerdown mode Alexandru Ardelean
2019-08-08 12:30 ` [PATCH v2 13/15] net: phy: adin: configure downshift on config_init Alexandru Ardelean
2019-08-08 19:38 ` Heiner Kallweit
2019-08-08 20:39 ` Andrew Lunn
2019-08-09 12:06 ` Ardelean, Alexandru
2019-08-08 12:30 ` [PATCH v2 14/15] net: phy: adin: add ethtool get_stats support Alexandru Ardelean
2019-08-08 12:30 ` [PATCH v2 15/15] dt-bindings: net: add bindings for ADIN PHY driver Alexandru Ardelean
2019-08-08 23:03 ` Rob Herring
2019-08-09 12:06 ` Ardelean, Alexandru
2019-08-08 18:24 ` [PATCH v2 00/15] net: phy: adin: add support for Analog Devices PHYs David Miller
2019-08-09 12:32 ` Ardelean, Alexandru
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=eeda87c9-bdba-8ef7-6043-85a16bd2cfc2@gmail.com \
--to=hkallweit1@gmail.com \
--cc=alexandru.ardelean@analog.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=f.fainelli@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=netdev@vger.kernel.org \
--cc=robh+dt@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;
as well as URLs for NNTP newsgroup(s).