linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Heiner Kallweit <hkallweit1@gmail.com>
To: Matthias Kaehlcke <mka@chromium.org>, Andrew Lunn <andrew@lunn.ch>
Cc: "David S . Miller" <davem@davemloft.net>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	netdev@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Douglas Anderson <dianders@chromium.org>
Subject: Re: [PATCH 2/3] net: phy: realtek: Enable accessing RTL8211E extension pages
Date: Tue, 2 Jul 2019 08:07:57 +0200	[thread overview]
Message-ID: <bdacdf76-8eae-e865-9c00-8e70a12ad303@gmail.com> (raw)
In-Reply-To: <20190702000925.GD250418@google.com>

On 02.07.2019 02:09, Matthias Kaehlcke wrote:
> On Mon, Jul 01, 2019 at 11:09:02PM +0200, Andrew Lunn wrote:
>> On Mon, Jul 01, 2019 at 10:37:16PM +0200, Heiner Kallweit wrote:
>>> On 01.07.2019 22:02, Andrew Lunn wrote:
>>>> On Mon, Jul 01, 2019 at 12:52:24PM -0700, Matthias Kaehlcke wrote:
>>>>> The RTL8211E has extension pages, which can be accessed after
>>>>> selecting a page through a custom method. Add a function to
>>>>> modify bits in a register of an extension page and a few
>>>>> helpers for dealing with ext pages.
>>>>>
>>>>> rtl8211e_modify_ext_paged() and rtl821e_restore_page() are
>>>>> inspired by their counterparts phy_modify_paged() and
>>>>> phy_restore_page().
>>>>
>>>> Hi Matthias
>>>>
>>>> While an extended page is selected, what happens to the normal
>>>> registers in the range 0-0x1c? Are they still accessible?
>>>>
>>> AFAIK: no
>>
>> This it would be better to make use of the core paged access support,
>> so that locking is done correctly.
> 
> Do I understand correctly that this would involve assigning
> .read/write_page and use phy_select_page() and phy_restore_page()?
> 
> Besides the benefit of locking this would also result in less code and
> we could get rid of the custom _restore_page().
> 
Interestingly certain Realtek PHY's (incl. RTL8211E) support two paging
mechanisms.

1. Normal paging (set reg 0x1f to page number) - set by core paging
2. Extended pages (set reg 0x1f to 7, and reg 0x1e to ext. page number)

Newer Realtek PHY's use normal paging only.

  reply	other threads:[~2019-07-02  6:08 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-01 19:52 [PATCH 1/3] dt-bindings: net: Add bindings for Realtek PHYs Matthias Kaehlcke
2019-07-01 19:52 ` [PATCH 2/3] net: phy: realtek: Enable accessing RTL8211E extension pages Matthias Kaehlcke
2019-07-01 20:02   ` Andrew Lunn
2019-07-01 20:37     ` Heiner Kallweit
2019-07-01 21:09       ` Andrew Lunn
2019-07-02  0:09         ` Matthias Kaehlcke
2019-07-02  6:07           ` Heiner Kallweit [this message]
2019-07-01 21:21       ` Matthias Kaehlcke
2019-07-01 20:43   ` Heiner Kallweit
2019-07-01 21:32     ` Matthias Kaehlcke
2019-07-01 19:52 ` [PATCH 3/3] net: phy: realtek: Support SSC for the RTL8211E Matthias Kaehlcke
2019-07-01 20:49   ` Heiner Kallweit
2019-07-01 22:11     ` Matthias Kaehlcke

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=bdacdf76-8eae-e865-9c00-8e70a12ad303@gmail.com \
    --to=hkallweit1@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=dianders@chromium.org \
    --cc=f.fainelli@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mka@chromium.org \
    --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).