diff options
-rw-r--r-- | sys/dev/ata/atapi-cd.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/dev/ata/atapi-cd.c b/sys/dev/ata/atapi-cd.c index ab1e110..6599f1c 100644 --- a/sys/dev/ata/atapi-cd.c +++ b/sys/dev/ata/atapi-cd.c @@ -181,8 +181,9 @@ acd_attach(struct ata_device *atadev) } static void -acd_detach(struct ata_device *atadev) +acd_geom_detach(void *arg, int flag) { + struct ata_device *atadev = arg; struct acd_softc *cdp = atadev->softc; int subdev; @@ -215,6 +216,12 @@ acd_detach(struct ata_device *atadev) free(cdp, M_ACD); } +static void +acd_detach(struct ata_device *atadev) +{ + g_waitfor_event(acd_geom_detach, atadev, M_WAITOK, NULL); +} + static struct acd_softc * acd_init_lun(struct ata_device *atadev) { |