public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Brownell <david-b@pacbell.net>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: ehci-hcd on CARDBUS hangs when stopping card service
Date: Sat, 25 May 2002 10:15:15 -0700	[thread overview]
Message-ID: <3CEFC6A3.6080002@pacbell.net> (raw)
In-Reply-To: <20020523171326.GA11562@kroah.com> <3CED6E0B.8020501@pacbell.net> <200205241849.g4OInTe02393@penguin.transmeta.com>

>>Is there a clean way to detect the "card ejected before anything calls 
>>pci_dev->remove()" case?  I don't really like the idea of wrapping code
>>around every PCI register access to detect such cases. 
> 
> You don't have much choice with CardBus, I'm afraid
> ...
> On most (practically all?) machines, a device that no longer exists will
> return a nice floating 0xff for device reads, so it's usually reasonably
> simple to detect (0xff is often not a legal status register value for
> most devices for example). 

Seems to me it'd be worth mentioning this issue somewhere in the
documentation or source.  One could get the impression that the
main issue for a CardBus-enabled PCI driver is to make sure that
the "new style" driver APIs -- with a DEVICE_TABLE etc -- are used.
(Maybe just a brief comment in <asm/io.h> ...)


> Also, it's generally a good idea to "just say no" to endless loops in
> drivers. 

I'm hardly averse to changing that loop (which normally does have an end :)
and I expected to need to at some point.  It's interesting to me just how
long that has been there without causing problems.  In this case the root
cause is that Cardbus "improper shutdown sequence" problem, so "no end"
is just a particularly nasty secondary failure mode.

- Dave



  parent reply	other threads:[~2002-05-25 17:15 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20020523171326.GA11562@kroah.com>
2002-05-23 22:32 ` ehci-hcd on CARDBUS hangs when stopping card service David Brownell
2002-05-24 18:49   ` Linus Torvalds
2002-05-26 13:41     ` David Woodhouse
2002-05-28 13:54       ` Ingo Oeser
     [not found]   ` <200205241849.g4OInTe02393@penguin.transmeta.com>
2002-05-25 17:15     ` David Brownell [this message]
2002-05-25 17:54       ` Linus Torvalds
2002-05-27  6:27   ` Borsenkow Andrej
2002-05-27 18:37     ` David Brownell
2002-05-27 10:54   ` Borsenkow Andrej
2002-05-23  6:33 Borsenkow Andrej
2002-05-23  6:39 ` Borsenkow Andrej

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=3CEFC6A3.6080002@pacbell.net \
    --to=david-b@pacbell.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.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