From: Ben Hutchings <bhutchings@solarflare.com>
To: David Decotigny <decot@google.com>
Cc: "David S. Miller" <davem@davemloft.net>,
Joe Perches <joe@perches.com>, Szymon Janc <szymon@janc.net.pl>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-net-upstream@google.com, Mike Ditto <mditto@google.com>
Subject: Re: [PATCH 4/6] forcedeth: Acknowledge only interrupts that are being processed
Date: Thu, 19 May 2011 02:35:39 +0100 [thread overview]
Message-ID: <1305768939.19966.177.camel@localhost> (raw)
In-Reply-To: <1305764080-24853-4-git-send-email-decot@google.com>
On Wed, 2011-05-18 at 17:14 -0700, David Decotigny wrote:
> From: Mike Ditto <mditto@google.com>
>
> This is to avoid a race, accidentally acknowledging an interrupt that
> we didn't notice and won't immediately process. This is based solely
> on code inspection; it is not known if there was an actual bug here.
>
>
> Signed-off-by: David Decotigny <decot@google.com>
> ---
> drivers/net/forcedeth.c | 13 ++++++++-----
> 1 files changed, 8 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c
> index 7a6aa08..17e79de 100644
> --- a/drivers/net/forcedeth.c
> +++ b/drivers/net/forcedeth.c
> @@ -3403,7 +3403,8 @@ static irqreturn_t nv_nic_irq_tx(int foo, void *data)
>
> for (i = 0;; i++) {
> events = readl(base + NvRegMSIXIrqStatus) & NVREG_IRQ_TX_ALL;
> - writel(NVREG_IRQ_TX_ALL, base + NvRegMSIXIrqStatus);
> + writel(events, base + NvRegMSIXIrqStatus);
> + netdev_dbg(dev, "%s: tx irq: %08x\n", dev->name, events);
[...]
netdev_dbg() and related logging functions already include the device
name, too. :-)
Ben.
--
Ben Hutchings, Senior Software Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
next prev parent reply other threads:[~2011-05-19 1:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-19 0:14 [PATCH 1/6] forcedeth: Improve stats counters David Decotigny
2011-05-19 0:14 ` [PATCH 2/6] forcedeth: new ethtool stat "tx_timeout" to account for tx_timeouts David Decotigny
2011-05-19 0:59 ` Stephen Hemminger
2011-05-19 0:14 ` [PATCH 3/6] forcedeth: allow to silence tx_timeout debug messages David Decotigny
2011-05-19 0:14 ` [PATCH 4/6] forcedeth: Acknowledge only interrupts that are being processed David Decotigny
2011-05-19 1:35 ` Ben Hutchings [this message]
2011-05-19 0:14 ` [PATCH 5/6] forcedeth: Add messages to indicate using MSI or MSI-X David Decotigny
2011-05-19 1:34 ` Ben Hutchings
2011-05-19 0:14 ` [PATCH 6/6] forcedeth: Fix a race during rmmod of forcedeth David Decotigny
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=1305768939.19966.177.camel@localhost \
--to=bhutchings@solarflare.com \
--cc=davem@davemloft.net \
--cc=decot@google.com \
--cc=joe@perches.com \
--cc=kernel-net-upstream@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mditto@google.com \
--cc=netdev@vger.kernel.org \
--cc=szymon@janc.net.pl \
/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).