From d9e3a566ae47c5b64bbb91a10da0bf1879f452cd Mon Sep 17 00:00:00 2001 From: mav Date: Tue, 22 Sep 2009 22:23:52 +0000 Subject: MFp4: If on sense request device returns no sence, give up and return, or we may loop forever. --- sys/cam/cam_periph.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'sys/cam') diff --git a/sys/cam/cam_periph.c b/sys/cam/cam_periph.c index c4e0b04..9137c55 100644 --- a/sys/cam/cam_periph.c +++ b/sys/cam/cam_periph.c @@ -1034,8 +1034,13 @@ camperiphdone(struct cam_periph *periph, union ccb *done_ccb) cam_error_print(saved_ccb, CAM_ESF_ALL, CAM_EPF_ALL); #endif - xpt_done_ccb = TRUE; + } else { + saved_ccb->ccb_h.status &= + ~CAM_STATUS_MASK; + saved_ccb->ccb_h.status |= + CAM_AUTOSENSE_FAIL; } + xpt_done_ccb = TRUE; } } bcopy(done_ccb->ccb_h.saved_ccb_ptr, done_ccb, -- cgit v1.1