linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@armlinux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH RFC 0/7] Clean up PHY MMD accessors
Date: Thu, 19 Jan 2017 19:58:19 +0000	[thread overview]
Message-ID: <20170119195819.GJ27312@n2100.armlinux.org.uk> (raw)
In-Reply-To: <9fb97d58-6ad3-f9d1-c255-9f91e5857f88@gmail.com>

On Thu, Jan 19, 2017 at 11:42:47AM -0800, Florian Fainelli wrote:
> On 01/13/2017 07:20 AM, Russell King - ARM Linux wrote:
> > This series cleans up phylib's MMD accessors, so that we have a common
> > way of accessing the Clause 45 register set.
> > 
> > The current situation is far from ideal - we have phy_(read|write)_mmd()
> > which accesses Clause 45 registers over Clause 45 accesses, and we have
> > phy_(read|write)_mmd_indirect(), which accesses Clause 45 registers via
> > Clause 22 register 13/14.
> > 
> > Generic code uses the indirect methods to access standard Clause 45
> > features, and when we come to add Clause 45 PHY support to phylib, we
> > would need to make these conditional upon the PHY type, or duplicate
> > these functions.
> > 
> > An alternative solution is to merge these accessors together, and select
> > the appropriate access method depending upon the 802.3 clause that the
> > PHY conforms with.  The result is that we have a single set of
> > phy_(read|write)_mmd() accessors.
> > 
> > For cases which require special handling, we still allow PHY drivers to
> > override all MMD accesses - except rather than just overriding the
> > indirect accesses.  This keeps existing overrides working.
> > 
> > Combining the two also has another beneficial side effect - we get rid
> > of similar functions that take arguments in different orders.  The
> > old direct accessors took the phy structure, devad and register number,
> > whereas the indirect accessors took the phy structure, register number
> > and devad in that order.  Care must be taken when updating future
> > drivers that the argument order is correct, and the function name is
> > not merely replaced.
> 
> I really like that series, this is much much cleaner, do you mind
> resubmitting this without a RFC tag so David can apply it?

Hi Florian,

Thanks.

Will do in the next couple of days - I'd prefer to make one change
to the series before submitting it for real: provide compatibility
functions marked as deprecated so this doesn't create a flag day.
We can remove the deprecated _indirect functions later when we know
there's no new users.

I'd like to get the phy.h untanglement stuff into David's tree first.
I'm almost there, my allmodconfig from last night almost built fine
but for something I missed in bgmac.c, and 0-day found a MIPS file
affected by the change.  New code pushed out for 0-day and I'm
expecting tonights allmodconfig to be clear.

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.

      reply	other threads:[~2017-01-19 19:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-13 15:20 [PATCH RFC 0/7] Clean up PHY MMD accessors Russell King - ARM Linux
2017-01-13 15:21 ` [PATCH RFC 1/7] net: phy: move phy MMD accessors to phy-core.c Russell King
2017-01-13 15:21 ` [PATCH RFC 2/7] net: phy: make phy_(read|write)_mmd() generic MMD accessors Russell King
2017-01-13 15:21 ` [PATCH RFC 3/7] net: lan78xx: update for phy_(read|write)_mmd_indirect() removal Russell King
2017-01-13 15:21 ` [PATCH RFC 4/7] net: phy: switch remaining users to phy_(read|write)_mmd() Russell King
2017-01-13 15:22 ` [PATCH RFC 5/7] net: phy: convert micrel to new read_mmd/write_mmd driver methods Russell King
2017-01-13 15:22 ` [PATCH RFC 6/7] net: phy: remove the indirect MMD read/write methods Russell King
2017-01-13 15:22 ` [PATCH RFC 7/7] net: phy: clean up mmd_phy_indirect() Russell King
2017-01-19 19:42 ` [PATCH RFC 0/7] Clean up PHY MMD accessors Florian Fainelli
2017-01-19 19:58   ` Russell King - ARM Linux [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=20170119195819.GJ27312@n2100.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=linux-arm-kernel@lists.infradead.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).