netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Fugang Duan <b38611@freescale.com>
To: <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>, <bhutchings@solarflare.com>,
	<stephen@networkplumber.org>, <b38611@freescale.com>
Subject: [PATCH net-next 3/3] net: fec: only enable mdio interrupt before phy device link up
Date: Wed, 10 Dec 2014 17:54:49 +0800	[thread overview]
Message-ID: <1418205289-7730-4-git-send-email-b38611@freescale.com> (raw)
In-Reply-To: <1418205289-7730-1-git-send-email-b38611@freescale.com>

Before phy device link up, we only enable FEC mdio interrupt, which
is more reasonable.

Signed-off-by: Fugang Duan <B38611@freescale.com>
---
 drivers/net/ethernet/freescale/fec_main.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index c045f67..ea71bc8 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -1075,7 +1075,10 @@ fec_restart(struct net_device *ndev)
 		fec_ptp_start_cyclecounter(ndev);
 
 	/* Enable interrupts we wish to service */
-	writel(FEC_DEFAULT_IMASK, fep->hwp + FEC_IMASK);
+	if (fep->link)
+		writel(FEC_DEFAULT_IMASK, fep->hwp + FEC_IMASK);
+	else
+		writel(FEC_ENET_MII, fep->hwp + FEC_IMASK);
 
 	/* Init the interrupt coalescing */
 	fec_enet_itr_coal_init(ndev);
-- 
1.7.8

      parent reply	other threads:[~2014-12-10 10:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-10  9:54 [PATCH net-next 0/3] net: fec: driver code clean and bug fix Fugang Duan
2014-12-10  9:54 ` [PATCH net-next 1/3] net: fec: reset fep link status in suspend function Fugang Duan
2014-12-10 19:54   ` David Miller
2014-12-11  1:40     ` fugang.duan
2014-12-10  9:54 ` [PATCH net-next 2/3] net: fec: clear all interrupt events to support i.MX6SX Fugang Duan
2014-12-10  9:54 ` Fugang Duan [this message]

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=1418205289-7730-4-git-send-email-b38611@freescale.com \
    --to=b38611@freescale.com \
    --cc=bhutchings@solarflare.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.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).