mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Beniamino Galvani <b.galvani@gmail.com>
To: barebox@lists.infradead.org
Subject: [PATCH 2/2] net: arc_emac: disable interrupts
Date: Mon, 19 May 2014 22:35:00 +0200	[thread overview]
Message-ID: <1400531700-24248-2-git-send-email-b.galvani@gmail.com> (raw)
In-Reply-To: <1400531700-24248-1-git-send-email-b.galvani@gmail.com>

The driver doesn't use interrupts and Linux driver crashes when emac
interrupts are enabled at boot: keep them disabled.

Signed-off-by: Beniamino Galvani <b.galvani@gmail.com>
---
 drivers/net/arc_emac.c |    9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/net/arc_emac.c b/drivers/net/arc_emac.c
index 23df3fd..8b74ea5 100644
--- a/drivers/net/arc_emac.c
+++ b/drivers/net/arc_emac.c
@@ -210,9 +210,6 @@ static int arc_emac_open(struct eth_device *edev)
 	arc_reg_set(priv, R_RX_RING, (unsigned int)priv->rxbd);
 	arc_reg_set(priv, R_TX_RING, (unsigned int)priv->txbd);
 
-	/* Enable interrupts */
-	arc_reg_set(priv, R_ENABLE, RXINT_MASK | ERR_MASK);
-
 	/* Set CONTROL */
 	arc_reg_set(priv, R_CTRL,
 		     (RX_BD_NUM << 24) |	/* RX BD table length */
@@ -317,9 +314,6 @@ static void arc_emac_halt(struct eth_device *edev)
 {
 	struct arc_emac_priv *priv = edev->priv;
 
-	/* Disable interrupts */
-	arc_reg_clr(priv, R_ENABLE, RXINT_MASK | ERR_MASK);
-
 	/* Disable EMAC */
 	arc_reg_clr(priv, R_CTRL, EN_MASK);
 }
@@ -440,6 +434,9 @@ static int arc_emac_probe(struct device_d *dev)
 	/* Set poll rate so that it polls every 1 ms */
 	arc_reg_set(priv, R_POLLRATE, clock_frequency / 1000000);
 
+	/* Disable interrupts */
+	arc_reg_set(priv, R_ENABLE, 0);
+
 	mdiobus_register(miibus);
 	eth_register(edev);
 
-- 
1.7.10.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2014-05-19 20:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-19 20:34 [PATCH 1/2] net: arc_emac: remove delay from mdio polling loop Beniamino Galvani
2014-05-19 20:35 ` Beniamino Galvani [this message]
2014-05-20  5:48   ` [PATCH 2/2] net: arc_emac: disable interrupts Sascha Hauer

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=1400531700-24248-2-git-send-email-b.galvani@gmail.com \
    --to=b.galvani@gmail.com \
    --cc=barebox@lists.infradead.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