lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 13 Sep 2012 09:20:43 +0200
From:	Alexander Sverdlin <asv@...go.com>
To:	netdev@...r.kernel.org, Andy Fleming <afleming@...escale.com>,
	davem@...emloft.net
Subject: [PATCH] phy: Replace genphy_update_link() call with phy_read_status()

From: Alexander Sverdlin <alexander.sverdlin@...go.com>

Replace genphy_update_link() call with phy_read_status() 

Code in phy.c should not call genphy_*() functions directly, this breaks PHY layer abstraction.
Some drivers may re-implement "read_status" callback and it's not being called in one place of
PHY state machine, where genphy_update_link() is called instead. So fix it.
For drivers that rely on genphy_* implementation nothing changed, as genphy_read_status() calls
genphy_update_link() anyway.

Signed-off-by: Alexander Sverdlin <alexander.sverdlin@...go.com>
---
 drivers/net/phy/phy.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index dfca51d..cfed41c 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -839,7 +839,7 @@ void phy_state_machine(struct work_struct *work)
 			}
 			break;
 		case PHY_FORCING:
-			err = genphy_update_link(phydev);
+			err = phy_read_status(phydev);
 
 			if (err)
 				break;
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ