summaryrefslogtreecommitdiffstats
path: root/sys/scsi
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1996-09-06 23:09:20 +0000
committerphk <phk@FreeBSD.org>1996-09-06 23:09:20 +0000
commitbca885205da7f15208946f0896edc2eda3caff01 (patch)
tree35dad08bf59366e84921fd4aad9718c2f9426a1b /sys/scsi
parent9640e2d9e8f825813ec445d294de60884ad82bc8 (diff)
downloadFreeBSD-src-bca885205da7f15208946f0896edc2eda3caff01.zip
FreeBSD-src-bca885205da7f15208946f0896edc2eda3caff01.tar.gz
Remove devconf, it never grew up to be of any use.
Diffstat (limited to 'sys/scsi')
-rw-r--r--sys/scsi/cd.c27
-rw-r--r--sys/scsi/ch.c32
-rw-r--r--sys/scsi/od.c26
-rw-r--r--sys/scsi/pt.c8
-rw-r--r--sys/scsi/scsi_driver.c7
-rw-r--r--sys/scsi/scsi_driver.h4
-rw-r--r--sys/scsi/scsiconf.c24
-rw-r--r--sys/scsi/sd.c25
-rw-r--r--sys/scsi/st.c32
9 files changed, 11 insertions, 174 deletions
diff --git a/sys/scsi/cd.c b/sys/scsi/cd.c
index 7a71341..d18add7 100644
--- a/sys/scsi/cd.c
+++ b/sys/scsi/cd.c
@@ -14,7 +14,7 @@
*
* Ported to run under 386BSD by Julian Elischer (julian@tfs.com) Sept 1992
*
- * $Id: cd.c,v 1.71 1996/07/14 10:46:46 joerg Exp $
+ * $Id: cd.c,v 1.72 1996/07/23 21:52:18 phk Exp $
*/
#include "opt_bounce.h"
@@ -36,7 +36,6 @@
#include <sys/cdio.h>
#include <sys/errno.h>
#include <sys/disklabel.h>
-#include <sys/devconf.h>
#include <sys/dkstat.h>
#include <sys/kernel.h>
#ifdef DEVFS
@@ -158,33 +157,9 @@ static struct scsi_device cd_switch =
#define CD_START 1
#define CD_EJECT -2
-static int
-cd_externalize(struct kern_devconf *kdc, struct sysctl_req *req)
-{
- return scsi_externalize(SCSI_LINK(&cd_switch, kdc->kdc_unit), req);
-}
-
-static struct kern_devconf kdc_cd_template = {
- 0, 0, 0, /* filled in by dev_attach */
- "cd", 0, MDDC_SCSI,
- cd_externalize, 0, scsi_goaway, SCSI_EXTERNALLEN,
- &kdc_scbus0, /* parent - XXX should be host adapter*/
- 0, /* parentdata */
- DC_UNKNOWN, /* not supported */
-};
-
static inline void
cd_registerdev(int unit)
{
- struct kern_devconf *kdc;
-
- MALLOC(kdc, struct kern_devconf *, sizeof *kdc, M_TEMP, M_NOWAIT);
- if(!kdc) return;
- *kdc = kdc_cd_template;
- kdc->kdc_unit = unit;
- kdc->kdc_description = cd_switch.desc;
- /* XXX should set parentdata */
- dev_attach(kdc);
if(dk_ndrive < DK_NDRIVE) {
sprintf(dk_names[dk_ndrive], "cd%d", unit);
dk_wpms[dk_ndrive] = (150*1024/2);
diff --git a/sys/scsi/ch.c b/sys/scsi/ch.c
index 2957ea6..1a916d7 100644
--- a/sys/scsi/ch.c
+++ b/sys/scsi/ch.c
@@ -2,7 +2,7 @@
* Written by grefen@convex.com (probably moved by now)
* Based on scsi drivers by Julian Elischer (julian@tfs.com)
*
- * $Id: ch.c,v 1.32 1996/03/27 18:50:07 bde Exp $
+ * $Id: ch.c,v 1.33 1996/07/14 10:46:47 joerg Exp $
*/
#include <sys/types.h>
@@ -19,7 +19,6 @@
#include <sys/malloc.h>
#include <sys/conf.h>
#include <sys/kernel.h>
-#include <sys/devconf.h>
#ifdef DEVFS
#include <sys/devfsext.h>
#endif /*DEVFS*/
@@ -112,34 +111,6 @@ static struct scsi_device ch_switch =
#define CH_OPEN 0x01
-static int
-ch_externalize(struct kern_devconf *kdc, struct sysctl_req *req)
-{
- return scsi_externalize(SCSI_LINK(&ch_switch, kdc->kdc_unit), req);
-}
-
-static struct kern_devconf kdc_ch_template = {
- 0, 0, 0, /* filled in by dev_attach */
- "ch", 0, MDDC_SCSI,
- ch_externalize, 0, scsi_goaway, SCSI_EXTERNALLEN,
- &kdc_scbus0, /* parent */
- 0, /* parentdata */
- DC_UNKNOWN, /* not supported */
-};
-
-static inline void
-ch_registerdev(int unit)
-{
- struct kern_devconf *kdc;
-
- MALLOC(kdc, struct kern_devconf *, sizeof *kdc, M_TEMP, M_NOWAIT);
- if(!kdc) return;
- *kdc = kdc_ch_template;
- kdc->kdc_unit = unit;
- kdc->kdc_description = ch_switch.desc;
- dev_attach(kdc);
-}
-
/*
* The routine called by the low level scsi routine when it discovers
* a device suitable for this driver.
@@ -164,7 +135,6 @@ chattach(struct scsi_link *sc_link)
printf("%d slot(s) %d drive(s) %d arm(s) %d i/e-slot(s)",
ch->slots, ch->drives, ch->chms, ch->imexs);
}
- ch_registerdev(unit);
#ifdef DEVFS
ch->c_devfs_token = devfs_add_devswf(&ch_cdevsw, unit << 4, DV_CHR,
diff --git a/sys/scsi/od.c b/sys/scsi/od.c
index 9fefeb5..5265429 100644
--- a/sys/scsi/od.c
+++ b/sys/scsi/od.c
@@ -28,7 +28,7 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: od.c,v 1.20 1996/08/02 06:10:48 peter Exp $
+ * $Id: od.c,v 1.21 1996/08/17 20:50:26 joerg Exp $
*/
/*
@@ -84,7 +84,6 @@
#include <scsi/scsi_disk.h>
#include <scsi/scsiconf.h>
#include <vm/vm.h>
-#include <sys/devconf.h>
#include <sys/dkstat.h>
#include <machine/md_var.h>
@@ -184,32 +183,9 @@ static struct scsi_device od_switch =
od_strategy,
};
-static int
-od_externalize(struct kern_devconf *kdc, struct sysctl_req *req)
-{
- return scsi_externalize(SCSI_LINK(&od_switch, kdc->kdc_unit), req);
-}
-
-static struct kern_devconf kdc_od_template = {
- 0, 0, 0, /* filled in by dev_attach */
- "od", 0, MDDC_SCSI,
- od_externalize, 0, scsi_goaway, SCSI_EXTERNALLEN,
- &kdc_scbus0, /* XXX parent */
- 0, /* parentdata */
- DC_UNKNOWN, /* not supported */
-};
-
static inline void
od_registerdev(int unit)
{
- struct kern_devconf *kdc;
-
- MALLOC(kdc, struct kern_devconf *, sizeof *kdc, M_TEMP, M_NOWAIT);
- if(!kdc) return;
- *kdc = kdc_od_template;
- kdc->kdc_unit = unit;
- kdc->kdc_description = od_switch.desc;
- dev_attach(kdc);
if(dk_ndrive < DK_NDRIVE) {
sprintf(dk_names[dk_ndrive], "od%d", unit);
dk_wpms[dk_ndrive] = (4*1024*1024/2); /* 4MB/sec */
diff --git a/sys/scsi/pt.c b/sys/scsi/pt.c
index 1b715be..07e1db3 100644
--- a/sys/scsi/pt.c
+++ b/sys/scsi/pt.c
@@ -37,13 +37,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pt.c,v 1.16 1996/03/27 20:07:29 bde Exp $
- */
-
-/*
- * XXX dufault@hda.com: We need the "kern devconf" stuff, but I'm not
- * going to add it until it is done in a simple way that provides
- * base behavior in scsi_driver.c
+ * $Id: pt.c,v 1.17 1996/07/14 10:46:48 joerg Exp $
*/
#include "opt_bounce.h"
diff --git a/sys/scsi/scsi_driver.c b/sys/scsi/scsi_driver.c
index 45ed3cb..cf2fec8 100644
--- a/sys/scsi/scsi_driver.c
+++ b/sys/scsi/scsi_driver.c
@@ -35,7 +35,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: scsi_driver.c,v 1.16 1996/06/16 19:54:02 joerg Exp $
+ * $Id: scsi_driver.c,v 1.17 1996/07/14 10:46:50 joerg Exp $
*
*/
@@ -46,7 +46,6 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/buf.h>
-#include <sys/devconf.h>
#include <sys/malloc.h>
#include <sys/fcntl.h>
@@ -59,10 +58,8 @@
: (minor((DEV)) & ~SCSI_CONTROL_MASK)
int
-scsi_goaway(struct kern_devconf *kdc, int force) /* XXX should do a lot more */
+scsi_goaway(int force) /* XXX should do a lot more */
{
- dev_detach(kdc);
- FREE(kdc, M_TEMP);
return 0;
}
diff --git a/sys/scsi/scsi_driver.h b/sys/scsi/scsi_driver.h
index c304cf2..696115b 100644
--- a/sys/scsi/scsi_driver.h
+++ b/sys/scsi/scsi_driver.h
@@ -35,7 +35,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: scsi_driver.h,v 1.5 1995/11/04 13:25:22 bde Exp $
+ * $Id: scsi_driver.h,v 1.6 1996/03/10 07:13:08 gibbs Exp $
*
*/
#ifndef _SCSI__DRIVER_H_
@@ -51,7 +51,7 @@ struct scsi_device;
struct buf;
struct proc;
-int scsi_goaway __P((struct kern_devconf *, int));
+int scsi_goaway __P((int));
int scsi_device_attach __P((struct scsi_link *));
int scsi_open __P((dev_t, int, int, struct proc *, struct scsi_device *));
diff --git a/sys/scsi/scsiconf.c b/sys/scsi/scsiconf.c
index 7da014e..0b0e41c 100644
--- a/sys/scsi/scsiconf.c
+++ b/sys/scsi/scsiconf.c
@@ -16,7 +16,7 @@
*
* New configuration setup: dufault@hda.com
*
- * $Id: scsiconf.c,v 1.60 1996/06/14 11:02:16 asami Exp $
+ * $Id: scsiconf.c,v 1.61 1996/07/12 04:12:05 bde Exp $
*/
#include "opt_scsi.h"
@@ -27,7 +27,6 @@
#include <sys/stat.h>
#include <sys/malloc.h>
#include <sys/sysctl.h>
-#include <sys/devconf.h>
#include <sys/conf.h>
#ifdef PC98
#include <sys/device.h>
@@ -409,25 +408,6 @@ static struct scsi_device probe_switch =
"probe",
};
-/*
- * XXX
- * This is BOGUS.
- * We do this because it was easier than adding the requisite information
- * to the scsi_link structure and modifying everything to use that.
- * Someday, we will do just that, and users will be able to nail down their
- * preferred SCSI ids.
- *
- */
-struct kern_devconf kdc_scbus0 = {
- 0, 0, 0, /* filled in by dev_attach */
- "scbus", 0, MDDC_SCBUS,
- 0, 0, 0, 0, /* no external data */
- 0, /* no parent */
- 0, /* no parentdata */
- DC_BUSY, /* busses are always busy */
- "SCSI subsystem"
-};
-
static int free_bus; /* First bus not wired down */
static struct scsi_device *device_list;
@@ -513,8 +493,6 @@ scsi_init(void)
scbusses = extend_new();
- dev_attach(&kdc_scbus0);
-
/* First call all type initialization functions.
*/
ukinit(); /* We always have the unknown device. */
diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c
index 6db9bc6..822b589 100644
--- a/sys/scsi/sd.c
+++ b/sys/scsi/sd.c
@@ -14,7 +14,7 @@
*
* Ported to run under 386BSD by Julian Elischer (julian@dialix.oz.au) Sept 1992
*
- * $Id: sd.c,v 1.92 1996/08/02 06:10:49 peter Exp $
+ * $Id: sd.c,v 1.93 1996/09/03 10:24:29 asami Exp $
*/
#include "opt_bounce.h"
@@ -27,7 +27,6 @@
#include <sys/systm.h>
#include <sys/ioctl.h>
#include <sys/buf.h>
-#include <sys/devconf.h>
#include <sys/disklabel.h>
#include <sys/diskslice.h>
#include <sys/dkstat.h>
@@ -152,32 +151,10 @@ static struct scsi_device sd_switch =
static struct scsi_xfer sx;
-static int
-sd_externalize(struct kern_devconf *kdc, struct sysctl_req *req)
-{
- return scsi_externalize(SCSI_LINK(&sd_switch, kdc->kdc_unit), req);
-}
-
-static struct kern_devconf kdc_sd_template = {
- 0, 0, 0, /* filled in by dev_attach */
- "sd", 0, MDDC_SCSI,
- sd_externalize, 0, scsi_goaway, SCSI_EXTERNALLEN,
- &kdc_scbus0, /* XXX parent */
- 0, /* parentdata */
- DC_UNKNOWN, /* not supported */
-};
static inline void
sd_registerdev(int unit)
{
- struct kern_devconf *kdc;
-
- MALLOC(kdc, struct kern_devconf *, sizeof *kdc, M_TEMP, M_NOWAIT);
- if(!kdc) return;
- *kdc = kdc_sd_template;
- kdc->kdc_unit = unit;
- kdc->kdc_description = sd_switch.desc;
- dev_attach(kdc);
if(dk_ndrive < DK_NDRIVE) {
sprintf(dk_names[dk_ndrive], "sd%d", unit);
dk_wpms[dk_ndrive] = (8*1024*1024/2);
diff --git a/sys/scsi/st.c b/sys/scsi/st.c
index d7fe9a9..438e0bb3 100644
--- a/sys/scsi/st.c
+++ b/sys/scsi/st.c
@@ -12,7 +12,7 @@
* on the understanding that TFS is not responsible for the correct
* functioning of this software in any circumstances.
*
- * $Id: st.c,v 1.71 1996/07/14 10:46:54 joerg Exp $
+ * $Id: st.c,v 1.72 1996/07/23 21:52:31 phk Exp $
*/
/*
@@ -51,7 +51,6 @@
#include <scsi/scsi_all.h>
#include <scsi/scsi_tape.h>
#include <scsi/scsiconf.h>
-#include <sys/devconf.h>
@@ -218,34 +217,6 @@ static struct scsi_device st_switch =
ST_FIXEDBLOCKS | ST_READONLY | \
ST_FM_WRITTEN | ST_2FM_AT_EOD | ST_PER_ACTION)
-static int
-st_externalize(struct kern_devconf *kdc, struct sysctl_req *req)
-{
- return scsi_externalize(SCSI_LINK(&st_switch, kdc->kdc_unit), req);
-}
-
-static struct kern_devconf kdc_st_template = {
- 0, 0, 0, /* filled in by dev_attach */
- "st", 0, MDDC_SCSI,
- st_externalize, 0, scsi_goaway, SCSI_EXTERNALLEN,
- &kdc_scbus0, /* XXX parent */
- 0, /* parentdata */
- DC_UNKNOWN, /* not supported */
-};
-
-static inline void
-st_registerdev(int unit)
-{
- struct kern_devconf *kdc;
-
- MALLOC(kdc, struct kern_devconf *, sizeof *kdc, M_TEMP, M_NOWAIT);
- if(!kdc) return;
- *kdc = kdc_st_template;
- kdc->kdc_unit = unit;
- kdc->kdc_description = st_switch.desc;
- dev_attach(kdc);
-}
-
/*
* The routine called by the low level scsi routine when it discovers
* a device suitable for this driver
@@ -295,7 +266,6 @@ stattach(struct scsi_link *sc_link)
* Set up the buf queue for this device
*/
st->flags |= ST_INITIALIZED;
- st_registerdev(unit);
#ifdef DEVFS
for(ii=0; ii<4; ii++) {
st->devfs_token.rst_[ii] =
OpenPOWER on IntegriCloud