Re: [PATCH net-next v3] net: eth: fbnic: Fix addr validation in pcs write
From: Simon Horman
Date: Sun May 10 2026 - 14:48:47 EST
On Thu, May 07, 2026 at 11:42:03AM -0400, mike.marciniszyn@xxxxxxxxx wrote:
> From: "Mike Marciniszyn (Meta)" <mike.marciniszyn@xxxxxxxxx>
>
> The DW IP has two distinct PCS address ranges cooresponding
> to the C45 PCS registers.
>
> The shim translates the PCS addr/regno into specific CSR writes
> into one of those two zero-relative ranges.
>
> This patch fixes a one off in the test that could allow an invalid
> CSR write if an addr == 2 was called.
>
> There are is of yet, no real impact for the bug as no PCS writes are
> present.
>
> Signed-off-by: Mike Marciniszyn (Meta) <mike.marciniszyn@xxxxxxxxx>
> ---
> v3:
> - put back into the series based on https://lore.kernel.org/all/9ec11642-8035-419c-a896-52f902020bb8@xxxxxxx/
> - revised commit message will additional details
> v2:
> - omitted from patch series
> v1: https://lore.kernel.org/all/20260428172810.175077-2-mike.marciniszyn@xxxxxxxxx/
Reviewed-by: Simon Horman <horms@xxxxxxxxxx>