All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] net: macb: use phy_interface_mode_is_rgmii everywhere
@ 2020-07-17 23:32 Alexandre Belloni
  2020-07-18  1:32 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Alexandre Belloni @ 2020-07-17 23:32 UTC (permalink / raw)
  To: Nicolas Ferre, David S. Miller, Jakub Kicinski, Andrew Lunn,
	Philippe Schenker, Oleksij Rempel
  Cc: Alexandre Belloni, netdev, linux-kernel

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>
---
 drivers/net/ethernet/cadence/macb_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
index 52582e8ed90e..61d5b5744261 100644
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
@@ -3730,7 +3730,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))
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net] net: macb: use phy_interface_mode_is_rgmii everywhere
  2020-07-17 23:32 [PATCH net] net: macb: use phy_interface_mode_is_rgmii everywhere Alexandre Belloni
@ 2020-07-18  1:32 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-07-18  1:32 UTC (permalink / raw)
  To: alexandre.belloni
  Cc: nicolas.ferre, kuba, andrew, philippe.schenker, linux, netdev,
	linux-kernel

From: Alexandre Belloni <alexandre.belloni@bootlin.com>
Date: Sat, 18 Jul 2020 01:32:21 +0200

> 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>

Applied, thank you.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-07-18  1:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-17 23:32 [PATCH net] net: macb: use phy_interface_mode_is_rgmii everywhere Alexandre Belloni
2020-07-18  1:32 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.