Patch "net: dsa: sja1105: fix SGMII PCS being forced to SPEED_UNKNOWN instead of SPEED_10" has been added to the 5.11-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    net: dsa: sja1105: fix SGMII PCS being forced to SPEED_UNKNOWN instead of SPEED_10

to the 5.11-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     net-dsa-sja1105-fix-sgmii-pcs-being-forced-to-speed_unknown-instead-of-speed_10.patch
and it can be found in the queue-5.11 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From 053d8ad10d585adf9891fcd049637536e2fe9ea7 Mon Sep 17 00:00:00 2001
From: Vladimir Oltean <vladimir.oltean@xxxxxxx>
Date: Thu, 4 Mar 2021 12:56:53 +0200
Subject: net: dsa: sja1105: fix SGMII PCS being forced to SPEED_UNKNOWN instead of SPEED_10

From: Vladimir Oltean <vladimir.oltean@xxxxxxx>

commit 053d8ad10d585adf9891fcd049637536e2fe9ea7 upstream.

When using MLO_AN_PHY or MLO_AN_FIXED, the MII_BMCR of the SGMII PCS is
read before resetting the switch so it can be reprogrammed afterwards.
This works for the speeds of 1Gbps and 100Mbps, but not for 10Mbps,
because SPEED_10 is actually 0, so AND-ing anything with 0 is false,
therefore that last branch is dead code.

Do what others do (genphy_read_status_fixed, phy_mii_ioctl) and just
remove the check for SPEED_10, let it fall into the default case.

Fixes: ffe10e679cec ("net: dsa: sja1105: Add support for the SGMII port")
Signed-off-by: Vladimir Oltean <vladimir.oltean@xxxxxxx>
Reviewed-by: Andrew Lunn <andrew@xxxxxxx>
Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/net/dsa/sja1105/sja1105_main.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/net/dsa/sja1105/sja1105_main.c
+++ b/drivers/net/dsa/sja1105/sja1105_main.c
@@ -1834,7 +1834,7 @@ out_unlock_ptp:
 				speed = SPEED_1000;
 			else if (bmcr & BMCR_SPEED100)
 				speed = SPEED_100;
-			else if (bmcr & BMCR_SPEED10)
+			else
 				speed = SPEED_10;
 
 			sja1105_sgmii_pcs_force_speed(priv, speed);


Patches currently in stable-queue which might be from vladimir.oltean@xxxxxxx are

queue-5.11/net-enetc-fix-incorrect-tpid-when-receiving-802.1ad-tagged-packets.patch
queue-5.11/net-mscc-ocelot-properly-reject-destination-ip-keys-in-vcap-is1.patch
queue-5.11/net-enetc-don-t-overwrite-the-rss-indirection-table-when-initializing.patch
queue-5.11/net-enetc-keep-rx-ring-consumer-index-in-sync-with-hardware.patch
queue-5.11/net-enetc-remove-bogus-write-to-sirxidr-from-enetc_setup_rxbdr.patch
queue-5.11/net-dsa-sja1105-fix-sgmii-pcs-being-forced-to-speed_unknown-instead-of-speed_10.patch
queue-5.11/net-enetc-allow-hardware-timestamping-on-tx-queues-with-tc-etf-enabled.patch
queue-5.11/net-enetc-initialize-rfs-rss-memories-for-unused-ports-too.patch
queue-5.11/net-enetc-take-the-mdio-lock-only-once-per-napi-poll-cycle.patch
queue-5.11/net-enetc-don-t-disable-vlan-filtering-in-iff_promisc-mode.patch
queue-5.11/net-enetc-force-the-rgmii-speed-and-duplex-instead-of-operating-in-inband-mode.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux