mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-03 07:04:53 +00:00
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:
parent
ea54c3694c
commit
4b87c653f9
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=137973
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue