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.
This commit is contained in:
Mike Smith 2002-01-09 03:39:04 +00:00
parent 1e050d0ca5
commit 65c382562e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=89114
5 changed files with 13 additions and 8 deletions

View File

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

View File

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

View File

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

View File

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

View File

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