lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Tue,  7 Jul 2020 17:33:47 +0000
From:   Shyam Sundar S K <Shyam-sundar.S-k@....com>
To:     Tom Lendacky <thomas.lendacky@....com>,
        "David S . Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org
Cc:     Shyam Sundar S K <Shyam-sundar.S-k@....com>
Subject: [PATCH] amd-xgbe: print the right c45 id

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);
 
 	ret = phy_device_register(phydev);
 	if (ret) {
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ