linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: 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,
	hkallweit1@gmail.com
Subject: Re: [PATCH v2 02/15] net: phy: adin: hook genphy_read_abilities() to get_features
Date: Thu, 8 Aug 2019 17:24:03 +0200	[thread overview]
Message-ID: <20190808152403.GB27917@lunn.ch> (raw)
In-Reply-To: <20190808123026.17382-3-alexandru.ardelean@analog.com>

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?

     Andrew

  reply	other threads:[~2019-08-08 15:24 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 [this message]
2019-08-08 19:32     ` Heiner Kallweit
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=20190808152403.GB27917@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=alexandru.ardelean@analog.com \
    --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=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).