Message ID | 96437cfa-b1f9-eeae-f9ca-c658c81f61c0@gmail.com (mailing list archive) |
---|---|
State | Mainlined, archived |
Commit | ce64c1f77a9d66c3ea86e1ceb444c980ecb03b7d |
Headers | show |
Series | net: phy: add interface mode PHY_INTERFACE_MODE_USXGMII | expand |
On Thu, May 23, 2019 at 08:09:08PM +0200, Heiner Kallweit wrote: > So far we didn't support mode USXGMII, and in order to not break few > boards mode XGMII was accepted for the AQR107 family even though it > doesn't support XGMII. Add USXGMII support to the Aquantia PHY driver > and warn if XGMII mode is set. > > v2: > - add warning if XGMII mode is set > > Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Andrew
On 5/23/19 11:09 AM, Heiner Kallweit wrote: > So far we didn't support mode USXGMII, and in order to not break few > boards mode XGMII was accepted for the AQR107 family even though it > doesn't support XGMII. Add USXGMII support to the Aquantia PHY driver > and warn if XGMII mode is set. > > v2: > - add warning if XGMII mode is set > > Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
diff --git a/drivers/net/phy/aquantia_main.c b/drivers/net/phy/aquantia_main.c index 0fedd28fd..3b29d3811 100644 --- a/drivers/net/phy/aquantia_main.c +++ b/drivers/net/phy/aquantia_main.c @@ -27,6 +27,7 @@ #define MDIO_PHYXS_VEND_IF_STATUS_TYPE_MASK GENMASK(7, 3) #define MDIO_PHYXS_VEND_IF_STATUS_TYPE_KR 0 #define MDIO_PHYXS_VEND_IF_STATUS_TYPE_XFI 2 +#define MDIO_PHYXS_VEND_IF_STATUS_TYPE_USXGMII 3 #define MDIO_PHYXS_VEND_IF_STATUS_TYPE_SGMII 6 #define MDIO_PHYXS_VEND_IF_STATUS_TYPE_OCSGMII 10 @@ -360,6 +361,9 @@ static int aqr107_read_status(struct phy_device *phydev) case MDIO_PHYXS_VEND_IF_STATUS_TYPE_XFI: phydev->interface = PHY_INTERFACE_MODE_10GKR; break; + case MDIO_PHYXS_VEND_IF_STATUS_TYPE_USXGMII: + phydev->interface = PHY_INTERFACE_MODE_USXGMII; + break; case MDIO_PHYXS_VEND_IF_STATUS_TYPE_SGMII: phydev->interface = PHY_INTERFACE_MODE_SGMII; break; @@ -488,9 +492,13 @@ static int aqr107_config_init(struct phy_device *phydev) if (phydev->interface != PHY_INTERFACE_MODE_SGMII && phydev->interface != PHY_INTERFACE_MODE_2500BASEX && phydev->interface != PHY_INTERFACE_MODE_XGMII && + phydev->interface != PHY_INTERFACE_MODE_USXGMII && phydev->interface != PHY_INTERFACE_MODE_10GKR) return -ENODEV; + WARN(phydev->interface == PHY_INTERFACE_MODE_XGMII, + "Your devicetree is out of date, please update it. The AQR107 family doesn't support XGMII, maybe you mean USXGMII.\n"); + ret = aqr107_wait_reset_complete(phydev); if (!ret) aqr107_chip_info(phydev);
So far we didn't support mode USXGMII, and in order to not break few boards mode XGMII was accepted for the AQR107 family even though it doesn't support XGMII. Add USXGMII support to the Aquantia PHY driver and warn if XGMII mode is set. v2: - add warning if XGMII mode is set Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> --- drivers/net/phy/aquantia_main.c | 8 ++++++++ 1 file changed, 8 insertions(+)