1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00

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:
Brian Feldman 2004-06-21 20:42:03 +00:00
parent 71c911b18c
commit 5fd2bb173d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=130876

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