Re: [PATCH v2 2/2] net: phy: realtek: Change TX-delay setting for RGMII modes only

Martin Blumenstingl
2019-05-07T20:09:54Z

Hi Heiner,

On Tue, May 7, 2019 at 7:37 PM Heiner Kallweit <hkallweit1@gmail.com> wrote:
>
> On 06.05.2019 19:21, Martin Blumenstingl wrote:
> > Hi Serge,
> >
> > On Mon, May 6, 2019 at 4:39 PM Serge Semin <fancer.lancer@gmail.com> wrote:
> > [...]
> >>> the changes in patch 1 are looking good to me (except that I would use
> >>> phy_modify_paged instead of open-coding it, functionally it's
> >>> identical with what you have already)
> >>>
> >>
> >> Nah, this isn't going to work since the config register is placed on an extension
> >> page. So in order to reach the register first I needed to enable a standard page,
> >> then select an extended page, then modify the register bits.
> > I'm probably missing something here. my understanding about
> > phy_modify_paged is that it is equal to:
> > - select extension page
> > - read register
> > - calculate the new register value
> > - write register
> > - restore the original extension page
> >
> What maybe causes the confusion: Realtek has two kinds of pages.
> First there is the following, let's call it simple page:
> You select a page via register 0x1f and then access the paged register.
>
> Then there are extended pages. First you select a page via register 0x1f,
> then the extended page via register 0x1e, and then the paged register.
I totally missed that, thank you for pointing me in the right direction!
that means I don't have anything obvious to complain about in patch 1.

Regards
Martin