LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "Michael Chan" <mchan@broadcom.com>
To: "Bernhard Walle" <bwalle@suse.de>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Fix crash in tg3 when using irqpoll
Date: Thu, 22 Mar 2007 14:04:27 -0800 [thread overview]
Message-ID: <1174601067.9753.42.camel@dell> (raw)
In-Reply-To: <20070322204635.GA27152@strauss.suse.de>
On Thu, 2007-03-22 at 21:46 +0100, Bernhard Walle wrote:
>
> This patch makes sure that even the tr32() instruction in the interrupt handler
> is not executed which accesses PCI memory. Accessing PCI memory when
> pci_restore_state() is called is a bad idea because that function modifies
> the BARs of the PCI device.
It is not caused by the BAR as it doesn't get changed in this case. The
pci_restore_state() call is to restore the memory enable bit in the PCI
command register. The tr32() call in tg3_interrupt() will cause a
master abort if it is called before the memory enable bit has been
restored.
> --- mainline-msi-init.orig/drivers/net/tg3.c
> +++ mainline-msi-init/drivers/net/tg3.c
> @@ -3561,7 +3561,10 @@ static irqreturn_t tg3_interrupt(int irq
> struct net_device *dev = dev_id;
> struct tg3 *tp = netdev_priv(dev);
> struct tg3_hw_status *sblk = tp->hw_status;
> - unsigned int handled = 1;
> + unsigned int handled = 0;
> +
> + if (tg3_irq_sync(tp))
> + goto out;
This will break other things. When we disable interrupts, we set the
irq_sync flag but allow one more interrupt to be generated. The irq
handler will simply mask off the interrupt when it sees the irq_sync
flag. With the above change, the irq handler can no longer mask off
this trailing interrupt and you may get screaming interrupts as a
result.
Thanks for reporting this. I'll try to come up with a good solution.
next prev parent reply other threads:[~2007-03-22 21:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-22 20:46 Bernhard Walle
2007-03-22 22:04 ` Michael Chan [this message]
2007-03-22 23:20 ` Bernhard Walle
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=1174601067.9753.42.camel@dell \
--to=mchan@broadcom.com \
--cc=bwalle@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--subject='Re: [PATCH] Fix crash in tg3 when using irqpoll' \
/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
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).