From: Finn Thain <fthain@telegraphics.com.au>
To: David Miller <davem@davemloft.net>
Cc: linux-m68k@vger.kernel.org, netdev@vger.kernel.org
Subject: [PATCH] macmace: disable only the dma interrupt
Date: Sun, 11 Sep 2011 01:02:16 +1000 (EST) [thread overview]
Message-ID: <alpine.LNX.2.00.1109110042210.5327@nippy.intranet> (raw)
Don't disable all interrupts, just disable the relevant one.
Also move a couple of printk calls outside of local_irq_save/restore.
Tested on a Quadra 660av.
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Index: linux-m68k/drivers/net/macmace.c
===================================================================
--- linux-m68k.orig/drivers/net/macmace.c 2011-08-28 00:33:33.000000000 +1000
+++ linux-m68k/drivers/net/macmace.c 2011-08-28 00:36:10.000000000 +1000
@@ -458,8 +458,9 @@ static int mace_xmit_start(struct sk_buf
local_irq_save(flags);
netif_stop_queue(dev);
if (!mp->tx_count) {
- printk(KERN_ERR "macmace: tx queue running but no free buffers.\n");
local_irq_restore(flags);
+ printk(KERN_ERR
+ "macmace: tx queue running but no free buffers.\n");
return NETDEV_TX_BUSY;
}
mp->tx_count--;
@@ -563,10 +564,8 @@ static irqreturn_t mace_interrupt(int ir
struct mace_data *mp = netdev_priv(dev);
volatile struct mace *mb = mp->mace;
int intr, fs;
- unsigned long flags;
- /* don't want the dma interrupt handler to fire */
- local_irq_save(flags);
+ disable_irq(mp->dma_intr);
intr = mb->ir; /* read interrupt register */
mace_handle_misc_intrs(dev, intr);
@@ -604,7 +603,7 @@ static irqreturn_t mace_interrupt(int ir
if (mp->tx_count)
netif_wake_queue(dev);
- local_irq_restore(flags);
+ enable_irq(mp->dma_intr);
return IRQ_HANDLED;
}
@@ -615,11 +614,12 @@ static void mace_tx_timeout(struct net_d
volatile struct mace *mb = mp->mace;
unsigned long flags;
+ printk(KERN_ERR "macmace: transmit timeout - resetting\n");
+
local_irq_save(flags);
/* turn off both tx and rx and reset the chip */
mb->maccc = 0;
- printk(KERN_ERR "macmace: transmit timeout - resetting\n");
mace_txdma_reset(dev);
mace_reset(dev);
next reply other threads:[~2011-09-10 15:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-10 15:02 Finn Thain [this message]
2011-09-10 18:30 ` [PATCH] macmace: disable only the dma interrupt David Miller
2011-09-11 10:02 ` Finn Thain
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=alpine.LNX.2.00.1109110042210.5327@nippy.intranet \
--to=fthain@telegraphics.com.au \
--cc=davem@davemloft.net \
--cc=linux-m68k@vger.kernel.org \
--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