diff options
author | mjacob <mjacob@FreeBSD.org> | 2011-03-03 18:28:21 +0000 |
---|---|---|
committer | mjacob <mjacob@FreeBSD.org> | 2011-03-03 18:28:21 +0000 |
commit | 814465c1457288eb46281f117a733c98210b6d9a (patch) | |
tree | 77189d41129006ceb57f4e4ee3ffee7c2cb82a7c /sys/cam | |
parent | a583811c0a195d7c450269b4679aa8c529cb29e5 (diff) | |
download | FreeBSD-src-814465c1457288eb46281f117a733c98210b6d9a.zip FreeBSD-src-814465c1457288eb46281f117a733c98210b6d9a.tar.gz |
Don't automatically send a START UNIT to sequential access devices-
this might cause them to load the tape unintentionally.
Reviewed by: gibbs
MFC after: 1 month
Diffstat (limited to 'sys/cam')
-rw-r--r-- | sys/cam/cam_periph.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/cam/cam_periph.c b/sys/cam/cam_periph.c index 2474c6e..41185db 100644 --- a/sys/cam/cam_periph.c +++ b/sys/cam/cam_periph.c @@ -1560,6 +1560,15 @@ camperiphscsisenseerror(union ccb *ccb, cam_flags camflags, case SS_START: { int le; + if (SID_TYPE(&cgd.inq_data) == T_SEQUENTIAL) { + xpt_free_ccb(orig_ccb); + ccb->ccb_h.status |= CAM_DEV_QFRZN; + *action_string = "Will not autostart a " + "sequential access device"; + err_action = SS_FAIL; + error = EIO; + break; + } /* * Send a start unit command to the device, and |