Patch "net: netsec: Ignore 'phy-mode' on SynQuacer in DT mode" has been added to the 6.1-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: netsec: Ignore 'phy-mode' on SynQuacer in DT mode

to the 6.1-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-netsec-ignore-phy-mode-on-synquacer-in-dt-mode.patch
and it can be found in the queue-6.1 subdirectory.

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



commit f85ceacbf46e0fd01213152f0636870e56f74487
Author: Mark Brown <broonie@xxxxxxxxxx>
Date:   Mon Jul 31 11:48:32 2023 +0100

    net: netsec: Ignore 'phy-mode' on SynQuacer in DT mode
    
    [ Upstream commit f3bb7759a924713bc54d15f6d0d70733b5935fad ]
    
    As documented in acd7aaf51b20 ("netsec: ignore 'phy-mode' device
    property on ACPI systems") the SocioNext SynQuacer platform ships with
    firmware defining the PHY mode as RGMII even though the physical
    configuration of the PHY is for TX and RX delays.  Since bbc4d71d63549bc
    ("net: phy: realtek: fix rtl8211e rx/tx delay config") this has caused
    misconfiguration of the PHY, rendering the network unusable.
    
    This was worked around for ACPI by ignoring the phy-mode property but
    the system is also used with DT.  For DT instead if we're running on a
    SynQuacer force a working PHY mode, as well as the standard EDK2
    firmware with DT there are also some of these systems that use u-boot
    and might not initialise the PHY if not netbooting.  Newer firmware
    imagaes for at least EDK2 are available from Linaro so print a warning
    when doing this.
    
    Fixes: 533dd11a12f6 ("net: socionext: Add Synquacer NetSec driver")
    Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
    Acked-by: Ard Biesheuvel <ardb@xxxxxxxxxx>
    Acked-by: Ilias Apalodimas <ilias.apalodimas@xxxxxxxxxx>
    Reviewed-by: Andrew Lunn <andrew@xxxxxxx>
    Link: https://lore.kernel.org/r/20230731-synquacer-net-v3-1-944be5f06428@xxxxxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/socionext/netsec.c b/drivers/net/ethernet/socionext/netsec.c
index 9b46579b5a103..b130e978366c1 100644
--- a/drivers/net/ethernet/socionext/netsec.c
+++ b/drivers/net/ethernet/socionext/netsec.c
@@ -1851,6 +1851,17 @@ static int netsec_of_probe(struct platform_device *pdev,
 		return err;
 	}
 
+	/*
+	 * SynQuacer is physically configured with TX and RX delays
+	 * but the standard firmware claimed otherwise for a long
+	 * time, ignore it.
+	 */
+	if (of_machine_is_compatible("socionext,developer-box") &&
+	    priv->phy_interface != PHY_INTERFACE_MODE_RGMII_ID) {
+		dev_warn(&pdev->dev, "Outdated firmware reports incorrect PHY mode, overriding\n");
+		priv->phy_interface = PHY_INTERFACE_MODE_RGMII_ID;
+	}
+
 	priv->phy_np = of_parse_phandle(pdev->dev.of_node, "phy-handle", 0);
 	if (!priv->phy_np) {
 		dev_err(&pdev->dev, "missing required property 'phy-handle'\n");



[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