From: Alexander Sverdlin <asv@sysgo.com>
To: netdev@vger.kernel.org, Andy Fleming <afleming@freescale.com>,
davem@davemloft.net
Subject: [PATCH] phy: Replace genphy_update_link() call with phy_read_status()
Date: Thu, 13 Sep 2012 09:20:43 +0200 [thread overview]
Message-ID: <5051894B.5060001@sysgo.com> (raw)
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;
next reply other threads:[~2012-09-13 7:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-13 7:20 Alexander Sverdlin [this message]
2012-09-17 17:22 ` [PATCH] phy: Replace genphy_update_link() call with phy_read_status() David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5051894B.5060001@sysgo.com \
--to=asv@sysgo.com \
--cc=afleming@freescale.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.