Patch "net: pcs: xpcs: propagate xpcs_read error to xpcs_get_state_c37_sgmii" has been added to the 5.15-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: pcs: xpcs: propagate xpcs_read error to xpcs_get_state_c37_sgmii

to the 5.15-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-pcs-xpcs-propagate-xpcs_read-error-to-xpcs_get_s.patch
and it can be found in the queue-5.15 subdirectory.

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



commit f5e90e5ec1e647d90d283e99ba9e3a2f84f312d5
Author: Vladimir Oltean <vladimir.oltean@xxxxxxx>
Date:   Wed Jul 20 14:20:57 2022 +0300

    net: pcs: xpcs: propagate xpcs_read error to xpcs_get_state_c37_sgmii
    
    [ Upstream commit 27161db0904ee48e59140aa8d0835939a666c1f1 ]
    
    While phylink_pcs_ops :: pcs_get_state does return void, xpcs_get_state()
    does check for a non-zero return code from xpcs_get_state_c37_sgmii()
    and prints that as a message to the kernel log.
    
    However, a non-zero return code from xpcs_read() is translated into
    "return false" (i.e. zero as int) and the I/O error is therefore not
    printed. Fix that.
    
    Fixes: b97b5331b8ab ("net: pcs: add C37 SGMII AN support for intel mGbE controller")
    Signed-off-by: Vladimir Oltean <vladimir.oltean@xxxxxxx>
    Link: https://lore.kernel.org/r/20220720112057.3504398-1-vladimir.oltean@xxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/pcs/pcs-xpcs.c b/drivers/net/pcs/pcs-xpcs.c
index 7de631f5356f..fd4cbf8a55ad 100644
--- a/drivers/net/pcs/pcs-xpcs.c
+++ b/drivers/net/pcs/pcs-xpcs.c
@@ -890,7 +890,7 @@ static int xpcs_get_state_c37_sgmii(struct dw_xpcs *xpcs,
 	 */
 	ret = xpcs_read(xpcs, MDIO_MMD_VEND2, DW_VR_MII_AN_INTR_STS);
 	if (ret < 0)
-		return false;
+		return ret;
 
 	if (ret & DW_VR_MII_C37_ANSGM_SP_LNKSTS) {
 		int speed_value;



[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