Author: mav
Date: Sat Jun  9 08:41:30 2012
New Revision: 236799
URL: http://svn.freebsd.org/changeset/base/236799

Log:
  MFC r219241 (by mjacob):
  Don't automatically send a START UNIT to sequential access devices --
  this might cause them to load the tape unintentionally.

Modified:
  stable/8/sys/cam/cam_periph.c
Directory Properties:
  stable/8/sys/   (props changed)

Modified: stable/8/sys/cam/cam_periph.c
==============================================================================
--- stable/8/sys/cam/cam_periph.c       Sat Jun  9 08:25:39 2012        
(r236798)
+++ stable/8/sys/cam/cam_periph.c       Sat Jun  9 08:41:30 2012        
(r236799)
@@ -1539,6 +1539,15 @@ camperiphscsisenseerror(union ccb *ccb, 
                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
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to