From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: Francois Romieu <romieu@fr.zoreil.com>, netdev@oss.sgi.com
Subject: Re: [PATCH] [RFT] 2.6.4 - epic100 napi
Date: Wed, 24 Mar 2004 01:05:30 +0900 [thread overview]
Message-ID: <87brmnh7lh.fsf@devron.myhome.or.jp> (raw)
In-Reply-To: <4060544F.2090702@pobox.com>
Jeff Garzik <jgarzik@pobox.com> writes:
> > Umm.. the above code is part of ->poll(). I think xxx_interrut() need
> > netif_running() instead. The driver must clear __LINK_STATE_RX_SCHED
> > flag...
>
> Most interrupt routines already test this, look at
>
> static inline int netif_rx_schedule_prep(struct net_device *dev)
> {
> return netif_running(dev) &&
> !test_and_set_bit(__LINK_STATE_RX_SCHED, &dev->state);
> }
>
> It shouldn't schedule unless the interface is running.
Yes.
> However... I believe it was you that added this check to 8139cp.c:
>
> /* close possible race's with dev_close */
> if (unlikely(!netif_running(dev))) {
> cpw16(IntrMask, 0);
> goto out;
> }
Yes, I added. And my suggestion was about this.
Because in case of 8139too, I got too many interrupts about pending RX
during the following, and the following wasn't finished.
(dev->close() wasn't called).
dev_close(),
clear_bit(__LINK_STATE_START, &dev->state);
smp_mb__after_clear_bit(); /* Commit netif_running(). */
while (test_bit(__LINK_STATE_RX_SCHED, &dev->state)) {
/* No hurry. */
current->state = TASK_INTERRUPTIBLE;
schedule_timeout(1);
}
> I do wonder about the consequences, on some hardware, about receiving
> an interrupt and -not- processing the RX or TX completions associated
> with that. For most NIC hardware, you'll get sane behavior, but not
> all, I bet...
Is this meaning should _not_ receive the interrupt about pending RX/TX?
Thanks.
--
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
next prev parent reply other threads:[~2004-03-23 16:05 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-20 14:21 [PATCH] [RFT] 2.6.4 - epic100 napi Francois Romieu
2004-03-21 18:24 ` Jeff Garzik
2004-03-21 23:47 ` Francois Romieu
2004-03-23 14:29 ` OGAWA Hirofumi
2004-03-23 15:14 ` Jeff Garzik
2004-03-23 16:05 ` OGAWA Hirofumi [this message]
2004-03-23 18:51 ` Francois Romieu
2004-03-23 19:59 ` OGAWA Hirofumi
2004-03-24 0:41 ` Francois Romieu
2004-03-24 2:52 ` OGAWA Hirofumi
2004-03-24 12:33 ` Francois Romieu
2004-03-25 0:27 ` [PATCH] 2.6.5-rc2 - more " Francois Romieu
2004-03-22 23:50 ` [PATCH 0/4] 2.6.5-rc2 - epic100 update Francois Romieu
2004-03-22 23:51 ` [PATCH 1/4] 2.6.5-rc2 - epic100 fixup Francois Romieu
2004-03-22 23:52 ` [PATCH 2/4] 2.6.5-rc2 - epic100 napi Francois Romieu
2004-03-22 23:53 ` [PATCH 3/4] " Francois Romieu
2004-03-22 23:53 ` [PATCH 4/4] " Francois Romieu
2004-03-23 0:12 ` [PATCH 0/4] 2.6.5-rc2 - epic100 update Jeff Garzik
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=87brmnh7lh.fsf@devron.myhome.or.jp \
--to=hirofumi@mail.parknet.co.jp \
--cc=jgarzik@pobox.com \
--cc=netdev@oss.sgi.com \
--cc=romieu@fr.zoreil.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).