Subject: Re: sudden detach
To: Garrett D'Amore <garrett_damore@tadpole.com>
From: Quentin Garnier <cube@cubidou.net>
List: tech-kern
Date: 07/12/2006 16:25:03
--rNtUoUA3Tn0/N1iC
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Jul 12, 2006 at 07:19:27AM -0700, Garrett D'Amore wrote:
> 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:
> > } >  =20
> > } >> If we can agree to require user intervention before removing hotpl=
ug
> > } >> devices (which is what Windows XP does, not sure about other syste=
ms),
> > } >> 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 princip=
le,
> > } > can't a carefully written driver survive a sudden detach?
> > }=20
> > } In principle this is true for USB, and it _may_ be true for Cardbus.=
=20
> > } 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.
> >  =20
>=20
> 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.
>=20
> So in  the case of PCI, you _don't_ deal with "sudden detach".  You deal
> with "controlled, prenotified detach".

What's the expectation for ExpressCard?  AFAIK (but I know very little),
it's just a hot-plug PCIe port.

--=20
Quentin Garnier - cube@cubidou.net - cube@NetBSD.org
"When I find the controls, I'll go where I like, I'll know where I want
to be, but maybe for now I'll stay right here on a silent sea."
KT Tunstall, Silent Sea, Eye to the Telescope, 2004.

--rNtUoUA3Tn0/N1iC
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (NetBSD)

iQEVAwUBRLUGP9goQloHrPnoAQJtnQf/T06yjuGRfR1wNZt4XEMZ/rXybjgwFYAi
2OcJu/nIDxbEb2QNilOmO6HCnTiXSJ+YZur3p20QIzFukuY3IqOzbKoVjS8m4+fi
1W6xWqLhdxE70C1oa47XsI0acxIkRFPpmr+rzunHAieXFL4Lv50NDvy+wFuW/hxY
PoiHGsigyNoAN8KzIQ5+aBqWbXV8DitLgLMQBN5LojpDPxYQb4l5I+J3njz+/V4t
3fHPBJ0di+8NwhEh1kAvBsoqM7mlWWpTbiEbuL58mSFJ/z8zQTfVWXW9aTDtmoQD
IDlnNuHPY9kqSurlAoHH5YEwrYyzihEnQ6rmEjtD2fV6o6X6AQ+BkA==
=d4Ka
-----END PGP SIGNATURE-----

--rNtUoUA3Tn0/N1iC--