diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/amd64/conf/GENERIC | 5 | ||||
-rw-r--r-- | sys/cam/ctl/ctl.c | 6 | ||||
-rw-r--r-- | sys/conf/options | 3 | ||||
-rw-r--r-- | sys/i386/conf/GENERIC | 5 |
4 files changed, 17 insertions, 2 deletions
diff --git a/sys/amd64/conf/GENERIC b/sys/amd64/conf/GENERIC index 3988195..577cf4b 100644 --- a/sys/amd64/conf/GENERIC +++ b/sys/amd64/conf/GENERIC @@ -138,7 +138,10 @@ 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 +options CTL_DISABLE # Disable CTL by default to save memory. + # Re-enable with kern.cam.ctl.disable=0 in + # /boot/loader.conf # RAID controllers interfaced to the SCSI subsystem device amr # AMI MegaRAID diff --git a/sys/cam/ctl/ctl.c b/sys/cam/ctl/ctl.c index 768332e..1884c7b 100644 --- a/sys/cam/ctl/ctl.c +++ b/sys/cam/ctl/ctl.c @@ -78,6 +78,8 @@ __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; /* @@ -317,7 +319,11 @@ static int persis_offset; static uint8_t ctl_pause_rtr; static int ctl_is_single; 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, diff --git a/sys/conf/options b/sys/conf/options index 75d0c97..ec9271d 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -329,6 +329,9 @@ 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 3a98ded..d35a780 100644 --- a/sys/i386/conf/GENERIC +++ b/sys/i386/conf/GENERIC @@ -146,7 +146,10 @@ 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 +options CTL_DISABLE # Disable CTL by default to save memory. + # Re-enable with kern.cam.ctl.disable=0 in + # /boot/loader.conf # RAID controllers interfaced to the SCSI subsystem device amr # AMI MegaRAID |