[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Tue, 7 Jul 2020 20:04:15 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Shyam Sundar S K <Shyam-sundar.S-k@....com>
Cc: Tom Lendacky <thomas.lendacky@....com>,
"David S . Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org
Subject: Re: [PATCH] amd-xgbe: print the right c45 id
On Tue, Jul 07, 2020 at 05:33:47PM +0000, Shyam Sundar S K wrote:
> If an external PHY uses the CL45 protocol, then phydev->phy_id will be
> zero. Update the debug message that prints the PHY ID to check the PHY
> mode and print the PMAPMD MMD PHY ID value for a CL45 PHY.
>
> Also, removing the TODO note, as the CL45 support has been updated to
> do this.
>
> Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@....com>
> ---
> drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
> index 46c3c1ca38d6..5b14fc758c2f 100644
> --- a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
> +++ b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
> @@ -1024,9 +1024,9 @@ static int xgbe_phy_find_phy_device(struct xgbe_prv_data *pdata)
> return -ENODEV;
> }
> netif_dbg(pdata, drv, pdata->netdev, "external PHY id is %#010x\n",
> - phydev->phy_id);
> -
> - /*TODO: If c45, add request_module based on one of the MMD ids? */
> + (phy_data->phydev_mode == XGBE_MDIO_MODE_CL45)
> + ? phydev->c45_ids.device_ids[MDIO_MMD_PMAPMD]
> + : phydev->phy_id);
IDs are pretty low level. And for C45 devices, each sub device can
have its own ID, make it even less useful.
You get more useful information from phy_attached_info().
Andrew
Powered by blists - more mailing lists