From: Madalin Bucur <madalin.bucur@oss.nxp.com>
To: davem@davemloft.net
Cc: andrew@lunn.ch, f.fainelli@gmail.com, hkallweit1@gmail.com,
netdev@vger.kernel.org, ykaukab@suse.de,
Madalin Bucur <madalin.bucur@oss.nxp.com>
Subject: [PATCH net-next 2/2] dpaa_eth: support all modes with rate adapting PHYs
Date: Wed, 22 Jan 2020 15:59:33 +0200 [thread overview]
Message-ID: <1579701573-6609-3-git-send-email-madalin.bucur@oss.nxp.com> (raw)
In-Reply-To: <1579701573-6609-1-git-send-email-madalin.bucur@oss.nxp.com>
Stop removing modes that are not supported on the system interface
when the connected PHY is capable of rate adaptation. This addresses
an issue with the LS1046ARDB board 10G interface no longer working
with an 1G link partner after autonegotiation support was added
for the Aquantia PHY on board in
commit 09c4c57f7bc4 ("net: phy: aquantia: add support for auto-negotiation configuration")
As it only worked in other modes besides 10G because the PHY
was not configured by its driver to remove them, this is not
really a bug fix but more of a feature add.
Reported-by: Mian Yousaf Kaukab <ykaukab@suse.de>
Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
---
drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
index a301f0095223..d3eb235450e5 100644
--- a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
+++ b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
@@ -2471,9 +2471,13 @@ static int dpaa_phy_init(struct net_device *net_dev)
return -ENODEV;
}
- /* Remove any features not supported by the controller */
- ethtool_convert_legacy_u32_to_link_mode(mask, mac_dev->if_support);
- linkmode_and(phy_dev->supported, phy_dev->supported, mask);
+ if (mac_dev->phy_if != PHY_INTERFACE_MODE_XGMII ||
+ !phy_dev->rate_adaptation) {
+ /* Remove any features not supported by the controller */
+ ethtool_convert_legacy_u32_to_link_mode(mask,
+ mac_dev->if_support);
+ linkmode_and(phy_dev->supported, phy_dev->supported, mask);
+ }
phy_support_asym_pause(phy_dev);
--
2.1.0
next prev parent reply other threads:[~2020-01-22 13:59 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-22 13:59 [PATCH net-next 0/2] net: phy: aquantia: indicate rate adaptation Madalin Bucur
2020-01-22 13:59 ` [PATCH net-next 1/2] net: phy: aquantia: add rate_adaptation indication Madalin Bucur
2020-01-22 17:58 ` Florian Fainelli
2020-01-23 7:38 ` Madalin Bucur (OSS)
2020-01-27 17:42 ` Florian Fainelli
2020-01-28 7:02 ` Madalin Bucur (OSS)
2020-01-28 15:55 ` Vladimir Oltean
2020-01-29 9:38 ` Madalin Bucur (OSS)
2020-01-29 10:15 ` Vladimir Oltean
2020-01-29 10:53 ` Madalin Bucur (OSS)
2020-01-29 10:57 ` Russell King - ARM Linux admin
2020-01-29 10:59 ` Madalin Bucur (OSS)
2020-01-29 11:57 ` Vladimir Oltean
2020-01-29 12:47 ` Madalin Bucur
2020-01-29 13:44 ` Andrew Lunn
2020-01-29 14:36 ` Madalin Bucur (OSS)
2020-01-29 15:33 ` Andrew Lunn
2020-01-30 9:40 ` Madalin Bucur (OSS)
2020-01-22 13:59 ` Madalin Bucur [this message]
2020-01-22 20:05 ` [PATCH net-next 2/2] dpaa_eth: support all modes with rate adapting PHYs Heiner Kallweit
2020-01-23 7:20 ` Madalin Bucur (OSS)
2020-01-29 13:34 ` Russell King - ARM Linux admin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1579701573-6609-3-git-send-email-madalin.bucur@oss.nxp.com \
--to=madalin.bucur@oss.nxp.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=ykaukab@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).