]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
net: macb: use phy_interface_mode_is_rgmii everywhere
authorAlexandre Belloni <alexandre.belloni@bootlin.com>
Fri, 17 Jul 2020 23:32:21 +0000 (01:32 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 18 Jul 2020 01:32:35 +0000 (18:32 -0700)
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: bcf3440c6dd78bfe ("net: phy: micrel: add phy-mode support for the KSZ9031 PHY")
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cadence/macb_main.c

index f1f0976e7669a8e3261ab1c2a544f035dddd7c2c..2213e6ab81512fbc833ccb2484c85243a4b6b7ea 100644 (file)
@@ -3736,7 +3736,7 @@ static int macb_init(struct platform_device *pdev)
 
        if (!(bp->caps & MACB_CAPS_USRIO_DISABLED)) {
                val = 0;
-               if (bp->phy_interface == PHY_INTERFACE_MODE_RGMII)
+               if (phy_interface_mode_is_rgmii(bp->phy_interface))
                        val = GEM_BIT(RGMII);
                else if (bp->phy_interface == PHY_INTERFACE_MODE_RMII &&
                         (bp->caps & MACB_CAPS_USRIO_DEFAULT_IS_MII_GMII))