* [PATCH] phy: Replace genphy_update_link() call with phy_read_status()
@ 2012-09-13 7:20 Alexander Sverdlin
2012-09-17 17:22 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Alexander Sverdlin @ 2012-09-13 7:20 UTC (permalink / raw)
To: netdev, Andy Fleming, davem
From: Alexander Sverdlin <alexander.sverdlin@sysgo.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@sysgo.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;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] phy: Replace genphy_update_link() call with phy_read_status()
2012-09-13 7:20 [PATCH] phy: Replace genphy_update_link() call with phy_read_status() Alexander Sverdlin
@ 2012-09-17 17:22 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2012-09-17 17:22 UTC (permalink / raw)
To: asv; +Cc: netdev, afleming
From: Alexander Sverdlin <asv@sysgo.com>
Date: Thu, 13 Sep 2012 09:20:43 +0200
> From: Alexander Sverdlin <alexander.sverdlin@sysgo.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@sysgo.com>
This is a behavioral change, not just a change to make sure the right
interfaces are used.
genphy_update_link() does only a small subset of the operations
performed by the generic read_status callback.
I'm not applying this patch, because all of those extra operations
might be unexpected in some situations and break some configurations.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-09-17 17:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-13 7:20 [PATCH] phy: Replace genphy_update_link() call with phy_read_status() Alexander Sverdlin
2012-09-17 17:22 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.