[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bb2b027c-27c6-4b6b-bcda-c10b71c30cea@redhat.com>
Date: Tue, 18 Nov 2025 12:14:02 +0100
From: Paolo Abeni <pabeni@...hat.com>
To: Alexander Duyck <alexander.duyck@...il.com>, netdev@...r.kernel.org
Cc: kuba@...nel.org, kernel-team@...a.com, andrew+netdev@...n.ch,
hkallweit1@...il.com, linux@...linux.org.uk, davem@...emloft.net
Subject: Re: [net-next PATCH v4 09/10] fbnic: Add SW shim for MDIO interface
to PMA/PMD and PCS
On 11/13/25 5:33 PM, Alexander Duyck wrote:
> diff --git a/drivers/net/ethernet/meta/fbnic/fbnic_mdio.c b/drivers/net/ethernet/meta/fbnic/fbnic_mdio.c
> new file mode 100644
> index 000000000000..7eeaeb03529b
> --- /dev/null
> +++ b/drivers/net/ethernet/meta/fbnic/fbnic_mdio.c
> @@ -0,0 +1,190 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/* Copyright (c) Meta Platforms, Inc. and affiliates. */
> +
> +#include <linux/mdio.h>
> +#include <linux/pcs/pcs-xpcs.h>
> +
> +#include "fbnic.h"
> +#include "fbnic_netdev.h"
> +
> +#define DW_VENDOR BIT(15)
> +#define FBNIC_PCS_VENDOR BIT(9)
> +#define FBNIC_PCS_ZERO_MASK (DW_VENDOR - FBNIC_PCS_VENDOR)
> +
> +static int
> +fbnic_mdio_read_pmapmd(struct fbnic_dev *fbd, int addr, int regnum)
> +{
> + u16 ctrl1[__FBNIC_AUI_MAX__][2] = {
> + { MDIO_PMA_CTRL1_SPEED25G, MDIO_PMA_CTRL1_SPEED50G },
> + { MDIO_PMA_CTRL1_SPEED50G, MDIO_PMA_CTRL1_SPEED50G },
> + { MDIO_PMA_CTRL1_SPEED50G, MDIO_PMA_CTRL1_SPEED100G },
> + { MDIO_PMA_CTRL1_SPEED100G, MDIO_PMA_CTRL1_SPEED100G },
> + { 0, 0 }};
I guess the above could/should be `const`.
/P
Powered by blists - more mailing lists