Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Mar 2011 18:28:21 +0000 (UTC)
From:      Matt Jacob <mjacob@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r219241 - head/sys/cam
Message-ID:  <201103031828.p23ISLwj061293@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201103031828.p23ISLwj061293>