summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorn_hibma <n_hibma@FreeBSD.org>1999-05-30 18:46:04 +0000
committern_hibma <n_hibma@FreeBSD.org>1999-05-30 18:46:04 +0000
commit26fb913de5b1084512973ba2177d8abb9d5a185e (patch)
tree049a2ccb16e9abd883853b9c2a347f1243f54a1e
parentc45bbfd551149939b50ef01bc9b771763c473e95 (diff)
downloadFreeBSD-src-26fb913de5b1084512973ba2177d8abb9d5a185e.zip
FreeBSD-src-26fb913de5b1084512973ba2177d8abb9d5a185e.tar.gz
Notify CAM of the removed device on detach.
-rw-r--r--sys/dev/usb/umass.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/dev/usb/umass.c b/sys/dev/usb/umass.c
index e1afd8b..f2039c8 100644
--- a/sys/dev/usb/umass.c
+++ b/sys/dev/usb/umass.c
@@ -661,14 +661,13 @@ umass_cam_attach(umass_softc_t *sc)
}
/* umass_cam_detach
+ * detach from the CAM layer
*/
+
static void
umass_cam_detach(umass_softc_t *sc)
{
- /* Detach from CAM layer
- * XXX do we need to delete the device first?
- */
-
+ xpt_async(AC_LOST_DEVICE, sc->path, NULL);
xpt_free_path(sc->path);
xpt_bus_deregister(cam_sim_path(sc->sim));
cam_sim_free(sc->sim, /*free_devq*/TRUE);
@@ -746,7 +745,6 @@ umass_cam_action(struct cam_sim *sim, union ccb *ccb)
DPRINTF(UDMASS_CAM, ("%s: XPT_PATH_INQ\n",
USBDEVNAME(sc->sc_dev)));
- /* information copied from vpo driver. Needs to be checked */
cpi->version_num = 1;
cpi->hba_inquiry = 0;
cpi->target_sprt = 0;
OpenPOWER on IntegriCloud