summaryrefslogtreecommitdiff
path: root/sys/dev/aac
diff options
context:
space:
mode:
authorScott Long <scottl@FreeBSD.org>2003-02-06 03:31:02 +0000
committerScott Long <scottl@FreeBSD.org>2003-02-06 03:31:02 +0000
commitddb8683e595a114de0b508a6a473ab1c2df648d8 (patch)
tree3d89609d113c56c4e3d009ce7becf17276907d01 /sys/dev/aac
parentc2f10e2de40c3518cd8e22e4ae0789e61c0da466 (diff)
Notes
Diffstat (limited to 'sys/dev/aac')
-rw-r--r--sys/dev/aac/aac.c1
-rw-r--r--sys/dev/aac/aac_cam.c11
2 files changed, 10 insertions, 2 deletions
diff --git a/sys/dev/aac/aac.c b/sys/dev/aac/aac.c
index c9e0bc3e40d5..f612c1515fe6 100644
--- a/sys/dev/aac/aac.c
+++ b/sys/dev/aac/aac.c
@@ -2798,6 +2798,7 @@ aac_get_bus_info(struct aac_softc *sc)
caminf->BusNumber = i;
caminf->InitiatorBusId = businfo.InitiatorBusId[i];
caminf->aac_sc = sc;
+ caminf->sim_dev = child;
device_set_ivars(child, caminf);
device_set_desc(child, "SCSI Passthrough Bus");
diff --git a/sys/dev/aac/aac_cam.c b/sys/dev/aac/aac_cam.c
index 92bb5e889b82..e1874beac9fc 100644
--- a/sys/dev/aac/aac_cam.c
+++ b/sys/dev/aac/aac_cam.c
@@ -104,7 +104,6 @@ MALLOC_DEFINE(M_AACCAM, "aaccam", "AAC CAM info");
static int
aac_cam_probe(device_t dev)
{
-
debug_called(2);
return (0);
@@ -113,9 +112,17 @@ aac_cam_probe(device_t dev)
static int
aac_cam_detach(device_t dev)
{
+ struct aac_cam *camsc;
debug_called(2);
- return (EBUSY);
+ camsc = (struct aac_cam *)device_get_softc(dev);
+
+ xpt_async(AC_LOST_DEVICE, camsc->path, NULL);
+ xpt_free_path(camsc->path);
+ xpt_bus_deregister(cam_sim_path(camsc->sim));
+ cam_sim_free(camsc->sim, /*free_devq*/TRUE);
+
+ return (0);
}
/*