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
This commit is contained in:
Edward Tomasz Napierala 2013-04-12 16:25:03 +00:00
parent d1a51785b3
commit 8ed9860914
13 changed files with 5 additions and 54 deletions

View File

@ -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

View File

@ -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

View File

@ -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;

View File

@ -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.

View File

@ -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));

View File

@ -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__,

View File

@ -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);

View File

@ -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

View File

@ -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

View File

@ -38,8 +38,6 @@ nodevice ncv
nodevice nsp
nodevice stg
nodevice ctl
nodevice asr
nodevice dpt
nodevice mly

View File

@ -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

View File

@ -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>

View File

@ -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