Commit 5e332954 authored by Russell King (Oracle)'s avatar Russell King (Oracle) Committed by Jakub Kicinski

net: fman_memac: remove the now unnecessary checking for fixed-link

Since default_an_inband can be overriden by a fixed-link specification,
there is no need for memac to be checking for this before setting
default_an_inband. Remove this code and update the comment.
Signed-off-by: default avatarRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: default avatarSean Anderson <sean.anderson@seco.com>
Reviewed-by: default avatarAndrew Halaney <ahalaney@redhat.com>
Link: https://lore.kernel.org/r/E1sCJN1-00Ecr7-02@rmk-PC.armlinux.org.ukSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 02d00dc7
...@@ -1066,7 +1066,6 @@ int memac_initialization(struct mac_device *mac_dev, ...@@ -1066,7 +1066,6 @@ int memac_initialization(struct mac_device *mac_dev,
struct fman_mac_params *params) struct fman_mac_params *params)
{ {
int err; int err;
struct device_node *fixed;
struct phylink_pcs *pcs; struct phylink_pcs *pcs;
struct fman_mac *memac; struct fman_mac *memac;
unsigned long capabilities; unsigned long capabilities;
...@@ -1222,18 +1221,15 @@ int memac_initialization(struct mac_device *mac_dev, ...@@ -1222,18 +1221,15 @@ int memac_initialization(struct mac_device *mac_dev,
memac->rgmii_no_half_duplex = true; memac->rgmii_no_half_duplex = true;
/* Most boards should use MLO_AN_INBAND, but existing boards don't have /* Most boards should use MLO_AN_INBAND, but existing boards don't have
* a managed property. Default to MLO_AN_INBAND if nothing else is * a managed property. Default to MLO_AN_INBAND rather than MLO_AN_PHY.
* specified. We need to be careful and not enable this if we have a * Phylink will allow this to be overriden by a fixed link. We need to
* fixed link or if we are using MII or RGMII, since those * be careful and not enable this if we are using MII or RGMII, since
* configurations modes don't use in-band autonegotiation. * those configurations modes don't use in-band autonegotiation.
*/ */
fixed = of_get_child_by_name(mac_node, "fixed-link"); if (!of_property_read_bool(mac_node, "managed") &&
if (!fixed && !of_property_read_bool(mac_node, "fixed-link") &&
!of_property_read_bool(mac_node, "managed") &&
mac_dev->phy_if != PHY_INTERFACE_MODE_MII && mac_dev->phy_if != PHY_INTERFACE_MODE_MII &&
!phy_interface_mode_is_rgmii(mac_dev->phy_if)) !phy_interface_mode_is_rgmii(mac_dev->phy_if))
mac_dev->phylink_config.default_an_inband = true; mac_dev->phylink_config.default_an_inband = true;
of_node_put(fixed);
err = memac_init(mac_dev->fman_mac); err = memac_init(mac_dev->fman_mac);
if (err < 0) if (err < 0)
......
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