From patchwork Thu Jan 9 08:50:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Marginean X-Patchwork-Id: 239283 List-Id: U-Boot discussion From: alexandru.marginean at nxp.com (Alex Marginean) Date: Thu, 9 Jan 2020 10:50:05 +0200 Subject: [PATCH v2] net: phy: add XFI, USXGMII types to is_10g_interface() helper Message-ID: <20200109085005.26853-1-alexandru.marginean@nxp.com> The helper is used to reset PHYs on connect and it determines the clause to use (C22/C45) based on interface type. This fixes 'PHY reset timed out' warnings in console for USXGMII/XFI PHYs. Signed-off-by: Alex Marginean Acked-by: Joe Hershberger --- Changes in v2: - updated helper comment, I missed that in v1 replaces v1: https://patchwork.ozlabs.org/patch/1219697/ include/phy.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/include/phy.h b/include/phy.h index 6ace9b3a0c..876b4a9c8e 100644 --- a/include/phy.h +++ b/include/phy.h @@ -246,10 +246,15 @@ static inline int phy_write_mmd(struct phy_device *phydev, int devad, #ifdef CONFIG_PHYLIB_10G extern struct phy_driver gen10g_driver; -/* For now, XGMII is the only 10G interface */ +/* + * List all 10G interfaces here, the assumption being that PHYs on these + * interfaces are C45 + */ static inline int is_10g_interface(phy_interface_t interface) { - return interface == PHY_INTERFACE_MODE_XGMII; + return interface == PHY_INTERFACE_MODE_XGMII || + interface == PHY_INTERFACE_MODE_USXGMII || + interface == PHY_INTERFACE_MODE_XFI; } #endif