mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-26 04:20:23 +09:00
net: phy: lan87xx: fix access to wrong register of LAN87xx
[ Upstream commitfdb5cc6ab3] The function lan87xx_config_aneg_ext was introduced to configure LAN95xxA but as well writes to undocumented register of LAN87xx. This fix prevents that access. The function lan87xx_config_aneg_ext gets more suitable for the new behavior name. Reported-by: Måns Rullgård <mans@mansr.com> Fixes:05b35e7eb9("smsc95xx: add phylib support") Signed-off-by: Andre Edich <andre.edich@microchip.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
897c095c7e
commit
c45cb22a55
@@ -152,10 +152,13 @@ static int lan87xx_config_aneg(struct phy_device *phydev)
|
||||
return genphy_config_aneg(phydev);
|
||||
}
|
||||
|
||||
static int lan87xx_config_aneg_ext(struct phy_device *phydev)
|
||||
static int lan95xx_config_aneg_ext(struct phy_device *phydev)
|
||||
{
|
||||
int rc;
|
||||
|
||||
if (phydev->phy_id != 0x0007c0f0) /* not (LAN9500A or LAN9505A) */
|
||||
return lan87xx_config_aneg(phydev);
|
||||
|
||||
/* Extend Manual AutoMDIX timer */
|
||||
rc = phy_read(phydev, PHY_EDPD_CONFIG);
|
||||
if (rc < 0)
|
||||
@@ -408,7 +411,7 @@ static struct phy_driver smsc_phy_driver[] = {
|
||||
.read_status = lan87xx_read_status,
|
||||
.config_init = smsc_phy_config_init,
|
||||
.soft_reset = smsc_phy_reset,
|
||||
.config_aneg = lan87xx_config_aneg_ext,
|
||||
.config_aneg = lan95xx_config_aneg_ext,
|
||||
|
||||
/* IRQ related */
|
||||
.ack_interrupt = smsc_phy_ack_interrupt,
|
||||
|
||||
Reference in New Issue
Block a user