From: Robert Olsson <Robert.Olsson@data.slu.se>
To: Zhang Fuxin <fxzhang@ict.ac.cn>
Cc: Robert Olsson <Robert.Olsson@data.slu.se>,
Paul <xerox@foonet.net>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: NAPI eepro100 bug fixed
Date: Tue, 18 Jun 2002 19:07:38 +0200 [thread overview]
Message-ID: <15631.26842.867674.437939@robur.slu.se> (raw)
In-Reply-To: <3D0EA83A.50606@ict.ac.cn>
Zhang Fuxin writes:
> My first NAPI eepro100 contains a subtle but fatal race,which will
> lead
> to lockup(of the whole machine here,but of ether interface for paul). This
> version should be ok, Paul, would you like to have a try? I've tested it
> in my
> will meet it,so it is listed here.
> /* disable interrupts here is necessary!
> * We need to ensure Rx/RxNobuf ints are disabled if in poll
> * flag is set. If interrupt comes bwteen netif_rx_complete
> * and enable_rx_and_rxnobuf_ints, the following will happen:
> * netif_rx_complete --> clear RX_SCHED flag
> * -> ints(e.g. TxDone)
> * speedo_interrupt
> * if (netif_rx_schedule_prep(dev))
> * disable_rx_and_rxnobuf_ints
> * return
> * <-
> * enable_rx_and_rxnobuf_ints
> * then we will have Rx&RxNoBuf ints enable while in polling!
> * it may lead to endless interrupts and effective lockup of
> * the whole machine.
> */
> spin_lock_irqsave(&sp->lock,flags);
> netif_rx_complete(dev);
> enable_rx_and_rxnobuf_ints(dev);
> spin_unlock_irqrestore(&sp->lock,flags);
Thanks!
Yes as far as I see this correct... and this race and others is mentioned
in NAPI_HOWTO.txt and yes the spinlock can help for the drivers that uses
this type interrupt acking. And tulip is a candidate for this as well. Let
see if it solves Paul's problem to start with.
Cheers.
--ro
next prev parent reply other threads:[~2002-06-18 17:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <15624.57000.928651.530593@robur.slu.se>
[not found] ` <JBEKKKICLLIJKLIGCCKLCEAJCCAA.xerox@foonet.net>
[not found] ` <15624.63280.379421.369909@robur.slu.se>
2002-06-18 3:25 ` Zhang Fuxin
2002-06-18 4:43 ` kuznet
2002-06-18 17:07 ` Robert Olsson [this message]
[not found] <3D0EF872.7020007@ict.ac.cn>
2002-06-18 17:54 ` kuznet
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=15631.26842.867674.437939@robur.slu.se \
--to=robert.olsson@data.slu.se \
--cc=fxzhang@ict.ac.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=xerox@foonet.net \
/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
all inboxes | Powered by JetHome®