From: Anatolij Gustschin <agust@denx.de>
To: netdev@vger.kernel.org
Cc: afleming@freescale.com
Subject: [PATCH 3/3] phylib: Add interrupt source check function to M88E1121R driver
Date: Tue, 7 Apr 2009 14:01:43 +0200 [thread overview]
Message-ID: <1239105703-26240-3-git-send-email-agust@denx.de> (raw)
In-Reply-To: <1239105703-26240-2-git-send-email-agust@denx.de>
Add did_interrupt() function to check if a PHY port
really caused an interrupt. This is needed in the case
of shared PHY interrupt pin configuration to stop
interrupt event processing for PHY ports which didn't
cause an interrupt.
Signed-off-by: Anatolij Gustschin <agust@denx.de>
---
drivers/net/phy/marvell.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
index e9f436b..7a3ec9d 100644
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -458,6 +458,18 @@ static int marvell_read_status(struct phy_device *phydev)
return 0;
}
+static int m88e1121_did_interrupt(struct phy_device *phydev)
+{
+ int imask;
+
+ imask = phy_read(phydev, MII_M1011_IEVENT);
+
+ if (imask & MII_M1011_IMASK_INIT)
+ return 1;
+
+ return 0;
+}
+
static struct phy_driver marvell_drivers[] = {
{
.phy_id = 0x01410c60,
@@ -520,6 +532,7 @@ static struct phy_driver marvell_drivers[] = {
.read_status = &marvell_read_status,
.ack_interrupt = &marvell_ack_interrupt,
.config_intr = &marvell_config_intr,
+ .did_interrupt = &m88e1121_did_interrupt,
.driver = { .owner = THIS_MODULE },
},
{
--
1.5.6.3
next prev parent reply other threads:[~2009-04-07 12:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-07 12:01 [PATCH 1/3] phylib: Basic support for the M88E1121R Marvell chip Anatolij Gustschin
2009-04-07 12:01 ` [PATCH 2/3] phylib: Allow early-out in phy_change Anatolij Gustschin
2009-04-07 12:01 ` Anatolij Gustschin [this message]
2009-04-13 21:51 ` [PATCH 3/3] phylib: Add interrupt source check function to M88E1121R driver David Miller
2009-04-13 21:52 ` [PATCH 2/3] phylib: Allow early-out in phy_change David Miller
2009-04-13 21:51 ` [PATCH 1/3] phylib: Basic support for the M88E1121R Marvell chip 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=1239105703-26240-3-git-send-email-agust@denx.de \
--to=agust@denx.de \
--cc=afleming@freescale.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).