linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: f.fainelli@gmail.com (Florian Fainelli)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH RFC 0/7] Clean up PHY MMD accessors
Date: Thu, 19 Jan 2017 11:42:47 -0800	[thread overview]
Message-ID: <9fb97d58-6ad3-f9d1-c255-9f91e5857f88@gmail.com> (raw)
In-Reply-To: <20170113152059.GR14217@n2100.armlinux.org.uk>

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?

Thanks!
-- 
Florian

  parent reply	other threads:[~2017-01-19 19:42 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 ` Florian Fainelli [this message]
2017-01-19 19:58   ` [PATCH RFC 0/7] Clean up PHY MMD accessors Russell King - ARM Linux

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=9fb97d58-6ad3-f9d1-c255-9f91e5857f88@gmail.com \
    --to=f.fainelli@gmail.com \
    --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).