Patch "net: phy: dp83867: add w/a for packet errors seen with short cables" 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: phy: dp83867: add w/a for packet errors seen with short cables

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-phy-dp83867-add-w-a-for-packet-errors-seen-with-.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 8649533f050e1d272f171bc0dcf76f6748ece389
Author: Grygorii Strashko <grygorii.strashko@xxxxxx>
Date:   Wed May 10 18:21:39 2023 +0530

    net: phy: dp83867: add w/a for packet errors seen with short cables
    
    [ Upstream commit 0b01db274028f5acd207332686ffc92ac77491ac ]
    
    Introduce the W/A for packet errors seen with short cables (<1m) between
    two DP83867 PHYs.
    
    The W/A recommended by DM requires FFE Equalizer Configuration tuning by
    writing value 0x0E81 to DSP_FFE_CFG register (0x012C), surrounded by hard
    and soft resets as follows:
    
    write_reg(0x001F, 0x8000); //hard reset
    write_reg(DSP_FFE_CFG, 0x0E81);
    write_reg(0x001F, 0x4000); //soft reset
    
    Since  DP83867 PHY DM says "Changing this register to 0x0E81, will not
    affect Long Cable performance.", enable the W/A by default.
    
    Fixes: 2a10154abcb7 ("net: phy: dp83867: Add TI dp83867 phy")
    Signed-off-by: Grygorii Strashko <grygorii.strashko@xxxxxx>
    Signed-off-by: Siddharth Vadapalli <s-vadapalli@xxxxxx>
    Reviewed-by: Simon Horman <simon.horman@xxxxxxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/phy/dp83867.c b/drivers/net/phy/dp83867.c
index 7446d5c6c7146..14990f8462ae3 100644
--- a/drivers/net/phy/dp83867.c
+++ b/drivers/net/phy/dp83867.c
@@ -42,6 +42,7 @@
 #define DP83867_STRAP_STS1	0x006E
 #define DP83867_STRAP_STS2	0x006f
 #define DP83867_RGMIIDCTL	0x0086
+#define DP83867_DSP_FFE_CFG	0x012c
 #define DP83867_RXFCFG		0x0134
 #define DP83867_RXFPMD1	0x0136
 #define DP83867_RXFPMD2	0x0137
@@ -910,8 +911,27 @@ static int dp83867_phy_reset(struct phy_device *phydev)
 
 	usleep_range(10, 20);
 
-	return phy_modify(phydev, MII_DP83867_PHYCTRL,
+	err = phy_modify(phydev, MII_DP83867_PHYCTRL,
 			 DP83867_PHYCR_FORCE_LINK_GOOD, 0);
+	if (err < 0)
+		return err;
+
+	/* Configure the DSP Feedforward Equalizer Configuration register to
+	 * improve short cable (< 1 meter) performance. This will not affect
+	 * long cable performance.
+	 */
+	err = phy_write_mmd(phydev, DP83867_DEVADDR, DP83867_DSP_FFE_CFG,
+			    0x0e81);
+	if (err < 0)
+		return err;
+
+	err = phy_write(phydev, DP83867_CTRL, DP83867_SW_RESTART);
+	if (err < 0)
+		return err;
+
+	usleep_range(10, 20);
+
+	return 0;
 }
 
 static void dp83867_link_change_notify(struct phy_device *phydev)



[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