svn commit: r219241 - head/sys/cam

Matt Jacob mjacob at FreeBSD.org
Thu Mar 3 18:28:21 UTC 2011


Author: mjacob
Date: Thu Mar  3 18:28:21 2011
New Revision: 219241
URL: http://svn.freebsd.org/changeset/base/219241

Log:
  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

Modified:
  head/sys/cam/cam_periph.c

Modified: head/sys/cam/cam_periph.c
==============================================================================
--- head/sys/cam/cam_periph.c	Thu Mar  3 18:19:10 2011	(r219240)
+++ head/sys/cam/cam_periph.c	Thu Mar  3 18:28:21 2011	(r219241)
@@ -1560,6 +1560,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


More information about the svn-src-all mailing list