All of lore.kernel.org
 help / color / mirror / Atom feed
From: Manfred Spraul <manfred@colorfullife.com>
To: "'Roger Luethi'" <rl@hellgate.ch>,
	linux-kernel@vger.kernel.org,
	Shing Chuang <ShingChuang@via.com.tw>
Subject: Re: [PATCH] #2 VIA Rhine stalls: TxAbort handling
Date: Fri, 17 May 2002 20:46:33 +0200	[thread overview]
Message-ID: <3CE55009.9050505@colorfullife.com> (raw)

>> All the three conditions caused the TXON bit of CR1 went off. the
>> driver must wait  a little while until the bit go off, reset the pointer of
>> [...]
>> do {} while (BYTE_REG_BITS_IS_ON(CR0_TXON,&pMacRegs->byCR0));
> 
> The driver "waits a little" in the interrupt handler? How long can that
> take, worst case? I don't know of many places where the kernel stops to
> wait for an external device to change some value.
> 

It's not that uncommon: Most network drivers busy-wait after stopping 
the tx process during netif_close().

But I would add a maximum timeout and a printk - just to avoid 
unexplainable system hangs. One example would be natsemi_stop_rxtx() in 
drivers/net/natsemi.c.
IIRC all register reads from the addresses that belong to a pulled out 
PCMCIA card return 0xFFFFFFFF ;-)

Shing, I don't like the empty body of the while loop. It's not a bug, 
but doesn't that generate a large load on the pci bus?

I've always added an udelay(1), i.e. wait one microsecond, into such loops.

--
	Manfred


             reply	other threads:[~2002-05-17 18:46 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-17 18:46 Manfred Spraul [this message]
2002-05-17 19:56 ` [PATCH] #2 VIA Rhine stalls: TxAbort handling 'Roger Luethi'
2002-05-18 10:08 ` David Woodhouse
     [not found] <369B0912E1F5D511ACA5003048222B75A3C06E@EXCHANGE2>
     [not found] ` <20020518040143.GA9318@k3.hellgate.ch>
2002-05-17 23:13   ` Ivan G.
2002-05-18 19:11     ` 'Roger Luethi'
  -- strict thread matches above, loose matches on Subject: below --
2002-05-16 10:03 Shing Chuang
2002-05-16 18:03 ` 'Roger Luethi'
2002-05-16 18:25   ` Richard B. Johnson
2002-05-16 20:31     ` 'Roger Luethi'
2002-05-16 16:39       ` Ivan G.
2002-05-16 21:05       ` Richard B. Johnson
2002-05-17  0:16         ` 'Roger Luethi'
2002-05-17 12:51           ` Richard B. Johnson
2002-05-17 16:25             ` 'Roger Luethi'
2002-05-16  3:13 Roger Luethi

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=3CE55009.9050505@colorfullife.com \
    --to=manfred@colorfullife.com \
    --cc=ShingChuang@via.com.tw \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rl@hellgate.ch \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.