Subject: Re: sudden detach
To: John Nemeth <firstname.lastname@example.org>
From: Garrett D'Amore <email@example.com>
Date: 07/12/2006 07:19:27
John Nemeth wrote:
> On Dec 1, 7:38am, "Garrett D'Amore" wrote:
> } David Young wrote:
> } > On Tue, Jul 04, 2006 at 03:23:02PM +0200, Jachym Holecek wrote:
> } >
> } >> If we can agree to require user intervention before removing hotplug
> } >> devices (which is what Windows XP does, not sure about other systems),
> } >> then we "should" get rid of ca_activate (as we know it now, anyway).
> } >> There was a short thread on this recently, the argument for keeping
> } >> them was exactly "we need a quick deactivation from hardintr when
> } >> we get a device-gone interrupt".
> } >
> } > I have always considered it a bug in Windows XP that the user has to
> } > intervene before a device can be removed. I thought that both USB and
> } > Cardbus were designed to make a sudden detach possible? In principle,
> } > can't a carefully written driver survive a sudden detach?
> } In principle this is true for USB, and it _may_ be true for Cardbus.
> } But the reality is that cardbus drivers generally share code with PCI
> } (for most OS' they use the same driver entirely, although for some
> } reason NetBSD has a separate Cardbus support apart from PCI) and those
> Many of the Cardbus "drivers" are just bus attachment frontends
> which use common chipset backends found in sys/dev/ic.
> } drivers are generally _not_ hotplug safe.
> What about PCI Hot-Plug? Sounds to me that if drivers can't
> handle sudden detach now, they will need to do so in the future.
All PCI hotplug systems that I'm familiar with use a command to
deconfigure the device before removal first. CompactPCI even has LEDs
to indicate "safe-to-remove" status, IIRC.
So in the case of PCI, you _don't_ deal with "sudden detach". You deal
with "controlled, prenotified detach".
> }-- End of excerpt from "Garrett D'Amore"
Garrett D'Amore, Principal Software Engineer
Tadpole Computer / Computing Technologies Division,
General Dynamics C4 Systems
Phone: 951 325-2134 Fax: 951 325-2191