Re: [PATCH net] net: eth: fbnic: Fix addr validation in pcs write
From: Mike Marciniszyn
Date: Sat May 02 2026 - 05:45:28 EST
On Fri, May 01, 2026 at 02:46:36PM +0100, Simon Horman wrote:
> On Wed, Apr 29, 2026 at 11:00:49AM -0400, mike.marciniszyn@xxxxxxxxx wrote:
> > From: "Mike Marciniszyn (Meta)" <mike.marciniszyn@xxxxxxxxx>
> >
> > This patch contains a fix for addr validation in fbnic_mdio_write_pcs().
>
> Hi Mike,
>
> I think this warrants a bit more explanation: Why should addr 2 be
> accepted? What happens from a user-perspective when it is not?
>
The DW IP part has two distinct PCS address ranges cooresponding
to the C45 PCS registers.
The shim translates the PCS mmd/addr/regno into specific CSR writes
to one of two zero-relative addr values into one of those two
ranges.
This patch fixes a one off in the test that could allow an invalid
CSR write if an addr == 2 was called.
I can update the commit message to reflect the above?
Mike