lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 8 Dec 2022 15:59:25 +0000
From:   Hau <hau@...ltek.com>
To:     Heiner Kallweit <hkallweit1@...il.com>
CC:     "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        nic_swsd <nic_swsd@...ltek.com>
Subject: RE: [PATCH net-next v5] r8169: add support for rtl8168h(revid 0x2a) + rtl8211fs fiber application

> On 07.12.2022 18:43, Hau wrote:
> >>
> >> On 01.12.2022 15:39, Chunhao Lin wrote:
> >>> rtl8168h(revid 0x2a) + rtl8211fs is for utp to fiber application.
> >>> rtl8168h is connected to rtl8211fs utp interface. And fiber is
> >>> connected to rtl8211fs sfp interface. rtl8168h use its eeprm or gpo
> >>> pins to control rtl8211fs mdio bus.
> >>>
> >>
> >> I found a datasheet for RTL8211FS and it doesn't mention SFP support.
> >> For the fiber use case it mentions RGMII for MAC/PHY connection and
> >> SerDes for connecting the PHY to the fiber module. Is this the mode
> >> you'd like to support?
> >> "utp to fiber" sounds like the media converter application, and I
> >> think that's not what we want here. So it's misleading.
> > This application is not listed in datasheet. But it is similar to utp to fiber
> application. Fiber connects to rtl8211fs through SerDes interface.
> > rtl8168h connects to rtl8211fs through mdi interface. rtl8168h also
> > connects to rtl8211fs mdc/mdio interface through its eeprom or gpo pins
> for controlling rtl8211fs. The link between rtl8211fs and fiber, and the link
> between rtl8211fs and rtl8168h should be the same.
> >  Driver just needs to set the link capability of rtl8168h to auto negation and
> rtl8211fs will propagate the link status between fiber and itself to rtl8168h.
> > But rtl8168h will not know the link capability of fiber. So when system
> suspend, if wol is enabled, driver cannot speed down rtl8168h's phy.
> > Or rtl8168h cannot be waken up.
> >
> > I will submit a new patch according your advice. But we are considering not
> to use driver(r8169) to setup rtl8211fs. So next patch maybe simpler.
> >
> 
> Sounds strange that RTL8168H connects to RTL8211FS via MDI. Typically you
> would use RGMII here.
> Is it because RTL8168H has no pins for RGMII to external PHY's?
> 
> Then my understanding would be that you do it like this:
> RTL8168H MAC -> <internal RGMII> -> RTL8168H PHY -> <MDI> -> RTL8211FS -
> > <SerDes> -> Fiber module
>    |                                                             |
>     -------------------bit-banged MDIO---------------------------
> 
> Sou you would need to control both PHY's, right? Because setup wouldn't
> work if e.g. RTL8168H-internal PHY is powered down.
> Is the RTL8211FS interrupt pin connected to RTL8168H? Or has polling to be
> used to get the status from RTL8211FS?
> 
rtl8168H is an integrated Ethernet controller, it contains MAC and PHY. It has no RGMII interface to connect to external PHY.
In this application, driver r8169 controls two PHY. One is rtl8168h's PHY, another PHY is rtl8211fs.
What r8169 have to do is to enable all link capability. rtl8211fs firmware will propagate fiber's link status to rtl8168h. 
rtl8168h will know the fiber's link status from its MAC register 0x6c. This the same as before. So rtl8211fs's interrupt pin 
will not connect to rtl8168h. And rtl8168h does not have to polling the link status of rtl8211fs.

RTL8168H MAC -> <internal RGMII> -> RTL8168H PHY -> <MDI> -> RTL8211FS -> <SerDes> -> Fiber module
   |                                                                                                                                    |
    -------------------bit-banged MDIO(use eeprom or gpo pin)--------------------

Because rtl8211fs's firmware will set link capability to 100M and GIGA when fiber link is from off to on..
So when system suspend, if wol is enabled, rtl8168h will speed down to 100M(because rtl8211fs advertise 100M and giga to rtl8168h).
The link speed between rtl8168h and fiber will mismatch. That will cause wol fail.

And in the application, we also need to setup rtl8211fs. Or it may always link down.

 ------Please consider the environment before printing this e-mail.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ