Call the detach function with g_waitfor_event() so that it can access

the GEOM topology.

There are still issues with not detaching from cam correctly such that
upon a device detach there's an invalid pointer dereference from the
later call to cam_rescan().
This commit is contained in:
green 2004-06-21 20:42:03 +00:00
parent 500031481b
commit 590da0d007

View File

@ -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)
{