diff options
author | trasz <trasz@FreeBSD.org> | 2013-04-12 16:25:03 +0000 |
---|---|---|
committer | trasz <trasz@FreeBSD.org> | 2013-04-12 16:25:03 +0000 |
commit | 80b8b2f7791585982400714f802d5617862e9c68 (patch) | |
tree | 0d3f89904a66a862c8883241e7d39bebcff52fcc | |
parent | 06443169d2a0b4fd8cfe68856c1285347f5e59b0 (diff) | |
download | FreeBSD-src-80b8b2f7791585982400714f802d5617862e9c68.zip FreeBSD-src-80b8b2f7791585982400714f802d5617862e9c68.tar.gz |
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
-rw-r--r-- | sys/amd64/conf/GENERIC | 5 | ||||
-rw-r--r-- | sys/arm/conf/ATMEL | 2 | ||||
-rw-r--r-- | sys/cam/ctl/ctl.c | 14 | ||||
-rw-r--r-- | sys/cam/ctl/ctl_backend.c | 5 | ||||
-rw-r--r-- | sys/cam/ctl/ctl_frontend_cam_sim.c | 5 | ||||
-rw-r--r-- | sys/cam/ctl/ctl_frontend_internal.c | 5 | ||||
-rw-r--r-- | sys/cam/ctl/scsi_ctl.c | 5 | ||||
-rw-r--r-- | sys/conf/options | 3 | ||||
-rw-r--r-- | sys/i386/conf/GENERIC | 5 | ||||
-rw-r--r-- | sys/i386/conf/PAE | 2 | ||||
-rw-r--r-- | sys/ia64/conf/GENERIC | 2 | ||||
-rw-r--r-- | sys/modules/ctl/Makefile | 1 | ||||
-rw-r--r-- | sys/sparc64/conf/GENERIC | 5 |
13 files changed, 5 insertions, 54 deletions
diff --git a/sys/amd64/conf/GENERIC b/sys/amd64/conf/GENERIC index 828e6ea..1043b2b 100644 --- a/sys/amd64/conf/GENERIC +++ b/sys/amd64/conf/GENERIC @@ -137,10 +137,7 @@ device sa # Sequential Access (tape etc) 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 diff --git a/sys/arm/conf/ATMEL b/sys/arm/conf/ATMEL index fc23165..eb3dd7d 100644 --- a/sys/arm/conf/ATMEL +++ b/sys/arm/conf/ATMEL @@ -150,7 +150,7 @@ device sa # Sequential Access (tape etc) 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 diff --git a/sys/cam/ctl/ctl.c b/sys/cam/ctl/ctl.c index cced79d..137dee3 100644 --- a/sys/cam/ctl/ctl.c +++ b/sys/cam/ctl/ctl.c @@ -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; diff --git a/sys/cam/ctl/ctl_backend.c b/sys/cam/ctl/ctl_backend.c index 863e9c7..5234c4a 100644 --- a/sys/cam/ctl/ctl_backend.c +++ b/sys/cam/ctl/ctl_backend.c @@ -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_driver *be) 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. diff --git a/sys/cam/ctl/ctl_frontend_cam_sim.c b/sys/cam/ctl/ctl_frontend_cam_sim.c index 9548332..6a6a487 100644 --- a/sys/cam/ctl/ctl_frontend_cam_sim.c +++ b/sys/cam/ctl/ctl_frontend_cam_sim.c @@ -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)); diff --git a/sys/cam/ctl/ctl_frontend_internal.c b/sys/cam/ctl/ctl_frontend_internal.c index 9b25a70..0c1ec27 100644 --- a/sys/cam/ctl/ctl_frontend_internal.c +++ b/sys/cam/ctl/ctl_frontend_internal.c @@ -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__, diff --git a/sys/cam/ctl/scsi_ctl.c b/sys/cam/ctl/scsi_ctl.c index 30f16f7..f065e3b 100644 --- a/sys/cam/ctl/scsi_ctl.c +++ b/sys/cam/ctl/scsi_ctl.c @@ -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); diff --git a/sys/conf/options b/sys/conf/options index e584e0c..c5bdbb0 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -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 diff --git a/sys/i386/conf/GENERIC b/sys/i386/conf/GENERIC index 5f10405..be606ec 100644 --- a/sys/i386/conf/GENERIC +++ b/sys/i386/conf/GENERIC @@ -145,10 +145,7 @@ device sa # Sequential Access (tape etc) 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 diff --git a/sys/i386/conf/PAE b/sys/i386/conf/PAE index 5600d08..254dc08 100644 --- a/sys/i386/conf/PAE +++ b/sys/i386/conf/PAE @@ -38,8 +38,6 @@ nodevice ncv nodevice nsp nodevice stg -nodevice ctl - nodevice asr nodevice dpt nodevice mly diff --git a/sys/ia64/conf/GENERIC b/sys/ia64/conf/GENERIC index 882a5c7..0407e35 100644 --- a/sys/ia64/conf/GENERIC +++ b/sys/ia64/conf/GENERIC @@ -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 diff --git a/sys/modules/ctl/Makefile b/sys/modules/ctl/Makefile index 0be1e10..5744b7d 100644 --- a/sys/modules/ctl/Makefile +++ b/sys/modules/ctl/Makefile @@ -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> diff --git a/sys/sparc64/conf/GENERIC b/sys/sparc64/conf/GENERIC index 818394e..ad8f429 100644 --- a/sys/sparc64/conf/GENERIC +++ b/sys/sparc64/conf/GENERIC @@ -120,10 +120,7 @@ device sa # Sequential Access (tape etc) 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 |