summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Thompson <thompsa@FreeBSD.org>2009-10-21 19:48:27 +0000
committerAndrew Thompson <thompsa@FreeBSD.org>2009-10-21 19:48:27 +0000
commitb1c3c31d58bedbf18442891ff0e8b50631497920 (patch)
tree9e0fe6c4efb1f5fb485b8369281ad0ec2acfd2f7
parent3604d6e3d3d578a4af47019667f926d93d9a72ba (diff)
Notes
-rw-r--r--sys/dev/usb/storage/umass.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/usb/storage/umass.c b/sys/dev/usb/storage/umass.c
index 2e412d98ca3d..3aa128453df1 100644
--- a/sys/dev/usb/storage/umass.c
+++ b/sys/dev/usb/storage/umass.c
@@ -2843,8 +2843,9 @@ umass_cam_action(struct cam_sim *sim, union ccb *ccb)
{
struct umass_softc *sc = (struct umass_softc *)sim->softc;
- if (sc == UMASS_GONE) {
- ccb->ccb_h.status = CAM_TID_INVALID;
+ if (sc == UMASS_GONE ||
+ (sc != NULL && !usbd_device_attached(sc->sc_udev))) {
+ ccb->ccb_h.status = CAM_SEL_TIMEOUT;
xpt_done(ccb);
return;
}