]> git.baikalelectronics.ru Git - uboot.git/commit
net: enetc: force the RGMII MAC speed/duplex instead of using in-band signaling
authorVladimir Oltean <vladimir.oltean@nxp.com>
Tue, 29 Jun 2021 17:53:16 +0000 (20:53 +0300)
committerRamon Fried <rfried.dev@gmail.com>
Tue, 6 Jul 2021 02:22:41 +0000 (05:22 +0300)
commit49af326e890f6f322eb808c960eb29999a3084b4
tree15f96683272227f097041eb37287bab5d0fc0f98
parent82980d5ac9933576f933a198b23ebc3eb236244e
net: enetc: force the RGMII MAC speed/duplex instead of using in-band signaling

The RGMII spec supports optional in-band status reporting for the speed
and duplex negotiated on the copper side, and the ENETC driver enables
this feature by default.

However, this does not work when the PHY does not implement the in-band
reporting, or when there is a MAC-to-MAC connection described using a
fixed-link. In that case, it would be better to disable the feature in
the ENETC MAC and always force the speed and duplex to the values that
were negotiated and retrieved over MDIO once the autoneg is finished.
Since this works always, we just do it unconditionally and drop the
in-band code.

Note that because we need to wait for the autoneg to complete, we need
to move enetc_setup_mac_iface() after phy_startup() returns, and then
pass the phydev pointer all the way to enetc_init_rgmii().

The same considerations have led to a similar Linux driver patch as well:
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=c76a97218dcbb2cb7cec1404ace43ef96c87d874

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
drivers/net/fsl_enetc.c
drivers/net/fsl_enetc.h