Properly wither the geom container on detach. This will allow one to

then later reload fdc and not have duplicate fd devices in dev.

# Maybe this should be moved to a convenience function.

Reviewed by: phk
This commit is contained in:
Warner Losh 2004-11-21 16:25:21 +00:00
parent ea54c3694c
commit 4b87c653f9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=137973

View file

@ -1957,6 +1957,11 @@ fd_detach(device_t dev)
struct fd_data *fd;
fd = device_get_softc(dev);
g_topology_lock();
g_wither_geom(fd->fd_geom, ENXIO);
g_topology_unlock();
while (device_get_state(dev) == DS_BUSY)
tsleep(fd, PZERO, "fdd", hz/10);
callout_drain(&fd->toffhandle);
return (0);