diff options
author | mjacob <mjacob@FreeBSD.org> | 2001-07-30 00:44:32 +0000 |
---|---|---|
committer | mjacob <mjacob@FreeBSD.org> | 2001-07-30 00:44:32 +0000 |
commit | 478e29d90ed2bcf1bc9ee2b4100a727f804f5dfc (patch) | |
tree | c10c5c5420ad4f75fc77a035cb2677bc9a9aff79 /sys | |
parent | a37e3009d0637a2f74a844dacfda2fd8d14fdd86 (diff) | |
download | FreeBSD-src-478e29d90ed2bcf1bc9ee2b4100a727f804f5dfc.zip FreeBSD-src-478e29d90ed2bcf1bc9ee2b4100a727f804f5dfc.tar.gz |
Kill the command (don't rerun it) if we had an AUTOSENSE failure.
If we had an AUTOSENSE failure, we don't know what SENSE DATA
we had for a CHECK CONDITION. It's far better to assume failure
in this case.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/cam/cam_periph.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/cam/cam_periph.c b/sys/cam/cam_periph.c index d74b04d..d93a842 100644 --- a/sys/cam/cam_periph.c +++ b/sys/cam/cam_periph.c @@ -493,8 +493,8 @@ cam_periph_lock(struct cam_periph *periph, int priority) /* * Increment the reference count on the peripheral * while we wait for our lock attempt to succeed - * to ensure the peripheral doesn't dissappear - * out from under us while we sleep. + * to ensure the peripheral doesn't disappear out + * from under us while we sleep. */ if (cam_periph_acquire(periph) != CAM_REQ_CMP) return(ENXIO); @@ -1514,7 +1514,7 @@ cam_periph_error(union ccb *ccb, cam_flags camflags, status = ccb->ccb_h.status; frozen = (status & CAM_DEV_QFRZN) != 0; status &= CAM_STATUS_MASK; - relsim_flags = 0; + openings = relsim_flags = 0; switch (status) { case CAM_REQ_CMP: @@ -1532,6 +1532,8 @@ cam_periph_error(union ccb *ccb, cam_flags camflags, case CAM_AUTOSENSE_FAIL: xpt_print_path(ccb->ccb_h.path); printf("AutoSense Failed\n"); + error = EIO; /* we have to kill the command */ + break; case CAM_REQ_CMP_ERR: case CAM_CMD_TIMEOUT: case CAM_UNEXP_BUSFREE: |