Skip to content

Commit 91c5aa7

Browse files
Marc Gonzalezgregkh
authored andcommitted
net: ethernet: nb8800: Handle all 4 RGMII modes identically
[ Upstream commit 4813497b537c6208c90d6cbecac5072d347de900 ] Before commit bf8f6952a233 ("Add blurb about RGMII") it was unclear whose responsibility it was to insert the required clock skew, and in hindsight, some PHY drivers got it wrong. The solution forward is to introduce a new property, explicitly requiring skew from the node to which it is attached. In the interim, this driver will handle all 4 RGMII modes identically (no skew). Fixes: 52dfc83 ("net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller") Signed-off-by: Marc Gonzalez <marc_gonzalez@sigmadesigns.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent d1ed1f8 commit 91c5aa7

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

drivers/net/ethernet/aurora/nb8800.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@ static void nb8800_mac_config(struct net_device *dev)
608608
mac_mode |= HALF_DUPLEX;
609609

610610
if (gigabit) {
611-
if (priv->phy_mode == PHY_INTERFACE_MODE_RGMII)
611+
if (phy_interface_is_rgmii(dev->phydev))
612612
mac_mode |= RGMII_MODE;
613613

614614
mac_mode |= GMAC_MODE;
@@ -1295,11 +1295,10 @@ static int nb8800_tangox_init(struct net_device *dev)
12951295
break;
12961296

12971297
case PHY_INTERFACE_MODE_RGMII:
1298-
pad_mode = PAD_MODE_RGMII;
1299-
break;
1300-
1298+
case PHY_INTERFACE_MODE_RGMII_ID:
1299+
case PHY_INTERFACE_MODE_RGMII_RXID:
13011300
case PHY_INTERFACE_MODE_RGMII_TXID:
1302-
pad_mode = PAD_MODE_RGMII | PAD_MODE_GTX_CLK_DELAY;
1301+
pad_mode = PAD_MODE_RGMII;
13031302
break;
13041303

13051304
default:

0 commit comments

Comments
 (0)