Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Apr 2013 16:25:03 +0000 (UTC)
From:      Edward Tomasz Napierala <trasz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r249410 - in head/sys: amd64/conf arm/conf cam/ctl conf i386/conf ia64/conf modules/ctl sparc64/conf
Message-ID:  <201304121625.r3CGP3Dv068400@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: trasz
Date: Fri Apr 12 16:25:03 2013
New Revision: 249410
URL: http://svnweb.freebsd.org/changeset/base/249410

Log:
  Remove ctl(4) from GENERIC.  Also remove 'options CTL_DISABLE'
  and kern.cam.ctl.disable tunable; those were introduced as a workaround
  to make it possible to boot GENERIC on low memory machines.
  
  With ctl(4) being built as a module and automatically loaded by ctladm(8),
  this makes CTL work out of the box.
  
  Reviewed by:	ken
  Sponsored by:	FreeBSD Foundation

Modified:
  head/sys/amd64/conf/GENERIC
  head/sys/arm/conf/ATMEL
  head/sys/cam/ctl/ctl.c
  head/sys/cam/ctl/ctl_backend.c
  head/sys/cam/ctl/ctl_frontend_cam_sim.c
  head/sys/cam/ctl/ctl_frontend_internal.c
  head/sys/cam/ctl/scsi_ctl.c
  head/sys/conf/options
  head/sys/i386/conf/GENERIC
  head/sys/i386/conf/PAE
  head/sys/ia64/conf/GENERIC
  head/sys/modules/ctl/Makefile
  head/sys/sparc64/conf/GENERIC

Modified: head/sys/amd64/conf/GENERIC
==============================================================================
--- head/sys/amd64/conf/GENERIC	Fri Apr 12 16:03:22 2013	(r249409)
+++ head/sys/amd64/conf/GENERIC	Fri Apr 12 16:25:03 2013	(r249410)
@@ -137,10 +137,7 @@ device		sa		# Sequential Access (tape et
 device		cd		# CD
 device		pass		# Passthrough device (direct ATA/SCSI access)
 device		ses		# Enclosure Services (SES and SAF-TE)
-device		ctl		# CAM Target Layer
-options		CTL_DISABLE	# Disable CTL by default to save memory.
-				# Re-enable with kern.cam.ctl.disable=0 in
-				# /boot/loader.conf
+#device		ctl		# CAM Target Layer
 
 # RAID controllers interfaced to the SCSI subsystem
 device		amr		# AMI MegaRAID

Modified: head/sys/arm/conf/ATMEL
==============================================================================
--- head/sys/arm/conf/ATMEL	Fri Apr 12 16:03:22 2013	(r249409)
+++ head/sys/arm/conf/ATMEL	Fri Apr 12 16:25:03 2013	(r249410)
@@ -150,7 +150,7 @@ device		sa		# Sequential Access (tape et
 device		cd		# CD
 device		pass		# Passthrough device (direct ATA/SCSI access)
 device		ses		# Enclosure Services (SES and SAF-TE)
-device		ctl		# CAM Target Layer
+#device		ctl		# CAM Target Layer
 
 # Serial (COM) ports
 device		uart		# Multi-uart driver

Modified: head/sys/cam/ctl/ctl.c
==============================================================================
--- head/sys/cam/ctl/ctl.c	Fri Apr 12 16:03:22 2013	(r249409)
+++ head/sys/cam/ctl/ctl.c	Fri Apr 12 16:25:03 2013	(r249410)
@@ -79,8 +79,6 @@ __FBSDID("$FreeBSD$");
 #include <cam/ctl/ctl_scsi_all.h>
 #include <cam/ctl/ctl_error.h>
 
-#include "opt_ctl.h"
-
 struct ctl_softc *control_softc = NULL;
 
 /*
@@ -320,16 +318,8 @@ static int persis_offset;
 static uint8_t ctl_pause_rtr;
 static int     ctl_is_single = 1;
 static int     index_to_aps_page;
-#ifdef CTL_DISABLE
-int	   ctl_disable = 1;
-#else
-int	   ctl_disable = 0;
-#endif
 
 SYSCTL_NODE(_kern_cam, OID_AUTO, ctl, CTLFLAG_RD, 0, "CAM Target Layer");
-SYSCTL_INT(_kern_cam_ctl, OID_AUTO, disable, CTLFLAG_RDTUN, &ctl_disable, 0,
-	   "Disable CTL");
-TUNABLE_INT("kern.cam.ctl.disable", &ctl_disable);
 
 /*
  * Serial number (0x80), device id (0x83), and supported pages (0x00)
@@ -966,10 +956,6 @@ ctl_init(void)
 	ctl_pause_rtr = 0;
         rcv_sync_msg = 0;
 
-	/* If we're disabled, don't initialize. */
-	if (ctl_disable != 0)
-		return (0);
-
 	control_softc = malloc(sizeof(*control_softc), M_DEVBUF,
 			       M_WAITOK | M_ZERO);
 	softc = control_softc;

Modified: head/sys/cam/ctl/ctl_backend.c
==============================================================================
--- head/sys/cam/ctl/ctl_backend.c	Fri Apr 12 16:03:22 2013	(r249409)
+++ head/sys/cam/ctl/ctl_backend.c	Fri Apr 12 16:25:03 2013	(r249410)
@@ -62,7 +62,6 @@ __FBSDID("$FreeBSD$");
 #include <cam/ctl/ctl_debug.h>
 
 extern struct ctl_softc *control_softc;
-extern int ctl_disable;
 
 int
 ctl_backend_register(struct ctl_backend_driver *be)
@@ -72,10 +71,6 @@ ctl_backend_register(struct ctl_backend_
 
 	ctl_softc = control_softc;
 
-	/* Don't continue if CTL is disabled */
-	if (ctl_disable != 0)
-		return (0);
-
 	mtx_lock(&ctl_softc->ctl_lock);
 	/*
 	 * Sanity check, make sure this isn't a duplicate registration.

Modified: head/sys/cam/ctl/ctl_frontend_cam_sim.c
==============================================================================
--- head/sys/cam/ctl/ctl_frontend_cam_sim.c	Fri Apr 12 16:03:22 2013	(r249409)
+++ head/sys/cam/ctl/ctl_frontend_cam_sim.c	Fri Apr 12 16:25:03 2013	(r249410)
@@ -119,7 +119,6 @@ struct cfcs_softc cfcs_softc;
  * amount of SCSI sense data that we will report to CAM.
  */
 static int cfcs_max_sense = sizeof(struct scsi_sense_data);
-extern int ctl_disable;
 
 SYSCTL_NODE(_kern_cam, OID_AUTO, ctl2cam, CTLFLAG_RD, 0,
 	    "CAM Target Layer SIM frontend");
@@ -150,10 +149,6 @@ cfcs_init(void)
 #endif
 	int retval;
 
-	/* Don't continue if CTL is disabled */
-	if (ctl_disable != 0)
-		return (0);
-
 	softc = &cfcs_softc;
 	retval = 0;
 	bzero(softc, sizeof(*softc));

Modified: head/sys/cam/ctl/ctl_frontend_internal.c
==============================================================================
--- head/sys/cam/ctl/ctl_frontend_internal.c	Fri Apr 12 16:03:22 2013	(r249409)
+++ head/sys/cam/ctl/ctl_frontend_internal.c	Fri Apr 12 16:25:03 2013	(r249410)
@@ -188,7 +188,6 @@ struct cfi_softc {
 MALLOC_DEFINE(M_CTL_CFI, "ctlcfi", "CTL CFI");
 
 static struct cfi_softc fetd_internal_softc;
-extern int ctl_disable;
 
 int cfi_init(void);
 void cfi_shutdown(void) __unused;
@@ -243,10 +242,6 @@ cfi_init(void)
 
 	retval = 0;
 
-	/* If we're disabled, don't initialize */
-	if (ctl_disable != 0)
-		return (0);
-
 	if (sizeof(struct cfi_lun_io) > CTL_PORT_PRIV_SIZE) {
 		printf("%s: size of struct cfi_lun_io %zd > "
 		       "CTL_PORT_PRIV_SIZE %d\n", __func__,

Modified: head/sys/cam/ctl/scsi_ctl.c
==============================================================================
--- head/sys/cam/ctl/scsi_ctl.c	Fri Apr 12 16:03:22 2013	(r249409)
+++ head/sys/cam/ctl/scsi_ctl.c	Fri Apr 12 16:25:03 2013	(r249410)
@@ -244,7 +244,6 @@ MODULE_DEPEND(ctlfe, ctl, 1, 1, 1);
 MODULE_DEPEND(ctlfe, cam, 1, 1, 1);
 
 extern struct ctl_softc *control_softc;
-extern int ctl_disable;
 
 void
 ctlfeshutdown(void)
@@ -257,10 +256,6 @@ ctlfeinit(void)
 {
 	cam_status status;
 
-	/* Don't initialize if we're disabled */
-	if (ctl_disable != 0)
-		return;
-
 	STAILQ_INIT(&ctlfe_softc_list);
 
 	mtx_init(&ctlfe_list_mtx, ctlfe_mtx_desc, NULL, MTX_DEF);

Modified: head/sys/conf/options
==============================================================================
--- head/sys/conf/options	Fri Apr 12 16:03:22 2013	(r249409)
+++ head/sys/conf/options	Fri Apr 12 16:25:03 2013	(r249410)
@@ -332,9 +332,6 @@ SCSI_PT_DEFAULT_TIMEOUT	opt_pt.h
 # Options used only in cam/scsi/scsi_ses.c
 SES_ENABLE_PASSTHROUGH	opt_ses.h
 
-# Options used only in cam/ctl
-CTL_DISABLE		opt_ctl.h
-
 # Options used in dev/sym/ (Symbios SCSI driver).
 SYM_SETUP_LP_PROBE_MAP	opt_sym.h	#-Low Priority Probe Map (bits)
 					# Allows the ncr to take precedence

Modified: head/sys/i386/conf/GENERIC
==============================================================================
--- head/sys/i386/conf/GENERIC	Fri Apr 12 16:03:22 2013	(r249409)
+++ head/sys/i386/conf/GENERIC	Fri Apr 12 16:25:03 2013	(r249410)
@@ -145,10 +145,7 @@ device		sa		# Sequential Access (tape et
 device		cd		# CD
 device		pass		# Passthrough device (direct ATA/SCSI access)
 device		ses		# Enclosure Services (SES and SAF-TE)
-device		ctl		# CAM Target Layer
-options		CTL_DISABLE	# Disable CTL by default to save memory.
-				# Re-enable with kern.cam.ctl.disable=0 in
-				# /boot/loader.conf
+#device		ctl		# CAM Target Layer
 
 # RAID controllers interfaced to the SCSI subsystem
 device		amr		# AMI MegaRAID

Modified: head/sys/i386/conf/PAE
==============================================================================
--- head/sys/i386/conf/PAE	Fri Apr 12 16:03:22 2013	(r249409)
+++ head/sys/i386/conf/PAE	Fri Apr 12 16:25:03 2013	(r249410)
@@ -38,8 +38,6 @@ nodevice	ncv
 nodevice	nsp
 nodevice	stg
 
-nodevice	ctl
-
 nodevice	asr
 nodevice	dpt
 nodevice	mly

Modified: head/sys/ia64/conf/GENERIC
==============================================================================
--- head/sys/ia64/conf/GENERIC	Fri Apr 12 16:03:22 2013	(r249409)
+++ head/sys/ia64/conf/GENERIC	Fri Apr 12 16:25:03 2013	(r249410)
@@ -113,7 +113,7 @@ device		da		# Direct Access (ie disk)
 device		pass		# Passthrough (direct ATA/SCSI access)
 device		sa		# Sequential Access (ie tape)
 device		ses		# Enclosure Services (SES and SAF-TE)
-device		ctl		# CAM Target Layer
+#device		ctl		# CAM Target Layer
 
 # RAID controllers
 device		aac		# Adaptec FSA RAID

Modified: head/sys/modules/ctl/Makefile
==============================================================================
--- head/sys/modules/ctl/Makefile	Fri Apr 12 16:03:22 2013	(r249409)
+++ head/sys/modules/ctl/Makefile	Fri Apr 12 16:25:03 2013	(r249410)
@@ -21,7 +21,6 @@ SRCS+=	bus_if.h
 SRCS+=	device_if.h
 SRCS+=	vnode_if.h
 SRCS+=	opt_cam.h
-SRCS+=	opt_ctl.h
 SRCS+=	opt_kdtrace.h
 
 .include <bsd.kmod.mk>

Modified: head/sys/sparc64/conf/GENERIC
==============================================================================
--- head/sys/sparc64/conf/GENERIC	Fri Apr 12 16:03:22 2013	(r249409)
+++ head/sys/sparc64/conf/GENERIC	Fri Apr 12 16:25:03 2013	(r249410)
@@ -120,10 +120,7 @@ device		sa		# Sequential Access (tape et
 device		cd		# CD
 device		pass		# Passthrough device (direct ATA/SCSI access)
 device		ses		# Enclosure Services (SES and SAF-TE)
-device		ctl		# CAM Target Layer
-options 	CTL_DISABLE	# Disable CTL by default to save memory.
-				# Re-enable with kern.cam.ctl.disable=0 in
-				# /boot/loader.conf
+#device		ctl		# CAM Target Layer
 
 # RAID controllers
 #device		amr		# AMI MegaRAID



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