mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-30 02:29:01 +00:00
ee035de0fd
Import patches from Linux v5.16 and v5.17 to get 2500Base-X SFP working
again with mvneta driver after the generic phylink validate backport.
Fixes: aab466f422
("kernel: backport generic phylink validate")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
36 lines
1.4 KiB
Diff
36 lines
1.4 KiB
Diff
From d9ca72807ecb236f679b960c70ef5b7d4a5f0222 Mon Sep 17 00:00:00 2001
|
|
From: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
|
|
Date: Wed, 27 Oct 2021 10:03:48 +0100
|
|
Subject: [PATCH] net: mvneta: remove interface checks in mvneta_validate()
|
|
|
|
As phylink checks the interface mode against the supported_interfaces
|
|
bitmap, we no longer need to validate the interface mode in the
|
|
validation function. Remove this to simplify it.
|
|
|
|
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
|
|
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
---
|
|
drivers/net/ethernet/marvell/mvneta.c | 11 ++---------
|
|
1 file changed, 2 insertions(+), 9 deletions(-)
|
|
|
|
--- a/drivers/net/ethernet/marvell/mvneta.c
|
|
+++ b/drivers/net/ethernet/marvell/mvneta.c
|
|
@@ -3833,15 +3833,8 @@ static void mvneta_validate(struct phyli
|
|
* "Bit 2 Field InBandAnEn In-band Auto-Negotiation enable. ...
|
|
* When <PortType> = 1 (1000BASE-X) this field must be set to 1."
|
|
*/
|
|
- if (phy_interface_mode_is_8023z(state->interface)) {
|
|
- if (!phylink_test(state->advertising, Autoneg)) {
|
|
- linkmode_zero(supported);
|
|
- return;
|
|
- }
|
|
- } else if (state->interface != PHY_INTERFACE_MODE_NA &&
|
|
- state->interface != PHY_INTERFACE_MODE_QSGMII &&
|
|
- state->interface != PHY_INTERFACE_MODE_SGMII &&
|
|
- !phy_interface_mode_is_rgmii(state->interface)) {
|
|
+ if (phy_interface_mode_is_8023z(state->interface) &&
|
|
+ !phylink_test(state->advertising, Autoneg)) {
|
|
linkmode_zero(supported);
|
|
return;
|
|
}
|