summaryrefslogtreecommitdiffstats
path: root/sys/cam
diff options
context:
space:
mode:
authormsmith <msmith@FreeBSD.org>2002-01-09 03:39:04 +0000
committermsmith <msmith@FreeBSD.org>2002-01-09 03:39:04 +0000
commit6d5a228d7f9879b6376575687c6e307e43105f72 (patch)
tree2bb9be61e9481ca44a7026f0a28670676ba0d78f /sys/cam
parent5cfc4a9df0b978192e73dd8fd7bedf6b70534448 (diff)
downloadFreeBSD-src-6d5a228d7f9879b6376575687c6e307e43105f72.zip
FreeBSD-src-6d5a228d7f9879b6376575687c6e307e43105f72.tar.gz
Define the kern.cam sysctl in the cam layer, rather than multiply in several
peripheral drivers. Remove Ken's comment to the effect that this needed to be done. Staticise camnet_ih and cambio_ih.
Diffstat (limited to 'sys/cam')
-rw-r--r--sys/cam/cam.c7
-rw-r--r--sys/cam/cam.h4
-rw-r--r--sys/cam/cam_xpt.c4
-rw-r--r--sys/cam/scsi/scsi_cd.c5
-rw-r--r--sys/cam/scsi/scsi_da.c1
5 files changed, 13 insertions, 8 deletions
diff --git a/sys/cam/cam.c b/sys/cam/cam.c
index 3f410bb..d575fd6 100644
--- a/sys/cam/cam.c
+++ b/sys/cam/cam.c
@@ -30,7 +30,10 @@
#include <sys/param.h>
#ifdef _KERNEL
+#include <sys/param.h>
#include <sys/systm.h>
+#include <sys/kernel.h>
+#include <sys/sysctl.h>
#else /* _KERNEL */
#include <stdlib.h>
#include <stdio.h>
@@ -95,6 +98,10 @@ const struct cam_status_entry cam_status_table[] = {
const int num_cam_status_entries =
sizeof(cam_status_table)/sizeof(*cam_status_table);
+#ifdef _KERNEL
+SYSCTL_NODE(_kern, OID_AUTO, cam, CTLFLAG_RD, 0, "CAM Subsystem");
+#endif
+
void
cam_strvis(u_int8_t *dst, const u_int8_t *src, int srclen, int dstlen)
{
diff --git a/sys/cam/cam.h b/sys/cam/cam.h
index 20f660e..0ca870a 100644
--- a/sys/cam/cam.h
+++ b/sys/cam/cam.h
@@ -189,6 +189,10 @@ extern const struct cam_status_entry cam_status_table[];
extern const int num_cam_status_entries;
union ccb;
+#ifdef SYSCTL_DECL /* from sysctl.h */
+SYSCTL_DECL(_kern_cam);
+#endif
+
__BEGIN_DECLS
typedef int (cam_quirkmatch_t)(caddr_t, caddr_t);
diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c
index 3e12dc3..eb3f91c 100644
--- a/sys/cam/cam_xpt.c
+++ b/sys/cam/cam_xpt.c
@@ -641,8 +641,8 @@ u_int32_t cam_debug_delay;
#endif
/* Pointers to software interrupt handlers */
-void *camnet_ih;
-void *cambio_ih;
+static void *camnet_ih;
+static void *cambio_ih;
#if defined(CAM_DEBUG_FLAGS) && !defined(CAMDEBUG)
#error "You must have options CAMDEBUG to use options CAM_DEBUG_FLAGS"
diff --git a/sys/cam/scsi/scsi_cd.c b/sys/cam/scsi/scsi_cd.c
index 09fe6a8..7ac3195 100644
--- a/sys/cam/scsi/scsi_cd.c
+++ b/sys/cam/scsi/scsi_cd.c
@@ -280,11 +280,6 @@ static int num_changers;
static int changer_min_busy_seconds = CHANGER_MIN_BUSY_SECONDS;
static int changer_max_busy_seconds = CHANGER_MAX_BUSY_SECONDS;
-/*
- * XXX KDM this CAM node should be moved if we ever get more CAM sysctl
- * variables.
- */
-SYSCTL_NODE(_kern, OID_AUTO, cam, CTLFLAG_RD, 0, "CAM Subsystem");
SYSCTL_NODE(_kern_cam, OID_AUTO, cd, CTLFLAG_RD, 0, "CAM CDROM driver");
SYSCTL_NODE(_kern_cam_cd, OID_AUTO, changer, CTLFLAG_RD, 0, "CD Changer");
SYSCTL_INT(_kern_cam_cd_changer, OID_AUTO, min_busy_seconds, CTLFLAG_RW,
diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c
index 0d2da4b..fd9ca9e 100644
--- a/sys/cam/scsi/scsi_da.c
+++ b/sys/cam/scsi/scsi_da.c
@@ -390,7 +390,6 @@ static void dashutdown(void *arg, int howto);
static int da_retry_count = DA_DEFAULT_RETRY;
static int da_default_timeout = DA_DEFAULT_TIMEOUT;
-SYSCTL_NODE(_kern, OID_AUTO, cam, CTLFLAG_RD, 0, "CAM Subsystem");
SYSCTL_NODE(_kern_cam, OID_AUTO, da, CTLFLAG_RD, 0,
"CAM Direct Access Disk driver");
SYSCTL_INT(_kern_cam_da, OID_AUTO, retry_count, CTLFLAG_RW,
OpenPOWER on IntegriCloud