[PATCH v2] realtek: do not reset SerDes on link change

Sander Vanheule sander at svanheule.net
Wed May 11 13:26:12 PDT 2022


Hi Birger,

On Sun, 2022-05-08 at 16:53 +0200, Birger Koblitz wrote:
> Hi,
> 
> On 08.05.22 13:11, Sander Vanheule wrote:
> > Hi,
> > 
> > Sorry I didn't get back to this any sooner.
> > 
> > On Wed, 2022-04-27 at 20:16 +0200, Birger Koblitz wrote:
> > > Hi,
> > It's still not clear to me what issue or issues you are fixing exactly with this patch,
> > and in what way.
> The patch fixes a bug that was introduced during the merging of the Zyxel XGS1250 code which
> also is an issue for the XGS1210. The problem as stated with the submitted patch is that
> a reset of the SerDes connecting to the 8 1GBit ports was done. This is a single XGMII link to
> the RTL8218D, which provides 8 1GBit ports via this link.
> 
> The handling of (US)XGMII links is entirely different from the handling of SGMII/HiSGMII, 1000BX
> or 10GR with a completely different code-path on both the RTL9300 and the RTL9310. The difference
> is that the internal SerDes is in fact turned "off" in the latter case, and in the former it
> is put into a suitable XGMII mode. For (Hi)SGMII/1000BX/10GR the SerDes is then put (in its
> outside "off" state") into what is on RTL931x a suitable "fibre" mode and on RTL9300 into a
> "forced" mode. All these modes then need to be suitably RX calibrated and the pre- main and post-
> amplifiers set up properly for TX.
> 
> The bug was to do a complete SerDes reset on all SerDes links, although the code for setting
> up the XGMII link was not there, thereby wiping the (RX/TX) setup done by u-boot and breaking the
> 8 1GBit ports. The 10GBit SFP+ links are mostly understood (from the Ubiquiti USW switch),
> so here we use the appropriate setup code, which e.g. is necessary when someone pulls a module
> out and puts another in.
> 
> > 
> > Is the suggested change in behaviour required for SFP+ modules to completely fix bringing
> > up new links? Or is this only part of the solution? Your reply makes me think it's the
> It is only part of the solution. It makes swapping out 10GBit (fiber!) modules possible.
> It does not allow any 1GBit modules.


Thanks, this is what I wanted to know! I've rewritten the commit message for this patch to contain
this info, and pushed it to master.

Best,
Sander



More information about the openwrt-devel mailing list