netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@davemloft.net>
To: Harald Welte <laforge@gnumonks.org>
Cc: netdev@oss.sgi.com
Subject: Re: [PATCH 2.6] natsemi.c NAPI
Date: Mon, 20 Sep 2004 11:57:46 -0700	[thread overview]
Message-ID: <20040920115746.7ccbfb45.davem@davemloft.net> (raw)
In-Reply-To: <20040920141030.GV1307@sunbeam.de.gnumonks.org>

On Mon, 20 Sep 2004 16:10:30 +0200
Harald Welte <laforge@gnumonks.org> wrote:

> +static inline void natsemi_irq_enable(struct netdev_private *np)
> +{
> +	/* Enable interrupts by setting the interrupt mask. */
> +	writel(DEFAULT_INTR, np->base_addr + IntrMask);
> +	writel(1, np->base_addr + IntrEnable);
> +	mb();
> +}
> +
> +static inline void natsemi_irq_disable(struct netdev_private *np)
> +{
> +	writel(0, np->base_addr + IntrEnable);
> +	mb();
> +}

Kill the mb(), try using:

	readl(np->base_addr + IntrEnable);

in it's place.

This driver (before the NAPI patch) is a bit buggy, it does
no RX processing SMP locking.  So if one one cpu you're doing
RX interrupt processing, and on another cpu tx_timeout() runs
we're totally screwed.

This is not caused by Harald's patch, but there are implications
for his NAPI patch once it is fixed.

  reply	other threads:[~2004-09-20 18:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-20 14:10 [PATCH 2.6] natsemi.c NAPI Harald Welte
2004-09-20 18:57 ` David S. Miller [this message]
2004-09-20 19:07   ` Jeff Garzik
2004-09-20 19:12     ` David S. Miller
     [not found] <20040919163642.GC1307@sunbeam.de.gnumonks.org>
     [not found] ` <4155D781.8050700@colorfullife.com>
2004-09-27  9:11   ` Harald Welte
2004-09-27 10:30     ` Robert Olsson
2004-09-27 17:30       ` Eric Lemoine
     [not found]   ` <20040927081411.GC3236@sunbeam.de.gnumonks.org>
     [not found]     ` <1096343829.8660.107.camel@jzny.localdomain>
     [not found]       ` <4158E74C.7030709@colorfullife.com>
2004-09-28 10:39         ` jamal

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=20040920115746.7ccbfb45.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=laforge@gnumonks.org \
    --cc=netdev@oss.sgi.com \
    /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).