From: David Woodhouse <dwmw2@infradead.org>
To: torvalds@transmeta.com (Linus Torvalds)
Cc: linux-kernel@vger.kernel.org
Subject: Re: ehci-hcd on CARDBUS hangs when stopping card service
Date: Sun, 26 May 2002 14:41:30 +0100 [thread overview]
Message-ID: <28429.1022420490@redhat.com> (raw)
In-Reply-To: <acm1vp$2ak$1@penguin.transmeta.com>
torvalds@transmeta.com said:
> > 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.
You get an interrupt _before_ the card goes away, because the pins are of
different lengths.
As long as your driver API has some kind of abort() call to tell it that the
device is no longer present, and you manage to call that within the few
milliseconds between the card detect pin contact breaking and the rest of
the pins breaking, you should be fine.
If you're sharing interrupts and have high interrupt latency, there may be a
problem -- perhaps it would be better if in that case you could ensure that
the socket IRQ handler gets run _before_ the device IRQ handler.
> Also, it's generally a good idea to "just say no" to endless loops in
> drivers. Hardware bugs _do_ happen, and it's a lot more pleasant to
> have the driver do a
> printk("Device does not respond\n");
> than for the kernel to hang.
Too late. On some hardware, if you try to talk to the device once it's
gone, you're already dead. Not all the world is a PeeCee.
--
dwmw2
next prev parent reply other threads:[~2002-05-26 13:41 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 [this message]
2002-05-28 13:54 ` Ingo Oeser
[not found] ` <200205241849.g4OInTe02393@penguin.transmeta.com>
2002-05-25 17:15 ` David Brownell
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=28429.1022420490@redhat.com \
--to=dwmw2@infradead.org \
--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