Commit 2ccb0161 authored by Alexandre Belloni's avatar Alexandre Belloni Committed by David S. Miller

net: macb: use phy_interface_mode_is_rgmii everywhere

There is one RGMII check not using the phy_interface_mode_is_rgmii()
helper. This prevents the driver from configuring the MAC properly when
using a phy-mode that is not just rgmii, e.g. rgmii-rxid. This became an
issue on sama5d3 xplained since the ksz9031 driver is hadling phy-mode
properly and the phy-mode has to be set to rgmii-rxid.

Fixes: bcf3440c ("net: phy: micrel: add phy-mode support for the KSZ9031 PHY")
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 23e500e8
...@@ -3736,7 +3736,7 @@ static int macb_init(struct platform_device *pdev) ...@@ -3736,7 +3736,7 @@ static int macb_init(struct platform_device *pdev)
if (!(bp->caps & MACB_CAPS_USRIO_DISABLED)) { if (!(bp->caps & MACB_CAPS_USRIO_DISABLED)) {
val = 0; val = 0;
if (bp->phy_interface == PHY_INTERFACE_MODE_RGMII) if (phy_interface_mode_is_rgmii(bp->phy_interface))
val = GEM_BIT(RGMII); val = GEM_BIT(RGMII);
else if (bp->phy_interface == PHY_INTERFACE_MODE_RMII && else if (bp->phy_interface == PHY_INTERFACE_MODE_RMII &&
(bp->caps & MACB_CAPS_USRIO_DEFAULT_IS_MII_GMII)) (bp->caps & MACB_CAPS_USRIO_DEFAULT_IS_MII_GMII))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment