From: David Yu <[email protected]> commit 0498ded7bc94eea3fc7d24bf90100ffdf1464529 from https://github.com/OE4T/linux-jammy-nvidia-tegra.git
BugLink: https://bugs.launchpad.net/bugs/2019240 Data corruption is happening in aqr107_config_init(). It's accessing address offset across struct phy_device boundary. This is caused by misuse of SUPPORTED_* to linkmode_*_bit() api. Change SUPPORTED_* to ETHTOOL_LINK_MODE_*_BIT for correct usage. Signed-off-by: David Yu <[email protected]> Reviewed-by: Narayan Reddy <[email protected]> Reviewed-by: Bhadram Varka <[email protected]> Reviewed-by: Bibek Basu <[email protected]> Tested-by: Bhadram Varka <[email protected]> Signed-off-by: Abhilash G <[email protected]> Acked-by: Brad Figg <[email protected]> Acked-by: Jacob Martin <[email protected]> Acked-by: Ian May <[email protected]> Signed-off-by: Brad Figg <[email protected]> Signed-off-by: Meng Li <[email protected]> --- drivers/net/phy/aquantia_main.c | 4 ++-- drivers/net/phy/realtek.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/phy/aquantia_main.c b/drivers/net/phy/aquantia_main.c index 9b8df5892fbd..d9085a0eddd7 100644 --- a/drivers/net/phy/aquantia_main.c +++ b/drivers/net/phy/aquantia_main.c @@ -814,8 +814,8 @@ static int aqr107_config_init(struct phy_device *phydev) aqr107_chip_info(phydev); /* Advertize flow control */ - linkmode_set_bit(SUPPORTED_Pause, phydev->supported); - linkmode_set_bit(SUPPORTED_Asym_Pause, phydev->supported); + linkmode_set_bit(ETHTOOL_LINK_MODE_Pause_BIT, phydev->supported); + linkmode_set_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT, phydev->supported); linkmode_copy(phydev->advertising, phydev->supported); /* Configure flow control */ diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c index 96d463b5fff0..1f21afde1d91 100644 --- a/drivers/net/phy/realtek.c +++ b/drivers/net/phy/realtek.c @@ -533,8 +533,8 @@ static int rtl8211f_config_init(struct phy_device *phydev) } /* Advertise Flow Control */ - linkmode_set_bit(SUPPORTED_Pause, phydev->supported); - linkmode_set_bit(SUPPORTED_Asym_Pause, phydev->supported); + linkmode_set_bit(ETHTOOL_LINK_MODE_Pause_BIT, phydev->supported); + linkmode_set_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT, phydev->supported); linkmode_copy(phydev->advertising, phydev->supported); if (priv->has_phycr2) { -- 2.34.1
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#16099): https://lists.yoctoproject.org/g/linux-yocto/message/16099 Mute This Topic: https://lists.yoctoproject.org/mt/117065453/21656 Group Owner: [email protected] Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
