Subject: Re: [PATCH net-next v2 3/4] mlxbf_gige: add BlueField-3 Serdes configuration

From: Jakub Kicinski <[email-masked]>
Date: Fri, 11 Nov 2022 21:34:18 -0800

On Thu, 10 Nov 2022 14:33:47 +0100 Andrew Lunn wrote:
> On Wed, Nov 09, 2022 at 05:47:51PM -0500, David Thompson wrote:
> > The BlueField-3 out-of-band Ethernet interface requires
> > SerDes configuration. There are two aspects to this:
> > 
> > Configuration of PLL:
> >     1) Initialize UPHY registers to values dependent on p1clk clock
> >     2) Load PLL best known values via the gateway register
> >     3) Set the fuses to tune up the SerDes voltage
> >     4) Lock the PLL
> >     5) Get the lanes out of functional reset.
> >     6) Configure the UPHY microcontroller via gateway reads/writes
> > 
> > Configuration of lanes:
> >     1) Configure and open TX lanes
> >     2) Configure and open RX lanes  
> 
> I still don't like all these black magic tables in the driver.
> 
> But lets see what others say.

Well, the patch was marked as Changes Requested so it seems that DaveM
concurs :) (I'm slightly desensitized to those tables because they
happen in WiFi relatively often.)

The recommendation is to come up with a format for a binary file, load
it via FW loader and then parse in the kernel?

We did have a recommendation against parsing FW files in the kernel at
some point, too, but perhaps this is simple enough to pass.

Should this be shared infra? The problem is fairly common.