summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>1996-09-06 23:09:20 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>1996-09-06 23:09:20 +0000
commitbfbb029d8745290a139bf3b15d942717e986fd9f (patch)
tree35dad08bf59366e84921fd4aad9718c2f9426a1b /sys
parentcb3c44d7878864912ded33f7f1c468863ae4b43d (diff)
downloadsrc-test2-bfbb029d8745290a139bf3b15d942717e986fd9f.tar.gz
src-test2-bfbb029d8745290a139bf3b15d942717e986fd9f.zip
Notes
Diffstat (limited to 'sys')
-rw-r--r--sys/amd64/amd64/fpu.c31
-rw-r--r--sys/amd64/amd64/identcpu.c16
-rw-r--r--sys/amd64/amd64/machdep.c10
-rw-r--r--sys/amd64/isa/isa.c55
-rw-r--r--sys/amd64/isa/npx.c31
-rw-r--r--sys/dev/ar/if_ar.c73
-rw-r--r--sys/dev/ar/if_ar_isa.c73
-rw-r--r--sys/dev/ccd/ccd.c3
-rw-r--r--sys/dev/cy/cy.c53
-rw-r--r--sys/dev/cy/cy_isa.c53
-rw-r--r--sys/dev/de/if_de.c18
-rw-r--r--sys/dev/dgb/dgb.c40
-rw-r--r--sys/dev/ed/if_ed.c67
-rw-r--r--sys/dev/eisa/eisaconf.c126
-rw-r--r--sys/dev/eisa/eisaconf.h7
-rw-r--r--sys/dev/ep/if_ep.c47
-rw-r--r--sys/dev/ep/if_ep_eisa.c23
-rw-r--r--sys/dev/fdc/fdc.c113
-rw-r--r--sys/dev/fe/if_fe.c56
-rw-r--r--sys/dev/fxp/if_fxp.c12
-rw-r--r--sys/dev/ie/if_ie.c27
-rw-r--r--sys/dev/lnc/if_lnc.c49
-rw-r--r--sys/dev/mcd/mcd.c31
-rw-r--r--sys/dev/mse/mse.c28
-rw-r--r--sys/dev/pci/pci.c79
-rw-r--r--sys/dev/pci/pcivar.h5
-rw-r--r--sys/dev/rc/rc.c30
-rw-r--r--sys/dev/scd/scd.c30
-rw-r--r--sys/dev/si/si.c35
-rw-r--r--sys/dev/sio/sio.c65
-rw-r--r--sys/dev/sr/if_sr.c69
-rw-r--r--sys/dev/sr/if_sr_isa.c69
-rw-r--r--sys/dev/syscons/syscons.c25
-rw-r--r--sys/geom/geom_ccd.c3
-rw-r--r--sys/gnu/i386/isa/dgb.c40
-rw-r--r--sys/i386/apm/apm.c32
-rw-r--r--sys/i386/bios/apm.c32
-rw-r--r--sys/i386/eisa/3c5x9.c23
-rw-r--r--sys/i386/eisa/aha1742.c18
-rw-r--r--sys/i386/eisa/aic7770.c25
-rw-r--r--sys/i386/eisa/bt74x.c18
-rw-r--r--sys/i386/eisa/eisaconf.c126
-rw-r--r--sys/i386/eisa/eisaconf.h7
-rw-r--r--sys/i386/i386/identcpu.c16
-rw-r--r--sys/i386/i386/machdep.c10
-rw-r--r--sys/i386/isa/aha1542.c29
-rw-r--r--sys/i386/isa/aic6360.c27
-rw-r--r--sys/i386/isa/asc.c25
-rw-r--r--sys/i386/isa/atapi.c7
-rw-r--r--sys/i386/isa/atapi.h5
-rw-r--r--sys/i386/isa/b004.c31
-rw-r--r--sys/i386/isa/bt5xx-445.c30
-rw-r--r--sys/i386/isa/ctx.c29
-rw-r--r--sys/i386/isa/cx.c7
-rw-r--r--sys/i386/isa/cy.c53
-rw-r--r--sys/i386/isa/fd.c113
-rw-r--r--sys/i386/isa/ft.c49
-rw-r--r--sys/i386/isa/if_ar.c73
-rw-r--r--sys/i386/isa/if_cx.c17
-rw-r--r--sys/i386/isa/if_ed.c67
-rw-r--r--sys/i386/isa/if_eg.c30
-rw-r--r--sys/i386/isa/if_el.c29
-rw-r--r--sys/i386/isa/if_ep.c47
-rw-r--r--sys/i386/isa/if_fe.c56
-rw-r--r--sys/i386/isa/if_ie.c27
-rw-r--r--sys/i386/isa/if_ix.c34
-rw-r--r--sys/i386/isa/if_ixreg.h3
-rw-r--r--sys/i386/isa/if_le.c28
-rw-r--r--sys/i386/isa/if_lnc.c49
-rw-r--r--sys/i386/isa/if_sr.c69
-rw-r--r--sys/i386/isa/isa.c55
-rw-r--r--sys/i386/isa/istallion.c3
-rw-r--r--sys/i386/isa/labpc.c44
-rw-r--r--sys/i386/isa/lpt.c30
-rw-r--r--sys/i386/isa/matcd/matcd.c34
-rw-r--r--sys/i386/isa/mcd.c31
-rw-r--r--sys/i386/isa/mse.c28
-rw-r--r--sys/i386/isa/ncr5380.c17
-rw-r--r--sys/i386/isa/npx.c31
-rw-r--r--sys/i386/isa/pcaudio.c26
-rw-r--r--sys/i386/isa/pcvt/pcvt_drv.c57
-rw-r--r--sys/i386/isa/pcvt/pcvt_hdr.h4
-rw-r--r--sys/i386/isa/psm.c27
-rw-r--r--sys/i386/isa/qcam.c41
-rw-r--r--sys/i386/isa/qcamdefs.h1
-rw-r--r--sys/i386/isa/qcamio.c1
-rw-r--r--sys/i386/isa/rc.c30
-rw-r--r--sys/i386/isa/scd.c30
-rw-r--r--sys/i386/isa/seagate.c19
-rw-r--r--sys/i386/isa/si.c35
-rw-r--r--sys/i386/isa/sio.c65
-rw-r--r--sys/i386/isa/spigot.c36
-rw-r--r--sys/i386/isa/stallion.c3
-rw-r--r--sys/i386/isa/syscons.c25
-rw-r--r--sys/i386/isa/ultra14f.c27
-rw-r--r--sys/i386/isa/wcd.c42
-rw-r--r--sys/i386/isa/wd.c97
-rw-r--r--sys/i386/isa/wd7000.c20
-rw-r--r--sys/i386/isa/wt.c29
-rw-r--r--sys/isa/fd.c113
-rw-r--r--sys/isa/sio.c65
-rw-r--r--sys/isa/syscons.c25
-rw-r--r--sys/kern/kern_devconf.c181
-rw-r--r--sys/kern/kern_shutdown.c3
-rw-r--r--sys/pc98/pc98/atapi.h5
-rw-r--r--sys/pccard/pccard.c16
-rw-r--r--sys/pccard/pcic.c39
-rw-r--r--sys/pci/if_de.c18
-rw-r--r--sys/pci/if_fxp.c12
-rw-r--r--sys/pci/if_pdq.c24
-rw-r--r--sys/pci/if_vx.c6
-rw-r--r--sys/pci/meteor.c1
-rw-r--r--sys/pci/ncr.c5
-rw-r--r--sys/pci/pci.c79
-rw-r--r--sys/pci/pcisupport.c3
-rw-r--r--sys/pci/pcivar.h5
-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
125 files changed, 187 insertions, 4219 deletions
diff --git a/sys/amd64/amd64/fpu.c b/sys/amd64/amd64/fpu.c
index ad03e2ac29b6..687ff738a4d0 100644
--- a/sys/amd64/amd64/fpu.c
+++ b/sys/amd64/amd64/fpu.c
@@ -32,7 +32,7 @@
* SUCH DAMAGE.
*
* from: @(#)npx.c 7.2 (Berkeley) 5/12/91
- * $Id: npx.c,v 1.29 1996/01/06 23:10:52 peter Exp $
+ * $Id: npx.c,v 1.30 1996/06/25 20:30:38 bde Exp $
*/
#include "npx.h"
@@ -47,7 +47,6 @@
#include <sys/conf.h>
#include <sys/file.h>
#include <sys/proc.h>
-#include <sys/devconf.h>
#include <sys/ioctl.h>
#include <sys/syslog.h>
#include <sys/signalvar.h>
@@ -158,30 +157,6 @@ _probetrap:
iret
");
-static struct kern_devconf kdc_npx[NNPX] = { {
- 0, 0, 0, /* filled in by dev_attach */
- "npx", 0, { MDDT_ISA, 0 },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0, /* parent */
- 0, /* parentdata */
- DC_UNCONFIGURED, /* state */
- "Floating-point unit",
- DC_CLS_MISC /* class */
-} };
-
-static inline void
-npx_registerdev(struct isa_device *id)
-{
- int unit;
-
- unit = id->id_unit;
- if (unit != 0)
- kdc_npx[unit] = kdc_npx[0];
- kdc_npx[unit].kdc_unit = unit;
- kdc_npx[unit].kdc_isa = id;
- dev_attach(&kdc_npx[unit]);
-}
-
/*
* Probe routine. Initialize cr0 to give correct behaviour for [f]wait
* whether the device exists or not (XXX should be elsewhere). Set flags
@@ -205,7 +180,6 @@ npxprobe(dvp)
* install suitable handlers and run with interrupts enabled so we
* won't need to do so much here.
*/
- npx_registerdev(dvp);
npx_intrno = NRSVIDT + ffs(dvp->id_irq) - 1;
save_eflags = read_eflags();
disable_intr();
@@ -366,9 +340,6 @@ npxattach(dvp)
printf("npx%d: no 387 emulator in kernel!\n", dvp->id_unit);
#endif
npxinit(__INITIAL_NPXCW__);
- if (npx_exists) {
- kdc_npx[dvp->id_unit].kdc_state = DC_BUSY;
- }
return (1); /* XXX unused */
}
diff --git a/sys/amd64/amd64/identcpu.c b/sys/amd64/amd64/identcpu.c
index 4c49f3ee6f81..81a24e7c25cc 100644
--- a/sys/amd64/amd64/identcpu.c
+++ b/sys/amd64/amd64/identcpu.c
@@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: Id: machdep.c,v 1.193 1996/06/18 01:22:04 bde Exp
- * $Id: identcpu.c,v 1.3 1996/08/10 06:35:35 peter Exp $
+ * $Id: identcpu.c,v 1.4 1996/08/10 08:04:24 peter Exp $
*/
#include <sys/param.h>
@@ -43,7 +43,6 @@
#include <sys/sysproto.h>
#include <sys/kernel.h>
#include <sys/sysctl.h>
-#include <sys/devconf.h>
#include <machine/cpu.h>
#include <machine/reg.h>
@@ -51,7 +50,6 @@
#include <machine/clock.h>
#include <machine/specialreg.h>
#include <machine/sysarch.h>
-#include <machine/devconf.h>
#include <machine/md_var.h>
/* XXX - should be in header file */
@@ -69,17 +67,6 @@ SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD, machine, 0, "");
static char cpu_model[128];
SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD, cpu_model, 0, "");
-struct kern_devconf kdc_cpu0 = {
- 0, 0, 0, /* filled in by dev_attach */
- "cpu", 0, { MDDT_CPU },
- 0, 0, 0, CPU_EXTERNALLEN,
- 0, /* CPU has no parent */
- 0, /* no parentdata */
- DC_BUSY, /* the CPU is always busy */
- cpu_model, /* no sense in duplication */
- DC_CLS_CPU /* class */
-};
-
static struct cpu_nameclass i386_cpus[] = {
{ "Intel 80286", CPUCLASS_286 }, /* CPU_286 */
{ "i386SX", CPUCLASS_386 }, /* CPU_386SX */
@@ -273,7 +260,6 @@ identifycpu(void)
default:
break;
}
- dev_attach(&kdc_cpu0);
}
/*
diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c
index 6e771c7468c3..e4186eeaace0 100644
--- a/sys/amd64/amd64/machdep.c
+++ b/sys/amd64/amd64/machdep.c
@@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
- * $Id: machdep.c,v 1.200 1996/09/01 02:16:07 nate Exp $
+ * $Id: machdep.c,v 1.201 1996/09/03 18:50:36 nate Exp $
*/
#include "npx.h"
@@ -64,7 +64,6 @@
#include <sys/sysent.h>
#include <sys/tty.h>
#include <sys/sysctl.h>
-#include <sys/devconf.h>
#include <sys/vmmeter.h>
#ifdef SYSVSHM
@@ -106,7 +105,6 @@
#include <machine/specialreg.h>
#include <machine/sysarch.h>
#include <machine/cons.h>
-#include <machine/devconf.h>
#include <machine/bootinfo.h>
#include <machine/md_var.h>
#ifdef PERFMON
@@ -1535,9 +1533,3 @@ bad:
bp->b_flags |= B_ERROR;
return(-1);
}
-
-int
-disk_externalize(int drive, struct sysctl_req *req)
-{
- return SYSCTL_OUT(req, &drive, sizeof drive);
-}
diff --git a/sys/amd64/isa/isa.c b/sys/amd64/isa/isa.c
index e944509daf7b..f03e18b13f2f 100644
--- a/sys/amd64/isa/isa.c
+++ b/sys/amd64/isa/isa.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)isa.c 7.2 (Berkeley) 5/13/91
- * $Id: isa.c,v 1.70 1996/05/02 10:43:09 phk Exp $
+ * $Id: isa.c,v 1.71 1996/06/25 20:30:36 bde Exp $
*/
/*
@@ -64,7 +64,6 @@
#include <i386/isa/isa.h>
#include <i386/isa/icu.h>
#include <i386/isa/ic/i8237.h>
-#include <sys/devconf.h>
#include "vector.h"
/*
@@ -89,19 +88,6 @@ u_int intr_mask[ICU_LEN];
u_int* intr_mptr[ICU_LEN];
int intr_unit[ICU_LEN];
-extern struct kern_devconf kdc_cpu0;
-
-struct kern_devconf kdc_isa0 = {
- 0, 0, 0, /* filled in by dev_attach */
- "isa", 0, { MDDT_BUS, 0 },
- 0, 0, 0, BUS_EXTERNALLEN,
- &kdc_cpu0, /* parent is the CPU */
- 0, /* no parentdata */
- DC_BUSY, /* busses are always busy */
- "ISA bus",
- DC_CLS_BUS /* class */
-};
-
static inthand_t *fastintr[ICU_LEN] = {
&IDTVEC(fastintr0), &IDTVEC(fastintr1),
&IDTVEC(fastintr2), &IDTVEC(fastintr3),
@@ -269,8 +255,6 @@ void
isa_configure() {
struct isa_device *dvp;
- dev_attach(&kdc_isa0);
-
splhigh();
printf("Probing for devices on the ISA bus:\n");
/* First probe all the sensitive probes */
@@ -487,43 +471,6 @@ config_isadev_c(isdp, mp, reconfig)
}
/*
- * Provide ISA-specific device information to user programs using the
- * hw.devconf interface.
- */
-int
-isa_externalize(struct isa_device *id, struct sysctl_req *req)
-{
- return (SYSCTL_OUT(req, id, sizeof *id));
-}
-
-/*
- * This is used to forcibly reconfigure an ISA device. It currently just
- * returns an error 'cos you can't do that yet. It is here to demonstrate
- * what the `internalize' routine is supposed to do.
- */
-int
-isa_internalize(struct isa_device *id, struct sysctl_req *req)
-{
- struct isa_device myid;
- int rv;
-
- rv = SYSCTL_IN(req, &myid, sizeof *id);
- if(rv)
- return rv;
-
- rv = EOPNOTSUPP;
- /* code would go here to validate the configuration request */
- /* code would go here to actually perform the reconfiguration */
- return rv;
-}
-
-int
-isa_generic_externalize(struct kern_devconf *kdc, struct sysctl_req *req)
-{
- return isa_externalize(kdc->kdc_isa, req);
-}
-
-/*
* Fill in default interrupt table (in case of spuruious interrupt
* during configuration of kernel, setup interrupt control unit
*/
diff --git a/sys/amd64/isa/npx.c b/sys/amd64/isa/npx.c
index ad03e2ac29b6..687ff738a4d0 100644
--- a/sys/amd64/isa/npx.c
+++ b/sys/amd64/isa/npx.c
@@ -32,7 +32,7 @@
* SUCH DAMAGE.
*
* from: @(#)npx.c 7.2 (Berkeley) 5/12/91
- * $Id: npx.c,v 1.29 1996/01/06 23:10:52 peter Exp $
+ * $Id: npx.c,v 1.30 1996/06/25 20:30:38 bde Exp $
*/
#include "npx.h"
@@ -47,7 +47,6 @@
#include <sys/conf.h>
#include <sys/file.h>
#include <sys/proc.h>
-#include <sys/devconf.h>
#include <sys/ioctl.h>
#include <sys/syslog.h>
#include <sys/signalvar.h>
@@ -158,30 +157,6 @@ _probetrap:
iret
");
-static struct kern_devconf kdc_npx[NNPX] = { {
- 0, 0, 0, /* filled in by dev_attach */
- "npx", 0, { MDDT_ISA, 0 },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0, /* parent */
- 0, /* parentdata */
- DC_UNCONFIGURED, /* state */
- "Floating-point unit",
- DC_CLS_MISC /* class */
-} };
-
-static inline void
-npx_registerdev(struct isa_device *id)
-{
- int unit;
-
- unit = id->id_unit;
- if (unit != 0)
- kdc_npx[unit] = kdc_npx[0];
- kdc_npx[unit].kdc_unit = unit;
- kdc_npx[unit].kdc_isa = id;
- dev_attach(&kdc_npx[unit]);
-}
-
/*
* Probe routine. Initialize cr0 to give correct behaviour for [f]wait
* whether the device exists or not (XXX should be elsewhere). Set flags
@@ -205,7 +180,6 @@ npxprobe(dvp)
* install suitable handlers and run with interrupts enabled so we
* won't need to do so much here.
*/
- npx_registerdev(dvp);
npx_intrno = NRSVIDT + ffs(dvp->id_irq) - 1;
save_eflags = read_eflags();
disable_intr();
@@ -366,9 +340,6 @@ npxattach(dvp)
printf("npx%d: no 387 emulator in kernel!\n", dvp->id_unit);
#endif
npxinit(__INITIAL_NPXCW__);
- if (npx_exists) {
- kdc_npx[dvp->id_unit].kdc_state = DC_BUSY;
- }
return (1); /* XXX unused */
}
diff --git a/sys/dev/ar/if_ar.c b/sys/dev/ar/if_ar.c
index 7758bcb8e5d4..c7d678aac3d4 100644
--- a/sys/dev/ar/if_ar.c
+++ b/sys/dev/ar/if_ar.c
@@ -28,7 +28,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: if_ar.c,v 1.8 1996/04/12 19:57:44 jhay Exp $
+ * $Id: if_ar.c,v 1.9 1996/06/25 20:29:56 bde Exp $
*/
/*
@@ -71,7 +71,6 @@
#include <net/bpfdesc.h>
#endif
-#include <sys/devconf.h>
#include <machine/clock.h>
#include <machine/md_var.h>
@@ -116,7 +115,6 @@ static struct ar_hardc {
sca_regs *sca;
- struct kern_devconf kdc;
}ar_hardc[NAR];
struct ar_softc {
@@ -148,7 +146,6 @@ struct ar_softc {
int scano;
int scachan;
- struct kern_devconf kdc;
};
static int arprobe(struct isa_device *id);
@@ -181,28 +178,6 @@ static int irqtable[16] = {
struct isa_driver ardriver = {arprobe, arattach, "arc"};
-static struct kern_devconf kdc_ar_template = {
- 0, 0, 0,
- "ar", 0, { MDDT_ISA, 0, "net" },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0,
- 0,
- DC_UNCONFIGURED,
- "Arnet SYNC/570i Port",
- DC_CLS_NETIF
-};
-
-static struct kern_devconf kdc_arc_template = {
- 0, 0, 0,
- "arc", 0, { MDDT_ISA, 0, "net" },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0,
- 0,
- DC_UNCONFIGURED,
- "Arnet SYNC/570i Adapter",
- DC_CLS_NETIF
-};
-
static void ar_xmit(struct ar_softc *sc);
static void arstart(struct ifnet *ifp);
static int arioctl(struct ifnet *ifp, int cmd, caddr_t data);
@@ -223,33 +198,6 @@ static void ar_dmac_intr(struct ar_hardc *hc, int scano, u_char isr);
static void ar_msci_intr(struct ar_hardc *hc, int scano, u_char isr);
static void ar_timer_intr(struct ar_hardc *hc, int scano, u_char isr);
-static inline void
-ar_registerdev(int ctlr, int unit)
-{
- struct ar_softc *sc;
-
- sc = &ar_hardc[ctlr].sc[unit];
- sc->kdc = kdc_ar_template;
-
- sc->kdc.kdc_unit = ar_hardc[ctlr].startunit + unit;
- sc->kdc.kdc_parentdata = &ar_hardc[ctlr].kdc;
- dev_attach(&sc->kdc);
-}
-
-static inline void
-arc_registerdev(struct isa_device *dvp)
-{
- int unit = dvp->id_unit;
- struct ar_hardc *hc = &ar_hardc[dvp->id_unit];
-
- hc->kdc = kdc_arc_template;
-
- hc->kdc.kdc_unit = unit;
- hc->kdc.kdc_parentdata = dvp;
- dev_attach(&hc->kdc);
-}
-
-
/*
* Register the Adapter.
* Probe to see if it is there.
@@ -265,7 +213,6 @@ arprobe(struct isa_device *id)
/*
* Register the card.
*/
- arc_registerdev(id);
/*
* Now see if the card is realy there.
@@ -317,15 +264,6 @@ arprobe(struct isa_device *id)
break;
}
- switch(hc->numports) {
- case 2:
- hc->kdc.kdc_description = "Arnet SYNC/570i 2 Port Adapter";
- break;
- case 4:
- hc->kdc.kdc_description = "Arnet SYNC/570i 4 Port Adapter";
- break;
- }
-
if(id->id_unit == 0)
hc->startunit = 0;
else
@@ -375,8 +313,6 @@ arattach(struct isa_device *id)
hc->revision,
iface);
- hc->kdc.kdc_state = DC_BUSY;
-
arc_init(id);
sc = hc->sc;
@@ -394,8 +330,6 @@ arattach(struct isa_device *id)
sc->scano = unit / NCHAN;
sc->scachan = unit%NCHAN;
- ar_registerdev(id->id_unit, unit);
-
ar_init_rx_dmac(sc);
ar_init_tx_dmac(sc);
ar_init_msci(sc);
@@ -413,8 +347,6 @@ arattach(struct isa_device *id)
sc->ifsppp.pp_flags = PP_KEEPALIVE;
- sc->kdc.kdc_state = DC_IDLE;
-
printf("ar%d: Adapter %d, port %d.\n",
sc->unit,
hc->cunit,
@@ -759,7 +691,6 @@ ar_up(struct ar_softc *sc)
TRC(printf("ar%d: sca %p, msci %p, ch %d\n",
sc->unit, sca, msci, sc->scachan));
- sc->kdc.kdc_state = DC_BUSY;
/*
* Enable transmitter and receiver.
@@ -802,8 +733,6 @@ ar_down(struct ar_softc *sc)
sca_regs *sca = sc->hc->sca;
msci_channel *msci = &sca->msci[sc->scachan];
- sc->kdc.kdc_state = DC_IDLE;
-
/*
* Disable transmitter and receiver.
* Lower DTR and RTS.
diff --git a/sys/dev/ar/if_ar_isa.c b/sys/dev/ar/if_ar_isa.c
index 7758bcb8e5d4..c7d678aac3d4 100644
--- a/sys/dev/ar/if_ar_isa.c
+++ b/sys/dev/ar/if_ar_isa.c
@@ -28,7 +28,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: if_ar.c,v 1.8 1996/04/12 19:57:44 jhay Exp $
+ * $Id: if_ar.c,v 1.9 1996/06/25 20:29:56 bde Exp $
*/
/*
@@ -71,7 +71,6 @@
#include <net/bpfdesc.h>
#endif
-#include <sys/devconf.h>
#include <machine/clock.h>
#include <machine/md_var.h>
@@ -116,7 +115,6 @@ static struct ar_hardc {
sca_regs *sca;
- struct kern_devconf kdc;
}ar_hardc[NAR];
struct ar_softc {
@@ -148,7 +146,6 @@ struct ar_softc {
int scano;
int scachan;
- struct kern_devconf kdc;
};
static int arprobe(struct isa_device *id);
@@ -181,28 +178,6 @@ static int irqtable[16] = {
struct isa_driver ardriver = {arprobe, arattach, "arc"};
-static struct kern_devconf kdc_ar_template = {
- 0, 0, 0,
- "ar", 0, { MDDT_ISA, 0, "net" },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0,
- 0,
- DC_UNCONFIGURED,
- "Arnet SYNC/570i Port",
- DC_CLS_NETIF
-};
-
-static struct kern_devconf kdc_arc_template = {
- 0, 0, 0,
- "arc", 0, { MDDT_ISA, 0, "net" },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0,
- 0,
- DC_UNCONFIGURED,
- "Arnet SYNC/570i Adapter",
- DC_CLS_NETIF
-};
-
static void ar_xmit(struct ar_softc *sc);
static void arstart(struct ifnet *ifp);
static int arioctl(struct ifnet *ifp, int cmd, caddr_t data);
@@ -223,33 +198,6 @@ static void ar_dmac_intr(struct ar_hardc *hc, int scano, u_char isr);
static void ar_msci_intr(struct ar_hardc *hc, int scano, u_char isr);
static void ar_timer_intr(struct ar_hardc *hc, int scano, u_char isr);
-static inline void
-ar_registerdev(int ctlr, int unit)
-{
- struct ar_softc *sc;
-
- sc = &ar_hardc[ctlr].sc[unit];
- sc->kdc = kdc_ar_template;
-
- sc->kdc.kdc_unit = ar_hardc[ctlr].startunit + unit;
- sc->kdc.kdc_parentdata = &ar_hardc[ctlr].kdc;
- dev_attach(&sc->kdc);
-}
-
-static inline void
-arc_registerdev(struct isa_device *dvp)
-{
- int unit = dvp->id_unit;
- struct ar_hardc *hc = &ar_hardc[dvp->id_unit];
-
- hc->kdc = kdc_arc_template;
-
- hc->kdc.kdc_unit = unit;
- hc->kdc.kdc_parentdata = dvp;
- dev_attach(&hc->kdc);
-}
-
-
/*
* Register the Adapter.
* Probe to see if it is there.
@@ -265,7 +213,6 @@ arprobe(struct isa_device *id)
/*
* Register the card.
*/
- arc_registerdev(id);
/*
* Now see if the card is realy there.
@@ -317,15 +264,6 @@ arprobe(struct isa_device *id)
break;
}
- switch(hc->numports) {
- case 2:
- hc->kdc.kdc_description = "Arnet SYNC/570i 2 Port Adapter";
- break;
- case 4:
- hc->kdc.kdc_description = "Arnet SYNC/570i 4 Port Adapter";
- break;
- }
-
if(id->id_unit == 0)
hc->startunit = 0;
else
@@ -375,8 +313,6 @@ arattach(struct isa_device *id)
hc->revision,
iface);
- hc->kdc.kdc_state = DC_BUSY;
-
arc_init(id);
sc = hc->sc;
@@ -394,8 +330,6 @@ arattach(struct isa_device *id)
sc->scano = unit / NCHAN;
sc->scachan = unit%NCHAN;
- ar_registerdev(id->id_unit, unit);
-
ar_init_rx_dmac(sc);
ar_init_tx_dmac(sc);
ar_init_msci(sc);
@@ -413,8 +347,6 @@ arattach(struct isa_device *id)
sc->ifsppp.pp_flags = PP_KEEPALIVE;
- sc->kdc.kdc_state = DC_IDLE;
-
printf("ar%d: Adapter %d, port %d.\n",
sc->unit,
hc->cunit,
@@ -759,7 +691,6 @@ ar_up(struct ar_softc *sc)
TRC(printf("ar%d: sca %p, msci %p, ch %d\n",
sc->unit, sca, msci, sc->scachan));
- sc->kdc.kdc_state = DC_BUSY;
/*
* Enable transmitter and receiver.
@@ -802,8 +733,6 @@ ar_down(struct ar_softc *sc)
sca_regs *sca = sc->hc->sca;
msci_channel *msci = &sca->msci[sc->scachan];
- sc->kdc.kdc_state = DC_IDLE;
-
/*
* Disable transmitter and receiver.
* Lower DTR and RTS.
diff --git a/sys/dev/ccd/ccd.c b/sys/dev/ccd/ccd.c
index ce52aa5563ae..86de9c2ff671 100644
--- a/sys/dev/ccd/ccd.c
+++ b/sys/dev/ccd/ccd.c
@@ -1,4 +1,4 @@
-/* $Id: ccd.c,v 1.15 1996/07/23 21:51:13 phk Exp $ */
+/* $Id: ccd.c,v 1.16 1996/07/24 23:45:24 asami Exp $ */
/* $NetBSD: ccd.c,v 1.22 1995/12/08 19:13:26 thorpej Exp $ */
@@ -107,7 +107,6 @@
#include <sys/ioctl.h>
#include <sys/disklabel.h>
#include <ufs/ffs/fs.h>
-#include <sys/devconf.h>
#include <sys/device.h>
#undef KERNEL /* XXX */
#include <sys/disk.h>
diff --git a/sys/dev/cy/cy.c b/sys/dev/cy/cy.c
index 2f44c29dd654..4cb47ccb1d70 100644
--- a/sys/dev/cy/cy.c
+++ b/sys/dev/cy/cy.c
@@ -27,7 +27,7 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: cy.c,v 1.33 1996/06/12 05:03:36 gpalmer Exp $
+ * $Id: cy.c,v 1.34 1996/07/30 19:50:37 bde Exp $
*/
#include "cy.h"
@@ -37,8 +37,6 @@
* Implement BREAK.
* Fix overflows when closing line.
* Atomic COR change.
- * Don't report individual ports in devconf; busy flag for board should be
- * union of the current individual busy flags.
* Consoles.
*/
@@ -83,7 +81,6 @@
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/syslog.h>
-#include <sys/devconf.h>
#ifdef DEVFS
#include <sys/devfsext.h>
#endif
@@ -119,7 +116,6 @@
#define comspeed cyspeed
#define comstart cystart
#define comwakeup cywakeup
-#define kdc_sio kdc_cy
#define nsio_tty ncy_tty
#define p_com_addr p_cy_addr
#define sioattach cyattach
@@ -134,7 +130,6 @@
#define siopoll cypoll
#define sioprobe cyprobe
#define sioread cyread
-#define sioregisterdev cyregisterdev
#define siosettimeout cysettimeout
#define siostop cystop
#define siowrite cywrite
@@ -298,8 +293,6 @@ struct com_s {
u_char cor[3]; /* CD1400 COR1-3 shadows */
u_char intr_enable; /* CD1400 SRER shadow */
- struct kern_devconf kdc;
-
/*
* Ping-pong input buffers. The extra factor of 2 in the sizes is
* to allow for an error byte for each input byte.
@@ -347,7 +340,6 @@ static void siointr1 __P((struct com_s *com));
static int commctl __P((struct com_s *com, int bits, int how));
static int comparam __P((struct tty *tp, struct termios *t));
static int sioprobe __P((struct isa_device *dev));
-static void sioregisterdev __P((struct isa_device *id));
static void siosettimeout __P((void));
static int comspeed __P((speed_t speed, int *prescaler_io));
static void comstart __P((struct tty *tp));
@@ -410,31 +402,6 @@ static int cy_nr_cd1400s[NCY];
#undef RxFifoThreshold
static int volatile RxFifoThreshold = (CD1400_RX_FIFO_SIZE / 2);
-static struct kern_devconf kdc_sio[NCY] = { {
- 0, 0, 0, /* filled in by dev_attach */
- "cyc", 0, { MDDT_ISA, 0, "tty" },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0, /* parent */
- 0, /* parentdata */
- DC_UNCONFIGURED, /* state */
- "Cyclades multiport board",
- DC_CLS_MISC /* just an ordinary device */
-} };
-
-static void
-sioregisterdev(id)
- struct isa_device *id;
-{
- int unit;
-
- unit = id->id_unit;
- if (unit != 0)
- kdc_sio[unit] = kdc_sio[0];
- kdc_sio[unit].kdc_unit = unit;
- kdc_sio[unit].kdc_isa = id;
- dev_attach(&kdc_sio[unit]);
-}
-
static int
sioprobe(dev)
struct isa_device *dev;
@@ -449,7 +416,6 @@ sioprobe(dev)
if ((u_int)unit >= NCY)
return (0);
cy_nr_cd1400s[unit] = 0;
- sioregisterdev(dev);
/* Cyclom-16Y hardware reset (Cyclom-8Ys don't care) */
cy_inb(iobase, CY16_RESET); /* XXX? */
@@ -568,17 +534,6 @@ sioattach(isdp)
com->it_in.c_ispeed = com->it_in.c_ospeed = comdefaultrate;
com->it_out = com->it_in;
- com->kdc = kdc_sio[0];
- com->kdc.kdc_name = driver_name;
- com->kdc.kdc_unit = unit;
- com->kdc.kdc_isa = isdp;
- com->kdc.kdc_parent = &kdc_sio[isdp->id_unit];
- com->kdc.kdc_state = DC_IDLE;
- com->kdc.kdc_description =
- "Serial port: Cirrus Logic CD1400";
- com->kdc.kdc_class = DC_CLS_SERIAL;
- dev_attach(&com->kdc);
-
s = spltty();
com_addr(unit) = com;
splx(s);
@@ -607,7 +562,6 @@ sioattach(isdp)
#endif
}
}
- kdc_sio[isdp->id_unit].kdc_state = DC_BUSY; /* XXX */
/* ensure an edge for the next interrupt */
cy_outb(cy_iobase, CY_CLEAR_INTR, 0);
@@ -652,7 +606,6 @@ open_top:
if (error != 0)
goto out;
}
- com->kdc.kdc_state = DC_BUSY;
if (tp->t_state & TS_ISOPEN) {
/*
* The device is open, so everything has been initialized.
@@ -917,8 +870,6 @@ comhardclose(com)
com->active_out = FALSE;
wakeup(&com->active_out);
wakeup(TSA_CARR_ON(tp)); /* restart any wopeners */
- if (!(com->state & CS_DTR_OFF) && unit != comconsole)
- com->kdc.kdc_state = DC_IDLE;
splx(s);
}
@@ -980,8 +931,6 @@ siodtrwakeup(chan)
com = (struct com_s *)chan;
com->state &= ~CS_DTR_OFF;
- if (com->unit != comconsole)
- com->kdc.kdc_state = DC_IDLE;
wakeup(&com->dtr_wait);
}
diff --git a/sys/dev/cy/cy_isa.c b/sys/dev/cy/cy_isa.c
index 2f44c29dd654..4cb47ccb1d70 100644
--- a/sys/dev/cy/cy_isa.c
+++ b/sys/dev/cy/cy_isa.c
@@ -27,7 +27,7 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: cy.c,v 1.33 1996/06/12 05:03:36 gpalmer Exp $
+ * $Id: cy.c,v 1.34 1996/07/30 19:50:37 bde Exp $
*/
#include "cy.h"
@@ -37,8 +37,6 @@
* Implement BREAK.
* Fix overflows when closing line.
* Atomic COR change.
- * Don't report individual ports in devconf; busy flag for board should be
- * union of the current individual busy flags.
* Consoles.
*/
@@ -83,7 +81,6 @@
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/syslog.h>
-#include <sys/devconf.h>
#ifdef DEVFS
#include <sys/devfsext.h>
#endif
@@ -119,7 +116,6 @@
#define comspeed cyspeed
#define comstart cystart
#define comwakeup cywakeup
-#define kdc_sio kdc_cy
#define nsio_tty ncy_tty
#define p_com_addr p_cy_addr
#define sioattach cyattach
@@ -134,7 +130,6 @@
#define siopoll cypoll
#define sioprobe cyprobe
#define sioread cyread
-#define sioregisterdev cyregisterdev
#define siosettimeout cysettimeout
#define siostop cystop
#define siowrite cywrite
@@ -298,8 +293,6 @@ struct com_s {
u_char cor[3]; /* CD1400 COR1-3 shadows */
u_char intr_enable; /* CD1400 SRER shadow */
- struct kern_devconf kdc;
-
/*
* Ping-pong input buffers. The extra factor of 2 in the sizes is
* to allow for an error byte for each input byte.
@@ -347,7 +340,6 @@ static void siointr1 __P((struct com_s *com));
static int commctl __P((struct com_s *com, int bits, int how));
static int comparam __P((struct tty *tp, struct termios *t));
static int sioprobe __P((struct isa_device *dev));
-static void sioregisterdev __P((struct isa_device *id));
static void siosettimeout __P((void));
static int comspeed __P((speed_t speed, int *prescaler_io));
static void comstart __P((struct tty *tp));
@@ -410,31 +402,6 @@ static int cy_nr_cd1400s[NCY];
#undef RxFifoThreshold
static int volatile RxFifoThreshold = (CD1400_RX_FIFO_SIZE / 2);
-static struct kern_devconf kdc_sio[NCY] = { {
- 0, 0, 0, /* filled in by dev_attach */
- "cyc", 0, { MDDT_ISA, 0, "tty" },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0, /* parent */
- 0, /* parentdata */
- DC_UNCONFIGURED, /* state */
- "Cyclades multiport board",
- DC_CLS_MISC /* just an ordinary device */
-} };
-
-static void
-sioregisterdev(id)
- struct isa_device *id;
-{
- int unit;
-
- unit = id->id_unit;
- if (unit != 0)
- kdc_sio[unit] = kdc_sio[0];
- kdc_sio[unit].kdc_unit = unit;
- kdc_sio[unit].kdc_isa = id;
- dev_attach(&kdc_sio[unit]);
-}
-
static int
sioprobe(dev)
struct isa_device *dev;
@@ -449,7 +416,6 @@ sioprobe(dev)
if ((u_int)unit >= NCY)
return (0);
cy_nr_cd1400s[unit] = 0;
- sioregisterdev(dev);
/* Cyclom-16Y hardware reset (Cyclom-8Ys don't care) */
cy_inb(iobase, CY16_RESET); /* XXX? */
@@ -568,17 +534,6 @@ sioattach(isdp)
com->it_in.c_ispeed = com->it_in.c_ospeed = comdefaultrate;
com->it_out = com->it_in;
- com->kdc = kdc_sio[0];
- com->kdc.kdc_name = driver_name;
- com->kdc.kdc_unit = unit;
- com->kdc.kdc_isa = isdp;
- com->kdc.kdc_parent = &kdc_sio[isdp->id_unit];
- com->kdc.kdc_state = DC_IDLE;
- com->kdc.kdc_description =
- "Serial port: Cirrus Logic CD1400";
- com->kdc.kdc_class = DC_CLS_SERIAL;
- dev_attach(&com->kdc);
-
s = spltty();
com_addr(unit) = com;
splx(s);
@@ -607,7 +562,6 @@ sioattach(isdp)
#endif
}
}
- kdc_sio[isdp->id_unit].kdc_state = DC_BUSY; /* XXX */
/* ensure an edge for the next interrupt */
cy_outb(cy_iobase, CY_CLEAR_INTR, 0);
@@ -652,7 +606,6 @@ open_top:
if (error != 0)
goto out;
}
- com->kdc.kdc_state = DC_BUSY;
if (tp->t_state & TS_ISOPEN) {
/*
* The device is open, so everything has been initialized.
@@ -917,8 +870,6 @@ comhardclose(com)
com->active_out = FALSE;
wakeup(&com->active_out);
wakeup(TSA_CARR_ON(tp)); /* restart any wopeners */
- if (!(com->state & CS_DTR_OFF) && unit != comconsole)
- com->kdc.kdc_state = DC_IDLE;
splx(s);
}
@@ -980,8 +931,6 @@ siodtrwakeup(chan)
com = (struct com_s *)chan;
com->state &= ~CS_DTR_OFF;
- if (com->unit != comconsole)
- com->kdc.kdc_state = DC_IDLE;
wakeup(&com->dtr_wait);
}
diff --git a/sys/dev/de/if_de.c b/sys/dev/de/if_de.c
index 3078142fd84c..32c3e6a8b8de 100644
--- a/sys/dev/de/if_de.c
+++ b/sys/dev/de/if_de.c
@@ -21,7 +21,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: if_de.c,v 1.48 1996/06/14 05:25:32 davidg Exp $
+ * $Id: if_de.c,v 1.49 1996/08/06 21:09:25 phk Exp $
*
*/
@@ -46,7 +46,6 @@
#include <sys/kernel.h>
#include <sys/proc.h> /* only for declaration of wakeup() used by vm.h */
#if defined(__FreeBSD__)
-#include <sys/devconf.h>
#include <machine/clock.h>
#elif defined(__bsdi__) || defined(__NetBSD__)
#include <sys/device.h>
@@ -3712,17 +3711,14 @@ static const int tulip_eisa_irqs[4] = { IRQ5, IRQ9, IRQ10, IRQ11 };
static int
tulip_pci_shutdown(
- struct kern_devconf * const kdc,
+ int unit,
int force)
{
- if (kdc->kdc_unit < tulip_count) {
- tulip_softc_t * const sc = TULIP_UNIT_TO_SOFTC(kdc->kdc_unit);
- TULIP_CSR_WRITE(sc, csr_busmode, TULIP_BUSMODE_SWRESET);
- DELAY(10); /* Wait 10 microseconds (actually 50 PCI cycles but at
- 33MHz that comes to two microseconds but wait a
- bit longer anyways) */
- }
- (void) dev_detach(kdc);
+ tulip_softc_t * const sc = TULIP_UNIT_TO_SOFTC(unit);
+ TULIP_CSR_WRITE(sc, csr_busmode, TULIP_BUSMODE_SWRESET);
+ DELAY(10); /* Wait 10 microseconds (actually 50 PCI cycles but at
+ 33MHz that comes to two microseconds but wait a
+ bit longer anyways) */
return 0;
}
diff --git a/sys/dev/dgb/dgb.c b/sys/dev/dgb/dgb.c
index 8e8f2f30ffce..18e69c36bb0b 100644
--- a/sys/dev/dgb/dgb.c
+++ b/sys/dev/dgb/dgb.c
@@ -1,5 +1,5 @@
/*-
- * dgb.c $Id: dgb.c,v 1.18 1996/06/12 04:59:14 gpalmer Exp $
+ * dgb.c $Id: dgb.c,v 1.19 1996/06/18 01:21:40 bde Exp $
*
* Digiboard driver.
*
@@ -40,7 +40,6 @@
#include <sys/sysctl.h>
#include <sys/malloc.h>
#include <sys/syslog.h>
-#include <sys/devconf.h>
#ifdef DEVFS
#include <sys/devfsext.h>
#endif /*DEVFS*/
@@ -175,7 +174,6 @@ static void dgbpoll __P((void *unit_c));
static int dgbattach __P((struct isa_device *dev));
static int dgbprobe __P((struct isa_device *dev));
-static void dgbregisterdev __P((struct isa_device *id));
static void fepcmd(struct dgb_p *port, int cmd, int op1, int op2,
int ncmds, int bytecmd);
@@ -400,35 +398,6 @@ dgbprobe(dev)
return 4; /* we need I/O space of 4 ports */
}
-static struct kern_devconf kdc_dgb[NDGB];
-static struct kern_devconf kdc_dgb_init = {
- 0, 0, 0, /* filled in by dev_attach */
- "dgb", 0, { MDDT_ISA, 0, "tty" },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0, /* parent */
- 0, /* parentdata */
- DC_UNCONFIGURED,
- "DigiBoard multiport card",
- DC_CLS_SERIAL,
-};
-
-static void
-dgbregisterdev(id)
- struct isa_device *id;
-{
- int unit;
-
- unit = id->id_unit;
- kdc_dgb[unit] = kdc_dgb_init;
- kdc_dgb[unit].kdc_unit = unit;
- kdc_dgb[unit].kdc_isa = id;
-
- /* no ports are open yet */
- kdc_dgb[unit].kdc_state = DC_IDLE;
- dev_attach(&kdc_dgb[unit]);
-}
-
-
static int
dgbattach(dev)
struct isa_device *dev;
@@ -871,8 +840,6 @@ load_fep:
hidewin(sc);
- dgbregisterdev(dev);
-
/* register the polling function */
timeout(dgbpoll, (void *)unit, hz/25);
@@ -1040,8 +1007,6 @@ open_top:
* the device is busy
*/
- kdc_dgb[unit].kdc_state = DC_BUSY;
-
out:
splx(s);
@@ -1098,9 +1063,6 @@ dgbclose(dev, flag, mode, p)
if(sc->ports[i].used)
break;
- if(i>= sc->numports)
- kdc_dgb[unit].kdc_state = DC_IDLE;
-
splx(s);
wakeup(TSA_CARR_ON(tp));
diff --git a/sys/dev/ed/if_ed.c b/sys/dev/ed/if_ed.c
index eb78d0bc9eae..b1807efcf513 100644
--- a/sys/dev/ed/if_ed.c
+++ b/sys/dev/ed/if_ed.c
@@ -24,7 +24,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: if_ed.c,v 1.103 1996/08/06 21:14:02 phk Exp $
+ * $Id: if_ed.c,v 1.104 1996/08/07 11:18:21 davidg Exp $
*/
/*
@@ -48,7 +48,6 @@
#include <sys/mbuf.h>
#include <sys/socket.h>
#include <sys/syslog.h>
-#include <sys/devconf.h>
#include <net/if.h>
#include <net/if_dl.h>
@@ -133,7 +132,6 @@ struct ed_softc {
u_char rec_page_start; /* first page of RX ring-buffer */
u_char rec_page_stop; /* last page of RX ring-buffer */
u_char next_packet; /* pointer to next unread RX packet */
- struct kern_devconf kdc; /* kernel configuration database info */
};
static struct ed_softc ed_softc[NED];
@@ -280,11 +278,10 @@ edunload(struct pccard_dev *dp)
struct ed_softc *sc = &ed_softc[dp->isahd.id_unit];
struct ifnet *ifp = &sc->arpcom.ac_if;
- if (sc->kdc.kdc_state == DC_UNCONFIGURED) {
+ if (sc->gone) {
printf("ed%d: already unloaded\n", dp->isahd.id_unit);
return;
}
- sc->kdc.kdc_state = DC_UNCONFIGURED;
ifp->if_flags &= ~IFF_RUNNING;
if_down(ifp);
sc->gone = 1;
@@ -362,28 +359,6 @@ static unsigned short ed_hpp_intr_mask[] = {
IRQ15 /* 15 */
};
-static struct kern_devconf kdc_ed_template = {
- 0, 0, 0, /* filled in by dev_attach */
- "ed", 0, { MDDT_ISA, 0, "net" },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0, /* parent */
- 0, /* parentdata */
- DC_UNCONFIGURED, /* state */
- "", /* description */
- DC_CLS_NETIF /* class */
-};
-
-static inline void
-ed_registerdev(struct isa_device *id, const char *descr)
-{
- struct kern_devconf *kdc = &ed_softc[id->id_unit].kdc;
- *kdc = kdc_ed_template;
- kdc->kdc_unit = id->id_unit;
- kdc->kdc_parentdata = id;
- kdc->kdc_description = descr;
- dev_attach(kdc);
-}
-
/*
* Determine if the device is present
*
@@ -407,10 +382,6 @@ ed_probe(isa_dev)
pccard_add_driver(&ed_info);
#endif
-#ifndef DEV_LKM
- ed_registerdev(isa_dev, "Ethernet adapter");
-#endif /* not DEV_LKM */
-
nports = ed_probe_WD80x3(isa_dev);
if (nports)
return (nports);
@@ -530,29 +501,23 @@ ed_probe_WD80x3(isa_dev)
switch (sc->type) {
case ED_TYPE_WD8003S:
sc->type_str = "WD8003S";
- sc->kdc.kdc_description = "Ethernet adapter: WD 8003S";
break;
case ED_TYPE_WD8003E:
sc->type_str = "WD8003E";
- sc->kdc.kdc_description = "Ethernet adapter: WD 8003E";
break;
case ED_TYPE_WD8003EB:
sc->type_str = "WD8003EB";
- sc->kdc.kdc_description = "Ethernet adapter: WD 8003EB";
break;
case ED_TYPE_WD8003W:
sc->type_str = "WD8003W";
- sc->kdc.kdc_description = "Ethernet adapter: WD 8003W";
break;
case ED_TYPE_WD8013EBT:
sc->type_str = "WD8013EBT";
- sc->kdc.kdc_description = "Ethernet adapter: WD 8013EBT";
memsize = 16384;
isa16bit = 1;
break;
case ED_TYPE_WD8013W:
sc->type_str = "WD8013W";
- sc->kdc.kdc_description = "Ethernet adapter: WD 8013W";
memsize = 16384;
isa16bit = 1;
break;
@@ -562,29 +527,22 @@ ed_probe_WD80x3(isa_dev)
isa16bit = 1;
memsize = 16384;
sc->type_str = "WD8013EP";
- sc->kdc.kdc_description =
- "Ethernet adapter: WD 8013EP";
} else {
sc->type_str = "WD8003EP";
- sc->kdc.kdc_description =
- "Ethernet adapter: WD 8003EP";
}
break;
case ED_TYPE_WD8013WC:
sc->type_str = "WD8013WC";
- sc->kdc.kdc_description = "Ethernet adapter: WD 8013WC";
memsize = 16384;
isa16bit = 1;
break;
case ED_TYPE_WD8013EBP:
sc->type_str = "WD8013EBP";
- sc->kdc.kdc_description = "Ethernet adapter: WD 8013EBP";
memsize = 16384;
isa16bit = 1;
break;
case ED_TYPE_WD8013EPC:
sc->type_str = "WD8013EPC";
- sc->kdc.kdc_description = "Ethernet adapter: WD 8013EPC";
memsize = 16384;
isa16bit = 1;
break;
@@ -592,12 +550,8 @@ ed_probe_WD80x3(isa_dev)
case ED_TYPE_SMC8216T:
if (sc->type == ED_TYPE_SMC8216C) {
sc->type_str = "SMC8216/SMC8216C";
- sc->kdc.kdc_description =
- "Ethernet adapter: SMC 8216 or 8216C";
} else {
sc->type_str = "SMC8216T";
- sc->kdc.kdc_description =
- "Ethernet adapter: SMC 8216T";
}
outb(sc->asic_addr + ED_WD790_HWR,
@@ -616,12 +570,8 @@ ed_probe_WD80x3(isa_dev)
/* 8216 has 16K shared mem -- 8416 has 8K */
if (sc->type == ED_TYPE_SMC8216C) {
sc->type_str = "SMC8416C/SMC8416BT";
- sc->kdc.kdc_description =
- "Ethernet adapter: SMC 8416C or 8416BT";
} else {
sc->type_str = "SMC8416T";
- sc->kdc.kdc_description =
- "Ethernet adapter: SMC 8416T";
}
memsize = 8192;
break;
@@ -635,13 +585,11 @@ ed_probe_WD80x3(isa_dev)
#ifdef TOSH_ETHER
case ED_TYPE_TOSHIBA1:
sc->type_str = "Toshiba1";
- sc->kdc.kdc_description = "Ethernet adapter: Toshiba1";
memsize = 32768;
isa16bit = 1;
break;
case ED_TYPE_TOSHIBA4:
sc->type_str = "Toshiba4";
- sc->kdc.kdc_description = "Ethernet adapter: Toshiba4";
memsize = 32768;
isa16bit = 1;
break;
@@ -969,7 +917,6 @@ ed_probe_3Com(isa_dev)
sc->vendor = ED_VENDOR_3COM;
sc->type_str = "3c503";
- sc->kdc.kdc_description = "Ethernet adapter: 3c503";
sc->mem_shared = 1;
sc->cr_proto = ED_CR_RD2;
@@ -1232,11 +1179,9 @@ ed_probe_Novell_generic(sc, port, unit, flags)
sc->type = ED_TYPE_NE2000;
sc->type_str = "NE2000";
- sc->kdc.kdc_description = "Ethernet adapter: NE2000";
} else {
sc->type = ED_TYPE_NE1000;
sc->type_str = "NE1000";
- sc->kdc.kdc_description = "Ethernet adapter: NE1000";
}
/* 8k of memory plus an additional 8k if 16bit */
@@ -1340,7 +1285,6 @@ ed_probe_Novell_generic(sc, port, unit, flags)
#ifdef GWETHER
if (sc->arpcom.ac_enaddr[2] == 0x86) {
sc->type_str = "Gateway AT";
- sc->kdc.kdc_description = "Ethernet adapter: Gateway AT";
}
#endif /* GWETHER */
@@ -1383,7 +1327,6 @@ ed_probe_pccard(isa_dev, ether)
sc->vendor = ED_VENDOR_PCCARD;
sc->type = 0;
sc->type_str = "PCCARD";
- sc->kdc.kdc_description = "PCCARD Ethernet";
sc->mem_size = isa_dev->id_msize = memsize = 16384;
sc->isa16bit = isa16bit = 1;
@@ -1613,7 +1556,6 @@ ed_probe_HP_pclanp(isa_dev)
sc->vendor = ED_VENDOR_HP;
sc->type = ED_TYPE_HP_PCLANPLUS;
sc->type_str = "HP-PCLAN+";
- sc->kdc.kdc_description = "Ethernet adapter: HP PCLAN+ (27247B/27252A)";
sc->mem_shared = 0; /* we DON'T have dual ported RAM */
sc->mem_start = 0; /* we use offsets inside the card RAM */
@@ -1841,7 +1783,6 @@ ed_attach(sc, unit, flags)
ether_ifattach(ifp);
}
/* device attach does transition from UNCONFIGURED to IDLE state */
- sc->kdc.kdc_state = DC_IDLE;
/*
* Print additional info when attached
@@ -2720,10 +2661,6 @@ ed_ioctl(ifp, command, data)
ifp->if_flags &= ~IFF_RUNNING;
}
}
- /* UP controls BUSY/IDLE */
- sc->kdc.kdc_state = ((ifp->if_flags & IFF_UP)
- ? DC_BUSY
- : DC_IDLE);
#if NBPFILTER > 0
diff --git a/sys/dev/eisa/eisaconf.c b/sys/dev/eisa/eisaconf.c
index 4b0d46422afb..12b63352802f 100644
--- a/sys/dev/eisa/eisaconf.c
+++ b/sys/dev/eisa/eisaconf.c
@@ -28,14 +28,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: eisaconf.c,v 1.20 1996/06/12 05:02:41 gpalmer Exp $
+ * $Id: eisaconf.c,v 1.21 1996/08/31 14:47:30 bde Exp $
*/
#include <sys/param.h>
#include <sys/systm.h>
-#include <sys/devconf.h>
#include <sys/kernel.h>
#include <sys/sysctl.h>
-#include <sys/conf.h> /* For kdc_isa */
+#include <sys/conf.h>
#include <sys/malloc.h>
#include <i386/eisa/eisaconf.h>
@@ -47,19 +46,6 @@ struct eisa_device_node{
struct eisa_device_node *next;
};
-extern struct kern_devconf kdc_cpu0;
-
-struct kern_devconf kdc_eisa0 = {
- 0, 0, 0, /* filled in by dev_attach */
- "eisa", 0, { MDDT_BUS, 0 },
- 0, 0, 0, BUS_EXTERNALLEN,
- &kdc_cpu0, /* parent is the CPU */
- 0, /* no parentdata */
- DC_BUSY, /* busses are always busy */
- NULL,
- DC_CLS_BUS /* class */
-};
-
/*
* This should probably be a list of "struct device" once it exists.
* A struct device will incorperate ioconf and driver entry point data
@@ -204,16 +190,6 @@ eisa_configure()
e_dev->full_name);
/* Should set the iosize, but I don't have a spec handy */
- kdc_eisa0.kdc_description =
- (char *)malloc(strlen(e_dev->full_name)
- + sizeof("EISA bus <>")
- + 1, M_DEVBUF, M_NOWAIT);
- if (!kdc_eisa0.kdc_description) {
- panic("Eisa probe unable to malloc");
- }
- sprintf((char *)kdc_eisa0.kdc_description, "EISA bus <%s>",
- e_dev->full_name);
- dev_attach(&kdc_eisa0);
printf("Probing for devices on the EISA bus\n");
dev_node = dev_node->next;
}
@@ -263,7 +239,6 @@ eisa_configure()
}
/* Ensure registration has ended */
reg_state.in_registration = 0;
- e_dev->kdc->kdc_unit = e_dev->unit;
}
else {
/* Announce unattached device */
@@ -379,14 +354,9 @@ eisa_reg_end(e_dev)
*/
char string[25];
- if (e_dev->kdc && (e_dev->kdc->kdc_parent == &kdc_isa0)) {
- sprintf(string, " on isa");
- }
- else {
- sprintf(string, " on %s0 slot %d",
- mainboard_drv.name,
- e_dev->ioconf.slot);
- }
+ sprintf(string, " on %s0 slot %d",
+ mainboard_drv.name,
+ e_dev->ioconf.slot);
eisa_reg_print(e_dev, string, NULL);
printf("\n");
reg_state.in_registration = 0;
@@ -620,7 +590,6 @@ eisa_reg_resvaddr(e_dev, head, resvaddr, reg_count)
eisa_reg_print(e_dev, buf,
*reg_count ? &separator : NULL);
(*reg_count)++;
- e_dev->kdc->kdc_datalen += sizeof(resvaddr_t);
return (0);
}
}
@@ -668,94 +637,11 @@ eisa_reg_iospace(e_dev, resvaddr)
}
int
-eisa_registerdev(e_dev, driver, kdc_template)
+eisa_registerdev(e_dev, driver)
struct eisa_device *e_dev;
struct eisa_driver *driver;
- struct kern_devconf *kdc_template;
{
e_dev->driver = driver; /* Driver now owns this device */
- e_dev->kdc = (struct kern_devconf *)malloc(sizeof(struct kern_devconf),
- M_DEVBUF, M_NOWAIT);
- if (!e_dev->kdc) {
- printf("WARNING: eisa_registerdev unable to malloc! "
- "Device kdc will not be registerd\n");
- return 1;
- }
- bcopy(kdc_template, e_dev->kdc, sizeof(*kdc_template));
- e_dev->kdc->kdc_description = e_dev->full_name;
- e_dev->kdc->kdc_parentdata = e_dev;
- dev_attach(e_dev->kdc);
return (0);
}
-int
-eisa_generic_externalize(struct kern_devconf *kdc, struct sysctl_req *req)
-{
- struct eisa_device *e_dev;
- resvaddr_t *node;
- void *buf; /* Temporary externalizing buffer */
- void *bufp; /* Current offset in the buffer */
- void *offset; /* Offset relative to target address space */
- void *ioa_prev; /* Prev Node entries relative to target address space */
- void *ma_prev; /* Prev Node entries relative to target address space */
- int retval;
-
- offset = (char *)req->oldptr + req->oldidx;
- buf = malloc(kdc->kdc_datalen, M_TEMP, M_NOWAIT);
- if (!buf)
- return 0;
-
- bufp = buf;
- bcopy(kdc->kdc_eisa, bufp, sizeof(struct eisa_device));
- e_dev = bufp;
-
- /* Calculate initial prev nodes */
- ioa_prev = (char *)offset + ((char *)&(e_dev->ioconf.ioaddrs.lh_first)
- - (char *)e_dev);
- ma_prev = (char *)offset + ((char *)&(e_dev->ioconf.maddrs.lh_first)
- - (char *)e_dev);
-
- offset = (char *)offset + sizeof(*e_dev);
- bufp = (char *)bufp + sizeof(*e_dev);
-
- if (e_dev->ioconf.ioaddrs.lh_first) {
- node = e_dev->ioconf.ioaddrs.lh_first;
- e_dev->ioconf.ioaddrs.lh_first = offset;
- for(;node;node = node->links.le_next) {
- resvaddr_t *out_node;
-
- bcopy(node, bufp, sizeof(resvaddr_t));
- out_node = (resvaddr_t *)bufp;
- bufp = (char *)bufp + sizeof(resvaddr_t);
- offset = (char *)offset + sizeof(resvaddr_t);
-
- out_node->links.le_prev = ioa_prev;
- ioa_prev = (char *)ioa_prev + sizeof(resvaddr_t);
-
- if (out_node->links.le_next)
- out_node->links.le_next = offset;
- }
- }
- if (e_dev->ioconf.maddrs.lh_first) {
- node = e_dev->ioconf.maddrs.lh_first;
- e_dev->ioconf.maddrs.lh_first = offset;
- for(;node;node = node->links.le_next) {
- resvaddr_t *out_node;
-
- bcopy(node, bufp, sizeof(resvaddr_t));
- out_node = (resvaddr_t *)bufp;
- bufp = (char *)bufp + sizeof(resvaddr_t);
- offset = (char *)offset + sizeof(resvaddr_t);
-
- out_node->links.le_prev = ma_prev;
- ma_prev = (char *)ma_prev + sizeof(resvaddr_t);
-
- if (out_node->links.le_next)
- out_node->links.le_next = offset;
- }
- }
-
- retval = SYSCTL_OUT(req, buf, kdc->kdc_datalen);
- free(buf, M_TEMP);
- return retval;
-}
diff --git a/sys/dev/eisa/eisaconf.h b/sys/dev/eisa/eisaconf.h
index c0372395bea8..5bceffb360c7 100644
--- a/sys/dev/eisa/eisaconf.h
+++ b/sys/dev/eisa/eisaconf.h
@@ -28,7 +28,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: eisaconf.h,v 1.8 1996/01/30 22:53:51 mpp Exp $
+ * $Id: eisaconf.h,v 1.9 1996/04/20 21:21:50 gibbs Exp $
*/
#ifndef _I386_EISA_EISACONF_H_
@@ -110,15 +110,12 @@ int eisa_add_iospace __P((struct eisa_device *, u_long, u_long, int));
int eisa_reg_iospace __P((struct eisa_device *, resvaddr_t *));
int eisa_add_mspace __P((struct eisa_device *, u_long, u_long, int));
int eisa_reg_mspace __P((struct eisa_device *, resvaddr_t *));
-int eisa_registerdev __P((struct eisa_device *, struct eisa_driver *, struct kern_devconf *));
+int eisa_registerdev __P((struct eisa_device *, struct eisa_driver *));
struct sysctl_req;
int eisa_externalize (struct eisa_device *, struct sysctl_req*);
-int eisa_generic_externalize (struct kern_devconf *, struct sysctl_req *);
-extern struct kern_devconf kdc_eisa0;
-
#define EISA_EXTERNALLEN (sizeof(struct eisa_device))
#endif /* _I386_EISA_EISACONF_H_ */
diff --git a/sys/dev/ep/if_ep.c b/sys/dev/ep/if_ep.c
index e3601543d4da..7840e8b1a809 100644
--- a/sys/dev/ep/if_ep.c
+++ b/sys/dev/ep/if_ep.c
@@ -38,7 +38,7 @@
*/
/*
- * $Id: if_ep.c,v 1.51 1996/07/19 13:20:04 amurai Exp $
+ * $Id: if_ep.c,v 1.52 1996/07/27 12:40:31 amurai Exp $
*
* Promiscuous mode added and interrupt logic slightly changed
* to reduce the number of adapter failures. Transceiver select
@@ -66,7 +66,6 @@
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/conf.h>
-#include <sys/devconf.h>
#endif
#include <sys/mbuf.h>
#include <sys/socket.h>
@@ -122,8 +121,6 @@ static int eeprom_rdy __P((struct ep_softc *sc));
static int ep_isa_probe __P((struct isa_device *));
static struct ep_board * ep_look_for_board_at __P((struct isa_device *is));
static int ep_isa_attach __P((struct isa_device *));
-static void ep_isa_registerdev __P((struct ep_softc *sc,
- struct isa_device *id));
static int epioctl __P((struct ifnet * ifp, int, caddr_t));
static void epmbuffill __P((caddr_t, int));
static void epmbufempty __P((struct ep_softc *));
@@ -155,17 +152,6 @@ struct isa_driver epdriver = {
0
};
-static struct kern_devconf kdc_isa_ep = {
- 0, 0, 0, /* filled in by dev_attach */
- "ep", 0, { MDDT_ISA, 0, "net" },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0, /* parent */
- 0, /* parentdata */
- DC_UNCONFIGURED, /* state */
- "3Com 3C509 Ethernet adapter",
- DC_CLS_NETIF /* class */
-};
-
#include "crd.h"
#if NCRD > 0
@@ -225,7 +211,6 @@ ep_pccard_init(dp, first)
return (ENXIO);
}
ep_unit++;
- ep_isa_registerdev(sc, is);
}
/* get_e() requires these. */
@@ -258,7 +243,6 @@ ep_pccard_init(dp, first)
}
if (!first) {
- sc->kdc->kdc_state = DC_IDLE;
sc->gone = 0;
printf("ep%d: resumed.\n", is->id_unit);
epinit(sc);
@@ -307,11 +291,10 @@ ep_unload(dp)
{
struct ep_softc *sc = ep_softc[dp->isahd.id_unit];
- if (sc->kdc->kdc_state == DC_UNCONFIGURED) {
+ if (sc->gone) {
printf("ep%d: already unloaded\n", dp->isahd.id_unit);
return;
}
- sc->kdc->kdc_state = DC_UNCONFIGURED;
sc->arpcom.ac_if.if_flags &= ~IFF_RUNNING;
sc->gone = 1;
printf("ep%d: unload\n", dp->isahd.id_unit);
@@ -331,24 +314,6 @@ card_intr(dp)
#endif /* NCRD > 0 */
-static void
-ep_isa_registerdev(sc, id)
- struct ep_softc *sc;
- struct isa_device *id;
-{
- sc->kdc = (struct kern_devconf *)malloc(sizeof(struct kern_devconf),
- M_DEVBUF, M_NOWAIT);
- if (!sc->kdc) {
- printf("WARNING: ep_isa_registerdev unable to malloc! "
- "Device kdc will not be registerd\n");
- return;
- }
- bcopy(&kdc_isa_ep, sc->kdc, sizeof(kdc_isa_ep));
- sc->kdc->kdc_unit = sc->unit;
- sc->kdc->kdc_parentdata = id;
- dev_attach(sc->kdc);
-}
-
static int
eeprom_rdy(sc)
struct ep_softc *sc;
@@ -552,8 +517,6 @@ ep_isa_probe(is)
is->id_unit = ep_unit++;
- ep_isa_registerdev(sc, is);
-
/*
* The iobase was found and MFG_ID was 0x6d50. PROD_ID should be
* 0x9[0-f]50
@@ -693,7 +656,6 @@ ep_attach(sc)
}
/* device attach does transition from UNCONFIGURED to IDLE state */
- sc->kdc->kdc_state=DC_IDLE;
/*
* Fill the hardware address into ifa_addr if we find an AF_LINK entry.
@@ -1428,7 +1390,6 @@ epioctl(ifp, cmd, data)
ifp->if_flags |= IFF_UP;
/* netifs are BUSY when UP */
- sc->kdc->kdc_state=DC_BUSY;
switch (ifa->ifa_addr->sa_family) {
#ifdef INET
@@ -1488,10 +1449,6 @@ epioctl(ifp, cmd, data)
}
break;
case SIOCSIFFLAGS:
- /* UP controls BUSY/IDLE */
- sc->kdc->kdc_state= ( (ifp->if_flags & IFF_UP)
- ? DC_BUSY
- : DC_IDLE );
if ((ifp->if_flags & IFF_UP) == 0 && ifp->if_flags & IFF_RUNNING) {
ifp->if_flags &= ~IFF_RUNNING;
diff --git a/sys/dev/ep/if_ep_eisa.c b/sys/dev/ep/if_ep_eisa.c
index f0284aeaf1f4..e16d9c3774bf 100644
--- a/sys/dev/ep/if_ep_eisa.c
+++ b/sys/dev/ep/if_ep_eisa.c
@@ -19,7 +19,7 @@
* 4. Modifications may be freely made to this file if the above conditions
* are met.
*
- * $Id: 3c5x9.c,v 1.3 1996/06/12 05:02:39 gpalmer Exp $
+ * $Id: 3c5x9.c,v 1.4 1996/07/19 13:19:47 amurai Exp $
*/
#include "eisa.h"
@@ -27,7 +27,6 @@
#include <sys/param.h>
#include <sys/systm.h>
-#include <sys/devconf.h>
#include <sys/kernel.h>
#include <machine/clock.h>
@@ -38,7 +37,6 @@
#include <netinet/if_ether.h>
#include <i386/isa/if_epreg.h>
-#include <i386/isa/isa_device.h> /* For kdc_isa0 */
#include <i386/eisa/eisaconf.h>
#define EISA_DEVICE_ID_3COM_3C509_TP 0x506d5090
@@ -80,17 +78,6 @@ struct eisa_driver ep_eisa_driver = {
DATA_SET (eisadriver_set, ep_eisa_driver);
-static struct kern_devconf kdc_eisa_ep = {
- 0, 0, 0, /* filled in by dev_attach */
- "ep", 0, { MDDT_EISA, 0, "net" },
- eisa_generic_externalize, 0, 0, EISA_EXTERNALLEN,
- &kdc_eisa0, /* parent */
- 0, /* parentdata */
- DC_UNCONFIGURED, /* always start out here */
- NULL,
- DC_CLS_MISC /* host adapters aren't special */
-};
-
static char *ep_match __P((eisa_id_t type));
static char*
@@ -181,12 +168,7 @@ ep_eisa_probe(void)
continue;
}
eisa_add_intr(e_dev, irq);
- eisa_registerdev(e_dev, &ep_eisa_driver, &kdc_eisa_ep);
- if(e_dev->id != EISA_DEVICE_ID_3COM_3C579_TP &&
- e_dev->id != EISA_DEVICE_ID_3COM_3C579_BNC) {
- /* Our real parent is the isa bus. Say so. */
- e_dev->kdc->kdc_parent = &kdc_isa0;
- }
+ eisa_registerdev(e_dev, &ep_eisa_driver);
count++;
}
return count;
@@ -238,7 +220,6 @@ ep_eisa_attach(e_dev)
ep_boards++;
sc->stat = 0;
- sc->kdc = e_dev->kdc;
level_intr = FALSE;
switch(e_dev->id) {
case EISA_DEVICE_ID_3COM_3C509_TP:
diff --git a/sys/dev/fdc/fdc.c b/sys/dev/fdc/fdc.c
index ac20996ae765..631157db1356 100644
--- a/sys/dev/fdc/fdc.c
+++ b/sys/dev/fdc/fdc.c
@@ -43,7 +43,7 @@
* SUCH DAMAGE.
*
* from: @(#)fd.c 7.4 (Berkeley) 5/25/91
- * $Id: fd.c,v 1.90 1996/07/12 07:40:59 bde Exp $
+ * $Id: fd.c,v 1.91 1996/07/23 21:51:33 phk Exp $
*
*/
@@ -69,7 +69,6 @@
#include <sys/malloc.h>
#include <sys/proc.h>
#include <sys/syslog.h>
-#include <sys/devconf.h>
#include <sys/dkstat.h>
#include <i386/isa/isa.h>
#include <i386/isa/isa_device.h>
@@ -85,80 +84,6 @@
#include <sys/devfsext.h>
#endif
-
-static int fd_goaway(struct kern_devconf *, int);
-static int fdc_goaway(struct kern_devconf *, int);
-static int fd_externalize(struct kern_devconf *, struct sysctl_req *);
-
-/*
- * Templates for the kern_devconf structures used when we attach.
- */
-static struct kern_devconf kdc_fd[NFD] = { {
- 0, 0, 0, /* filled in by kern_devconf.c */
- "fd", 0, { MDDT_DISK, 0 },
- fd_externalize, 0, fd_goaway, DISK_EXTERNALLEN,
- 0, /* parent */
- 0, /* parentdata */
- DC_UNCONFIGURED, /* state */
- "floppy disk",
- DC_CLS_DISK /* class */
-} };
-
-struct kern_devconf kdc_fdc[NFDC] = { {
- 0, 0, 0, /* filled in by kern_devconf.c */
- "fdc", 0, { MDDT_ISA, 0, "bio" },
- isa_generic_externalize, 0, fdc_goaway, ISA_EXTERNALLEN,
- 0, /* parent */
- 0, /* parentdata */
- DC_UNCONFIGURED, /* state */
- "floppy disk/tape controller",
- DC_CLS_MISC /* class */
-} };
-
-static inline void
-fd_registerdev(int ctlr, int unit)
-{
- if(unit != 0)
- kdc_fd[unit] = kdc_fd[0];
-
- kdc_fd[unit].kdc_unit = unit;
- kdc_fd[unit].kdc_parent = &kdc_fdc[ctlr];
- kdc_fd[unit].kdc_parentdata = 0;
- dev_attach(&kdc_fd[unit]);
-}
-
-static inline void
-fdc_registerdev(struct isa_device *dvp)
-{
- int unit = dvp->id_unit;
-
- if(unit != 0)
- kdc_fdc[unit] = kdc_fdc[0];
-
- kdc_fdc[unit].kdc_unit = unit;
- kdc_fdc[unit].kdc_parent = &kdc_isa0;
- kdc_fdc[unit].kdc_parentdata = dvp;
- dev_attach(&kdc_fdc[unit]);
-}
-
-static int
-fdc_goaway(struct kern_devconf *kdc, int force)
-{
- if(force) {
- dev_detach(kdc);
- return 0;
- } else {
- return EBUSY; /* XXX fix */
- }
-}
-
-static int
-fd_goaway(struct kern_devconf *kdc, int force)
-{
- dev_detach(kdc);
- return 0;
-}
-
#define b_cylin b_resid /* XXX now spelled b_cylinder elsewhere */
/* misuse a flag to identify format operation */
@@ -355,15 +280,6 @@ static struct bdevsw fd_bdevsw =
static struct isa_device *fdcdevs[NFDC];
-/*
- * Provide hw.devconf information.
- */
-static int
-fd_externalize(struct kern_devconf *kdc, struct sysctl_req *req)
-{
- return disk_externalize(fd_data[kdc->kdc_unit].fdsu, req);
-}
-
static int
fdc_err(fdcu_t fdcu, const char *s)
{
@@ -526,10 +442,6 @@ fdprobe(struct isa_device *dev)
fdcdevs[fdcu] = dev;
fdc_data[fdcu].baseport = dev->id_iobase;
-#ifndef DEV_LKM
- fdc_registerdev(dev);
-#endif
-
/* First - lets reset the floppy controller */
outb(dev->id_iobase+FDOUT, 0);
DELAY(100);
@@ -542,7 +454,6 @@ fdprobe(struct isa_device *dev)
{
return(0);
}
- kdc_fdc[fdcu].kdc_state = DC_IDLE;
return (IO_FDCSIZE);
}
@@ -636,20 +547,14 @@ fdattach(struct isa_device *dev)
case 0x80:
printf("NEC 765\n");
fdc->fdct = FDC_NE765;
- kdc_fdc[fdcu].kdc_description =
- "NEC 765 floppy disk/tape controller";
break;
case 0x81:
printf("Intel 82077\n");
fdc->fdct = FDC_I82077;
- kdc_fdc[fdcu].kdc_description =
- "Intel 82077 floppy disk/tape controller";
break;
case 0x90:
printf("NEC 72065B\n");
fdc->fdct = FDC_NE72065;
- kdc_fdc[fdcu].kdc_description =
- "NEC 72065B floppy disk/tape controller";
break;
default:
printf("unknown IC type %02x\n", ic_type);
@@ -708,46 +613,33 @@ fdattach(struct isa_device *dev)
fd->options = 0;
printf("fd%d: ", fdu);
- fd_registerdev(fdcu, fdu);
switch (fdt) {
case RTCFDT_12M:
printf("1.2MB 5.25in\n");
fd->type = FD_1200;
- kdc_fd[fdu].kdc_description =
- "1.2MB (1200K) 5.25in floppy disk drive";
break;
case RTCFDT_144M:
printf("1.44MB 3.5in\n");
fd->type = FD_1440;
- kdc_fd[fdu].kdc_description =
- "1.44MB (1440K) 3.5in floppy disk drive";
break;
case RTCFDT_288M:
case RTCFDT_288M_1:
printf("2.88MB 3.5in - 1.44MB mode\n");
fd->type = FD_1440;
- kdc_fd[fdu].kdc_description =
- "2.88MB (2880K) 3.5in floppy disk drive in 1.44 mode";
break;
case RTCFDT_360K:
printf("360KB 5.25in\n");
fd->type = FD_360;
- kdc_fd[fdu].kdc_description =
- "360KB 5.25in floppy disk drive";
break;
case RTCFDT_720K:
printf("720KB 3.5in\n");
fd->type = FD_720;
- kdc_fd[fdu].kdc_description =
- "720KB 3.5in floppy disk drive";
break;
default:
printf("unknown\n");
fd->type = NO_TYPE;
- dev_detach(&kdc_fd[fdu]);
continue;
}
- kdc_fd[fdu].kdc_state = DC_IDLE;
#ifdef DEVFS
mynor = fdu << 6;
fd->bdevs[0] = devfs_add_devswf(&fd_bdevsw, mynor, DV_BLK,
@@ -855,7 +747,6 @@ set_motor(fdcu_t fdcu, int fdsu, int turnon)
outb(fdc_data[fdcu].baseport+FDOUT, fdout);
fdc_data[fdcu].fdout = fdout;
- kdc_fdc[fdcu].kdc_state = (fdout & FDO_FRST)? DC_BUSY: DC_IDLE;
TRACE1("[0x%x->FDOUT]", fdout);
if(needspecify) {
@@ -1094,7 +985,6 @@ Fdopen(dev_t dev, int flags, int mode, struct proc *p)
}
fd_data[fdu].ft = fd_types + type - 1;
fd_data[fdu].flags |= FD_OPEN;
- kdc_fd[fdu].kdc_state = DC_BUSY;
return 0;
}
@@ -1112,7 +1002,6 @@ fdclose(dev_t dev, int flags, int mode, struct proc *p)
#endif
fd_data[fdu].flags &= ~FD_OPEN;
fd_data[fdu].options &= ~FDOPT_NORETRY;
- kdc_fd[fdu].kdc_state = DC_IDLE;
return(0);
}
diff --git a/sys/dev/fe/if_fe.c b/sys/dev/fe/if_fe.c
index 7648902cb7e4..5d1832928663 100644
--- a/sys/dev/fe/if_fe.c
+++ b/sys/dev/fe/if_fe.c
@@ -21,7 +21,7 @@
*/
/*
- * $Id: if_fe.c,v 1.16 1996/06/18 01:22:21 bde Exp $
+ * $Id: if_fe.c,v 1.17 1996/08/06 21:14:07 phk Exp $
*
* Device driver for Fujitsu MB86960A/MB86965A based Ethernet cards.
* To be used with FreeBSD 2.x
@@ -83,7 +83,6 @@
#include <sys/mbuf.h>
#include <sys/socket.h>
#include <sys/syslog.h>
-#include <sys/devconf.h>
#include <net/if.h>
#include <net/if_dl.h>
@@ -206,7 +205,6 @@ static struct fe_softc {
struct arpcom arpcom; /* Ethernet common */
/* Used by config codes. */
- struct kern_devconf kdc;/* Kernel configuration database info. */
/* Set by probe() and not modified in later phases. */
char * typestr; /* printable name of the interface. */
@@ -239,8 +237,6 @@ static struct fe_softc {
#define sc_if arpcom.ac_if
#define sc_unit arpcom.ac_if.if_unit
#define sc_enaddr arpcom.ac_enaddr
-#define sc_dcstate kdc.kdc_state
-#define sc_description kdc.kdc_description
/* Standard driver entry points. These can be static. */
static int fe_probe ( struct isa_device * );
@@ -252,7 +248,6 @@ static void fe_reset ( int );
static void fe_watchdog ( struct ifnet * );
/* Local functions. Order of declaration is confused. FIXME. */
-static void fe_registerdev ( struct fe_softc *, DEVICE * );
static int fe_probe_fmv ( DEVICE *, struct fe_softc * );
static int fe_probe_ati ( DEVICE *, struct fe_softc * );
static int fe_probe_mbh ( DEVICE *, struct fe_softc * );
@@ -281,19 +276,6 @@ struct isa_driver fedriver =
1 /* It's safe to mark as "sensitive" */
};
-/* Initial value for a kdc struct. */
-static struct kern_devconf const fe_kdc_template =
-{
- 0, 0, 0,
- "fe", 0, { MDDT_ISA, 0, "net" },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0, /* This is an ISA device. */
- 0,
- DC_UNCONFIGURED, /* Not yet configured. */
- "Ethernet (MB8696x)", /* Tentative description (filled in later.) */
- DC_CLS_NETIF /* This is a network interface. */
-};
-
/*
* Fe driver specific constants which relate to 86960/86965.
*/
@@ -460,15 +442,6 @@ static struct fe_probe_list const fe_probe_list [] =
{ NULL, NULL }
};
-static void
-fe_registerdev ( struct fe_softc * sc, DEVICE * dev )
-{
- /* Fill the device config data and register it. */
- sc->kdc = fe_kdc_template;
- sc->kdc.kdc_unit = sc->sc_unit;
- sc->kdc.kdc_parentdata = dev;
- dev_attach( &sc->kdc );
-}
/*
* Determine if the device is present
@@ -497,19 +470,12 @@ fe_probe ( DEVICE * dev )
sc = &fe_softc[ dev->id_unit ];
sc->sc_unit = dev->id_unit;
-#if NCRD == 0
-#ifndef DEV_LKM
- fe_registerdev(sc, dev);
-#endif
-#endif /* NCRD == 0 */
-
#if NCRD > 0
/*
* If PC-Card probe required, then register driver with
* slot manager.
*/
if (fe_already_init != 1) {
- fe_registerdev(sc,dev);
pccard_add_driver(&fe_info);
fe_already_init = 1;
}
@@ -784,7 +750,6 @@ fe_probe_fmv ( DEVICE * dev, struct fe_softc * sc )
switch ( revision ) {
case 8:
sc->typestr = "FMV-183";
- sc->sc_description = "Ethernet adapter: FMV-183";
break;
}
break;
@@ -792,11 +757,9 @@ fe_probe_fmv ( DEVICE * dev, struct fe_softc * sc )
switch ( revision ) {
case 0:
sc->typestr = "FMV-181";
- sc->sc_description = "Ethernet adapter: FMV-181";
break;
case 1:
sc->typestr = "FMV-181A";
- sc->sc_description = "Ethernet adapter: FMV-181A";
break;
}
break;
@@ -804,7 +767,6 @@ fe_probe_fmv ( DEVICE * dev, struct fe_softc * sc )
switch ( revision ) {
case 8:
sc->typestr = "FMV-184 (CSR = 2)";
- sc->sc_description = "Ethernet adapter: FMV-184";
break;
}
break;
@@ -812,7 +774,6 @@ fe_probe_fmv ( DEVICE * dev, struct fe_softc * sc )
switch ( revision ) {
case 8:
sc->typestr = "FMV-184 (CSR = 1)";
- sc->sc_description = "Ethernet adapter: FMV-184";
break;
}
break;
@@ -820,15 +781,12 @@ fe_probe_fmv ( DEVICE * dev, struct fe_softc * sc )
switch ( revision ) {
case 0:
sc->typestr = "FMV-182";
- sc->sc_description = "Ethernet adapter: FMV-182";
break;
case 1:
sc->typestr = "FMV-182A";
- sc->sc_description = "Ethernet adapter: FMV-182A";
break;
case 8:
sc->typestr = "FMV-184 (CSR = 3)";
- sc->sc_description = "Ethernet adapter: FMV-184";
break;
}
break;
@@ -836,8 +794,6 @@ fe_probe_fmv ( DEVICE * dev, struct fe_softc * sc )
if ( sc->typestr == NULL ) {
/* Unknown card type... Hope the driver works. */
sc->typestr = "unknown FMV-180 version";
- sc->sc_description
- = "Ethernet adapter: unknown FMV-180 version";
log( LOG_WARNING, "fe%d: %s: %x-%x-%x-%x\n",
sc->sc_unit, sc->typestr,
inb( sc->ioaddr[ FE_FMV0 ] ),
@@ -1023,23 +979,18 @@ fe_probe_ati ( DEVICE * dev, struct fe_softc * sc )
switch (eeprom[FE_ATI_EEP_MODEL]) {
case FE_ATI_MODEL_AT1700T:
sc->typestr = "AT-1700T/RE2001";
- sc->sc_description = "Ethernet adapter: AT1700T or RE2001";
break;
case FE_ATI_MODEL_AT1700BT:
sc->typestr = "AT-1700BT/RE2003";
- sc->sc_description = "Ethernet adapter: AT1700BT or RE2003";
break;
case FE_ATI_MODEL_AT1700FT:
sc->typestr = "AT-1700FT/RE2009";
- sc->sc_description = "Ethernet adapter: AT1700FT or RE2009";
break;
case FE_ATI_MODEL_AT1700AT:
sc->typestr = "AT-1700AT/RE2005";
- sc->sc_description = "Ethernet adapter: AT1700AT or RE2005";
break;
default:
sc->typestr = "unknown AT-1700/RE2000 ?";
- sc->sc_description = "Ethernet adapter: AT1700 or RE2000 ?";
break;
}
@@ -1220,7 +1171,6 @@ fe_probe_mbh ( DEVICE * dev, struct fe_softc * sc )
/* Determine the card type. */
sc->typestr = "MBH10302 (PCMCIA)";
- sc->sc_description = "Ethernet adapter: MBH10302 (PCMCIA)";
/*
* Initialize constants in the per-line structure.
@@ -1480,7 +1430,6 @@ fe_stop ( int unit )
sc->filter_change = 0;
/* Update config status also. */
- sc->sc_dcstate = DC_IDLE;
/* Call a hook. */
if ( sc->stop ) sc->stop( sc );
@@ -1678,9 +1627,6 @@ fe_init ( int unit )
/* Set 'running' flag, because we are now running. */
sc->sc_if.if_flags |= IFF_RUNNING;
- /* Update device config status. */
- sc->sc_dcstate = DC_BUSY;
-
/*
* At this point, the interface is running properly,
* except that it receives *no* packets. we then call
diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c
index fa64fca3c430..6da34be1e47f 100644
--- a/sys/dev/fxp/if_fxp.c
+++ b/sys/dev/fxp/if_fxp.c
@@ -24,7 +24,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: if_fxp.c,v 1.12 1996/04/08 01:31:41 davidg Exp $
+ * $Id: if_fxp.c,v 1.13 1996/06/01 23:25:10 gpalmer Exp $
*/
/*
@@ -39,7 +39,6 @@
#include <sys/mbuf.h>
#include <sys/malloc.h>
#include <sys/kernel.h>
-#include <sys/devconf.h>
#include <sys/syslog.h>
#include <net/if.h>
@@ -131,7 +130,7 @@ static u_char fxp_cb_config_template[] = {
static inline int fxp_scb_wait __P((struct fxp_csr *));
static char *fxp_probe __P((pcici_t, pcidi_t));
static void fxp_attach __P((pcici_t, int));
-static int fxp_shutdown __P((struct kern_devconf *, int));
+static int fxp_shutdown __P((int, int));
static void fxp_intr __P((void *));
static void fxp_start __P((struct ifnet *));
static int fxp_ioctl __P((struct ifnet *, int, caddr_t));
@@ -392,15 +391,14 @@ fxp_get_macaddr(sc)
* kernel memory doesn't get clobbered during warmboot.
*/
static int
-fxp_shutdown(kdc, force)
- struct kern_devconf *kdc;
+fxp_shutdown(unit, force)
+ int unit;
int force;
{
- struct fxp_softc *sc = fxp_sc[kdc->kdc_unit];
+ struct fxp_softc *sc = fxp_sc[unit];
fxp_stop(sc);
- (void) dev_detach(kdc);
return 0;
}
diff --git a/sys/dev/ie/if_ie.c b/sys/dev/ie/if_ie.c
index 24e3829ab612..4c8cf8decf00 100644
--- a/sys/dev/ie/if_ie.c
+++ b/sys/dev/ie/if_ie.c
@@ -43,7 +43,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: if_ie.c,v 1.34 1996/06/18 01:22:22 bde Exp $
+ * $Id: if_ie.c,v 1.35 1996/06/25 20:30:13 bde Exp $
*/
/*
@@ -117,7 +117,6 @@ iomem, and to make 16-pointers, we subtract iomem and and with 0xffff.
#include <sys/ioctl.h>
#include <sys/errno.h>
#include <sys/syslog.h>
-#include <sys/devconf.h>
#include <net/if.h>
#include <net/if_types.h>
@@ -314,35 +313,12 @@ static int sl_probe(struct isa_device *);
static int el_probe(struct isa_device *);
static int ni_probe(struct isa_device *);
-static struct kern_devconf kdc_ie[NIE] = { {
- 0, 0, 0, /* filled in by dev_attach */
- "ie", 0, { MDDT_ISA, 0, "net" },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0, /* parent */
- 0, /* parentdata */
- DC_UNCONFIGURED, /* state */
- "Ethernet adapter", /* description */
- DC_CLS_NETIF /* class */
-} };
-
-static inline void
-ie_registerdev(struct isa_device *id)
-{
- if(id->id_unit)
- kdc_ie[id->id_unit] = kdc_ie[0];
- kdc_ie[id->id_unit].kdc_unit = id->id_unit;
- kdc_ie[id->id_unit].kdc_isa = id;
- dev_attach(&kdc_ie[id->id_unit]);
-}
-
/* This routine written by Charles Martin Hannum. */
int ieprobe(dvp)
struct isa_device *dvp;
{
int ret;
- ie_registerdev(dvp);
-
ret = sl_probe(dvp);
if(!ret) ret = el_probe(dvp);
if(!ret) ret = ni_probe(dvp);
@@ -596,7 +572,6 @@ ieattach(dvp)
if_attach(ifp);
ether_ifattach(ifp);
- kdc_ie[unit].kdc_description = ie_hardware_names[ie_softc[unit].hard_type];
return 1;
}
diff --git a/sys/dev/lnc/if_lnc.c b/sys/dev/lnc/if_lnc.c
index abc3b74c645e..08a14a450105 100644
--- a/sys/dev/lnc/if_lnc.c
+++ b/sys/dev/lnc/if_lnc.c
@@ -80,7 +80,6 @@
#include <sys/mbuf.h>
#include <sys/socket.h>
#include <sys/syslog.h>
-#include <sys/devconf.h>
#include <net/if.h>
#include <net/if_dl.h>
@@ -120,7 +119,7 @@ static struct lnc_softc {
int initialised;
int rap;
int rdp;
- struct kern_devconf kdc;
+ char *descr;
#ifdef DEBUG
int lnc_debug;
#endif
@@ -165,17 +164,6 @@ void lncintr_sc __P((struct lnc_softc *sc));
struct isa_driver lncdriver = {lnc_probe, lnc_attach, "lnc"};
-static struct kern_devconf kdc_lnc = {
- 0, 0, 0, /* filled in by dev_attach */
- "lnc", 0, { MDDT_ISA, 0, "net" },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0, /* parent */
- 0, /* parentdata */
- DC_UNCONFIGURED,
- "",
- DC_CLS_NETIF
-};
-
static inline void
write_csr(struct lnc_softc *sc, u_short port, u_short val)
{
@@ -194,48 +182,43 @@ static inline void
lnc_registerdev(struct isa_device *isa_dev)
{
struct lnc_softc *sc = &lnc_softc[isa_dev->id_unit];
- struct kern_devconf *kdc = &sc->kdc;
- *kdc = kdc_lnc;
- kdc->kdc_unit = isa_dev->id_unit;
- kdc->kdc_parentdata = isa_dev;
switch(sc->nic.ic) {
case LANCE:
if (sc->nic.ident == BICC)
- kdc->kdc_description = "BICC (LANCE) Ethernet controller";
+ sc->descr = "BICC (LANCE) Ethernet controller";
else if (sc->nic.ident == NE2100)
- kdc->kdc_description = "NE2100 (LANCE) Ethernet controller";
+ sc->descr = "NE2100 (LANCE) Ethernet controller";
else if (sc->nic.ident == DEPCA)
- kdc->kdc_description = "DEPCA (LANCE) Ethernet controller";
+ sc->descr = "DEPCA (LANCE) Ethernet controller";
break;
case C_LANCE:
if (sc->nic.ident == BICC)
- kdc->kdc_description = "BICC (C-LANCE) Ethernet controller";
+ sc->descr = "BICC (C-LANCE) Ethernet controller";
else if (sc->nic.ident == NE2100)
- kdc->kdc_description = "NE2100 (C-LANCE) Ethernet controller";
+ sc->descr = "NE2100 (C-LANCE) Ethernet controller";
else if (sc->nic.ident == DEPCA)
- kdc->kdc_description = "DEPCA (C-LANCE) Ethernet controller";
+ sc->descr = "DEPCA (C-LANCE) Ethernet controller";
break;
case PCnet_ISA:
- kdc->kdc_description = "PCnet-ISA Ethernet controller";
+ sc->descr = "PCnet-ISA Ethernet controller";
break;
case PCnet_ISAplus:
- kdc->kdc_description = "PCnet-ISA+ Ethernet controller";
+ sc->descr = "PCnet-ISA+ Ethernet controller";
break;
case PCnet_32:
- kdc->kdc_description = "PCnet-32 VL-Bus Ethernet controller";
+ sc->descr = "PCnet-32 VL-Bus Ethernet controller";
break;
case PCnet_PCI:
/*
* XXX - This should never be the case ...
*/
- kdc->kdc_description = "PCnet-PCI Ethernet controller";
+ sc->descr = "PCnet-PCI Ethernet controller";
break;
default:
break;
}
- dev_attach(kdc);
}
@@ -1198,14 +1181,13 @@ lnc_attach_sc(struct lnc_softc *sc, int unit)
if_attach(&sc->arpcom.ac_if);
ether_ifattach(&sc->arpcom.ac_if);
- sc->kdc.kdc_state = DC_IDLE;
- if (sc->kdc.kdc_description == NULL)
- sc->kdc.kdc_description = "Lance Ethernet controller";
+ if (sc->descr == NULL)
+ sc->descr = "Lance Ethernet controller";
printf("lnc%d: %s, address %6D\n",
unit,
- sc->kdc.kdc_description,
+ sc->descr,
sc->arpcom.ac_enaddr, ":");
#if NBPFILTER > 0
@@ -1736,7 +1718,6 @@ lnc_ioctl(struct ifnet * ifp, int command, caddr_t data)
switch (command) {
case SIOCSIFADDR:
ifp->if_flags |= IFF_UP;
- sc->kdc.kdc_state = DC_BUSY;
switch (ifa->ifa_addr->sa_family) {
#ifdef INET
@@ -1783,8 +1764,6 @@ lnc_ioctl(struct ifnet * ifp, int command, caddr_t data)
*/
lnc_init(sc);
}
- sc->kdc.kdc_state =
- ((ifp->if_flags & IFF_UP) ? DC_BUSY : DC_IDLE);
break;
#ifdef LNC_MULTICAST
case SIOCADDMULTI:
diff --git a/sys/dev/mcd/mcd.c b/sys/dev/mcd/mcd.c
index c16c00472256..dcb1abc2e069 100644
--- a/sys/dev/mcd/mcd.c
+++ b/sys/dev/mcd/mcd.c
@@ -40,7 +40,7 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: mcd.c,v 1.81 1996/06/18 01:22:27 bde Exp $
+ * $Id: mcd.c,v 1.82 1996/07/23 21:51:36 phk Exp $
*/
static const char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore";
@@ -60,7 +60,6 @@ static const char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore";
#include <sys/errno.h>
#include <sys/dkbad.h>
#include <sys/disklabel.h>
-#include <sys/devconf.h>
#include <sys/kernel.h>
#ifdef DEVFS
#include <sys/devfsext.h>
@@ -242,27 +241,6 @@ static struct bdevsw mcd_bdevsw =
#define MIN_DELAY 15
#define DELAY_GETREPLY 5000000
-static struct kern_devconf kdc_mcd[NMCD] = { {
- 0, 0, 0, /* filled in by dev_attach */
- "mcd", 0, { MDDT_ISA, 0, "bio" },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0, /* parent */
- 0, /* parentdata */
- DC_UNCONFIGURED, /* status */
- "Mitsumi CD-ROM controller", /* properly filled later */
- DC_CLS_RDISK
-} };
-
-static inline void
-mcd_registerdev(struct isa_device *id)
-{
- if(id->id_unit)
- kdc_mcd[id->id_unit] = kdc_mcd[0];
- kdc_mcd[id->id_unit].kdc_unit = id->id_unit;
- kdc_mcd[id->id_unit].kdc_isa = id;
- dev_attach(&kdc_mcd[id->id_unit]);
-}
-
int mcd_attach(struct isa_device *dev)
{
int unit = dev->id_unit;
@@ -277,9 +255,7 @@ int mcd_attach(struct isa_device *dev)
/* wire controller for interrupts and dma */
mcd_configure(cd);
#endif
- kdc_mcd[unit].kdc_state = DC_IDLE;
/* name filled in probe */
- kdc_mcd[unit].kdc_description = mcd_data[unit].name;
#ifdef DEVFS
cd->ra_devfs_token =
devfs_add_devswf(&mcd_cdevsw, dkmakeminor(unit, 0, 0),
@@ -343,7 +319,6 @@ int mcdopen(dev_t dev, int flags, int fmt, struct proc *p)
cd->openflags |= (1<<part);
if (phys)
cd->partflags[part] |= MCDREADRAW;
- kdc_mcd[unit].kdc_state = DC_BUSY;
return 0;
}
if (cd->status & MCDDOOROPEN) {
@@ -364,7 +339,6 @@ int mcdopen(dev_t dev, int flags, int fmt, struct proc *p)
cd->openflags |= (1<<part);
if (phys)
cd->partflags[part] |= MCDREADRAW;
- kdc_mcd[unit].kdc_state = DC_BUSY;
return 0;
}
printf("mcd%d: failed to get disk size\n",unit);
@@ -384,7 +358,6 @@ MCD_TRACE("open: partition=%d, disksize = %ld, blksize=%d\n",
cd->openflags |= (1<<part);
if (part == RAW_PART && phys)
cd->partflags[part] |= MCDREADRAW;
- kdc_mcd[unit].kdc_state = DC_BUSY;
(void) mcd_lock_door(unit, MCD_LK_LOCK);
if (!(cd->flags & MCDVALID))
return ENXIO;
@@ -414,7 +387,6 @@ int mcdclose(dev_t dev, int flags, int fmt, struct proc *p)
(void) mcd_lock_door(unit, MCD_LK_UNLOCK);
cd->openflags &= ~(1<<part);
cd->partflags[part] &= ~MCDREADRAW;
- kdc_mcd[unit].kdc_state = DC_IDLE;
return 0;
}
@@ -766,7 +738,6 @@ mcd_probe(struct isa_device *dev)
int i, j;
unsigned char stbytes[3];
- mcd_registerdev(dev);
mcd_data[unit].flags = MCDPROBING;
#ifdef NOTDEF
diff --git a/sys/dev/mse/mse.c b/sys/dev/mse/mse.c
index 835e1e148580..b54417e024d5 100644
--- a/sys/dev/mse/mse.c
+++ b/sys/dev/mse/mse.c
@@ -11,7 +11,7 @@
* this software for any purpose. It is provided "as is"
* without express or implied warranty.
*
- * $Id: mse.c,v 1.26 1996/06/02 18:57:17 joerg Exp $
+ * $Id: mse.c,v 1.27 1996/06/08 09:37:51 bde Exp $
*/
/*
* Driver for the Logitech and ATI Inport Bus mice for use with 386bsd and
@@ -54,7 +54,6 @@
#include <sys/kernel.h>
#include <sys/ioctl.h>
#include <sys/uio.h>
-#include <sys/devconf.h>
#ifdef DEVFS
#include <sys/devfsext.h>
#endif /*DEVFS*/
@@ -205,27 +204,6 @@ static struct mse_types {
{ 0, },
};
-static struct kern_devconf kdc_mse[NMSE] = { {
- 0, 0, 0, /* filled in by dev_attach */
- "mse", 0, { MDDT_ISA, 0, "tty" },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0, /* parent */
- 0, /* parentdata */
- DC_UNCONFIGURED, /* state */
- "ATI or Logitech bus mouse adapter",
- DC_CLS_MISC /* class */
-} };
-
-static inline void
-mse_registerdev(struct isa_device *id)
-{
- if(id->id_unit)
- kdc_mse[id->id_unit] = kdc_mse[0];
- kdc_mse[id->id_unit].kdc_unit = id->id_unit;
- kdc_mse[id->id_unit].kdc_isa = id;
- dev_attach(&kdc_mse[id->id_unit]);
-}
-
int
mseprobe(idp)
register struct isa_device *idp;
@@ -233,7 +211,6 @@ mseprobe(idp)
register struct mse_softc *sc = &mse_sc[idp->id_unit];
register int i;
- mse_registerdev(idp);
/*
* Check for each mouse type in the table.
*/
@@ -259,7 +236,6 @@ mseattach(idp)
struct mse_softc *sc = &mse_sc[unit];
sc->sc_port = idp->id_iobase;
- kdc_mse[unit].kdc_state = DC_IDLE;
#ifdef DEVFS
sc->devfs_token =
devfs_add_devswf(&mse_cdevsw, unit << 1, DV_CHR, 0, 0,
@@ -290,7 +266,6 @@ mseopen(dev, flags, fmt, p)
if (sc->sc_flags & MSESC_OPEN)
return (EBUSY);
sc->sc_flags |= MSESC_OPEN;
- kdc_mse[MSE_UNIT(dev)].kdc_state = DC_BUSY;
sc->sc_obuttons = sc->sc_buttons = 0x7;
sc->sc_deltax = sc->sc_deltay = 0;
sc->sc_bytesread = PROTOBYTES;
@@ -320,7 +295,6 @@ mseclose(dev, flags, fmt, p)
s = spltty();
(*sc->sc_disablemouse)(sc->sc_port);
sc->sc_flags &= ~MSESC_OPEN;
- kdc_mse[MSE_UNIT(dev)].kdc_state = DC_IDLE;
splx(s);
return(0);
}
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c
index 6bc7c9d6c23d..db97c8b399c6 100644
--- a/sys/dev/pci/pci.c
+++ b/sys/dev/pci/pci.c
@@ -1,6 +1,6 @@
/**************************************************************************
**
-** $Id: pci.c,v 1.52 1996/09/02 21:23:04 se Exp $
+** $Id: pci.c,v 1.53 1996/09/05 21:28:51 se Exp $
**
** General subroutines for the PCI bus.
** pci_configure ()
@@ -53,13 +53,11 @@
#include <sys/kernel.h>
#include <sys/sysctl.h>
#include <sys/proc.h> /* declaration of wakeup(), used by vm.h */
-#include <sys/devconf.h>
#include <vm/vm.h>
#include <vm/vm_param.h>
#include <vm/pmap.h>
-#include <sys/devconf.h>
#include <i386/isa/isa_device.h> /* XXX inthand2_t */
@@ -77,21 +75,7 @@
**========================================================
*/
-extern struct kern_devconf kdc_cpu0;
-
-struct kern_devconf kdc_pci0 = {
- 0, 0, 0, /* filled in by dev_attach */
- "pci", 0, { MDDT_BUS, 0 },
- 0, 0, 0, BUS_EXTERNALLEN,
- &kdc_cpu0, /* parent is the CPU */
- 0, /* no parentdata */
- DC_BUSY, /* busses are always busy */
- "PCI bus",
- DC_CLS_BUS /* class */
-};
-
struct pci_devconf {
- struct kern_devconf pdc_kdc;
struct pci_info pdc_pi;
};
@@ -123,10 +107,6 @@ struct pcicb {
u_long pcicb_p_memlimit;
};
-static int pci_externalize (struct kern_devconf *, struct sysctl_req *);
-
-static int pci_internalize (struct kern_devconf *, struct sysctl_req *);
-
static void
not_supported (pcici_t tag, u_long type);
@@ -677,27 +657,7 @@ pci_bus_config (void)
pdcp -> pdc_pi.pi_bus = bus_no;
pdcp -> pdc_pi.pi_device = device;
pdcp -> pdc_pi.pi_func = func;
-
- pdcp -> pdc_kdc.kdc_name = dvp->pd_name;
- pdcp -> pdc_kdc.kdc_unit = unit;
-
- pdcp -> pdc_kdc.kdc_md.mddc_devtype = MDDT_PCI;
-
- pdcp -> pdc_kdc.kdc_externalize = pci_externalize;
- pdcp -> pdc_kdc.kdc_internalize = pci_internalize;
-
- pdcp -> pdc_kdc.kdc_datalen = PCI_EXTERNAL_LEN;
- pdcp -> pdc_kdc.kdc_parent = &kdc_pci0;
- pdcp -> pdc_kdc.kdc_parentdata = &pdcp->pdc_pi;
- pdcp -> pdc_kdc.kdc_state = DC_UNKNOWN;
- pdcp -> pdc_kdc.kdc_description = name;
- pdcp -> pdc_kdc.kdc_shutdown = dvp->pd_shutdown;
-
- /*
- ** And register this device
- */
-
- dev_attach (&pdcp->pdc_kdc);
+ pdcp -> pdc_pi.pi_unit = unit;
/*
** attach device
@@ -937,8 +897,6 @@ void pci_configure()
** hello world ..
*/
- dev_attach(&kdc_pci0);
-
pciroots = 1;
while (pciroots--) {
@@ -1196,39 +1154,6 @@ int pci_map_mem (pcici_t tag, u_long reg, vm_offset_t* va, vm_offset_t* pa)
return (1);
}
-/*------------------------------------------------------------
-**
-** Interface functions for the devconf module.
-**
-**------------------------------------------------------------
-*/
-
-static int
-pci_externalize (struct kern_devconf *kdcp, struct sysctl_req *req)
-{
- struct pci_externalize_buffer buffer;
- struct pci_info * pip = kdcp->kdc_parentdata;
- pcici_t tag;
- int i;
-
- tag = pcibus->pb_tag (pip->pi_bus, pip->pi_device, pip->pi_func);
-
- buffer.peb_pci_info = *pip;
-
- for (i=0; i<PCI_EXT_CONF_LEN; i++) {
- buffer.peb_config[i] = pci_conf_read (tag, i*4);
- };
-
- return SYSCTL_OUT(req, &buffer, sizeof buffer);
-}
-
-
-static int
-pci_internalize (struct kern_devconf *kdcp, struct sysctl_req *re)
-{
- return EOPNOTSUPP;
-}
-
/*-----------------------------------------------------------------------
**
** Pci meta interrupt handler
diff --git a/sys/dev/pci/pcivar.h b/sys/dev/pci/pcivar.h
index 4f4a29f08745..51516ecce4ae 100644
--- a/sys/dev/pci/pcivar.h
+++ b/sys/dev/pci/pcivar.h
@@ -1,6 +1,6 @@
/**************************************************************************
**
-** $Id: pcivar.h,v 1.9 1996/01/25 18:32:00 se Exp $
+** $Id: pcivar.h,v 1.10 1996/03/19 15:02:58 bde Exp $
**
** Declarations for pci device drivers.
**
@@ -132,7 +132,7 @@ struct pci_device {
char* (*pd_probe ) (pcici_t tag, pcidi_t type);
void (*pd_attach) (pcici_t tag, int unit);
u_long *pd_count;
- int (*pd_shutdown) (struct kern_devconf *, int);
+ int (*pd_shutdown) (int, int);
};
/*-----------------------------------------------------------------
@@ -161,6 +161,7 @@ struct pci_info {
u_char pi_device;
u_char pi_func;
u_char pi_dummy;
+ u_char pi_unit;
};
#define PCI_EXT_CONF_LEN (16)
diff --git a/sys/dev/rc/rc.c b/sys/dev/rc/rc.c
index 5614de5662cd..fd37df2b668b 100644
--- a/sys/dev/rc/rc.c
+++ b/sys/dev/rc/rc.c
@@ -46,7 +46,6 @@
#include <sys/uio.h>
#include <sys/kernel.h>
#include <sys/syslog.h>
-#include <sys/devconf.h>
#ifdef DEVFS
#include <sys/devfsext.h>
#endif /*DEVFS*/
@@ -185,7 +184,6 @@ static void rc_hardclose __P((struct rc_chans *));
static int rc_modctl __P((struct rc_chans *, int, int));
static void rc_start __P((struct tty *));
static int rc_param __P((struct tty *, struct termios *));
-static void rc_registerdev __P((struct isa_device *id));
static void rc_reinit __P((struct rc_softc *));
#ifdef RCDEBUG
static void printrcflags();
@@ -227,32 +225,6 @@ rcprobe(dvp)
return 0xF;
}
-static struct kern_devconf kdc_rc[NRC] = { {
- 0, 0, 0, /* filled in by dev_attach */
- "rc", 0, { MDDT_ISA, 0, "tty" },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0, /* parent */
- 0, /* parentdata */
- DC_UNCONFIGURED, /* state */
- "RISCom/8 multiport card",
- DC_CLS_SERIAL /* class */
-} };
-
-static void
-rc_registerdev(id)
- struct isa_device *id;
-{
- int unit;
-
- unit = id->id_unit;
- if (unit != 0)
- kdc_rc[unit] = kdc_rc[0];
- kdc_rc[unit].kdc_unit = unit;
- kdc_rc[unit].kdc_isa = id;
- kdc_rc[unit].kdc_state = DC_UNKNOWN;
- dev_attach(&kdc_rc[unit]);
-}
-
static int
rcattach(dvp)
struct isa_device *dvp;
@@ -273,8 +245,6 @@ rcattach(dvp)
printf("rc%d: %d chans, firmware rev. %c\n", dvp->id_unit,
CD180_NCHAN, (rcin(CD180_GFRCR) & 0xF) + 'A');
- rc_registerdev(dvp);
-
for (chan = 0; chan < CD180_NCHAN; chan++, rc++) {
rc->rc_rcb = rcb;
rc->rc_chan = chan;
diff --git a/sys/dev/scd/scd.c b/sys/dev/scd/scd.c
index 454cd5b20c47..f08439d03de5 100644
--- a/sys/dev/scd/scd.c
+++ b/sys/dev/scd/scd.c
@@ -41,7 +41,7 @@
*/
-/* $Id: scd.c,v 1.23 1996/07/12 04:11:25 bde Exp $ */
+/* $Id: scd.c,v 1.24 1996/07/23 21:51:39 phk Exp $ */
/* Please send any comments to micke@dynas.se */
@@ -63,7 +63,6 @@
#include <sys/errno.h>
#include <sys/dkbad.h>
#include <sys/disklabel.h>
-#include <sys/devconf.h>
#include <sys/kernel.h>
#ifdef DEVFS
#include <sys/devfsext.h>
@@ -199,27 +198,6 @@ static struct bdevsw scd_bdevsw =
{ scdopen, scdclose, scdstrategy, scdioctl, /*16*/
nodump, nopsize, 0, "scd", &scd_cdevsw, -1 };
-static struct kern_devconf kdc_scd[NSCD] = { {
- 0, 0, 0, /* filled in by dev_attach */
- "scd", 0, { MDDT_ISA, 0, "bio" },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0, /* parent */
- 0, /* parentdata */
- DC_UNCONFIGURED, /* status */
- "Sony CD-ROM drive", /* properly filled later */
- DC_CLS_RDISK /* class */
-} };
-
-static inline void
-scd_registerdev(struct isa_device *id)
-{
- if(id->id_unit)
- kdc_scd[id->id_unit] = kdc_scd[0];
- kdc_scd[id->id_unit].kdc_unit = id->id_unit;
- kdc_scd[id->id_unit].kdc_isa = id;
- dev_attach(&kdc_scd[id->id_unit]);
-}
-
int scd_attach(struct isa_device *dev)
{
int unit = dev->id_unit;
@@ -227,9 +205,7 @@ int scd_attach(struct isa_device *dev)
cd->iobase = dev->id_iobase; /* Already set by probe, but ... */
- kdc_scd[dev->id_unit].kdc_state = DC_IDLE;
/* name filled in probe */
- kdc_scd[dev->id_unit].kdc_description = scd_data[dev->id_unit].name;
printf("scd%d: <%s>\n", dev->id_unit, scd_data[dev->id_unit].name);
init_drive(dev->id_unit);
@@ -307,7 +283,6 @@ scdopen(dev_t dev, int flags, int fmt, struct proc *p)
cd->openflag = 1;
cd->flags |= SCDVALID;
- kdc_scd[unit].kdc_state = DC_BUSY;
return 0;
}
@@ -334,7 +309,6 @@ scdclose(dev_t dev, int flags, int fmt, struct proc *p)
cd->flags &= ~SCDSPINNING;
}
- kdc_scd[unit].kdc_state = DC_IDLE;
/* close channel */
cd->openflag = 0;
@@ -723,8 +697,6 @@ scd_probe(struct isa_device *dev)
bzero(&drive_config, sizeof(drive_config));
- scd_registerdev(dev);
-
again:
/* Reset drive */
write_control(dev->id_iobase, CBIT_RESET_DRIVE);
diff --git a/sys/dev/si/si.c b/sys/dev/si/si.c
index bcb301da4496..369d57da12e5 100644
--- a/sys/dev/si/si.c
+++ b/sys/dev/si/si.c
@@ -30,7 +30,7 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
* NO EVENT SHALL THE AUTHORS BE LIABLE.
*
- * $Id: si.c,v 1.50 1996/08/03 00:21:44 peter Exp $
+ * $Id: si.c,v 1.51 1996/08/12 17:12:07 peter Exp $
*/
#ifndef lint
@@ -53,7 +53,6 @@ static const char si_copyright1[] = "@(#) (C) Specialix International, 1990,199
#include <sys/syslog.h>
#include <sys/malloc.h>
#include <sys/sysctl.h>
-#include <sys/devconf.h>
#ifdef DEVFS
#include <sys/devfsext.h>
#endif /*DEVFS*/
@@ -105,7 +104,6 @@ static void sidtrwakeup __P((void *chan));
static int siparam __P((struct tty *, struct termios *));
-static void si_registerdev __P((struct isa_device *id));
static int siprobe __P((struct isa_device *id));
static int siattach __P((struct isa_device *id));
static void si_modem_state __P((struct si_port *pp, struct tty *tp, int hi_ip));
@@ -163,7 +161,6 @@ struct si_softc {
int sc_irq; /* copy of attach irq */
int sc_eisa_iobase; /* EISA io port address */
int sc_eisa_irqbits;
- struct kern_devconf sc_kdc;
#ifdef DEVFS
struct {
void *ttyd;
@@ -253,31 +250,6 @@ static char *si_type[] = {
"SIEISA",
};
-
-static struct kern_devconf si_kdc[NSI] = { {
- 0, 0, 0, /* filled in by dev_attach */
- "si", 0, { MDDT_ISA, 0, "tty" },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0, /* parent */
- 0, /* parent data */
- DC_UNCONFIGURED, /* state */
- "Specialix SI/XIO Host adapter",
- DC_CLS_SERIAL, /* class */
-} };
-
-static void
-si_registerdev(id)
- struct isa_device *id;
-{
- if (id->id_unit != 0) {
- bcopy(&si_kdc[0], &si_kdc[id->id_unit], sizeof(si_kdc[0]));
- }
- si_kdc[id->id_unit].kdc_unit = id->id_unit;
- si_kdc[id->id_unit].kdc_isa = id;
- si_kdc[id->id_unit].kdc_state = DC_UNCONFIGURED;
- dev_attach(&si_kdc[id->id_unit]);
-}
-
/* Look for a valid board at the given mem addr */
static int
siprobe(id)
@@ -290,8 +262,6 @@ siprobe(id)
volatile unsigned char *maddr;
unsigned char *paddr;
- si_registerdev(id);
-
si_pollrate = POLLHZ; /* default 10 per second */
#ifdef REALPOLL
si_realpoll = 1; /* scan always */
@@ -645,9 +615,6 @@ mem_fail:
bzero(tp, sizeof(*tp) * nport);
si_tty = tp;
- /* mark the device state as attached */
- si_kdc[unit].kdc_state = DC_BUSY;
-
/*
* Scan round the ports again, this time initialising.
*/
diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c
index cbf86b377607..2aa4dfc185d0 100644
--- a/sys/dev/sio/sio.c
+++ b/sys/dev/sio/sio.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
- * $Id: sio.c,v 1.143 1996/06/17 14:23:39 bde Exp $
+ * $Id: sio.c,v 1.144 1996/07/17 22:07:23 julian Exp $
*/
#include "opt_comconsole.h"
@@ -61,7 +61,6 @@
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/syslog.h>
-#include <sys/devconf.h>
#ifdef DEVFS
#include <sys/devfsext.h>
#endif
@@ -292,7 +291,6 @@ static void siointr1 __P((struct com_s *com));
static int commctl __P((struct com_s *com, int bits, int how));
static int comparam __P((struct tty *tp, struct termios *t));
static int sioprobe __P((struct isa_device *dev));
-static void sioregisterdev __P((struct isa_device *id));
static void siosettimeout __P((void));
static void comstart __P((struct tty *tp));
static timeout_t comwakeup;
@@ -363,17 +361,6 @@ static struct speedtab comspeedtab[] = {
{ -1, -1 }
};
-static struct kern_devconf kdc_sio[NSIO] = { {
- 0, 0, 0, /* filled in by dev_attach */
- driver_name, 0, { MDDT_ISA, 0, "tty" },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0, /* parent */
- 0, /* parentdata */
- DC_UNCONFIGURED, /* state */
- "Serial port",
- DC_CLS_SERIAL /* class */
-} };
-
#ifdef COM_ESP
/* XXX configure this properly. */
static Port_t likely_com_ports[] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8, };
@@ -468,8 +455,6 @@ siounload(struct pccard_dev *dp)
printf("sio%d already unloaded!\n",dp->isahd.id_unit);
return;
}
- kdc_sio[com->unit].kdc_state = DC_UNCONFIGURED;
- kdc_sio[com->unit].kdc_description = "Serial port";
if (com->tp && (com->tp->t_state & TS_ISOPEN)) {
com->gone = 1;
printf("sio%d: unload\n", dp->isahd.id_unit);
@@ -500,27 +485,6 @@ card_intr(struct pccard_dev *dp)
}
#endif /* NCRD > 0 */
-static void
-sioregisterdev(id)
- struct isa_device *id;
-{
- int unit;
-
- unit = id->id_unit;
-/*
- * If already registered, don't try to re-register.
- */
- if (kdc_sio[unit].kdc_isa)
- return;
- if (unit != 0)
- kdc_sio[unit] = kdc_sio[0];
- kdc_sio[unit].kdc_state = DC_UNCONFIGURED;
- kdc_sio[unit].kdc_description = "Serial port";
- kdc_sio[unit].kdc_unit = unit;
- kdc_sio[unit].kdc_isa = id;
- dev_attach(&kdc_sio[unit]);
-}
-
static int
sioprobe(dev)
struct isa_device *dev;
@@ -534,8 +498,6 @@ sioprobe(dev)
int result;
struct isa_device *xdev;
- sioregisterdev(dev);
-
if (!already_init) {
/*
* Turn off MCR_IENABLE for all likely serial ports. An unused
@@ -856,8 +818,6 @@ sioattach(isdp)
#ifdef DSI_SOFT_MODEM
if((inb(iobase+7) ^ inb(iobase+7)) & 0x80) {
printf(" Digicom Systems, Inc. SoftModem");
- kdc_sio[unit].kdc_description =
- "Serial port: Digicom Systems SoftModem";
goto determined_type;
}
#endif /* DSI_SOFT_MODEM */
@@ -878,8 +838,6 @@ sioattach(isdp)
outb(iobase + com_scr, scr);
if (scr1 != 0xa5 || scr2 != 0x5a) {
printf(" 8250");
- kdc_sio[unit].kdc_description =
- "Serial port: National 8250 or compatible";
goto determined_type;
}
}
@@ -888,36 +846,24 @@ sioattach(isdp)
switch (inb(com->int_id_port) & IIR_FIFO_MASK) {
case FIFO_RX_LOW:
printf(" 16450");
- kdc_sio[unit].kdc_description =
- "Serial port: National 16450 or compatible";
break;
case FIFO_RX_MEDL:
printf(" 16450?");
- kdc_sio[unit].kdc_description =
- "Serial port: maybe National 16450";
break;
case FIFO_RX_MEDH:
printf(" 16550?");
- kdc_sio[unit].kdc_description =
- "Serial port: maybe National 16550";
break;
case FIFO_RX_HIGH:
printf(" 16550A");
if (COM_NOFIFO(isdp)) {
printf(" fifo disabled");
- kdc_sio[unit].kdc_description =
- "Serial port: National 16550A, FIFO disabled";
} else {
com->hasfifo = TRUE;
com->tx_fifo_size = 16;
- kdc_sio[unit].kdc_description =
- "Serial port: National 16550A or compatible";
#ifdef COM_ESP
for (espp = likely_esp_ports; *espp != 0; espp++)
if (espattach(isdp, com, *espp)) {
com->tx_fifo_size = 1024;
- kdc_sio[unit].kdc_description =
- "Serial port: Hayes ESP";
break;
}
#endif
@@ -942,8 +888,6 @@ sioattach(isdp)
} else {
com->tx_fifo_size = 32;
printf(" 16650");
- kdc_sio[unit].kdc_description =
- "Serial port: Startech 16C650 or similar";
}
if (!com->tx_fifo_size)
printf(" fifo disabled");
@@ -991,8 +935,6 @@ determined_type: ;
#endif /* COM_MULTIPORT */
printf("\n");
- kdc_sio[unit].kdc_state = (unit == comconsole) ? DC_BUSY : DC_IDLE;
-
s = spltty();
com_addr(unit) = com;
splx(s);
@@ -1064,7 +1006,6 @@ open_top:
if (error != 0 || com->gone)
goto out;
}
- kdc_sio[unit].kdc_state = DC_BUSY;
if (tp->t_state & TS_ISOPEN) {
/*
* The device is open, so everything has been initialized.
@@ -1280,8 +1221,6 @@ comhardclose(com)
com->active_out = FALSE;
wakeup(&com->active_out);
wakeup(TSA_CARR_ON(tp)); /* restart any wopeners */
- if (!(com->state & CS_DTR_OFF) && unit != comconsole)
- kdc_sio[unit].kdc_state = DC_IDLE;
splx(s);
}
@@ -1342,8 +1281,6 @@ siodtrwakeup(chan)
com = (struct com_s *)chan;
com->state &= ~CS_DTR_OFF;
- if (com->unit != comconsole)
- kdc_sio[com->unit].kdc_state = DC_IDLE;
wakeup(&com->dtr_wait);
}
diff --git a/sys/dev/sr/if_sr.c b/sys/dev/sr/if_sr.c
index bf1cdd1135e1..9d16b6b80600 100644
--- a/sys/dev/sr/if_sr.c
+++ b/sys/dev/sr/if_sr.c
@@ -28,7 +28,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id$
+ * $Id: if_sr.c,v 1.1 1996/07/05 18:49:21 jhay Exp $
*/
/*
@@ -71,7 +71,6 @@
#include <net/bpfdesc.h>
#endif
-#include <sys/devconf.h>
#include <machine/clock.h>
#include <machine/md_var.h>
@@ -118,7 +117,6 @@ static struct sr_hardc {
sca_regs *sca;
- struct kern_devconf kdc;
}sr_hardc[NSR];
struct sr_softc {
@@ -151,7 +149,6 @@ struct sr_softc {
int scachan;
- struct kern_devconf kdc;
};
static int srprobe(struct isa_device *id);
@@ -181,28 +178,6 @@ static int sr_irqtable[16] = {
struct isa_driver srdriver = {srprobe, srattach, "src"};
-static struct kern_devconf kdc_sr_template = {
- 0, 0, 0,
- "sr", 0, { MDDT_ISA, 0, "net" },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0,
- 0,
- DC_UNCONFIGURED,
- "SDL Riscom/N2 Port",
- DC_CLS_NETIF
-};
-
-static struct kern_devconf kdc_src_template = {
- 0, 0, 0,
- "src", 0, { MDDT_ISA, 0, "net" },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0,
- 0,
- DC_UNCONFIGURED,
- "SDL Riscom/N2 Adapter",
- DC_CLS_NETIF
-};
-
static void sr_xmit(struct sr_softc *sc);
static void srstart(struct ifnet *ifp);
static int srioctl(struct ifnet *ifp, int cmd, caddr_t data);
@@ -223,33 +198,6 @@ static void sr_dmac_intr(struct sr_hardc *hc, u_char isr);
static void sr_msci_intr(struct sr_hardc *hc, u_char isr);
static void sr_timer_intr(struct sr_hardc *hc, u_char isr);
-static inline void
-sr_registerdev(int ctlr, int unit)
-{
- struct sr_softc *sc;
-
- sc = &sr_hardc[ctlr].sc[unit];
- sc->kdc = kdc_sr_template;
-
- sc->kdc.kdc_unit = sr_hardc[ctlr].startunit + unit;
- sc->kdc.kdc_parentdata = &sr_hardc[ctlr].kdc;
- dev_attach(&sc->kdc);
-}
-
-static inline void
-src_registerdev(struct isa_device *dvp)
-{
- int unit = dvp->id_unit;
- struct sr_hardc *hc = &sr_hardc[dvp->id_unit];
-
- hc->kdc = kdc_src_template;
-
- hc->kdc.kdc_unit = unit;
- hc->kdc.kdc_parentdata = dvp;
- dev_attach(&hc->kdc);
-}
-
-
/*
* Register the Adapter.
* Probe to see if it is there.
@@ -266,11 +214,6 @@ srprobe(struct isa_device *id)
sca_regs *sca = 0;
/*
- * Register the card.
- */
- src_registerdev(id);
-
- /*
* Now see if the card is realy there.
*
* If it is there, size its memory.
@@ -438,8 +381,6 @@ srattach(struct isa_device *id)
hc->memsize/1024,
hc->numports);
- hc->kdc.kdc_state = DC_BUSY;
-
src_init(id);
sc = hc->sc;
@@ -455,8 +396,6 @@ srattach(struct isa_device *id)
sc->unit = hc->startunit + unit;
sc->scachan = unit%NCHAN;
- sr_registerdev(id->id_unit, unit);
-
sr_init_rx_dmac(sc);
sr_init_tx_dmac(sc);
sr_init_msci(sc);
@@ -474,8 +413,6 @@ srattach(struct isa_device *id)
sc->ifsppp.pp_flags = PP_KEEPALIVE;
- sc->kdc.kdc_state = DC_IDLE;
-
printf("sr%d: Adapter %d, port %d.\n",
sc->unit,
hc->cunit,
@@ -796,8 +733,6 @@ sr_up(struct sr_softc *sc)
sca_regs *sca = sc->hc->sca;
msci_channel *msci = &sca->msci[sc->scachan];
- sc->kdc.kdc_state = DC_BUSY;
-
/*
* Enable transmitter and receiver.
* Raise DTR and RTS.
@@ -840,8 +775,6 @@ sr_down(struct sr_softc *sc)
sca_regs *sca = sc->hc->sca;
msci_channel *msci = &sca->msci[sc->scachan];
- sc->kdc.kdc_state = DC_IDLE;
-
/*
* Disable transmitter and receiver.
* Lower DTR and RTS.
diff --git a/sys/dev/sr/if_sr_isa.c b/sys/dev/sr/if_sr_isa.c
index bf1cdd1135e1..9d16b6b80600 100644
--- a/sys/dev/sr/if_sr_isa.c
+++ b/sys/dev/sr/if_sr_isa.c
@@ -28,7 +28,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id$
+ * $Id: if_sr.c,v 1.1 1996/07/05 18:49:21 jhay Exp $
*/
/*
@@ -71,7 +71,6 @@
#include <net/bpfdesc.h>
#endif
-#include <sys/devconf.h>
#include <machine/clock.h>
#include <machine/md_var.h>
@@ -118,7 +117,6 @@ static struct sr_hardc {
sca_regs *sca;
- struct kern_devconf kdc;
}sr_hardc[NSR];
struct sr_softc {
@@ -151,7 +149,6 @@ struct sr_softc {
int scachan;
- struct kern_devconf kdc;
};
static int srprobe(struct isa_device *id);
@@ -181,28 +178,6 @@ static int sr_irqtable[16] = {
struct isa_driver srdriver = {srprobe, srattach, "src"};
-static struct kern_devconf kdc_sr_template = {
- 0, 0, 0,
- "sr", 0, { MDDT_ISA, 0, "net" },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0,
- 0,
- DC_UNCONFIGURED,
- "SDL Riscom/N2 Port",
- DC_CLS_NETIF
-};
-
-static struct kern_devconf kdc_src_template = {
- 0, 0, 0,
- "src", 0, { MDDT_ISA, 0, "net" },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0,
- 0,
- DC_UNCONFIGURED,
- "SDL Riscom/N2 Adapter",
- DC_CLS_NETIF
-};
-
static void sr_xmit(struct sr_softc *sc);
static void srstart(struct ifnet *ifp);
static int srioctl(struct ifnet *ifp, int cmd, caddr_t data);
@@ -223,33 +198,6 @@ static void sr_dmac_intr(struct sr_hardc *hc, u_char isr);
static void sr_msci_intr(struct sr_hardc *hc, u_char isr);
static void sr_timer_intr(struct sr_hardc *hc, u_char isr);
-static inline void
-sr_registerdev(int ctlr, int unit)
-{
- struct sr_softc *sc;
-
- sc = &sr_hardc[ctlr].sc[unit];
- sc->kdc = kdc_sr_template;
-
- sc->kdc.kdc_unit = sr_hardc[ctlr].startunit + unit;
- sc->kdc.kdc_parentdata = &sr_hardc[ctlr].kdc;
- dev_attach(&sc->kdc);
-}
-
-static inline void
-src_registerdev(struct isa_device *dvp)
-{
- int unit = dvp->id_unit;
- struct sr_hardc *hc = &sr_hardc[dvp->id_unit];
-
- hc->kdc = kdc_src_template;
-
- hc->kdc.kdc_unit = unit;
- hc->kdc.kdc_parentdata = dvp;
- dev_attach(&hc->kdc);
-}
-
-
/*
* Register the Adapter.
* Probe to see if it is there.
@@ -266,11 +214,6 @@ srprobe(struct isa_device *id)
sca_regs *sca = 0;
/*
- * Register the card.
- */
- src_registerdev(id);
-
- /*
* Now see if the card is realy there.
*
* If it is there, size its memory.
@@ -438,8 +381,6 @@ srattach(struct isa_device *id)
hc->memsize/1024,
hc->numports);
- hc->kdc.kdc_state = DC_BUSY;
-
src_init(id);
sc = hc->sc;
@@ -455,8 +396,6 @@ srattach(struct isa_device *id)
sc->unit = hc->startunit + unit;
sc->scachan = unit%NCHAN;
- sr_registerdev(id->id_unit, unit);
-
sr_init_rx_dmac(sc);
sr_init_tx_dmac(sc);
sr_init_msci(sc);
@@ -474,8 +413,6 @@ srattach(struct isa_device *id)
sc->ifsppp.pp_flags = PP_KEEPALIVE;
- sc->kdc.kdc_state = DC_IDLE;
-
printf("sr%d: Adapter %d, port %d.\n",
sc->unit,
hc->cunit,
@@ -796,8 +733,6 @@ sr_up(struct sr_softc *sc)
sca_regs *sca = sc->hc->sca;
msci_channel *msci = &sca->msci[sc->scachan];
- sc->kdc.kdc_state = DC_BUSY;
-
/*
* Enable transmitter and receiver.
* Raise DTR and RTS.
@@ -840,8 +775,6 @@ sr_down(struct sr_softc *sc)
sca_regs *sca = sc->hc->sca;
msci_channel *msci = &sca->msci[sc->scachan];
- sc->kdc.kdc_state = DC_IDLE;
-
/*
* Disable transmitter and receiver.
* Lower DTR and RTS.
diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c
index 6a635ad32c6f..02218f93302a 100644
--- a/sys/dev/syscons/syscons.c
+++ b/sys/dev/syscons/syscons.c
@@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: syscons.c,v 1.163 1996/09/01 18:16:05 sos Exp $
+ * $Id: syscons.c,v 1.164 1996/09/04 22:24:19 sos Exp $
*/
#include "sc.h"
@@ -46,7 +46,6 @@
#include <sys/syslog.h>
#include <sys/errno.h>
#include <sys/malloc.h>
-#include <sys/devconf.h>
#ifdef DEVFS
#include <sys/devfsext.h>
#endif
@@ -302,27 +301,6 @@ gotack:
return (IO_KBDSIZE);
}
-static struct kern_devconf kdc_sc[NSC] = {
- 0, 0, 0, /* filled in by dev_attach */
- "sc", 0, { MDDT_ISA, 0, "tty" },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0, /* parent */
- 0, /* parentdata */
- DC_BUSY, /* the console is almost always busy */
- "Graphics console",
- DC_CLS_DISPLAY /* class */
-};
-
-static inline void
-sc_registerdev(struct isa_device *id)
-{
- if(id->id_unit)
- kdc_sc[id->id_unit] = kdc_sc[0];
- kdc_sc[id->id_unit].kdc_unit = id->id_unit;
- kdc_sc[id->id_unit].kdc_isa = id;
- dev_attach(&kdc_sc[id->id_unit]);
-}
-
#if NAPM > 0
static int
scresume(void *dummy)
@@ -451,7 +429,6 @@ scattach(struct isa_device *dev)
scrn_timer();
update_leds(scp->status);
- sc_registerdev(dev);
printf("sc%d: ", dev->id_unit);
if (crtc_vga)
diff --git a/sys/geom/geom_ccd.c b/sys/geom/geom_ccd.c
index ce52aa5563ae..86de9c2ff671 100644
--- a/sys/geom/geom_ccd.c
+++ b/sys/geom/geom_ccd.c
@@ -1,4 +1,4 @@
-/* $Id: ccd.c,v 1.15 1996/07/23 21:51:13 phk Exp $ */
+/* $Id: ccd.c,v 1.16 1996/07/24 23:45:24 asami Exp $ */
/* $NetBSD: ccd.c,v 1.22 1995/12/08 19:13:26 thorpej Exp $ */
@@ -107,7 +107,6 @@
#include <sys/ioctl.h>
#include <sys/disklabel.h>
#include <ufs/ffs/fs.h>
-#include <sys/devconf.h>
#include <sys/device.h>
#undef KERNEL /* XXX */
#include <sys/disk.h>
diff --git a/sys/gnu/i386/isa/dgb.c b/sys/gnu/i386/isa/dgb.c
index 8e8f2f30ffce..18e69c36bb0b 100644
--- a/sys/gnu/i386/isa/dgb.c
+++ b/sys/gnu/i386/isa/dgb.c
@@ -1,5 +1,5 @@
/*-
- * dgb.c $Id: dgb.c,v 1.18 1996/06/12 04:59:14 gpalmer Exp $
+ * dgb.c $Id: dgb.c,v 1.19 1996/06/18 01:21:40 bde Exp $
*
* Digiboard driver.
*
@@ -40,7 +40,6 @@
#include <sys/sysctl.h>
#include <sys/malloc.h>
#include <sys/syslog.h>
-#include <sys/devconf.h>
#ifdef DEVFS
#include <sys/devfsext.h>
#endif /*DEVFS*/
@@ -175,7 +174,6 @@ static void dgbpoll __P((void *unit_c));
static int dgbattach __P((struct isa_device *dev));
static int dgbprobe __P((struct isa_device *dev));
-static void dgbregisterdev __P((struct isa_device *id));
static void fepcmd(struct dgb_p *port, int cmd, int op1, int op2,
int ncmds, int bytecmd);
@@ -400,35 +398,6 @@ dgbprobe(dev)
return 4; /* we need I/O space of 4 ports */
}
-static struct kern_devconf kdc_dgb[NDGB];
-static struct kern_devconf kdc_dgb_init = {
- 0, 0, 0, /* filled in by dev_attach */
- "dgb", 0, { MDDT_ISA, 0, "tty" },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0, /* parent */
- 0, /* parentdata */
- DC_UNCONFIGURED,
- "DigiBoard multiport card",
- DC_CLS_SERIAL,
-};
-
-static void
-dgbregisterdev(id)
- struct isa_device *id;
-{
- int unit;
-
- unit = id->id_unit;
- kdc_dgb[unit] = kdc_dgb_init;
- kdc_dgb[unit].kdc_unit = unit;
- kdc_dgb[unit].kdc_isa = id;
-
- /* no ports are open yet */
- kdc_dgb[unit].kdc_state = DC_IDLE;
- dev_attach(&kdc_dgb[unit]);
-}
-
-
static int
dgbattach(dev)
struct isa_device *dev;
@@ -871,8 +840,6 @@ load_fep:
hidewin(sc);
- dgbregisterdev(dev);
-
/* register the polling function */
timeout(dgbpoll, (void *)unit, hz/25);
@@ -1040,8 +1007,6 @@ open_top:
* the device is busy
*/
- kdc_dgb[unit].kdc_state = DC_BUSY;
-
out:
splx(s);
@@ -1098,9 +1063,6 @@ dgbclose(dev, flag, mode, p)
if(sc->ports[i].used)
break;
- if(i>= sc->numports)
- kdc_dgb[unit].kdc_state = DC_IDLE;
-
splx(s);
wakeup(TSA_CARR_ON(tp));
diff --git a/sys/i386/apm/apm.c b/sys/i386/apm/apm.c
index 7cdb96b6eea6..9348b7c95d7f 100644
--- a/sys/i386/apm/apm.c
+++ b/sys/i386/apm/apm.c
@@ -14,7 +14,7 @@
*
* Sep, 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD)
*
- * $Id: apm.c,v 1.46 1996/07/11 16:35:12 nate Exp $
+ * $Id: apm.c,v 1.47 1996/08/28 17:54:17 bde Exp $
*/
#include "apm.h"
@@ -42,7 +42,6 @@
#include <vm/vm_param.h>
#include <vm/pmap.h>
#include <sys/syslog.h>
-#include <sys/devconf.h>
#include <i386/apm/apm_setup.h>
static int apm_display_off __P((void));
@@ -66,18 +65,6 @@ struct apm_softc {
#endif
};
-static struct kern_devconf kdc_apm = {
- 0, 0, 0, /* filled in by dev_attach */
- "apm", 0, { MDDT_ISA, 0 },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0, /* parent */
- 0, /* parentdata */
- DC_UNCONFIGURED, /* state */
- "Advanced Power Management BIOS",
- DC_CLS_MISC /* class */
-};
-
-
static struct apm_softc apm_softc;
static struct apmhook *hook[NAPM_HOOK]; /* XXX */
@@ -97,17 +84,6 @@ static struct cdevsw apm_cdevsw =
apmioctl, nostop, nullreset, nodevtotty,/* APM */
seltrue, nommap, NULL , "apm" ,NULL, -1};
-static void
-apm_registerdev(struct isa_device *id)
-{
- if (kdc_apm.kdc_isa)
- return;
- kdc_apm.kdc_state = DC_UNCONFIGURED;
- kdc_apm.kdc_unit = 0;
- kdc_apm.kdc_isa = id;
- dev_attach(&kdc_apm);
-}
-
/* setup APM GDT discriptors */
static void
setup_apm_gdt(u_int code32_base, u_int code16_base, u_int data_base, u_int code_limit, u_int data_limit)
@@ -601,7 +577,6 @@ apmprobe(struct isa_device *dvp)
printf("apm: Only one APM driver supported.\n");
return 0;
}
- apm_registerdev(dvp);
switch (apm_version) {
case APMINI_CANTFIND:
/* silent */
@@ -756,8 +731,6 @@ apmattach(struct isa_device *dvp)
sc->minorversion = 0;
sc->intversion = INTVERSION(sc->majorversion, sc->minorversion);
printf("apm: running in APM 1.0 compatible mode\n");
- kcd_apm.kdc_description =
- "Advanced Power Management BIOS (1.0 compatability mode)",
#else
/* Try to kick bios into 1.1 or greater mode */
apm_driver_version();
@@ -819,7 +792,6 @@ apmattach(struct isa_device *dvp)
apm_hook_establish(APM_HOOK_RESUME , &sc->sc_resume);
apm_event_enable(sc);
- kdc_apm.kdc_state = DC_IDLE;
sc->initialized = 1;
@@ -872,11 +844,9 @@ apmioctl(dev_t dev, int cmd, caddr_t addr, int flag, struct proc *p)
}
break;
case APMIO_ENABLE:
- kdc_apm.kdc_state = DC_BUSY;
apm_event_enable(sc);
break;
case APMIO_DISABLE:
- kdc_apm.kdc_state = DC_IDLE;
apm_event_disable(sc);
break;
case APMIO_HALTCPU:
diff --git a/sys/i386/bios/apm.c b/sys/i386/bios/apm.c
index 7cdb96b6eea6..9348b7c95d7f 100644
--- a/sys/i386/bios/apm.c
+++ b/sys/i386/bios/apm.c
@@ -14,7 +14,7 @@
*
* Sep, 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD)
*
- * $Id: apm.c,v 1.46 1996/07/11 16:35:12 nate Exp $
+ * $Id: apm.c,v 1.47 1996/08/28 17:54:17 bde Exp $
*/
#include "apm.h"
@@ -42,7 +42,6 @@
#include <vm/vm_param.h>
#include <vm/pmap.h>
#include <sys/syslog.h>
-#include <sys/devconf.h>
#include <i386/apm/apm_setup.h>
static int apm_display_off __P((void));
@@ -66,18 +65,6 @@ struct apm_softc {
#endif
};
-static struct kern_devconf kdc_apm = {
- 0, 0, 0, /* filled in by dev_attach */
- "apm", 0, { MDDT_ISA, 0 },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0, /* parent */
- 0, /* parentdata */
- DC_UNCONFIGURED, /* state */
- "Advanced Power Management BIOS",
- DC_CLS_MISC /* class */
-};
-
-
static struct apm_softc apm_softc;
static struct apmhook *hook[NAPM_HOOK]; /* XXX */
@@ -97,17 +84,6 @@ static struct cdevsw apm_cdevsw =
apmioctl, nostop, nullreset, nodevtotty,/* APM */
seltrue, nommap, NULL , "apm" ,NULL, -1};
-static void
-apm_registerdev(struct isa_device *id)
-{
- if (kdc_apm.kdc_isa)
- return;
- kdc_apm.kdc_state = DC_UNCONFIGURED;
- kdc_apm.kdc_unit = 0;
- kdc_apm.kdc_isa = id;
- dev_attach(&kdc_apm);
-}
-
/* setup APM GDT discriptors */
static void
setup_apm_gdt(u_int code32_base, u_int code16_base, u_int data_base, u_int code_limit, u_int data_limit)
@@ -601,7 +577,6 @@ apmprobe(struct isa_device *dvp)
printf("apm: Only one APM driver supported.\n");
return 0;
}
- apm_registerdev(dvp);
switch (apm_version) {
case APMINI_CANTFIND:
/* silent */
@@ -756,8 +731,6 @@ apmattach(struct isa_device *dvp)
sc->minorversion = 0;
sc->intversion = INTVERSION(sc->majorversion, sc->minorversion);
printf("apm: running in APM 1.0 compatible mode\n");
- kcd_apm.kdc_description =
- "Advanced Power Management BIOS (1.0 compatability mode)",
#else
/* Try to kick bios into 1.1 or greater mode */
apm_driver_version();
@@ -819,7 +792,6 @@ apmattach(struct isa_device *dvp)
apm_hook_establish(APM_HOOK_RESUME , &sc->sc_resume);
apm_event_enable(sc);
- kdc_apm.kdc_state = DC_IDLE;
sc->initialized = 1;
@@ -872,11 +844,9 @@ apmioctl(dev_t dev, int cmd, caddr_t addr, int flag, struct proc *p)
}
break;
case APMIO_ENABLE:
- kdc_apm.kdc_state = DC_BUSY;
apm_event_enable(sc);
break;
case APMIO_DISABLE:
- kdc_apm.kdc_state = DC_IDLE;
apm_event_disable(sc);
break;
case APMIO_HALTCPU:
diff --git a/sys/i386/eisa/3c5x9.c b/sys/i386/eisa/3c5x9.c
index f0284aeaf1f4..e16d9c3774bf 100644
--- a/sys/i386/eisa/3c5x9.c
+++ b/sys/i386/eisa/3c5x9.c
@@ -19,7 +19,7 @@
* 4. Modifications may be freely made to this file if the above conditions
* are met.
*
- * $Id: 3c5x9.c,v 1.3 1996/06/12 05:02:39 gpalmer Exp $
+ * $Id: 3c5x9.c,v 1.4 1996/07/19 13:19:47 amurai Exp $
*/
#include "eisa.h"
@@ -27,7 +27,6 @@
#include <sys/param.h>
#include <sys/systm.h>
-#include <sys/devconf.h>
#include <sys/kernel.h>
#include <machine/clock.h>
@@ -38,7 +37,6 @@
#include <netinet/if_ether.h>
#include <i386/isa/if_epreg.h>
-#include <i386/isa/isa_device.h> /* For kdc_isa0 */
#include <i386/eisa/eisaconf.h>
#define EISA_DEVICE_ID_3COM_3C509_TP 0x506d5090
@@ -80,17 +78,6 @@ struct eisa_driver ep_eisa_driver = {
DATA_SET (eisadriver_set, ep_eisa_driver);
-static struct kern_devconf kdc_eisa_ep = {
- 0, 0, 0, /* filled in by dev_attach */
- "ep", 0, { MDDT_EISA, 0, "net" },
- eisa_generic_externalize, 0, 0, EISA_EXTERNALLEN,
- &kdc_eisa0, /* parent */
- 0, /* parentdata */
- DC_UNCONFIGURED, /* always start out here */
- NULL,
- DC_CLS_MISC /* host adapters aren't special */
-};
-
static char *ep_match __P((eisa_id_t type));
static char*
@@ -181,12 +168,7 @@ ep_eisa_probe(void)
continue;
}
eisa_add_intr(e_dev, irq);
- eisa_registerdev(e_dev, &ep_eisa_driver, &kdc_eisa_ep);
- if(e_dev->id != EISA_DEVICE_ID_3COM_3C579_TP &&
- e_dev->id != EISA_DEVICE_ID_3COM_3C579_BNC) {
- /* Our real parent is the isa bus. Say so. */
- e_dev->kdc->kdc_parent = &kdc_isa0;
- }
+ eisa_registerdev(e_dev, &ep_eisa_driver);
count++;
}
return count;
@@ -238,7 +220,6 @@ ep_eisa_attach(e_dev)
ep_boards++;
sc->stat = 0;
- sc->kdc = e_dev->kdc;
level_intr = FALSE;
switch(e_dev->id) {
case EISA_DEVICE_ID_3COM_3C509_TP:
diff --git a/sys/i386/eisa/aha1742.c b/sys/i386/eisa/aha1742.c
index d8fdf78fd966..35a64ee3ad1f 100644
--- a/sys/i386/eisa/aha1742.c
+++ b/sys/i386/eisa/aha1742.c
@@ -14,7 +14,7 @@
*
* commenced: Sun Sep 27 18:14:01 PDT 1992
*
- * $Id: aha1742.c,v 1.53 1996/05/22 00:03:50 dima Exp $
+ * $Id: aha1742.c,v 1.54 1996/06/12 05:02:39 gpalmer Exp $
*/
#include <sys/types.h>
@@ -26,7 +26,6 @@
#include <sys/kernel.h>
#include <sys/sysctl.h>
#include <sys/systm.h>
-#include <sys/devconf.h>
#include <sys/malloc.h>
#include <sys/buf.h>
#include <sys/proc.h>
@@ -341,18 +340,6 @@ static struct scsi_device ahb_dev =
{ 0, 0 }
};
-static struct kern_devconf kdc_ahb = {
- 0, 0, 0, /* filled in by dev_attach */
- "ahb", 0, { MDDT_EISA, 0, "bio" },
- eisa_generic_externalize, 0, 0, EISA_EXTERNALLEN,
- &kdc_eisa0, /* parent */
- 0, /* parentdata */
- DC_UNCONFIGURED, /* always start out here */
- NULL,
- DC_CLS_MISC /* host adapters aren't special */
-};
-
-
#endif /*KERNEL */
#ifndef KERNEL
@@ -504,7 +491,7 @@ ahbprobe(void)
continue;
}
eisa_add_intr(e_dev, irq);
- eisa_registerdev(e_dev, &ahb_eisa_driver, &kdc_ahb);
+ eisa_registerdev(e_dev, &ahb_eisa_driver);
count++;
}
return count;
@@ -640,7 +627,6 @@ ahb_attach(e_dev)
eisa_release_intr(e_dev, irq, ahbintr);
return -1;
}
- e_dev->kdc->kdc_state = DC_BUSY; /* host adapters always busy */
/* Attach sub-devices - always succeeds */
ahb_bus_attach(ahb);
diff --git a/sys/i386/eisa/aic7770.c b/sys/i386/eisa/aic7770.c
index eb15d487e06a..51933ab91010 100644
--- a/sys/i386/eisa/aic7770.c
+++ b/sys/i386/eisa/aic7770.c
@@ -29,7 +29,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: aic7770.c,v 1.29 1996/05/30 07:18:52 gibbs Exp $
+ * $Id: aic7770.c,v 1.30 1996/08/28 18:00:25 bde Exp $
*/
#if defined(__FreeBSD__)
@@ -39,9 +39,6 @@
#include <sys/param.h>
#include <sys/systm.h>
-#if defined(__FreeBSD__)
-#include <sys/devconf.h>
-#endif
#include <sys/kernel.h>
#if defined(__NetBSD__)
@@ -96,18 +93,6 @@ static struct eisa_driver ahc_eisa_driver = {
DATA_SET (eisadriver_set, ahc_eisa_driver);
-static struct kern_devconf kdc_aic7770 = {
- 0, 0, 0, /* filled in by dev_attach */
- "ahc", 0, { MDDT_EISA, 0, "bio" },
- eisa_generic_externalize, 0, 0, EISA_EXTERNALLEN,
- &kdc_eisa0, /* parent */
- 0, /* parentdata */
- DC_UNCONFIGURED, /* always start out here */
- NULL,
- DC_CLS_MISC /* host adapters aren't special */
-};
-
-
static char *aic7770_match __P((eisa_id_t type));
static char*
@@ -174,12 +159,7 @@ aic7770probe(void)
continue;
}
eisa_add_intr(e_dev, irq);
- eisa_registerdev(e_dev, &ahc_eisa_driver, &kdc_aic7770);
- if(e_dev->id == EISA_DEVICE_ID_ADAPTEC_284xB
- || e_dev->id == EISA_DEVICE_ID_ADAPTEC_284x) {
- /* Our real parent is the isa bus. Say so. */
- e_dev->kdc->kdc_parent = &kdc_isa0;
- }
+ eisa_registerdev(e_dev, &ahc_eisa_driver);
count++;
}
return count;
@@ -488,7 +468,6 @@ ahc_eisa_attach(parent, self, aux)
return -1;
}
- e_dev->kdc->kdc_state = DC_BUSY; /* host adapters always busy */
#elif defined(__NetBSD__)
intrstr = eisa_intr_string(ec, ih);
/*
diff --git a/sys/i386/eisa/bt74x.c b/sys/i386/eisa/bt74x.c
index 28ab27546959..2b607fc8fbee 100644
--- a/sys/i386/eisa/bt74x.c
+++ b/sys/i386/eisa/bt74x.c
@@ -19,7 +19,7 @@
* 4. Modifications may be freely made to this file if the above conditions
* are met.
*
- * $Id: bt74x.c,v 1.5 1996/02/26 01:01:41 gibbs Exp $
+ * $Id: bt74x.c,v 1.6 1996/06/12 05:02:40 gpalmer Exp $
*/
#include "eisa.h"
@@ -27,7 +27,6 @@
#include <sys/param.h>
#include <sys/systm.h>
-#include <sys/devconf.h>
#include <sys/kernel.h>
#include <scsi/scsi_all.h>
#include <scsi/scsiconf.h>
@@ -103,17 +102,6 @@ struct eisa_driver bt_eisa_driver = {
DATA_SET (eisadriver_set, bt_eisa_driver);
-static struct kern_devconf kdc_eisa_bt = {
- 0, 0, 0, /* filled in by dev_attach */
- "bt", 0, { MDDT_EISA, 0, "bio" },
- eisa_generic_externalize, 0, 0, EISA_EXTERNALLEN,
- &kdc_eisa0, /* parent */
- 0, /* parentdata */
- DC_UNCONFIGURED, /* always start out here */
- NULL,
- DC_CLS_MISC /* host adapters aren't special */
-};
-
static char *bt_match __P((eisa_id_t type));
static char*
@@ -288,7 +276,7 @@ bt_eisa_probe(void)
}
eisa_add_intr(e_dev, irq);
- eisa_registerdev(e_dev, &bt_eisa_driver, &kdc_eisa_bt);
+ eisa_registerdev(e_dev, &bt_eisa_driver);
count++;
}
@@ -360,8 +348,6 @@ bt_eisa_attach(e_dev)
return -1;
}
- e_dev->kdc->kdc_state = DC_BUSY; /* host adapters always busy */
-
/* Attach sub-devices - always succeeds */
bt_attach(bt);
diff --git a/sys/i386/eisa/eisaconf.c b/sys/i386/eisa/eisaconf.c
index 4b0d46422afb..12b63352802f 100644
--- a/sys/i386/eisa/eisaconf.c
+++ b/sys/i386/eisa/eisaconf.c
@@ -28,14 +28,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: eisaconf.c,v 1.20 1996/06/12 05:02:41 gpalmer Exp $
+ * $Id: eisaconf.c,v 1.21 1996/08/31 14:47:30 bde Exp $
*/
#include <sys/param.h>
#include <sys/systm.h>
-#include <sys/devconf.h>
#include <sys/kernel.h>
#include <sys/sysctl.h>
-#include <sys/conf.h> /* For kdc_isa */
+#include <sys/conf.h>
#include <sys/malloc.h>
#include <i386/eisa/eisaconf.h>
@@ -47,19 +46,6 @@ struct eisa_device_node{
struct eisa_device_node *next;
};
-extern struct kern_devconf kdc_cpu0;
-
-struct kern_devconf kdc_eisa0 = {
- 0, 0, 0, /* filled in by dev_attach */
- "eisa", 0, { MDDT_BUS, 0 },
- 0, 0, 0, BUS_EXTERNALLEN,
- &kdc_cpu0, /* parent is the CPU */
- 0, /* no parentdata */
- DC_BUSY, /* busses are always busy */
- NULL,
- DC_CLS_BUS /* class */
-};
-
/*
* This should probably be a list of "struct device" once it exists.
* A struct device will incorperate ioconf and driver entry point data
@@ -204,16 +190,6 @@ eisa_configure()
e_dev->full_name);
/* Should set the iosize, but I don't have a spec handy */
- kdc_eisa0.kdc_description =
- (char *)malloc(strlen(e_dev->full_name)
- + sizeof("EISA bus <>")
- + 1, M_DEVBUF, M_NOWAIT);
- if (!kdc_eisa0.kdc_description) {
- panic("Eisa probe unable to malloc");
- }
- sprintf((char *)kdc_eisa0.kdc_description, "EISA bus <%s>",
- e_dev->full_name);
- dev_attach(&kdc_eisa0);
printf("Probing for devices on the EISA bus\n");
dev_node = dev_node->next;
}
@@ -263,7 +239,6 @@ eisa_configure()
}
/* Ensure registration has ended */
reg_state.in_registration = 0;
- e_dev->kdc->kdc_unit = e_dev->unit;
}
else {
/* Announce unattached device */
@@ -379,14 +354,9 @@ eisa_reg_end(e_dev)
*/
char string[25];
- if (e_dev->kdc && (e_dev->kdc->kdc_parent == &kdc_isa0)) {
- sprintf(string, " on isa");
- }
- else {
- sprintf(string, " on %s0 slot %d",
- mainboard_drv.name,
- e_dev->ioconf.slot);
- }
+ sprintf(string, " on %s0 slot %d",
+ mainboard_drv.name,
+ e_dev->ioconf.slot);
eisa_reg_print(e_dev, string, NULL);
printf("\n");
reg_state.in_registration = 0;
@@ -620,7 +590,6 @@ eisa_reg_resvaddr(e_dev, head, resvaddr, reg_count)
eisa_reg_print(e_dev, buf,
*reg_count ? &separator : NULL);
(*reg_count)++;
- e_dev->kdc->kdc_datalen += sizeof(resvaddr_t);
return (0);
}
}
@@ -668,94 +637,11 @@ eisa_reg_iospace(e_dev, resvaddr)
}
int
-eisa_registerdev(e_dev, driver, kdc_template)
+eisa_registerdev(e_dev, driver)
struct eisa_device *e_dev;
struct eisa_driver *driver;
- struct kern_devconf *kdc_template;
{
e_dev->driver = driver; /* Driver now owns this device */
- e_dev->kdc = (struct kern_devconf *)malloc(sizeof(struct kern_devconf),
- M_DEVBUF, M_NOWAIT);
- if (!e_dev->kdc) {
- printf("WARNING: eisa_registerdev unable to malloc! "
- "Device kdc will not be registerd\n");
- return 1;
- }
- bcopy(kdc_template, e_dev->kdc, sizeof(*kdc_template));
- e_dev->kdc->kdc_description = e_dev->full_name;
- e_dev->kdc->kdc_parentdata = e_dev;
- dev_attach(e_dev->kdc);
return (0);
}
-int
-eisa_generic_externalize(struct kern_devconf *kdc, struct sysctl_req *req)
-{
- struct eisa_device *e_dev;
- resvaddr_t *node;
- void *buf; /* Temporary externalizing buffer */
- void *bufp; /* Current offset in the buffer */
- void *offset; /* Offset relative to target address space */
- void *ioa_prev; /* Prev Node entries relative to target address space */
- void *ma_prev; /* Prev Node entries relative to target address space */
- int retval;
-
- offset = (char *)req->oldptr + req->oldidx;
- buf = malloc(kdc->kdc_datalen, M_TEMP, M_NOWAIT);
- if (!buf)
- return 0;
-
- bufp = buf;
- bcopy(kdc->kdc_eisa, bufp, sizeof(struct eisa_device));
- e_dev = bufp;
-
- /* Calculate initial prev nodes */
- ioa_prev = (char *)offset + ((char *)&(e_dev->ioconf.ioaddrs.lh_first)
- - (char *)e_dev);
- ma_prev = (char *)offset + ((char *)&(e_dev->ioconf.maddrs.lh_first)
- - (char *)e_dev);
-
- offset = (char *)offset + sizeof(*e_dev);
- bufp = (char *)bufp + sizeof(*e_dev);
-
- if (e_dev->ioconf.ioaddrs.lh_first) {
- node = e_dev->ioconf.ioaddrs.lh_first;
- e_dev->ioconf.ioaddrs.lh_first = offset;
- for(;node;node = node->links.le_next) {
- resvaddr_t *out_node;
-
- bcopy(node, bufp, sizeof(resvaddr_t));
- out_node = (resvaddr_t *)bufp;
- bufp = (char *)bufp + sizeof(resvaddr_t);
- offset = (char *)offset + sizeof(resvaddr_t);
-
- out_node->links.le_prev = ioa_prev;
- ioa_prev = (char *)ioa_prev + sizeof(resvaddr_t);
-
- if (out_node->links.le_next)
- out_node->links.le_next = offset;
- }
- }
- if (e_dev->ioconf.maddrs.lh_first) {
- node = e_dev->ioconf.maddrs.lh_first;
- e_dev->ioconf.maddrs.lh_first = offset;
- for(;node;node = node->links.le_next) {
- resvaddr_t *out_node;
-
- bcopy(node, bufp, sizeof(resvaddr_t));
- out_node = (resvaddr_t *)bufp;
- bufp = (char *)bufp + sizeof(resvaddr_t);
- offset = (char *)offset + sizeof(resvaddr_t);
-
- out_node->links.le_prev = ma_prev;
- ma_prev = (char *)ma_prev + sizeof(resvaddr_t);
-
- if (out_node->links.le_next)
- out_node->links.le_next = offset;
- }
- }
-
- retval = SYSCTL_OUT(req, buf, kdc->kdc_datalen);
- free(buf, M_TEMP);
- return retval;
-}
diff --git a/sys/i386/eisa/eisaconf.h b/sys/i386/eisa/eisaconf.h
index c0372395bea8..5bceffb360c7 100644
--- a/sys/i386/eisa/eisaconf.h
+++ b/sys/i386/eisa/eisaconf.h
@@ -28,7 +28,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: eisaconf.h,v 1.8 1996/01/30 22:53:51 mpp Exp $
+ * $Id: eisaconf.h,v 1.9 1996/04/20 21:21:50 gibbs Exp $
*/
#ifndef _I386_EISA_EISACONF_H_
@@ -110,15 +110,12 @@ int eisa_add_iospace __P((struct eisa_device *, u_long, u_long, int));
int eisa_reg_iospace __P((struct eisa_device *, resvaddr_t *));
int eisa_add_mspace __P((struct eisa_device *, u_long, u_long, int));
int eisa_reg_mspace __P((struct eisa_device *, resvaddr_t *));
-int eisa_registerdev __P((struct eisa_device *, struct eisa_driver *, struct kern_devconf *));
+int eisa_registerdev __P((struct eisa_device *, struct eisa_driver *));
struct sysctl_req;
int eisa_externalize (struct eisa_device *, struct sysctl_req*);
-int eisa_generic_externalize (struct kern_devconf *, struct sysctl_req *);
-extern struct kern_devconf kdc_eisa0;
-
#define EISA_EXTERNALLEN (sizeof(struct eisa_device))
#endif /* _I386_EISA_EISACONF_H_ */
diff --git a/sys/i386/i386/identcpu.c b/sys/i386/i386/identcpu.c
index 4c49f3ee6f81..81a24e7c25cc 100644
--- a/sys/i386/i386/identcpu.c
+++ b/sys/i386/i386/identcpu.c
@@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: Id: machdep.c,v 1.193 1996/06/18 01:22:04 bde Exp
- * $Id: identcpu.c,v 1.3 1996/08/10 06:35:35 peter Exp $
+ * $Id: identcpu.c,v 1.4 1996/08/10 08:04:24 peter Exp $
*/
#include <sys/param.h>
@@ -43,7 +43,6 @@
#include <sys/sysproto.h>
#include <sys/kernel.h>
#include <sys/sysctl.h>
-#include <sys/devconf.h>
#include <machine/cpu.h>
#include <machine/reg.h>
@@ -51,7 +50,6 @@
#include <machine/clock.h>
#include <machine/specialreg.h>
#include <machine/sysarch.h>
-#include <machine/devconf.h>
#include <machine/md_var.h>
/* XXX - should be in header file */
@@ -69,17 +67,6 @@ SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD, machine, 0, "");
static char cpu_model[128];
SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD, cpu_model, 0, "");
-struct kern_devconf kdc_cpu0 = {
- 0, 0, 0, /* filled in by dev_attach */
- "cpu", 0, { MDDT_CPU },
- 0, 0, 0, CPU_EXTERNALLEN,
- 0, /* CPU has no parent */
- 0, /* no parentdata */
- DC_BUSY, /* the CPU is always busy */
- cpu_model, /* no sense in duplication */
- DC_CLS_CPU /* class */
-};
-
static struct cpu_nameclass i386_cpus[] = {
{ "Intel 80286", CPUCLASS_286 }, /* CPU_286 */
{ "i386SX", CPUCLASS_386 }, /* CPU_386SX */
@@ -273,7 +260,6 @@ identifycpu(void)
default:
break;
}
- dev_attach(&kdc_cpu0);
}
/*
diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c
index 6e771c7468c3..e4186eeaace0 100644
--- a/sys/i386/i386/machdep.c
+++ b/sys/i386/i386/machdep.c
@@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
- * $Id: machdep.c,v 1.200 1996/09/01 02:16:07 nate Exp $
+ * $Id: machdep.c,v 1.201 1996/09/03 18:50:36 nate Exp $
*/
#include "npx.h"
@@ -64,7 +64,6 @@
#include <sys/sysent.h>
#include <sys/tty.h>
#include <sys/sysctl.h>
-#include <sys/devconf.h>
#include <sys/vmmeter.h>
#ifdef SYSVSHM
@@ -106,7 +105,6 @@
#include <machine/specialreg.h>
#include <machine/sysarch.h>
#include <machine/cons.h>
-#include <machine/devconf.h>
#include <machine/bootinfo.h>
#include <machine/md_var.h>
#ifdef PERFMON
@@ -1535,9 +1533,3 @@ bad:
bp->b_flags |= B_ERROR;
return(-1);
}
-
-int
-disk_externalize(int drive, struct sysctl_req *req)
-{
- return SYSCTL_OUT(req, &drive, sizeof drive);
-}
diff --git a/sys/i386/isa/aha1542.c b/sys/i386/isa/aha1542.c
index 1ee7db38b512..bb28b93d7014 100644
--- a/sys/i386/isa/aha1542.c
+++ b/sys/i386/isa/aha1542.c
@@ -12,7 +12,7 @@
* on the understanding that TFS is not responsible for the correct
* functioning of this software in any circumstances.
*
- * $Id: aha1542.c,v 1.59 1996/06/12 05:03:34 gpalmer Exp $
+ * $Id: aha1542.c,v 1.60 1996/07/20 22:02:44 joerg Exp $
*/
/*
@@ -42,7 +42,6 @@
#endif /* KERNEL */
#include <scsi/scsi_all.h>
#include <scsi/scsiconf.h>
-#include <sys/devconf.h>
#ifdef KERNEL
#include <sys/kernel.h>
@@ -381,27 +380,6 @@ struct isa_driver ahadriver =
"aha"
};
-static struct kern_devconf kdc_aha[NAHA] = { {
- 0, 0, 0, /* filled in by dev_attach */
- "aha", 0, { MDDT_ISA, 0, "bio" },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0, /* parent */
- 0, /* parentdata */
- DC_UNCONFIGURED, /* always start out here */
- "Adaptec 154x-series SCSI host adapter",
- DC_CLS_MISC /* SCSI host adapters aren't special */
-} };
-
-static inline void
-aha_registerdev(struct isa_device *id)
-{
- if(id->id_unit)
- kdc_aha[id->id_unit] = kdc_aha[0];
- kdc_aha[id->id_unit].kdc_unit = id->id_unit;
- kdc_aha[id->id_unit].kdc_parentdata = id;
- dev_attach(&kdc_aha[id->id_unit]);
-}
-
#endif /* KERNEL */
static int ahaunit = 0;
@@ -605,10 +583,6 @@ ahaprobe(dev)
ahadata[unit] = aha;
aha->aha_base = dev->id_iobase;
-#ifndef DEV_LKM
- aha_registerdev(dev);
-#endif
-
/*
* Try initialise a unit at this location
* sets up dma and bus speed, loads aha->aha_int
@@ -675,7 +649,6 @@ ahaattach(dev)
/*
* ask the adapter what subunits are present
*/
- kdc_aha[unit].kdc_state = DC_BUSY; /* host adapters are always busy */
scsi_attachdevs(scbus);
return 1;
diff --git a/sys/i386/isa/aic6360.c b/sys/i386/isa/aic6360.c
index db958a1b78f8..d4dbb4a6b2f3 100644
--- a/sys/i386/isa/aic6360.c
+++ b/sys/i386/isa/aic6360.c
@@ -31,7 +31,7 @@
*/
/*
- * $Id: aic6360.c,v 1.20 1996/03/10 07:04:43 gibbs Exp $
+ * $Id: aic6360.c,v 1.21 1996/05/02 10:43:08 phk Exp $
*
* Acknowledgements: Many of the algorithms used in this driver are
* inspired by the work of Julian Elischer (julian@tfs.com) and
@@ -124,7 +124,6 @@
#include <scsi/scsi_all.h>
#include <scsi/scsiconf.h>
-#include <sys/devconf.h>
#include <machine/clock.h>
#include <i386/isa/isa_device.h>
@@ -688,26 +687,6 @@ static struct scsi_device aic_dev = {
0
};
-static struct kern_devconf kdc_aic[NAIC] = { {
- 0, 0, 0, /* filled in by dev_attach */
- "aic", 0, { MDDT_ISA, 0, "bio" },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0, /* parent */
- 0, /* parentdata */
- DC_UNCONFIGURED, /* start out in unconfig state */
- "Adaptec AIC-6360 SCSI host adapter chipset",
- DC_CLS_MISC /* host adapters aren't special */
-} };
-
-static inline void
-aic_registerdev(struct isa_device *id)
-{
- if(id->id_unit)
- kdc_aic[id->id_unit] = kdc_aic[0];
- kdc_aic[id->id_unit].kdc_unit = id->id_unit;
- kdc_aic[id->id_unit].kdc_parentdata = id;
- dev_attach(&kdc_aic[id->id_unit]);
-}
/*
* INITIALIZATION ROUTINES (probe, attach ++)
@@ -744,9 +723,6 @@ aicprobe(dev)
bzero(aic, sizeof(struct aic_data));
aicdata[unit] = aic;
aic->iobase = dev->id_iobase;
-#ifndef DEV_LKM
- aic_registerdev(dev);
-#endif /* not DEV_LKM */
if (aic_find(aic) != 0) {
aicdata[unit] = NULL;
@@ -844,7 +820,6 @@ aicattach(dev)
/*
* ask the adapter what subunits are present
*/
- kdc_aic[unit].kdc_state = DC_BUSY; /* host adapters are always busy */
scsi_attachdevs(scbus);
return 1;
diff --git a/sys/i386/isa/asc.c b/sys/i386/isa/asc.c
index 9bd21d7e5ed4..173784af06a5 100644
--- a/sys/i386/isa/asc.c
+++ b/sys/i386/isa/asc.c
@@ -34,7 +34,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/*
- * $Id: asc.c,v 1.19 1996/04/13 12:18:43 bde Exp $
+ * $Id: asc.c,v 1.20 1996/06/18 01:22:12 bde Exp $
*/
#include "asc.h"
@@ -67,7 +67,6 @@
#include <machine/asc_ioctl.h>
-#include <sys/devconf.h>
#include <i386/isa/isa.h>
#include <i386/isa/isa_device.h>
#include <i386/isa/ascreg.h>
@@ -213,26 +212,6 @@ static struct cdevsw asc_cdevsw =
ascioctl, nostop, nullreset, nodevtotty, /* asc */
ascselect, nommap, NULL, "asc", NULL, -1 };
-static struct kern_devconf kdc_asc[NASC] = { {
- 0, 0, 0, /* filled in by dev_attach */
- "asc", 0, { MDDT_ISA, 0, "tty" },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0, /* parent */
- 0, /* parentdata */
- DC_UNCONFIGURED, /* state */
- "GI1904 Hand scanner",
- DC_CLS_MISC
-} };
-
-static inline void
-asc_registerdev(struct isa_device *id)
-{
- if(id->id_unit)
- kdc_asc[id->id_unit] = kdc_asc[0];
- kdc_asc[id->id_unit].kdc_unit = id->id_unit;
- kdc_asc[id->id_unit].kdc_isa = id;
- dev_attach(&kdc_asc[id->id_unit]);
-}
#define STATIC static
#else
#define STATIC
@@ -476,8 +455,6 @@ ascattach(struct isa_device *isdp)
#else
scu->selp.si_flags=0;
scu->selp.si_pid=(pid_t)0;
- kdc_asc[isdp->id_unit].kdc_state = DC_BUSY; /* XXX don't know better */
- asc_registerdev(isdp);
#endif
#ifdef DEVFS
#define ASC_UID 0
diff --git a/sys/i386/isa/atapi.c b/sys/i386/isa/atapi.c
index 8c51d70a9d0a..4f10d56e8376 100644
--- a/sys/i386/isa/atapi.c
+++ b/sys/i386/isa/atapi.c
@@ -170,7 +170,7 @@ static int atapi_start_cmd (struct atapi *ata, struct atapicmd *ac);
static int atapi_wait_cmd (struct atapi *ata, struct atapicmd *ac);
extern int wdstart (int ctrlr);
-extern int wcdattach(struct atapi*, int, struct atapi_params*, int, struct kern_devconf*);
+extern int wcdattach(struct atapi*, int, struct atapi_params*, int);
/*
* Probe the ATAPI device at IDE controller `ctlr', drive `unit'.
@@ -179,7 +179,7 @@ extern int wcdattach(struct atapi*, int, struct atapi_params*, int, struct kern_
#ifdef ATAPI_MODULE
static
#endif
-int atapi_attach (int ctlr, int unit, int port, struct kern_devconf *parent)
+int atapi_attach (int ctlr, int unit, int port)
{
struct atapi *ata = atapitab + ctlr;
struct atapi_params *ap;
@@ -241,7 +241,6 @@ int atapi_attach (int ctlr, int unit, int port, struct kern_devconf *parent)
ata->port = port;
ata->ctrlr = ctlr;
- ata->parent = parent;
ata->attached[unit] = 0;
#ifdef DEBUG
ata->debug = 1;
@@ -275,7 +274,7 @@ int atapi_attach (int ctlr, int unit, int port, struct kern_devconf *parent)
case AT_TYPE_CDROM: /* CD-ROM device */
#if NWCD > 0
/* ATAPI CD-ROM */
- if (wcdattach (ata, unit, ap, ata->debug, parent) < 0)
+ if (wcdattach (ata, unit, ap, ata->debug) < 0)
break;
/* Device attached successfully. */
ata->attached[unit] = 1;
diff --git a/sys/i386/isa/atapi.h b/sys/i386/isa/atapi.h
index 6f3f142fadae..d43241be8693 100644
--- a/sys/i386/isa/atapi.h
+++ b/sys/i386/isa/atapi.h
@@ -195,7 +195,6 @@ struct atapidrv { /* delayed attach info */
int unit; /* drive unit, 0/1 */
int port; /* controller base port */
int attached; /* the drive is attached */
- struct kern_devconf *parent; /* the devconf info pattern */
};
struct wcd;
@@ -223,7 +222,6 @@ struct atapi { /* ATAPI controller data */
u_char slow : 1; /* slow reaction device */
u_char attached[2]; /* units are attached to subdrivers */
struct atapi_params *params[2]; /* params for units 0,1 */
- struct kern_devconf *parent; /* parent configuration pattern */
struct atapicmd *queue; /* queue of commands to perform */
struct atapicmd *tail; /* tail of queue */
struct atapicmd *free; /* queue of free command blocks */
@@ -232,7 +230,6 @@ struct atapi { /* ATAPI controller data */
#ifdef KERNEL
struct atapi;
-struct kern_devconf;
extern struct atapidrv atapi_drvtab[4]; /* delayed attach info */
extern int atapi_ndrv; /* the number of potential drives */
@@ -248,7 +245,7 @@ extern struct atapi *atapi_tab; /* the table of atapi controllers */
#endif
#ifndef ATAPI_MODULE
-int atapi_attach (int ctlr, int unit, int port, struct kern_devconf*);
+int atapi_attach (int ctlr, int unit, int port);
#endif
/*
diff --git a/sys/i386/isa/b004.c b/sys/i386/isa/b004.c
index a878fce877bb..33180d472025 100644
--- a/sys/i386/isa/b004.c
+++ b/sys/i386/isa/b004.c
@@ -52,7 +52,6 @@
#include <sys/systm.h>
#include <sys/proc.h>
#include <sys/uio.h>
-#include <sys/devconf.h>
#include <sys/conf.h>
#include <sys/kernel.h>
#ifdef DEVFS
@@ -64,17 +63,6 @@
#include <i386/isa/b004.h>
#include <i386/isa/isa_device.h>
-static struct kern_devconf kdc_bqu[NBQU] = { {
- 0, 0, 0, /* filled in by dev_attach */
- "bqu", 0, { MDDT_ISA, 0 },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0, /* parent */
- 0, /* parentdata */
- DC_UNCONFIGURED, /* always start here */
- "B004-compatible Transputer board",
- DC_CLS_MISC
-} };
-
#define IOCTL_OUT(arg, ret) *(int*)arg = ret
#define B004PRI (PZERO+8)
@@ -455,7 +443,6 @@ bquopen(dev_t dev, int flags, int fmt, struct proc *p)
return EBUSY;
}
B004_F(dev_min) |= B004_BUSY;
- kdc_bqu[dev_min].kdc_state = DC_BUSY;
B004_TIMEOUT(dev_min) = 0;
DEB(printf( "B004 opened, minor = %d.\n", dev_min );)
return 0;
@@ -476,7 +463,6 @@ bquclose(dev_t dev, int flags, int fmt, struct proc *p)
return ENXIO;
}
B004_F(dev_min) &= ~B004_BUSY;
- kdc_bqu[dev_min].kdc_state = DC_IDLE;
DEB(printf("B004(%d) released.\n", dev_min );)
return 0;
}
@@ -542,17 +528,6 @@ bquioctl(dev_t dev, int cmd, caddr_t addr, int flag, struct proc *p)
} /* bquioctl() */
-static inline void
-bqu_registerdev(struct isa_device *id)
-{
- int unit = id->id_unit;
-
- kdc_bqu[unit] = kdc_bqu[0]; /* XXX */ /* ??Eh?? */
- kdc_bqu[unit].kdc_unit = unit;
- kdc_bqu[unit].kdc_parentdata = id;
- dev_attach(&kdc_bqu[unit]);
-}
-
static int
bquattach(struct isa_device *idp)
{
@@ -560,8 +535,6 @@ bquattach(struct isa_device *idp)
struct b004_struct *bp;
int i;
- kdc_bqu[unit].kdc_state = DC_IDLE;
-
#ifdef DEVFS
#define BQU_UID 66
#define BQU_GID 66
@@ -619,10 +592,6 @@ bquprobe(struct isa_device *idp)
if(dev_min >= NBQU) return (0); /* No more descriptors */
if ((idp->id_iobase < 0x100) || (idp->id_iobase >= 0x1000))
idp->id_iobase=0; /* Dangerous isa addres ) */
-#ifndef DEV_LKM
- bqu_registerdev(idp);
-#endif /* not DEV_LKM */
-
for (test = 0; (test < B004_CHANCE); test++) {
if((idp->id_iobase==0)&&((!b004_base_addresses[test])||
diff --git a/sys/i386/isa/bt5xx-445.c b/sys/i386/isa/bt5xx-445.c
index fdf145787d23..a530a7ad28bf 100644
--- a/sys/i386/isa/bt5xx-445.c
+++ b/sys/i386/isa/bt5xx-445.c
@@ -12,7 +12,7 @@
* on the understanding that TFS is not responsible for the correct
* functioning of this software in any circumstances.
*
- * $Id: bt5xx-445.c,v 1.2 1995/12/14 14:19:15 peter Exp $
+ * $Id: bt5xx-445.c,v 1.3 1996/03/31 03:06:20 gibbs Exp $
*/
/*
@@ -33,7 +33,6 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
-#include <sys/devconf.h>
#include <scsi/scsi_all.h>
#include <scsi/scsiconf.h>
@@ -51,29 +50,6 @@ struct isa_driver btdriver =
"bt"
};
-static struct kern_devconf kdc_isa_bt = {
- 0, 0, 0, /* filled in by dev_attach */
- "bt", 0, { MDDT_ISA, 0, "bio" },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0, /* parent */
- 0, /* parentdata */
- DC_UNCONFIGURED, /* always start here */
- NULL,
- DC_CLS_MISC /* host adapters aren't special */
-};
-
-static inline void
-bt_isa_registerdev(struct isa_device *id)
-{
-#ifdef BOGUS
- if(id->id_unit)
- kdc_bt[id->id_unit] = kdc_bt[0];
- kdc_bt[id->id_unit].kdc_unit = id->id_unit;
- kdc_bt[id->id_unit].kdc_parentdata = id;
- dev_attach(&kdc_bt[id->id_unit]);
-#endif
-}
-
/*
* Check if the device can be found at the port given
* and if so, set it up ready for further work
@@ -104,10 +80,6 @@ bt_isa_probe(dev)
if (!bt)
return 0;
-#ifndef DEV_LKM
- bt_isa_registerdev(dev);
-#endif /* not DEV_LKM */
-
/*
* Try initialise a unit at this location
* sets up dma and bus speed, loads bt->bt_int
diff --git a/sys/i386/isa/ctx.c b/sys/i386/isa/ctx.c
index 53aec146ce0b..b35f2a315f68 100644
--- a/sys/i386/isa/ctx.c
+++ b/sys/i386/isa/ctx.c
@@ -8,7 +8,7 @@
* of this software, nor does the author assume any responsibility
* for damages incurred with its use.
*
- * $Id: ctx.c,v 1.18 1996/06/18 01:22:15 bde Exp $
+ * $Id: ctx.c,v 1.19 1996/06/25 20:29:52 bde Exp $
*/
/*
@@ -119,7 +119,6 @@
#include <sys/uio.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
-#include <sys/devconf.h>
#include <sys/kernel.h>
#ifdef DEVFS
#include <sys/devfsext.h>
@@ -173,34 +172,11 @@ static struct ctx_soft_registers {
} ctx_sr[NCTX];
-static struct kern_devconf kdc_ctx[NCTX] = { {
- 0, 0, 0, /* filled in by dev_attach */
- "ctx", 0, { MDDT_ISA, 0 },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0, /* parent */
- 0, /* parentdata */
- DC_UNCONFIGURED, /* always start out here */
- "CORTEX-I frame grabber",
- DC_CLS_MISC
-} };
-
-static inline void
-ctx_registerdev(struct isa_device *id)
-{
- if(id->id_unit)
- kdc_ctx[id->id_unit] = kdc_ctx[0];
- kdc_ctx[id->id_unit].kdc_unit = id->id_unit;
- kdc_ctx[id->id_unit].kdc_isa = id;
- dev_attach(&kdc_ctx[id->id_unit]);
-}
-
static int
ctxprobe(struct isa_device * devp)
{
int status;
- ctx_registerdev(devp);
-
if (inb(devp->id_iobase) == 0xff) /* 0xff only if board absent */
status = 0;
else {
@@ -221,7 +197,6 @@ ctxattach(struct isa_device * devp)
sr->iobase = devp->id_iobase;
sr->maddr = devp->id_maddr;
sr->msize = devp->id_msize;
- kdc_ctx[devp->id_unit].kdc_state = DC_IDLE;
return (1);
#ifdef DEVFS
sr->devfs_token =
@@ -255,7 +230,6 @@ ctxopen(dev_t dev, int flags, int fmt, struct proc *p)
return (ENOMEM);
sr->flag = OPEN;
- kdc_ctx[unit].kdc_state = DC_BUSY;
/*
Set up the shadow registers. We don't actually write these
@@ -293,7 +267,6 @@ ctxclose(dev_t dev, int flags, int fmt, struct proc *p)
unit = UNIT(minor(dev));
ctx_sr[unit].flag = 0;
- kdc_ctx[unit].kdc_state = DC_IDLE;
free(ctx_sr[unit].lutp, M_DEVBUF);
ctx_sr[unit].lutp = NULL;
return (0);
diff --git a/sys/i386/isa/cx.c b/sys/i386/isa/cx.c
index 75af7e8ee367..cc9b3b994000 100644
--- a/sys/i386/isa/cx.c
+++ b/sys/i386/isa/cx.c
@@ -38,8 +38,6 @@
# if __FreeBSD__ < 2
# include <machine/pio.h>
# define RB_GETC(q) getc(q)
-# else /* BSD 4.4 Lite */
-# include <sys/devconf.h>
# endif
#endif
#ifdef __bsdi__
@@ -84,7 +82,6 @@ timeout_t cxtimeout;
extern cx_board_t cxboard [NCX]; /* adapter state structures */
extern cx_chan_t *cxchan [NCX*NCHAN]; /* unit to channel struct pointer */
#if __FreeBSD__ >= 2
-extern struct kern_devconf kdc_cx [NCX];
static struct tty cx_tty [NCX*NCHAN]; /* tty data */
static d_open_t cxopen;
@@ -238,10 +235,6 @@ int cxopen (dev_t dev, int flag, int mode, struct proc *p)
return (error);
#if __FreeBSD__ >= 2
error = (*linesw[tp->t_line].l_open) (dev, tp);
- if (tp->t_state & TS_ISOPEN)
- /* Mark the board busy on the first startup.
- * Never goes idle. */
- kdc_cx[c->board->num].kdc_state = DC_BUSY;
#else
error = (*linesw[tp->t_line].l_open) (dev, tp, 0);
#endif
diff --git a/sys/i386/isa/cy.c b/sys/i386/isa/cy.c
index 2f44c29dd654..4cb47ccb1d70 100644
--- a/sys/i386/isa/cy.c
+++ b/sys/i386/isa/cy.c
@@ -27,7 +27,7 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: cy.c,v 1.33 1996/06/12 05:03:36 gpalmer Exp $
+ * $Id: cy.c,v 1.34 1996/07/30 19:50:37 bde Exp $
*/
#include "cy.h"
@@ -37,8 +37,6 @@
* Implement BREAK.
* Fix overflows when closing line.
* Atomic COR change.
- * Don't report individual ports in devconf; busy flag for board should be
- * union of the current individual busy flags.
* Consoles.
*/
@@ -83,7 +81,6 @@
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/syslog.h>
-#include <sys/devconf.h>
#ifdef DEVFS
#include <sys/devfsext.h>
#endif
@@ -119,7 +116,6 @@
#define comspeed cyspeed
#define comstart cystart
#define comwakeup cywakeup
-#define kdc_sio kdc_cy
#define nsio_tty ncy_tty
#define p_com_addr p_cy_addr
#define sioattach cyattach
@@ -134,7 +130,6 @@
#define siopoll cypoll
#define sioprobe cyprobe
#define sioread cyread
-#define sioregisterdev cyregisterdev
#define siosettimeout cysettimeout
#define siostop cystop
#define siowrite cywrite
@@ -298,8 +293,6 @@ struct com_s {
u_char cor[3]; /* CD1400 COR1-3 shadows */
u_char intr_enable; /* CD1400 SRER shadow */
- struct kern_devconf kdc;
-
/*
* Ping-pong input buffers. The extra factor of 2 in the sizes is
* to allow for an error byte for each input byte.
@@ -347,7 +340,6 @@ static void siointr1 __P((struct com_s *com));
static int commctl __P((struct com_s *com, int bits, int how));
static int comparam __P((struct tty *tp, struct termios *t));
static int sioprobe __P((struct isa_device *dev));
-static void sioregisterdev __P((struct isa_device *id));
static void siosettimeout __P((void));
static int comspeed __P((speed_t speed, int *prescaler_io));
static void comstart __P((struct tty *tp));
@@ -410,31 +402,6 @@ static int cy_nr_cd1400s[NCY];
#undef RxFifoThreshold
static int volatile RxFifoThreshold = (CD1400_RX_FIFO_SIZE / 2);
-static struct kern_devconf kdc_sio[NCY] = { {
- 0, 0, 0, /* filled in by dev_attach */
- "cyc", 0, { MDDT_ISA, 0, "tty" },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0, /* parent */
- 0, /* parentdata */
- DC_UNCONFIGURED, /* state */
- "Cyclades multiport board",
- DC_CLS_MISC /* just an ordinary device */
-} };
-
-static void
-sioregisterdev(id)
- struct isa_device *id;
-{
- int unit;
-
- unit = id->id_unit;
- if (unit != 0)
- kdc_sio[unit] = kdc_sio[0];
- kdc_sio[unit].kdc_unit = unit;
- kdc_sio[unit].kdc_isa = id;
- dev_attach(&kdc_sio[unit]);
-}
-
static int
sioprobe(dev)
struct isa_device *dev;
@@ -449,7 +416,6 @@ sioprobe(dev)
if ((u_int)unit >= NCY)
return (0);
cy_nr_cd1400s[unit] = 0;
- sioregisterdev(dev);
/* Cyclom-16Y hardware reset (Cyclom-8Ys don't care) */
cy_inb(iobase, CY16_RESET); /* XXX? */
@@ -568,17 +534,6 @@ sioattach(isdp)
com->it_in.c_ispeed = com->it_in.c_ospeed = comdefaultrate;
com->it_out = com->it_in;
- com->kdc = kdc_sio[0];
- com->kdc.kdc_name = driver_name;
- com->kdc.kdc_unit = unit;
- com->kdc.kdc_isa = isdp;
- com->kdc.kdc_parent = &kdc_sio[isdp->id_unit];
- com->kdc.kdc_state = DC_IDLE;
- com->kdc.kdc_description =
- "Serial port: Cirrus Logic CD1400";
- com->kdc.kdc_class = DC_CLS_SERIAL;
- dev_attach(&com->kdc);
-
s = spltty();
com_addr(unit) = com;
splx(s);
@@ -607,7 +562,6 @@ sioattach(isdp)
#endif
}
}
- kdc_sio[isdp->id_unit].kdc_state = DC_BUSY; /* XXX */
/* ensure an edge for the next interrupt */
cy_outb(cy_iobase, CY_CLEAR_INTR, 0);
@@ -652,7 +606,6 @@ open_top:
if (error != 0)
goto out;
}
- com->kdc.kdc_state = DC_BUSY;
if (tp->t_state & TS_ISOPEN) {
/*
* The device is open, so everything has been initialized.
@@ -917,8 +870,6 @@ comhardclose(com)
com->active_out = FALSE;
wakeup(&com->active_out);
wakeup(TSA_CARR_ON(tp)); /* restart any wopeners */
- if (!(com->state & CS_DTR_OFF) && unit != comconsole)
- com->kdc.kdc_state = DC_IDLE;
splx(s);
}
@@ -980,8 +931,6 @@ siodtrwakeup(chan)
com = (struct com_s *)chan;
com->state &= ~CS_DTR_OFF;
- if (com->unit != comconsole)
- com->kdc.kdc_state = DC_IDLE;
wakeup(&com->dtr_wait);
}
diff --git a/sys/i386/isa/fd.c b/sys/i386/isa/fd.c
index ac20996ae765..631157db1356 100644
--- a/sys/i386/isa/fd.c
+++ b/sys/i386/isa/fd.c
@@ -43,7 +43,7 @@
* SUCH DAMAGE.
*
* from: @(#)fd.c 7.4 (Berkeley) 5/25/91
- * $Id: fd.c,v 1.90 1996/07/12 07:40:59 bde Exp $
+ * $Id: fd.c,v 1.91 1996/07/23 21:51:33 phk Exp $
*
*/
@@ -69,7 +69,6 @@
#include <sys/malloc.h>
#include <sys/proc.h>
#include <sys/syslog.h>
-#include <sys/devconf.h>
#include <sys/dkstat.h>
#include <i386/isa/isa.h>
#include <i386/isa/isa_device.h>
@@ -85,80 +84,6 @@
#include <sys/devfsext.h>
#endif
-
-static int fd_goaway(struct kern_devconf *, int);
-static int fdc_goaway(struct kern_devconf *, int);
-static int fd_externalize(struct kern_devconf *, struct sysctl_req *);
-
-/*
- * Templates for the kern_devconf structures used when we attach.
- */
-static struct kern_devconf kdc_fd[NFD] = { {
- 0, 0, 0, /* filled in by kern_devconf.c */
- "fd", 0, { MDDT_DISK, 0 },
- fd_externalize, 0, fd_goaway, DISK_EXTERNALLEN,
- 0, /* parent */
- 0, /* parentdata */
- DC_UNCONFIGURED, /* state */
- "floppy disk",
- DC_CLS_DISK /* class */
-} };
-
-struct kern_devconf kdc_fdc[NFDC] = { {
- 0, 0, 0, /* filled in by kern_devconf.c */
- "fdc", 0, { MDDT_ISA, 0, "bio" },
- isa_generic_externalize, 0, fdc_goaway, ISA_EXTERNALLEN,
- 0, /* parent */
- 0, /* parentdata */
- DC_UNCONFIGURED, /* state */
- "floppy disk/tape controller",
- DC_CLS_MISC /* class */
-} };
-
-static inline void
-fd_registerdev(int ctlr, int unit)
-{
- if(unit != 0)
- kdc_fd[unit] = kdc_fd[0];
-
- kdc_fd[unit].kdc_unit = unit;
- kdc_fd[unit].kdc_parent = &kdc_fdc[ctlr];
- kdc_fd[unit].kdc_parentdata = 0;
- dev_attach(&kdc_fd[unit]);
-}
-
-static inline void
-fdc_registerdev(struct isa_device *dvp)
-{
- int unit = dvp->id_unit;
-
- if(unit != 0)
- kdc_fdc[unit] = kdc_fdc[0];
-
- kdc_fdc[unit].kdc_unit = unit;
- kdc_fdc[unit].kdc_parent = &kdc_isa0;
- kdc_fdc[unit].kdc_parentdata = dvp;
- dev_attach(&kdc_fdc[unit]);
-}
-
-static int
-fdc_goaway(struct kern_devconf *kdc, int force)
-{
- if(force) {
- dev_detach(kdc);
- return 0;
- } else {
- return EBUSY; /* XXX fix */
- }
-}
-
-static int
-fd_goaway(struct kern_devconf *kdc, int force)
-{
- dev_detach(kdc);
- return 0;
-}
-
#define b_cylin b_resid /* XXX now spelled b_cylinder elsewhere */
/* misuse a flag to identify format operation */
@@ -355,15 +280,6 @@ static struct bdevsw fd_bdevsw =
static struct isa_device *fdcdevs[NFDC];
-/*
- * Provide hw.devconf information.
- */
-static int
-fd_externalize(struct kern_devconf *kdc, struct sysctl_req *req)
-{
- return disk_externalize(fd_data[kdc->kdc_unit].fdsu, req);
-}
-
static int
fdc_err(fdcu_t fdcu, const char *s)
{
@@ -526,10 +442,6 @@ fdprobe(struct isa_device *dev)
fdcdevs[fdcu] = dev;
fdc_data[fdcu].baseport = dev->id_iobase;
-#ifndef DEV_LKM
- fdc_registerdev(dev);
-#endif
-
/* First - lets reset the floppy controller */
outb(dev->id_iobase+FDOUT, 0);
DELAY(100);
@@ -542,7 +454,6 @@ fdprobe(struct isa_device *dev)
{
return(0);
}
- kdc_fdc[fdcu].kdc_state = DC_IDLE;
return (IO_FDCSIZE);
}
@@ -636,20 +547,14 @@ fdattach(struct isa_device *dev)
case 0x80:
printf("NEC 765\n");
fdc->fdct = FDC_NE765;
- kdc_fdc[fdcu].kdc_description =
- "NEC 765 floppy disk/tape controller";
break;
case 0x81:
printf("Intel 82077\n");
fdc->fdct = FDC_I82077;
- kdc_fdc[fdcu].kdc_description =
- "Intel 82077 floppy disk/tape controller";
break;
case 0x90:
printf("NEC 72065B\n");
fdc->fdct = FDC_NE72065;
- kdc_fdc[fdcu].kdc_description =
- "NEC 72065B floppy disk/tape controller";
break;
default:
printf("unknown IC type %02x\n", ic_type);
@@ -708,46 +613,33 @@ fdattach(struct isa_device *dev)
fd->options = 0;
printf("fd%d: ", fdu);
- fd_registerdev(fdcu, fdu);
switch (fdt) {
case RTCFDT_12M:
printf("1.2MB 5.25in\n");
fd->type = FD_1200;
- kdc_fd[fdu].kdc_description =
- "1.2MB (1200K) 5.25in floppy disk drive";
break;
case RTCFDT_144M:
printf("1.44MB 3.5in\n");
fd->type = FD_1440;
- kdc_fd[fdu].kdc_description =
- "1.44MB (1440K) 3.5in floppy disk drive";
break;
case RTCFDT_288M:
case RTCFDT_288M_1:
printf("2.88MB 3.5in - 1.44MB mode\n");
fd->type = FD_1440;
- kdc_fd[fdu].kdc_description =
- "2.88MB (2880K) 3.5in floppy disk drive in 1.44 mode";
break;
case RTCFDT_360K:
printf("360KB 5.25in\n");
fd->type = FD_360;
- kdc_fd[fdu].kdc_description =
- "360KB 5.25in floppy disk drive";
break;
case RTCFDT_720K:
printf("720KB 3.5in\n");
fd->type = FD_720;
- kdc_fd[fdu].kdc_description =
- "720KB 3.5in floppy disk drive";
break;
default:
printf("unknown\n");
fd->type = NO_TYPE;
- dev_detach(&kdc_fd[fdu]);
continue;
}
- kdc_fd[fdu].kdc_state = DC_IDLE;
#ifdef DEVFS
mynor = fdu << 6;
fd->bdevs[0] = devfs_add_devswf(&fd_bdevsw, mynor, DV_BLK,
@@ -855,7 +747,6 @@ set_motor(fdcu_t fdcu, int fdsu, int turnon)
outb(fdc_data[fdcu].baseport+FDOUT, fdout);
fdc_data[fdcu].fdout = fdout;
- kdc_fdc[fdcu].kdc_state = (fdout & FDO_FRST)? DC_BUSY: DC_IDLE;
TRACE1("[0x%x->FDOUT]", fdout);
if(needspecify) {
@@ -1094,7 +985,6 @@ Fdopen(dev_t dev, int flags, int mode, struct proc *p)
}
fd_data[fdu].ft = fd_types + type - 1;
fd_data[fdu].flags |= FD_OPEN;
- kdc_fd[fdu].kdc_state = DC_BUSY;
return 0;
}
@@ -1112,7 +1002,6 @@ fdclose(dev_t dev, int flags, int mode, struct proc *p)
#endif
fd_data[fdu].flags &= ~FD_OPEN;
fd_data[fdu].options &= ~FDOPT_NORETRY;
- kdc_fd[fdu].kdc_state = DC_IDLE;
return(0);
}
diff --git a/sys/i386/isa/ft.c b/sys/i386/isa/ft.c
index 8d75a2a5d305..dfd8cb3a40c7 100644
--- a/sys/i386/isa/ft.c
+++ b/sys/i386/isa/ft.c
@@ -17,7 +17,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* ft.c - QIC-40/80 floppy tape driver
- * $Id: ft.c,v 1.25 1995/12/15 00:53:58 bde Exp $
+ * $Id: ft.c,v 1.26 1996/06/18 01:22:16 bde Exp $
*
* 01/19/95 ++sg
* Cleaned up recalibrate/seek code at attach time for FreeBSD 2.x.
@@ -78,7 +78,6 @@
#include <sys/buf.h>
#include <sys/uio.h>
#include <sys/ftape.h>
-#include <sys/devconf.h>
#include <machine/clock.h>
@@ -400,39 +399,6 @@ segio_free(ft_p ft, SegReq *sp)
DPRT(("segio_free: nfree=%d ndone=%d nreq=%d\n", ft->nfreelist, ft->ndoneq, ft->nsegq));
}
-static int ft_externalize(struct kern_devconf *, struct sysctl_req *);
-
-extern struct kern_devconf kdc_fdc[];
-static struct kern_devconf kdc_ft[NFT] = { {
- 0, 0, 0, /* filled in by kern_devconf.c */
- "ft", 0, { MDDT_DISK, 0 },
- ft_externalize, 0, 0, DISK_EXTERNALLEN,
- 0, /* parent */
- 0, /* parentdata */
- DC_IDLE, /* state */
- "floppy tape",
- DC_CLS_TAPE /* class */
-} };
-
-static inline void
-ft_registerdev(int ctlr, int unit)
-{
- if(unit != 0)
- kdc_ft[unit] = kdc_ft[0];
-
- kdc_ft[unit].kdc_unit = unit;
- kdc_ft[unit].kdc_parent = &kdc_fdc[ctlr];
- kdc_ft[unit].kdc_parentdata = 0;
- dev_attach(&kdc_ft[unit]);
-}
-
-
-static int
-ft_externalize(struct kern_devconf *kdc, struct sysctl_req *req)
-{
- return disk_externalize(ft_data[kdc->kdc_unit].ftsu, req);
-}
-
/*
* Probe/attach floppy tapes.
*/
@@ -521,49 +487,38 @@ out:
tape_end(ftu);
if (ft->type != NO_TYPE) {
fdc->flags |= FDC_HASFTAPE;
- ft_registerdev(fdcu, ftu);
switch(hw.hw_make) {
case 0x0000:
if (ft->type == FT_COLORADO) {
manu = "Colorado";
- kdc_ft[ftu].kdc_description = "Colorado floppy tape";
} else if (ft->type == FT_INSIGHT) {
manu = "Insight";
- kdc_ft[ftu].kdc_description = "Insight floppy tape";
} else if (ft->type == FT_MOUNTAIN && hw.hw_model == 0x05) {
manu = "Archive";
- kdc_ft[ftu].kdc_description = "Archive floppy tape";
} else if (ft->type == FT_MOUNTAIN) {
manu = "Mountain";
- kdc_ft[ftu].kdc_description = "Mountain floppy tape";
} else {
manu = "Unknown";
}
break;
case 0x0001:
manu = "Colorado";
- kdc_ft[ftu].kdc_description = "Colorado floppy tape";
break;
case 0x0005:
if (hw.hw_model >= 0x09) {
manu = "Conner";
- kdc_ft[ftu].kdc_description = "Conner floppy tape";
} else {
manu = "Archive";
- kdc_ft[ftu].kdc_description = "Archive floppy tape";
}
break;
case 0x0006:
manu = "Mountain";
- kdc_ft[ftu].kdc_description = "Mountain floppy tape";
break;
case 0x0007:
manu = "Wangtek";
- kdc_ft[ftu].kdc_description = "Wangtek floppy tape";
break;
case 0x0222:
manu = "IOMega";
- kdc_ft[ftu].kdc_description = "IOMega floppy tape";
break;
default:
manu = "Unknown";
@@ -2099,7 +2054,6 @@ ftopen(dev_t dev, int arg2) {
return(ENODEV);
fdc->fdu = ftu;
fdc->flags |= FDC_TAPE_BUSY;
- kdc_ft[ftu].kdc_state = DC_BUSY;
return(set_fdcmode(dev, FDC_TAPE_MODE)); /* try to switch to tape */
}
@@ -2121,7 +2075,6 @@ ftclose(dev_t dev, int flags)
tape_cmd(ftu, QC_PRIMARY);
tape_state(ftu, 0, QS_READY, 60);
ftreq_rewind(ftu);
- kdc_ft[ftu].kdc_state = DC_IDLE;
return(set_fdcmode(dev, FDC_DISK_MODE)); /* Otherwise, close tape */
}
diff --git a/sys/i386/isa/if_ar.c b/sys/i386/isa/if_ar.c
index 7758bcb8e5d4..c7d678aac3d4 100644
--- a/sys/i386/isa/if_ar.c
+++ b/sys/i386/isa/if_ar.c
@@ -28,7 +28,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: if_ar.c,v 1.8 1996/04/12 19:57:44 jhay Exp $
+ * $Id: if_ar.c,v 1.9 1996/06/25 20:29:56 bde Exp $
*/
/*
@@ -71,7 +71,6 @@
#include <net/bpfdesc.h>
#endif
-#include <sys/devconf.h>
#include <machine/clock.h>
#include <machine/md_var.h>
@@ -116,7 +115,6 @@ static struct ar_hardc {
sca_regs *sca;
- struct kern_devconf kdc;
}ar_hardc[NAR];
struct ar_softc {
@@ -148,7 +146,6 @@ struct ar_softc {
int scano;
int scachan;
- struct kern_devconf kdc;
};
static int arprobe(struct isa_device *id);
@@ -181,28 +178,6 @@ static int irqtable[16] = {
struct isa_driver ardriver = {arprobe, arattach, "arc"};
-static struct kern_devconf kdc_ar_template = {
- 0, 0, 0,
- "ar", 0, { MDDT_ISA, 0, "net" },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0,
- 0,
- DC_UNCONFIGURED,
- "Arnet SYNC/570i Port",
- DC_CLS_NETIF
-};
-
-static struct kern_devconf kdc_arc_template = {
- 0, 0, 0,
- "arc", 0, { MDDT_ISA, 0, "net" },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0,
- 0,
- DC_UNCONFIGURED,
- "Arnet SYNC/570i Adapter",
- DC_CLS_NETIF
-};
-
static void ar_xmit(struct ar_softc *sc);
static void arstart(struct ifnet *ifp);
static int arioctl(struct ifnet *ifp, int cmd, caddr_t data);
@@ -223,33 +198,6 @@ static void ar_dmac_intr(struct ar_hardc *hc, int scano, u_char isr);
static void ar_msci_intr(struct ar_hardc *hc, int scano, u_char isr);
static void ar_timer_intr(struct ar_hardc *hc, int scano, u_char isr);
-static inline void
-ar_registerdev(int ctlr, int unit)
-{
- struct ar_softc *sc;
-
- sc = &ar_hardc[ctlr].sc[unit];
- sc->kdc = kdc_ar_template;
-
- sc->kdc.kdc_unit = ar_hardc[ctlr].startunit + unit;
- sc->kdc.kdc_parentdata = &ar_hardc[ctlr].kdc;
- dev_attach(&sc->kdc);
-}
-
-static inline void
-arc_registerdev(struct isa_device *dvp)
-{
- int unit = dvp->id_unit;
- struct ar_hardc *hc = &ar_hardc[dvp->id_unit];
-
- hc->kdc = kdc_arc_template;
-
- hc->kdc.kdc_unit = unit;
- hc->kdc.kdc_parentdata = dvp;
- dev_attach(&hc->kdc);
-}
-
-
/*
* Register the Adapter.
* Probe to see if it is there.
@@ -265,7 +213,6 @@ arprobe(struct isa_device *id)
/*
* Register the card.
*/
- arc_registerdev(id);
/*
* Now see if the card is realy there.
@@ -317,15 +264,6 @@ arprobe(struct isa_device *id)
break;
}
- switch(hc->numports) {
- case 2:
- hc->kdc.kdc_description = "Arnet SYNC/570i 2 Port Adapter";
- break;
- case 4:
- hc->kdc.kdc_description = "Arnet SYNC/570i 4 Port Adapter";
- break;
- }
-
if(id->id_unit == 0)
hc->startunit = 0;
else
@@ -375,8 +313,6 @@ arattach(struct isa_device *id)
hc->revision,
iface);
- hc->kdc.kdc_state = DC_BUSY;
-
arc_init(id);
sc = hc->sc;
@@ -394,8 +330,6 @@ arattach(struct isa_device *id)
sc->scano = unit / NCHAN;
sc->scachan = unit%NCHAN;
- ar_registerdev(id->id_unit, unit);
-
ar_init_rx_dmac(sc);
ar_init_tx_dmac(sc);
ar_init_msci(sc);
@@ -413,8 +347,6 @@ arattach(struct isa_device *id)
sc->ifsppp.pp_flags = PP_KEEPALIVE;
- sc->kdc.kdc_state = DC_IDLE;
-
printf("ar%d: Adapter %d, port %d.\n",
sc->unit,
hc->cunit,
@@ -759,7 +691,6 @@ ar_up(struct ar_softc *sc)
TRC(printf("ar%d: sca %p, msci %p, ch %d\n",
sc->unit, sca, msci, sc->scachan));
- sc->kdc.kdc_state = DC_BUSY;
/*
* Enable transmitter and receiver.
@@ -802,8 +733,6 @@ ar_down(struct ar_softc *sc)
sca_regs *sca = sc->hc->sca;
msci_channel *msci = &sca->msci[sc->scachan];
- sc->kdc.kdc_state = DC_IDLE;
-
/*
* Disable transmitter and receiver.
* Lower DTR and RTS.
diff --git a/sys/i386/isa/if_cx.c b/sys/i386/isa/if_cx.c
index 0cbc95922dfa..f6675a138a55 100644
--- a/sys/i386/isa/if_cx.c
+++ b/sys/i386/isa/if_cx.c
@@ -43,7 +43,6 @@
extern struct cdevsw cx_cdevsw;
#include <sys/devfsext.h>
#endif /*DEVFS*/
-#include <sys/devconf.h>
#define watchdog_func_t void(*)(struct ifnet *)
#define start_func_t void(*)(struct ifnet*)
@@ -100,13 +99,6 @@ static unsigned short port_valid_values [] = {
0x240, 0x260, 0x280, 0x300, 0x320, 0x380, 0x3a0, 0,
};
-static char cxdescription [80];
-struct kern_devconf kdc_cx [NCX] = { {
- 0, 0, 0, "cx", 0, { MDDT_ISA, 0, "net" },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN, &kdc_isa0, 0,
- DC_IDLE, cxdescription, DC_CLS_SERIAL
-} };
-
/*
* Check that the value is contained in the list of correct values.
*/
@@ -298,13 +290,6 @@ cxattach (struct isa_device *id)
if (unit == 0)
timeout ((timeout_func_t) cxtimeout, 0, hz*5);
- if (unit != 0)
- kdc_cx[unit] = kdc_cx[0];
- kdc_cx[unit].kdc_unit = unit;
- kdc_cx[unit].kdc_isa = id;
- sprintf (cxdescription, "Cronyx-Sigma-%s sync/async serial adapter",
- b->name);
- dev_attach (&kdc_cx[unit]);
printf ("cx%d: <Cronyx-%s>\n", unit, b->name);
#ifdef DEVFS
cx_devfs_token =
@@ -419,8 +404,6 @@ cxup (cx_chan_t *c)
/* The interface is up, start it */
print (("cx%d.%d: cxup\n", c->board->num, c->num));
- kdc_cx[c->board->num].kdc_state = DC_BUSY;
-
/* Initialize channel, enable receiver and transmitter */
cx_cmd (port, CCR_INITCH | CCR_ENRX | CCR_ENTX);
/* Repeat the command, to avoid the rev.H bug */
diff --git a/sys/i386/isa/if_ed.c b/sys/i386/isa/if_ed.c
index eb78d0bc9eae..b1807efcf513 100644
--- a/sys/i386/isa/if_ed.c
+++ b/sys/i386/isa/if_ed.c
@@ -24,7 +24,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: if_ed.c,v 1.103 1996/08/06 21:14:02 phk Exp $
+ * $Id: if_ed.c,v 1.104 1996/08/07 11:18:21 davidg Exp $
*/
/*
@@ -48,7 +48,6 @@
#include <sys/mbuf.h>
#include <sys/socket.h>
#include <sys/syslog.h>
-#include <sys/devconf.h>
#include <net/if.h>
#include <net/if_dl.h>
@@ -133,7 +132,6 @@ struct ed_softc {
u_char rec_page_start; /* first page of RX ring-buffer */
u_char rec_page_stop; /* last page of RX ring-buffer */
u_char next_packet; /* pointer to next unread RX packet */
- struct kern_devconf kdc; /* kernel configuration database info */
};
static struct ed_softc ed_softc[NED];
@@ -280,11 +278,10 @@ edunload(struct pccard_dev *dp)
struct ed_softc *sc = &ed_softc[dp->isahd.id_unit];
struct ifnet *ifp = &sc->arpcom.ac_if;
- if (sc->kdc.kdc_state == DC_UNCONFIGURED) {
+ if (sc->gone) {
printf("ed%d: already unloaded\n", dp->isahd.id_unit);
return;
}
- sc->kdc.kdc_state = DC_UNCONFIGURED;
ifp->if_flags &= ~IFF_RUNNING;
if_down(ifp);
sc->gone = 1;
@@ -362,28 +359,6 @@ static unsigned short ed_hpp_intr_mask[] = {
IRQ15 /* 15 */
};
-static struct kern_devconf kdc_ed_template = {
- 0, 0, 0, /* filled in by dev_attach */
- "ed", 0, { MDDT_ISA, 0, "net" },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0, /* parent */
- 0, /* parentdata */
- DC_UNCONFIGURED, /* state */
- "", /* description */
- DC_CLS_NETIF /* class */
-};
-
-static inline void
-ed_registerdev(struct isa_device *id, const char *descr)
-{
- struct kern_devconf *kdc = &ed_softc[id->id_unit].kdc;
- *kdc = kdc_ed_template;
- kdc->kdc_unit = id->id_unit;
- kdc->kdc_parentdata = id;
- kdc->kdc_description = descr;
- dev_attach(kdc);
-}
-
/*
* Determine if the device is present
*
@@ -407,10 +382,6 @@ ed_probe(isa_dev)
pccard_add_driver(&ed_info);
#endif
-#ifndef DEV_LKM
- ed_registerdev(isa_dev, "Ethernet adapter");
-#endif /* not DEV_LKM */
-
nports = ed_probe_WD80x3(isa_dev);
if (nports)
return (nports);
@@ -530,29 +501,23 @@ ed_probe_WD80x3(isa_dev)
switch (sc->type) {
case ED_TYPE_WD8003S:
sc->type_str = "WD8003S";
- sc->kdc.kdc_description = "Ethernet adapter: WD 8003S";
break;
case ED_TYPE_WD8003E:
sc->type_str = "WD8003E";
- sc->kdc.kdc_description = "Ethernet adapter: WD 8003E";
break;
case ED_TYPE_WD8003EB:
sc->type_str = "WD8003EB";
- sc->kdc.kdc_description = "Ethernet adapter: WD 8003EB";
break;
case ED_TYPE_WD8003W:
sc->type_str = "WD8003W";
- sc->kdc.kdc_description = "Ethernet adapter: WD 8003W";
break;
case ED_TYPE_WD8013EBT:
sc->type_str = "WD8013EBT";
- sc->kdc.kdc_description = "Ethernet adapter: WD 8013EBT";
memsize = 16384;
isa16bit = 1;
break;
case ED_TYPE_WD8013W:
sc->type_str = "WD8013W";
- sc->kdc.kdc_description = "Ethernet adapter: WD 8013W";
memsize = 16384;
isa16bit = 1;
break;
@@ -562,29 +527,22 @@ ed_probe_WD80x3(isa_dev)
isa16bit = 1;
memsize = 16384;
sc->type_str = "WD8013EP";
- sc->kdc.kdc_description =
- "Ethernet adapter: WD 8013EP";
} else {
sc->type_str = "WD8003EP";
- sc->kdc.kdc_description =
- "Ethernet adapter: WD 8003EP";
}
break;
case ED_TYPE_WD8013WC:
sc->type_str = "WD8013WC";
- sc->kdc.kdc_description = "Ethernet adapter: WD 8013WC";
memsize = 16384;
isa16bit = 1;
break;
case ED_TYPE_WD8013EBP:
sc->type_str = "WD8013EBP";
- sc->kdc.kdc_description = "Ethernet adapter: WD 8013EBP";
memsize = 16384;
isa16bit = 1;
break;
case ED_TYPE_WD8013EPC:
sc->type_str = "WD8013EPC";
- sc->kdc.kdc_description = "Ethernet adapter: WD 8013EPC";
memsize = 16384;
isa16bit = 1;
break;
@@ -592,12 +550,8 @@ ed_probe_WD80x3(isa_dev)
case ED_TYPE_SMC8216T:
if (sc->type == ED_TYPE_SMC8216C) {
sc->type_str = "SMC8216/SMC8216C";
- sc->kdc.kdc_description =
- "Ethernet adapter: SMC 8216 or 8216C";
} else {
sc->type_str = "SMC8216T";
- sc->kdc.kdc_description =
- "Ethernet adapter: SMC 8216T";
}
outb(sc->asic_addr + ED_WD790_HWR,
@@ -616,12 +570,8 @@ ed_probe_WD80x3(isa_dev)
/* 8216 has 16K shared mem -- 8416 has 8K */
if (sc->type == ED_TYPE_SMC8216C) {
sc->type_str = "SMC8416C/SMC8416BT";
- sc->kdc.kdc_description =
- "Ethernet adapter: SMC 8416C or 8416BT";
} else {
sc->type_str = "SMC8416T";
- sc->kdc.kdc_description =
- "Ethernet adapter: SMC 8416T";
}
memsize = 8192;
break;
@@ -635,13 +585,11 @@ ed_probe_WD80x3(isa_dev)
#ifdef TOSH_ETHER
case ED_TYPE_TOSHIBA1:
sc->type_str = "Toshiba1";
- sc->kdc.kdc_description = "Ethernet adapter: Toshiba1";
memsize = 32768;
isa16bit = 1;
break;
case ED_TYPE_TOSHIBA4:
sc->type_str = "Toshiba4";
- sc->kdc.kdc_description = "Ethernet adapter: Toshiba4";
memsize = 32768;
isa16bit = 1;
break;
@@ -969,7 +917,6 @@ ed_probe_3Com(isa_dev)
sc->vendor = ED_VENDOR_3COM;
sc->type_str = "3c503";
- sc->kdc.kdc_description = "Ethernet adapter: 3c503";
sc->mem_shared = 1;
sc->cr_proto = ED_CR_RD2;
@@ -1232,11 +1179,9 @@ ed_probe_Novell_generic(sc, port, unit, flags)
sc->type = ED_TYPE_NE2000;
sc->type_str = "NE2000";
- sc->kdc.kdc_description = "Ethernet adapter: NE2000";
} else {
sc->type = ED_TYPE_NE1000;
sc->type_str = "NE1000";
- sc->kdc.kdc_description = "Ethernet adapter: NE1000";
}
/* 8k of memory plus an additional 8k if 16bit */
@@ -1340,7 +1285,6 @@ ed_probe_Novell_generic(sc, port, unit, flags)
#ifdef GWETHER
if (sc->arpcom.ac_enaddr[2] == 0x86) {
sc->type_str = "Gateway AT";
- sc->kdc.kdc_description = "Ethernet adapter: Gateway AT";
}
#endif /* GWETHER */
@@ -1383,7 +1327,6 @@ ed_probe_pccard(isa_dev, ether)
sc->vendor = ED_VENDOR_PCCARD;
sc->type = 0;
sc->type_str = "PCCARD";
- sc->kdc.kdc_description = "PCCARD Ethernet";
sc->mem_size = isa_dev->id_msize = memsize = 16384;
sc->isa16bit = isa16bit = 1;
@@ -1613,7 +1556,6 @@ ed_probe_HP_pclanp(isa_dev)
sc->vendor = ED_VENDOR_HP;
sc->type = ED_TYPE_HP_PCLANPLUS;
sc->type_str = "HP-PCLAN+";
- sc->kdc.kdc_description = "Ethernet adapter: HP PCLAN+ (27247B/27252A)";
sc->mem_shared = 0; /* we DON'T have dual ported RAM */
sc->mem_start = 0; /* we use offsets inside the card RAM */
@@ -1841,7 +1783,6 @@ ed_attach(sc, unit, flags)
ether_ifattach(ifp);
}
/* device attach does transition from UNCONFIGURED to IDLE state */
- sc->kdc.kdc_state = DC_IDLE;
/*
* Print additional info when attached
@@ -2720,10 +2661,6 @@ ed_ioctl(ifp, command, data)
ifp->if_flags &= ~IFF_RUNNING;
}
}
- /* UP controls BUSY/IDLE */
- sc->kdc.kdc_state = ((ifp->if_flags & IFF_UP)
- ? DC_BUSY
- : DC_IDLE);
#if NBPFILTER > 0
diff --git a/sys/i386/isa/if_eg.c b/sys/i386/isa/if_eg.c
index ec21fbad37aa..c92c5ba03b9a 100644
--- a/sys/i386/isa/if_eg.c
+++ b/sys/i386/isa/if_eg.c
@@ -27,7 +27,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: if_eg.c,v 1.16 1996/08/04 20:04:11 phk Exp $
+ * $Id: if_eg.c,v 1.17 1996/08/06 21:14:03 phk Exp $
*
* Support for 3Com 3c505 Etherlink+ card.
*/
@@ -47,7 +47,6 @@
#include <sys/mbuf.h>
#include <sys/socket.h>
#include <sys/syslog.h>
-#include <sys/devconf.h>
#include <net/if.h>
#include <net/if_dl.h>
@@ -107,7 +106,6 @@ static struct eg_softc {
u_char eg_incount; /* Number of buffers currently used */
u_char *eg_inbuf; /* Incoming packet buffer */
u_char *eg_outbuf; /* Outgoing packet buffer */
- struct kern_devconf kdc; /* kernel configuration database */
} eg_softc[NEG];
static int egprobe (struct isa_device *);
@@ -117,27 +115,6 @@ struct isa_driver egdriver = {
egprobe, egattach, "eg", 0
};
-static struct kern_devconf kdc_eg_template = {
- 0, 0, 0, /* filled in by dev_attach */
- "eg", 0, { MDDT_ISA, 0, "net" },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0, /* parent */
- 0, /* parentdata */
- DC_UNCONFIGURED,
- "", /* description */
- DC_CLS_NETIF /* class */
-};
-static void
-eg_registerdev(struct isa_device *id, const char *descr)
-{
- struct kern_devconf *kdc = &eg_softc[id->id_unit].kdc;
- *kdc = kdc_eg_template;
- kdc->kdc_unit = id->id_unit;
- kdc->kdc_parentdata = id;
- kdc->kdc_description = descr;
- dev_attach(kdc);
-}
-
static void egprintpcb __P((struct eg_softc *sc));
static void egprintstat __P((int b));
static int egoutPCB __P((struct eg_softc *sc, int b));
@@ -394,8 +371,6 @@ egattach(struct isa_device *id)
id->id_unit, sc->sc_arpcom.ac_enaddr, ":",
sc->eg_rom_major, sc->eg_rom_minor, sc->eg_ram);
- sc->kdc.kdc_description = "Ethernet adapter: 3Com 3C505";
-
sc->eg_pcb[0] = EG_CMD_SETEADDR; /* Set station address */
if (egwritePCB(sc) != 0) {
dprintf(("eg#: write error2\n"));
@@ -428,9 +403,6 @@ egattach(struct isa_device *id)
if_attach(ifp);
ether_ifattach(ifp);
- /* device attach does transition from UNCONFIGURED to IDLE state */
- sc->kdc.kdc_state = DC_IDLE;
-
#if NBPFILTER > 0
bpfattach(ifp, DLT_EN10MB, sizeof(struct ether_header));
#endif
diff --git a/sys/i386/isa/if_el.c b/sys/i386/isa/if_el.c
index 9a2e2323b6f8..afa08ae4bf2b 100644
--- a/sys/i386/isa/if_el.c
+++ b/sys/i386/isa/if_el.c
@@ -6,7 +6,7 @@
*
* Questions, comments, bug reports and fixes to kimmel@cs.umass.edu.
*
- * $Id: if_el.c,v 1.24 1996/06/18 01:22:20 bde Exp $
+ * $Id: if_el.c,v 1.25 1996/08/06 21:14:04 phk Exp $
*/
/* Except of course for the portions of code lifted from other FreeBSD
* drivers (mainly elread, elget and el_ioctl)
@@ -30,7 +30,6 @@
#include <sys/mbuf.h>
#include <sys/socket.h>
#include <sys/syslog.h>
-#include <sys/devconf.h>
#include <net/if.h>
#include <net/if_dl.h>
@@ -98,27 +97,6 @@ struct isa_driver eldriver = {
el_probe, el_attach, "el"
};
-static struct kern_devconf kdc_el[NEL] = { {
- 0, 0, 0, /* filled in by dev_attach */
- "el", 0, { MDDT_ISA, 0, "net" },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0, /* parent */
- 0, /* parentdata */
- DC_UNCONFIGURED, /* state */
- "Ethernet adapter: 3Com 3C501",
- DC_CLS_NETIF /* class */
-} };
-
-static inline void
-el_registerdev(struct isa_device *id)
-{
- if(id->id_unit)
- kdc_el[id->id_unit] = kdc_el[0];
- kdc_el[id->id_unit].kdc_unit = id->id_unit;
- kdc_el[id->id_unit].kdc_isa = id;
- dev_attach(&kdc_el[id->id_unit]);
-}
-
/* Probe routine. See if the card is there and at the right place. */
static int
el_probe(struct isa_device *idev)
@@ -133,10 +111,6 @@ el_probe(struct isa_device *idev)
sc->el_base = idev->id_iobase;
base = sc->el_base;
-#ifndef DEV_LKM
- el_registerdev(idev);
-#endif
-
/* First check the base */
if((base < 0x280) || (base > 0x3f0)) {
printf("el%d: ioaddr must be between 0x280 and 0x3f0\n",
@@ -216,7 +190,6 @@ el_attach(struct isa_device *idev)
dprintf(("Attaching interface...\n"));
if_attach(ifp);
ether_ifattach(ifp);
- kdc_el[idev->id_unit].kdc_state = DC_BUSY;
/* Put the station address in the ifa address list's AF_LINK
* entry, if any.
diff --git a/sys/i386/isa/if_ep.c b/sys/i386/isa/if_ep.c
index e3601543d4da..7840e8b1a809 100644
--- a/sys/i386/isa/if_ep.c
+++ b/sys/i386/isa/if_ep.c
@@ -38,7 +38,7 @@
*/
/*
- * $Id: if_ep.c,v 1.51 1996/07/19 13:20:04 amurai Exp $
+ * $Id: if_ep.c,v 1.52 1996/07/27 12:40:31 amurai Exp $
*
* Promiscuous mode added and interrupt logic slightly changed
* to reduce the number of adapter failures. Transceiver select
@@ -66,7 +66,6 @@
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/conf.h>
-#include <sys/devconf.h>
#endif
#include <sys/mbuf.h>
#include <sys/socket.h>
@@ -122,8 +121,6 @@ static int eeprom_rdy __P((struct ep_softc *sc));
static int ep_isa_probe __P((struct isa_device *));
static struct ep_board * ep_look_for_board_at __P((struct isa_device *is));
static int ep_isa_attach __P((struct isa_device *));
-static void ep_isa_registerdev __P((struct ep_softc *sc,
- struct isa_device *id));
static int epioctl __P((struct ifnet * ifp, int, caddr_t));
static void epmbuffill __P((caddr_t, int));
static void epmbufempty __P((struct ep_softc *));
@@ -155,17 +152,6 @@ struct isa_driver epdriver = {
0
};
-static struct kern_devconf kdc_isa_ep = {
- 0, 0, 0, /* filled in by dev_attach */
- "ep", 0, { MDDT_ISA, 0, "net" },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0, /* parent */
- 0, /* parentdata */
- DC_UNCONFIGURED, /* state */
- "3Com 3C509 Ethernet adapter",
- DC_CLS_NETIF /* class */
-};
-
#include "crd.h"
#if NCRD > 0
@@ -225,7 +211,6 @@ ep_pccard_init(dp, first)
return (ENXIO);
}
ep_unit++;
- ep_isa_registerdev(sc, is);
}
/* get_e() requires these. */
@@ -258,7 +243,6 @@ ep_pccard_init(dp, first)
}
if (!first) {
- sc->kdc->kdc_state = DC_IDLE;
sc->gone = 0;
printf("ep%d: resumed.\n", is->id_unit);
epinit(sc);
@@ -307,11 +291,10 @@ ep_unload(dp)
{
struct ep_softc *sc = ep_softc[dp->isahd.id_unit];
- if (sc->kdc->kdc_state == DC_UNCONFIGURED) {
+ if (sc->gone) {
printf("ep%d: already unloaded\n", dp->isahd.id_unit);
return;
}
- sc->kdc->kdc_state = DC_UNCONFIGURED;
sc->arpcom.ac_if.if_flags &= ~IFF_RUNNING;
sc->gone = 1;
printf("ep%d: unload\n", dp->isahd.id_unit);
@@ -331,24 +314,6 @@ card_intr(dp)
#endif /* NCRD > 0 */
-static void
-ep_isa_registerdev(sc, id)
- struct ep_softc *sc;
- struct isa_device *id;
-{
- sc->kdc = (struct kern_devconf *)malloc(sizeof(struct kern_devconf),
- M_DEVBUF, M_NOWAIT);
- if (!sc->kdc) {
- printf("WARNING: ep_isa_registerdev unable to malloc! "
- "Device kdc will not be registerd\n");
- return;
- }
- bcopy(&kdc_isa_ep, sc->kdc, sizeof(kdc_isa_ep));
- sc->kdc->kdc_unit = sc->unit;
- sc->kdc->kdc_parentdata = id;
- dev_attach(sc->kdc);
-}
-
static int
eeprom_rdy(sc)
struct ep_softc *sc;
@@ -552,8 +517,6 @@ ep_isa_probe(is)
is->id_unit = ep_unit++;
- ep_isa_registerdev(sc, is);
-
/*
* The iobase was found and MFG_ID was 0x6d50. PROD_ID should be
* 0x9[0-f]50
@@ -693,7 +656,6 @@ ep_attach(sc)
}
/* device attach does transition from UNCONFIGURED to IDLE state */
- sc->kdc->kdc_state=DC_IDLE;
/*
* Fill the hardware address into ifa_addr if we find an AF_LINK entry.
@@ -1428,7 +1390,6 @@ epioctl(ifp, cmd, data)
ifp->if_flags |= IFF_UP;
/* netifs are BUSY when UP */
- sc->kdc->kdc_state=DC_BUSY;
switch (ifa->ifa_addr->sa_family) {
#ifdef INET
@@ -1488,10 +1449,6 @@ epioctl(ifp, cmd, data)
}
break;
case SIOCSIFFLAGS:
- /* UP controls BUSY/IDLE */
- sc->kdc->kdc_state= ( (ifp->if_flags & IFF_UP)
- ? DC_BUSY
- : DC_IDLE );
if ((ifp->if_flags & IFF_UP) == 0 && ifp->if_flags & IFF_RUNNING) {
ifp->if_flags &= ~IFF_RUNNING;
diff --git a/sys/i386/isa/if_fe.c b/sys/i386/isa/if_fe.c
index 7648902cb7e4..5d1832928663 100644
--- a/sys/i386/isa/if_fe.c
+++ b/sys/i386/isa/if_fe.c
@@ -21,7 +21,7 @@
*/
/*
- * $Id: if_fe.c,v 1.16 1996/06/18 01:22:21 bde Exp $
+ * $Id: if_fe.c,v 1.17 1996/08/06 21:14:07 phk Exp $
*
* Device driver for Fujitsu MB86960A/MB86965A based Ethernet cards.
* To be used with FreeBSD 2.x
@@ -83,7 +83,6 @@
#include <sys/mbuf.h>
#include <sys/socket.h>
#include <sys/syslog.h>
-#include <sys/devconf.h>
#include <net/if.h>
#include <net/if_dl.h>
@@ -206,7 +205,6 @@ static struct fe_softc {
struct arpcom arpcom; /* Ethernet common */
/* Used by config codes. */
- struct kern_devconf kdc;/* Kernel configuration database info. */
/* Set by probe() and not modified in later phases. */
char * typestr; /* printable name of the interface. */
@@ -239,8 +237,6 @@ static struct fe_softc {
#define sc_if arpcom.ac_if
#define sc_unit arpcom.ac_if.if_unit
#define sc_enaddr arpcom.ac_enaddr
-#define sc_dcstate kdc.kdc_state
-#define sc_description kdc.kdc_description
/* Standard driver entry points. These can be static. */
static int fe_probe ( struct isa_device * );
@@ -252,7 +248,6 @@ static void fe_reset ( int );
static void fe_watchdog ( struct ifnet * );
/* Local functions. Order of declaration is confused. FIXME. */
-static void fe_registerdev ( struct fe_softc *, DEVICE * );
static int fe_probe_fmv ( DEVICE *, struct fe_softc * );
static int fe_probe_ati ( DEVICE *, struct fe_softc * );
static int fe_probe_mbh ( DEVICE *, struct fe_softc * );
@@ -281,19 +276,6 @@ struct isa_driver fedriver =
1 /* It's safe to mark as "sensitive" */
};
-/* Initial value for a kdc struct. */
-static struct kern_devconf const fe_kdc_template =
-{
- 0, 0, 0,
- "fe", 0, { MDDT_ISA, 0, "net" },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0, /* This is an ISA device. */
- 0,
- DC_UNCONFIGURED, /* Not yet configured. */
- "Ethernet (MB8696x)", /* Tentative description (filled in later.) */
- DC_CLS_NETIF /* This is a network interface. */
-};
-
/*
* Fe driver specific constants which relate to 86960/86965.
*/
@@ -460,15 +442,6 @@ static struct fe_probe_list const fe_probe_list [] =
{ NULL, NULL }
};
-static void
-fe_registerdev ( struct fe_softc * sc, DEVICE * dev )
-{
- /* Fill the device config data and register it. */
- sc->kdc = fe_kdc_template;
- sc->kdc.kdc_unit = sc->sc_unit;
- sc->kdc.kdc_parentdata = dev;
- dev_attach( &sc->kdc );
-}
/*
* Determine if the device is present
@@ -497,19 +470,12 @@ fe_probe ( DEVICE * dev )
sc = &fe_softc[ dev->id_unit ];
sc->sc_unit = dev->id_unit;
-#if NCRD == 0
-#ifndef DEV_LKM
- fe_registerdev(sc, dev);
-#endif
-#endif /* NCRD == 0 */
-
#if NCRD > 0
/*
* If PC-Card probe required, then register driver with
* slot manager.
*/
if (fe_already_init != 1) {
- fe_registerdev(sc,dev);
pccard_add_driver(&fe_info);
fe_already_init = 1;
}
@@ -784,7 +750,6 @@ fe_probe_fmv ( DEVICE * dev, struct fe_softc * sc )
switch ( revision ) {
case 8:
sc->typestr = "FMV-183";
- sc->sc_description = "Ethernet adapter: FMV-183";
break;
}
break;
@@ -792,11 +757,9 @@ fe_probe_fmv ( DEVICE * dev, struct fe_softc * sc )
switch ( revision ) {
case 0:
sc->typestr = "FMV-181";
- sc->sc_description = "Ethernet adapter: FMV-181";
break;
case 1:
sc->typestr = "FMV-181A";
- sc->sc_description = "Ethernet adapter: FMV-181A";
break;
}
break;
@@ -804,7 +767,6 @@ fe_probe_fmv ( DEVICE * dev, struct fe_softc * sc )
switch ( revision ) {
case 8:
sc->typestr = "FMV-184 (CSR = 2)";
- sc->sc_description = "Ethernet adapter: FMV-184";
break;
}
break;
@@ -812,7 +774,6 @@ fe_probe_fmv ( DEVICE * dev, struct fe_softc * sc )
switch ( revision ) {
case 8:
sc->typestr = "FMV-184 (CSR = 1)";
- sc->sc_description = "Ethernet adapter: FMV-184";
break;
}
break;
@@ -820,15 +781,12 @@ fe_probe_fmv ( DEVICE * dev, struct fe_softc * sc )
switch ( revision ) {
case 0:
sc->typestr = "FMV-182";
- sc->sc_description = "Ethernet adapter: FMV-182";
break;
case 1:
sc->typestr = "FMV-182A";
- sc->sc_description = "Ethernet adapter: FMV-182A";
break;
case 8:
sc->typestr = "FMV-184 (CSR = 3)";
- sc->sc_description = "Ethernet adapter: FMV-184";
break;
}
break;
@@ -836,8 +794,6 @@ fe_probe_fmv ( DEVICE * dev, struct fe_softc * sc )
if ( sc->typestr == NULL ) {
/* Unknown card type... Hope the driver works. */
sc->typestr = "unknown FMV-180 version";
- sc->sc_description
- = "Ethernet adapter: unknown FMV-180 version";
log( LOG_WARNING, "fe%d: %s: %x-%x-%x-%x\n",
sc->sc_unit, sc->typestr,
inb( sc->ioaddr[ FE_FMV0 ] ),
@@ -1023,23 +979,18 @@ fe_probe_ati ( DEVICE * dev, struct fe_softc * sc )
switch (eeprom[FE_ATI_EEP_MODEL]) {
case FE_ATI_MODEL_AT1700T:
sc->typestr = "AT-1700T/RE2001";
- sc->sc_description = "Ethernet adapter: AT1700T or RE2001";
break;
case FE_ATI_MODEL_AT1700BT:
sc->typestr = "AT-1700BT/RE2003";
- sc->sc_description = "Ethernet adapter: AT1700BT or RE2003";
break;
case FE_ATI_MODEL_AT1700FT:
sc->typestr = "AT-1700FT/RE2009";
- sc->sc_description = "Ethernet adapter: AT1700FT or RE2009";
break;
case FE_ATI_MODEL_AT1700AT:
sc->typestr = "AT-1700AT/RE2005";
- sc->sc_description = "Ethernet adapter: AT1700AT or RE2005";
break;
default:
sc->typestr = "unknown AT-1700/RE2000 ?";
- sc->sc_description = "Ethernet adapter: AT1700 or RE2000 ?";
break;
}
@@ -1220,7 +1171,6 @@ fe_probe_mbh ( DEVICE * dev, struct fe_softc * sc )
/* Determine the card type. */
sc->typestr = "MBH10302 (PCMCIA)";
- sc->sc_description = "Ethernet adapter: MBH10302 (PCMCIA)";
/*
* Initialize constants in the per-line structure.
@@ -1480,7 +1430,6 @@ fe_stop ( int unit )
sc->filter_change = 0;
/* Update config status also. */
- sc->sc_dcstate = DC_IDLE;
/* Call a hook. */
if ( sc->stop ) sc->stop( sc );
@@ -1678,9 +1627,6 @@ fe_init ( int unit )
/* Set 'running' flag, because we are now running. */
sc->sc_if.if_flags |= IFF_RUNNING;
- /* Update device config status. */
- sc->sc_dcstate = DC_BUSY;
-
/*
* At this point, the interface is running properly,
* except that it receives *no* packets. we then call
diff --git a/sys/i386/isa/if_ie.c b/sys/i386/isa/if_ie.c
index 24e3829ab612..4c8cf8decf00 100644
--- a/sys/i386/isa/if_ie.c
+++ b/sys/i386/isa/if_ie.c
@@ -43,7 +43,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: if_ie.c,v 1.34 1996/06/18 01:22:22 bde Exp $
+ * $Id: if_ie.c,v 1.35 1996/06/25 20:30:13 bde Exp $
*/
/*
@@ -117,7 +117,6 @@ iomem, and to make 16-pointers, we subtract iomem and and with 0xffff.
#include <sys/ioctl.h>
#include <sys/errno.h>
#include <sys/syslog.h>
-#include <sys/devconf.h>
#include <net/if.h>
#include <net/if_types.h>
@@ -314,35 +313,12 @@ static int sl_probe(struct isa_device *);
static int el_probe(struct isa_device *);
static int ni_probe(struct isa_device *);
-static struct kern_devconf kdc_ie[NIE] = { {
- 0, 0, 0, /* filled in by dev_attach */
- "ie", 0, { MDDT_ISA, 0, "net" },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0, /* parent */
- 0, /* parentdata */
- DC_UNCONFIGURED, /* state */
- "Ethernet adapter", /* description */
- DC_CLS_NETIF /* class */
-} };
-
-static inline void
-ie_registerdev(struct isa_device *id)
-{
- if(id->id_unit)
- kdc_ie[id->id_unit] = kdc_ie[0];
- kdc_ie[id->id_unit].kdc_unit = id->id_unit;
- kdc_ie[id->id_unit].kdc_isa = id;
- dev_attach(&kdc_ie[id->id_unit]);
-}
-
/* This routine written by Charles Martin Hannum. */
int ieprobe(dvp)
struct isa_device *dvp;
{
int ret;
- ie_registerdev(dvp);
-
ret = sl_probe(dvp);
if(!ret) ret = el_probe(dvp);
if(!ret) ret = ni_probe(dvp);
@@ -596,7 +572,6 @@ ieattach(dvp)
if_attach(ifp);
ether_ifattach(ifp);
- kdc_ie[unit].kdc_description = ie_hardware_names[ie_softc[unit].hard_type];
return 1;
}
diff --git a/sys/i386/isa/if_ix.c b/sys/i386/isa/if_ix.c
index 2275622bdd7e..720a6714dd00 100644
--- a/sys/i386/isa/if_ix.c
+++ b/sys/i386/isa/if_ix.c
@@ -28,7 +28,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: if_ix.c,v 1.21 1996/06/25 20:30:18 bde Exp $
+ * $Id: if_ix.c,v 1.22 1996/08/06 21:14:08 phk Exp $
*/
#include "ix.h"
@@ -41,7 +41,6 @@
#include <sys/ioctl.h>
#include <sys/errno.h>
#include <sys/syslog.h>
-#include <sys/devconf.h>
#include <machine/clock.h>
#include <machine/md_var.h>
@@ -175,28 +174,6 @@ RRR */
struct isa_driver ixdriver = {ixprobe, ixattach, "ix"};
-static struct kern_devconf kdc_ix_template = {
- 0, 0, 0, /* filled in by dev_attach */
- "ix", 0, { MDDT_ISA, 0, "net" },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0, /* parent */
- 0, /* parentdata */
- DC_UNCONFIGURED, /* state */
- "", /* description */
- DC_CLS_NETIF /* class */
-};
-
-static inline void
-ix_registerdev(struct isa_device *id, const char *descr)
-{
- struct kern_devconf *kdc = &ix_softc[id->id_unit].kdc;
- *kdc = kdc_ix_template;
- kdc->kdc_unit = id->id_unit;
- kdc->kdc_parentdata = id;
- kdc->kdc_description = descr;
- dev_attach(kdc);
-}
-
/*
* Enable the interrupt signal on the board so that it may interrupt
* the host.
@@ -552,10 +529,6 @@ ixprobe(struct isa_device *dvp) {
sc->flags = IXF_NONE; /* make sure the flag word is NONE */
status = IX_IO_PORTS;
-#ifndef DEV_LKM
- ix_registerdev(dvp, "Ethernet adapter: Intel EtherExpress16");
-#endif /* not DEV_LKM */
-
ixprobe_exit:
DEBUGBEGIN(DEBUGPROBE)
DEBUGDO(printf ("ixprobe exited\n");)
@@ -608,7 +581,6 @@ ixattach(struct isa_device *dvp) {
if_attach(ifp);
ether_ifattach(ifp);
- sc->kdc.kdc_state = DC_IDLE;
printf("ix%d: address %6D\n", unit, sc->arpcom.ac_enaddr, ":");
return(0);
@@ -631,8 +603,6 @@ ixinit(int unit) {
DEBUGDO(printf("ixinit:");)
DEBUGEND
- sc->kdc.kdc_state = DC_BUSY;
-
/* Put bart into loopback until we are done intializing to
* make sure that packets don't hit the wire */
bart_config = inb(sc->iobase + config);
@@ -1455,8 +1425,6 @@ ixstop(struct ifnet *ifp) {
/* force the 82586 reset pin high */
outb(sc->iobase + ee_ctrl, I586_RESET);
- sc->kdc.kdc_state = DC_IDLE;
-
DEBUGBEGIN(DEBUGSTOP)
DEBUGDO(printf("ixstop exiting\n");)
DEBUGEND
diff --git a/sys/i386/isa/if_ixreg.h b/sys/i386/isa/if_ixreg.h
index d46011d73eea..6b54d56958e8 100644
--- a/sys/i386/isa/if_ixreg.h
+++ b/sys/i386/isa/if_ixreg.h
@@ -28,7 +28,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: if_ixreg.h,v 1.7 1996/01/30 22:55:52 mpp Exp $
+ * $Id: if_ixreg.h,v 1.8 1996/08/06 21:14:09 phk Exp $
*/
/*
@@ -356,5 +356,4 @@ typedef struct
rfd_t *rfd_tail; /* tail of the rfd list */
rbd_t *rbd_head; /* head of the rbd list */
rbd_t *rbd_tail; /* tail of the rbd list */
- struct kern_devconf kdc;
} ix_softc_t;
diff --git a/sys/i386/isa/if_le.c b/sys/i386/isa/if_le.c
index 5d0473f9714a..ccad397d907c 100644
--- a/sys/i386/isa/if_le.c
+++ b/sys/i386/isa/if_le.c
@@ -21,7 +21,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: if_le.c,v 1.32 1996/06/12 05:03:42 gpalmer Exp $
+ * $Id: if_le.c,v 1.33 1996/06/18 01:22:23 bde Exp $
*/
/*
@@ -49,7 +49,6 @@
#include <sys/errno.h>
#include <sys/malloc.h>
#include <sys/syslog.h>
-#include <sys/devconf.h>
#include <net/if.h>
#include <net/if_types.h>
@@ -325,26 +324,6 @@ static unsigned le_intrs[NLE];
#define MEMSET(where, what, howmuch) bzero(where, howmuch)
#define MEMCMP(l, r, len) bcmp(l, r, len)
-static struct kern_devconf kdc_le[NLE] = { {
- 0, 0, 0, /* filled in by dev_attach */
- "le", 0, { MDDT_ISA, 0, "net" },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0, /* parent */
- 0, /* parentdata */
- DC_UNCONFIGURED, /* state */
- "Ethernet adapter: DEC EtherWorks II or EtherWorks III",
- DC_CLS_NETIF /* class */
-} };
-
-static inline void
-le_registerdev(struct isa_device *id)
-{
- if(id->id_unit)
- kdc_le[id->id_unit] = kdc_le[0];
- kdc_le[id->id_unit].kdc_unit = id->id_unit;
- kdc_le[id->id_unit].kdc_isa = id;
- dev_attach(&kdc_le[id->id_unit]);
-}
static int
le_probe(
@@ -360,8 +339,6 @@ le_probe(
return 0;
}
- le_registerdev(dvp);
-
sc->le_iobase = dvp->id_iobase;
sc->le_membase = (u_char *) dvp->id_maddr;
sc->le_irq = dvp->id_irq;
@@ -410,7 +387,6 @@ le_attach(
if_attach(ifp);
ether_ifattach(ifp);
- kdc_le[dvp->id_unit].kdc_state = DC_IDLE;
return 1;
}
@@ -637,8 +613,6 @@ le_ioctl(
}
splx(s);
- kdc_le[ifp->if_unit].kdc_state = (ifp->if_flags & IFF_UP)
- ? DC_BUSY : DC_IDLE;
return error;
}
diff --git a/sys/i386/isa/if_lnc.c b/sys/i386/isa/if_lnc.c
index abc3b74c645e..08a14a450105 100644
--- a/sys/i386/isa/if_lnc.c
+++ b/sys/i386/isa/if_lnc.c
@@ -80,7 +80,6 @@
#include <sys/mbuf.h>
#include <sys/socket.h>
#include <sys/syslog.h>
-#include <sys/devconf.h>
#include <net/if.h>
#include <net/if_dl.h>
@@ -120,7 +119,7 @@ static struct lnc_softc {
int initialised;
int rap;
int rdp;
- struct kern_devconf kdc;
+ char *descr;
#ifdef DEBUG
int lnc_debug;
#endif
@@ -165,17 +164,6 @@ void lncintr_sc __P((struct lnc_softc *sc));
struct isa_driver lncdriver = {lnc_probe, lnc_attach, "lnc"};
-static struct kern_devconf kdc_lnc = {
- 0, 0, 0, /* filled in by dev_attach */
- "lnc", 0, { MDDT_ISA, 0, "net" },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0, /* parent */
- 0, /* parentdata */
- DC_UNCONFIGURED,
- "",
- DC_CLS_NETIF
-};
-
static inline void
write_csr(struct lnc_softc *sc, u_short port, u_short val)
{
@@ -194,48 +182,43 @@ static inline void
lnc_registerdev(struct isa_device *isa_dev)
{
struct lnc_softc *sc = &lnc_softc[isa_dev->id_unit];
- struct kern_devconf *kdc = &sc->kdc;
- *kdc = kdc_lnc;
- kdc->kdc_unit = isa_dev->id_unit;
- kdc->kdc_parentdata = isa_dev;
switch(sc->nic.ic) {
case LANCE:
if (sc->nic.ident == BICC)
- kdc->kdc_description = "BICC (LANCE) Ethernet controller";
+ sc->descr = "BICC (LANCE) Ethernet controller";
else if (sc->nic.ident == NE2100)
- kdc->kdc_description = "NE2100 (LANCE) Ethernet controller";
+ sc->descr = "NE2100 (LANCE) Ethernet controller";
else if (sc->nic.ident == DEPCA)
- kdc->kdc_description = "DEPCA (LANCE) Ethernet controller";
+ sc->descr = "DEPCA (LANCE) Ethernet controller";
break;
case C_LANCE:
if (sc->nic.ident == BICC)
- kdc->kdc_description = "BICC (C-LANCE) Ethernet controller";
+ sc->descr = "BICC (C-LANCE) Ethernet controller";
else if (sc->nic.ident == NE2100)
- kdc->kdc_description = "NE2100 (C-LANCE) Ethernet controller";
+ sc->descr = "NE2100 (C-LANCE) Ethernet controller";
else if (sc->nic.ident == DEPCA)
- kdc->kdc_description = "DEPCA (C-LANCE) Ethernet controller";
+ sc->descr = "DEPCA (C-LANCE) Ethernet controller";
break;
case PCnet_ISA:
- kdc->kdc_description = "PCnet-ISA Ethernet controller";
+ sc->descr = "PCnet-ISA Ethernet controller";
break;
case PCnet_ISAplus:
- kdc->kdc_description = "PCnet-ISA+ Ethernet controller";
+ sc->descr = "PCnet-ISA+ Ethernet controller";
break;
case PCnet_32:
- kdc->kdc_description = "PCnet-32 VL-Bus Ethernet controller";
+ sc->descr = "PCnet-32 VL-Bus Ethernet controller";
break;
case PCnet_PCI:
/*
* XXX - This should never be the case ...
*/
- kdc->kdc_description = "PCnet-PCI Ethernet controller";
+ sc->descr = "PCnet-PCI Ethernet controller";
break;
default:
break;
}
- dev_attach(kdc);
}
@@ -1198,14 +1181,13 @@ lnc_attach_sc(struct lnc_softc *sc, int unit)
if_attach(&sc->arpcom.ac_if);
ether_ifattach(&sc->arpcom.ac_if);
- sc->kdc.kdc_state = DC_IDLE;
- if (sc->kdc.kdc_description == NULL)
- sc->kdc.kdc_description = "Lance Ethernet controller";
+ if (sc->descr == NULL)
+ sc->descr = "Lance Ethernet controller";
printf("lnc%d: %s, address %6D\n",
unit,
- sc->kdc.kdc_description,
+ sc->descr,
sc->arpcom.ac_enaddr, ":");
#if NBPFILTER > 0
@@ -1736,7 +1718,6 @@ lnc_ioctl(struct ifnet * ifp, int command, caddr_t data)
switch (command) {
case SIOCSIFADDR:
ifp->if_flags |= IFF_UP;
- sc->kdc.kdc_state = DC_BUSY;
switch (ifa->ifa_addr->sa_family) {
#ifdef INET
@@ -1783,8 +1764,6 @@ lnc_ioctl(struct ifnet * ifp, int command, caddr_t data)
*/
lnc_init(sc);
}
- sc->kdc.kdc_state =
- ((ifp->if_flags & IFF_UP) ? DC_BUSY : DC_IDLE);
break;
#ifdef LNC_MULTICAST
case SIOCADDMULTI:
diff --git a/sys/i386/isa/if_sr.c b/sys/i386/isa/if_sr.c
index bf1cdd1135e1..9d16b6b80600 100644
--- a/sys/i386/isa/if_sr.c
+++ b/sys/i386/isa/if_sr.c
@@ -28,7 +28,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id$
+ * $Id: if_sr.c,v 1.1 1996/07/05 18:49:21 jhay Exp $
*/
/*
@@ -71,7 +71,6 @@
#include <net/bpfdesc.h>
#endif
-#include <sys/devconf.h>
#include <machine/clock.h>
#include <machine/md_var.h>
@@ -118,7 +117,6 @@ static struct sr_hardc {
sca_regs *sca;
- struct kern_devconf kdc;
}sr_hardc[NSR];
struct sr_softc {
@@ -151,7 +149,6 @@ struct sr_softc {
int scachan;
- struct kern_devconf kdc;
};
static int srprobe(struct isa_device *id);
@@ -181,28 +178,6 @@ static int sr_irqtable[16] = {
struct isa_driver srdriver = {srprobe, srattach, "src"};
-static struct kern_devconf kdc_sr_template = {
- 0, 0, 0,
- "sr", 0, { MDDT_ISA, 0, "net" },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0,
- 0,
- DC_UNCONFIGURED,
- "SDL Riscom/N2 Port",
- DC_CLS_NETIF
-};
-
-static struct kern_devconf kdc_src_template = {
- 0, 0, 0,
- "src", 0, { MDDT_ISA, 0, "net" },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0,
- 0,
- DC_UNCONFIGURED,
- "SDL Riscom/N2 Adapter",
- DC_CLS_NETIF
-};
-
static void sr_xmit(struct sr_softc *sc);
static void srstart(struct ifnet *ifp);
static int srioctl(struct ifnet *ifp, int cmd, caddr_t data);
@@ -223,33 +198,6 @@ static void sr_dmac_intr(struct sr_hardc *hc, u_char isr);
static void sr_msci_intr(struct sr_hardc *hc, u_char isr);
static void sr_timer_intr(struct sr_hardc *hc, u_char isr);
-static inline void
-sr_registerdev(int ctlr, int unit)
-{
- struct sr_softc *sc;
-
- sc = &sr_hardc[ctlr].sc[unit];
- sc->kdc = kdc_sr_template;
-
- sc->kdc.kdc_unit = sr_hardc[ctlr].startunit + unit;
- sc->kdc.kdc_parentdata = &sr_hardc[ctlr].kdc;
- dev_attach(&sc->kdc);
-}
-
-static inline void
-src_registerdev(struct isa_device *dvp)
-{
- int unit = dvp->id_unit;
- struct sr_hardc *hc = &sr_hardc[dvp->id_unit];
-
- hc->kdc = kdc_src_template;
-
- hc->kdc.kdc_unit = unit;
- hc->kdc.kdc_parentdata = dvp;
- dev_attach(&hc->kdc);
-}
-
-
/*
* Register the Adapter.
* Probe to see if it is there.
@@ -266,11 +214,6 @@ srprobe(struct isa_device *id)
sca_regs *sca = 0;
/*
- * Register the card.
- */
- src_registerdev(id);
-
- /*
* Now see if the card is realy there.
*
* If it is there, size its memory.
@@ -438,8 +381,6 @@ srattach(struct isa_device *id)
hc->memsize/1024,
hc->numports);
- hc->kdc.kdc_state = DC_BUSY;
-
src_init(id);
sc = hc->sc;
@@ -455,8 +396,6 @@ srattach(struct isa_device *id)
sc->unit = hc->startunit + unit;
sc->scachan = unit%NCHAN;
- sr_registerdev(id->id_unit, unit);
-
sr_init_rx_dmac(sc);
sr_init_tx_dmac(sc);
sr_init_msci(sc);
@@ -474,8 +413,6 @@ srattach(struct isa_device *id)
sc->ifsppp.pp_flags = PP_KEEPALIVE;
- sc->kdc.kdc_state = DC_IDLE;
-
printf("sr%d: Adapter %d, port %d.\n",
sc->unit,
hc->cunit,
@@ -796,8 +733,6 @@ sr_up(struct sr_softc *sc)
sca_regs *sca = sc->hc->sca;
msci_channel *msci = &sca->msci[sc->scachan];
- sc->kdc.kdc_state = DC_BUSY;
-
/*
* Enable transmitter and receiver.
* Raise DTR and RTS.
@@ -840,8 +775,6 @@ sr_down(struct sr_softc *sc)
sca_regs *sca = sc->hc->sca;
msci_channel *msci = &sca->msci[sc->scachan];
- sc->kdc.kdc_state = DC_IDLE;
-
/*
* Disable transmitter and receiver.
* Lower DTR and RTS.
diff --git a/sys/i386/isa/isa.c b/sys/i386/isa/isa.c
index e944509daf7b..f03e18b13f2f 100644
--- a/sys/i386/isa/isa.c
+++ b/sys/i386/isa/isa.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)isa.c 7.2 (Berkeley) 5/13/91
- * $Id: isa.c,v 1.70 1996/05/02 10:43:09 phk Exp $
+ * $Id: isa.c,v 1.71 1996/06/25 20:30:36 bde Exp $
*/
/*
@@ -64,7 +64,6 @@
#include <i386/isa/isa.h>
#include <i386/isa/icu.h>
#include <i386/isa/ic/i8237.h>
-#include <sys/devconf.h>
#include "vector.h"
/*
@@ -89,19 +88,6 @@ u_int intr_mask[ICU_LEN];
u_int* intr_mptr[ICU_LEN];
int intr_unit[ICU_LEN];
-extern struct kern_devconf kdc_cpu0;
-
-struct kern_devconf kdc_isa0 = {
- 0, 0, 0, /* filled in by dev_attach */
- "isa", 0, { MDDT_BUS, 0 },
- 0, 0, 0, BUS_EXTERNALLEN,
- &kdc_cpu0, /* parent is the CPU */
- 0, /* no parentdata */
- DC_BUSY, /* busses are always busy */
- "ISA bus",
- DC_CLS_BUS /* class */
-};
-
static inthand_t *fastintr[ICU_LEN] = {
&IDTVEC(fastintr0), &IDTVEC(fastintr1),
&IDTVEC(fastintr2), &IDTVEC(fastintr3),
@@ -269,8 +255,6 @@ void
isa_configure() {
struct isa_device *dvp;
- dev_attach(&kdc_isa0);
-
splhigh();
printf("Probing for devices on the ISA bus:\n");
/* First probe all the sensitive probes */
@@ -487,43 +471,6 @@ config_isadev_c(isdp, mp, reconfig)
}
/*
- * Provide ISA-specific device information to user programs using the
- * hw.devconf interface.
- */
-int
-isa_externalize(struct isa_device *id, struct sysctl_req *req)
-{
- return (SYSCTL_OUT(req, id, sizeof *id));
-}
-
-/*
- * This is used to forcibly reconfigure an ISA device. It currently just
- * returns an error 'cos you can't do that yet. It is here to demonstrate
- * what the `internalize' routine is supposed to do.
- */
-int
-isa_internalize(struct isa_device *id, struct sysctl_req *req)
-{
- struct isa_device myid;
- int rv;
-
- rv = SYSCTL_IN(req, &myid, sizeof *id);
- if(rv)
- return rv;
-
- rv = EOPNOTSUPP;
- /* code would go here to validate the configuration request */
- /* code would go here to actually perform the reconfiguration */
- return rv;
-}
-
-int
-isa_generic_externalize(struct kern_devconf *kdc, struct sysctl_req *req)
-{
- return isa_externalize(kdc->kdc_isa, req);
-}
-
-/*
* Fill in default interrupt table (in case of spuruious interrupt
* during configuration of kernel, setup interrupt control unit
*/
diff --git a/sys/i386/isa/istallion.c b/sys/i386/isa/istallion.c
index 71814453b7f6..8063ec8a0265 100644
--- a/sys/i386/isa/istallion.c
+++ b/sys/i386/isa/istallion.c
@@ -33,7 +33,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: istallion.c,v 1.4 1996/06/18 01:22:25 bde Exp $
+ * $Id: istallion.c,v 1.5 1996/08/31 14:47:42 bde Exp $
*/
/*****************************************************************************/
@@ -51,7 +51,6 @@
#include <sys/file.h>
#include <sys/uio.h>
#include <sys/syslog.h>
-#include <sys/devconf.h>
#include <machine/cpu.h>
#include <machine/clock.h>
#include <vm/vm.h>
diff --git a/sys/i386/isa/labpc.c b/sys/i386/isa/labpc.c
index 76c81a5c7b7a..f272fbfc8144 100644
--- a/sys/i386/isa/labpc.c
+++ b/sys/i386/isa/labpc.c
@@ -46,7 +46,6 @@
#include <sys/time.h>
#include <sys/systm.h>
-#include <sys/devconf.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
@@ -60,7 +59,6 @@
#include <sys/devfsext.h>
#endif /*DEVFS*/
-#include <machine/devconf.h>
#include <machine/clock.h>
#include <i386/isa/isa_device.h>
@@ -148,7 +146,6 @@ struct ctlr
/* Device configuration structure:
*/
- struct kern_devconf kdc;
#ifdef DEVFS
void *devfs_token;
#endif
@@ -368,36 +365,6 @@ reset(struct ctlr *ctlr)
ad_clear(ctlr);
}
-static int
-labpc_goaway(struct kern_devconf *kdc, int force)
-{
- if(force) {
- dev_detach(kdc);
- return 0;
- } else {
- return EBUSY; /* XXX fix */
- }
-}
-
-static struct kern_devconf kdc_template = {
- 0, 0, 0, /* filled in by dev_attach */
- "labpc", 0, { MDDT_ISA, 0, "tty" },
- isa_generic_externalize, 0, labpc_goaway, ISA_EXTERNALLEN,
- &kdc_isa0, /* parent */
- 0, /* parentdata */
- DC_UNKNOWN,
- "?" /* Description (filled in later ) */
-};
-
-static inline void
-labpc_registerdev(struct isa_device *id)
-{
- struct kern_devconf *kdc = &labpcs[id->id_unit]->kdc;
- kdc->kdc_unit = id->id_unit;
- kdc->kdc_parentdata = id;
- dev_attach(kdc);
-}
-
/* overrun: slam the start convert register and OVERRUN should get set:
*/
static u_char
@@ -484,14 +451,6 @@ labpcprobe(struct isa_device *dev)
l->base = ctlr->base;
dev->id_unit = l->unit = unit;
- l->kdc = kdc_template;
- l->kdc.kdc_state = DC_IDLE;
-
- if ((status & LABPCPLUS) == 0)
- l->kdc.kdc_description = "National Instrument's LabPC+";
- else
- l->kdc.kdc_description = "National Instrument's LabPC";
-
unit++;
return 0x20;
}
@@ -511,7 +470,6 @@ labpcattach(struct isa_device *dev)
ctlr->sample_us = (1000000.0 / (double)LABPC_DEFAULT_HERZ) + .50;
reset(ctlr);
- labpc_registerdev(dev);
ctlr->min_tmo = LABPC_MIN_TMO;
@@ -766,7 +724,6 @@ labpcopen(dev_t dev, int flags, int fmt, struct proc *p)
if ( (ctlr->flags & BUSY) == 0)
{
ctlr->flags |= BUSY;
- ctlr->kdc.kdc_state = DC_BUSY;
reset(ctlr);
@@ -790,7 +747,6 @@ labpcclose(dev_t dev, int flags, int fmt, struct proc *p)
(*ctlr->stop)(ctlr);
- ctlr->kdc.kdc_state = DC_IDLE;
ctlr->flags &= ~BUSY;
return 0;
diff --git a/sys/i386/isa/lpt.c b/sys/i386/isa/lpt.c
index b2e0cdcdf11c..b3252a44a582 100644
--- a/sys/i386/isa/lpt.c
+++ b/sys/i386/isa/lpt.c
@@ -46,7 +46,7 @@
* SUCH DAMAGE.
*
* from: unknown origin, 386BSD 0.1
- * $Id: lpt.c,v 1.53 1996/04/04 12:28:36 joerg Exp $
+ * $Id: lpt.c,v 1.54 1996/07/12 07:41:00 bde Exp $
*/
/*
@@ -112,7 +112,6 @@
#include <sys/ioctl.h>
#include <sys/uio.h>
#include <sys/syslog.h>
-#include <sys/devconf.h>
#ifdef DEVFS
#include <sys/devfsext.h>
#endif /*DEVFS*/
@@ -301,27 +300,6 @@ static struct cdevsw lpt_cdevsw =
seltrue, nommap, nostrat, "lpt", NULL, -1 };
-static struct kern_devconf kdc_lpt[NLPT] = { {
- 0, 0, 0, /* filled in by dev_attach */
- "lpt", 0, { MDDT_ISA, 0, "tty" },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0, /* parent */
- 0, /* parentdata */
- DC_UNCONFIGURED, /* state */
- "Parallel printer adapter",
- DC_CLS_PARALLEL | DC_CLS_NETIF /* class */
-} };
-
-static inline void
-lpt_registerdev(struct isa_device *id)
-{
- if(id->id_unit)
- kdc_lpt[id->id_unit] = kdc_lpt[0];
- kdc_lpt[id->id_unit].kdc_unit = id->id_unit;
- kdc_lpt[id->id_unit].kdc_isa = id;
- dev_attach(&kdc_lpt[id->id_unit]);
-}
-
/*
* Internal routine to lptprobe to do port tests of one byte value
*/
@@ -397,8 +375,6 @@ lptprobe(struct isa_device *dvp)
u_char mask;
int i;
- lpt_registerdev(dvp);
-
/*
* Make sure there is some way for lptopen to see that
* the port is not configured
@@ -477,8 +453,6 @@ lptattach(struct isa_device *isdp)
}
lprintf("irq %x\n", sc->sc_irq);
- kdc_lpt[unit].kdc_state = DC_IDLE;
-
#ifdef DEVFS
/* XXX what to do about the flags in the minor number? */
sc->devfs_token = devfs_add_devswf(&lpt_cdevsw,
@@ -583,7 +557,6 @@ lptopen (dev_t dev, int flags, int fmt, struct proc *p)
outb(port+lpt_control, sc->sc_control);
sc->sc_state = OPEN;
- kdc_lpt[unit].kdc_state = DC_BUSY;
sc->sc_inbuf = geteblk(BUFSIZE);
sc->sc_xfercnt = 0;
splx(s);
@@ -645,7 +618,6 @@ lptclose(dev_t dev, int flags, int fmt, struct proc *p)
goto end_close;
sc->sc_state &= ~OPEN;
- kdc_lpt[minor(dev)].kdc_state = DC_IDLE;
/* if the last write was interrupted, don't complete it */
if((!(sc->sc_state & INTERRUPTED)) && (sc->sc_irq & LP_USE_IRQ))
diff --git a/sys/i386/isa/matcd/matcd.c b/sys/i386/isa/matcd/matcd.c
index 70c0a125e427..b71914cd654f 100644
--- a/sys/i386/isa/matcd/matcd.c
+++ b/sys/i386/isa/matcd/matcd.c
@@ -337,7 +337,7 @@ static char MATCDVERSION[]="Version 1(26) 18-Oct-95";
static char MATCDCOPYRIGHT[] = "Matsushita CD-ROM driver, Copr. 1994,1995 Frank Durda IV";
/* The proceeding strings may not be changed*/
-/* $Id: matcd.c,v 1.18 1996/06/08 09:17:51 bde Exp $ */
+/* $Id: matcd.c,v 1.19 1996/07/23 21:51:56 phk Exp $ */
/*---------------------------------------------------------------------------
Include declarations
@@ -360,7 +360,6 @@ static char MATCDCOPYRIGHT[] = "Matsushita CD-ROM driver, Copr. 1994,1995 Frank
#include "i386/isa/matcd/matcddrv.h" /*Drive-related defs & strings*/
#include "i386/isa/matcd/creative.h" /*Host interface related defs*/
-#include <sys/devconf.h>
#include <sys/conf.h>
#include <sys/kernel.h>
#ifdef DEVFS
@@ -484,18 +483,6 @@ struct matcd_read2 {
loading possible.
*/
-static struct kern_devconf kdc_matcd[TOTALDRIVES] = { {
- 0,0,0, /*Filled in by dev_attach*/
- "matcdc",0,{MDDT_ISA,0,"bio"},
- isa_generic_externalize,0,0,ISA_EXTERNALLEN,
- &kdc_isa0, /*<12>Parent*/
- 0, /*<12>Parent Data*/
- DC_IDLE, /*<12>Status*/
- "Matsushita CD-ROM Controller" /*<12>This is the description*/
-} };
-
-
-
/*---------------------------------------------------------------------------
These macros take apart the minor number and yield the
@@ -1335,25 +1322,6 @@ int doprobe(int port,int cdrive)
/*---------------------------------------------------------------------------
-<12> matcd_register - Something to handle dynamic driver loading.
- Sorry for the lousy description but no one could point
- me to anything that explained what it is for either.
- Added in Edit 12.
----------------------------------------------------------------------------*/
-
-static inline void matcd_register(struct isa_device *id)
-{
- if(id->id_unit) {
- kdc_matcd[id->id_unit]=kdc_matcd[0];
- }
- kdc_matcd[id->id_unit].kdc_unit=id->id_unit;
- kdc_matcd[id->id_unit].kdc_isa=id;
- dev_attach(&kdc_matcd[id->id_unit]);
- return;
-}
-
-
-/*---------------------------------------------------------------------------
matcd_attach - Locates drives on the adapters that were located.
If we got here, we located an interface and at least one
drive. Now we figure out how many drives are under that
diff --git a/sys/i386/isa/mcd.c b/sys/i386/isa/mcd.c
index c16c00472256..dcb1abc2e069 100644
--- a/sys/i386/isa/mcd.c
+++ b/sys/i386/isa/mcd.c
@@ -40,7 +40,7 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: mcd.c,v 1.81 1996/06/18 01:22:27 bde Exp $
+ * $Id: mcd.c,v 1.82 1996/07/23 21:51:36 phk Exp $
*/
static const char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore";
@@ -60,7 +60,6 @@ static const char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore";
#include <sys/errno.h>
#include <sys/dkbad.h>
#include <sys/disklabel.h>
-#include <sys/devconf.h>
#include <sys/kernel.h>
#ifdef DEVFS
#include <sys/devfsext.h>
@@ -242,27 +241,6 @@ static struct bdevsw mcd_bdevsw =
#define MIN_DELAY 15
#define DELAY_GETREPLY 5000000
-static struct kern_devconf kdc_mcd[NMCD] = { {
- 0, 0, 0, /* filled in by dev_attach */
- "mcd", 0, { MDDT_ISA, 0, "bio" },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0, /* parent */
- 0, /* parentdata */
- DC_UNCONFIGURED, /* status */
- "Mitsumi CD-ROM controller", /* properly filled later */
- DC_CLS_RDISK
-} };
-
-static inline void
-mcd_registerdev(struct isa_device *id)
-{
- if(id->id_unit)
- kdc_mcd[id->id_unit] = kdc_mcd[0];
- kdc_mcd[id->id_unit].kdc_unit = id->id_unit;
- kdc_mcd[id->id_unit].kdc_isa = id;
- dev_attach(&kdc_mcd[id->id_unit]);
-}
-
int mcd_attach(struct isa_device *dev)
{
int unit = dev->id_unit;
@@ -277,9 +255,7 @@ int mcd_attach(struct isa_device *dev)
/* wire controller for interrupts and dma */
mcd_configure(cd);
#endif
- kdc_mcd[unit].kdc_state = DC_IDLE;
/* name filled in probe */
- kdc_mcd[unit].kdc_description = mcd_data[unit].name;
#ifdef DEVFS
cd->ra_devfs_token =
devfs_add_devswf(&mcd_cdevsw, dkmakeminor(unit, 0, 0),
@@ -343,7 +319,6 @@ int mcdopen(dev_t dev, int flags, int fmt, struct proc *p)
cd->openflags |= (1<<part);
if (phys)
cd->partflags[part] |= MCDREADRAW;
- kdc_mcd[unit].kdc_state = DC_BUSY;
return 0;
}
if (cd->status & MCDDOOROPEN) {
@@ -364,7 +339,6 @@ int mcdopen(dev_t dev, int flags, int fmt, struct proc *p)
cd->openflags |= (1<<part);
if (phys)
cd->partflags[part] |= MCDREADRAW;
- kdc_mcd[unit].kdc_state = DC_BUSY;
return 0;
}
printf("mcd%d: failed to get disk size\n",unit);
@@ -384,7 +358,6 @@ MCD_TRACE("open: partition=%d, disksize = %ld, blksize=%d\n",
cd->openflags |= (1<<part);
if (part == RAW_PART && phys)
cd->partflags[part] |= MCDREADRAW;
- kdc_mcd[unit].kdc_state = DC_BUSY;
(void) mcd_lock_door(unit, MCD_LK_LOCK);
if (!(cd->flags & MCDVALID))
return ENXIO;
@@ -414,7 +387,6 @@ int mcdclose(dev_t dev, int flags, int fmt, struct proc *p)
(void) mcd_lock_door(unit, MCD_LK_UNLOCK);
cd->openflags &= ~(1<<part);
cd->partflags[part] &= ~MCDREADRAW;
- kdc_mcd[unit].kdc_state = DC_IDLE;
return 0;
}
@@ -766,7 +738,6 @@ mcd_probe(struct isa_device *dev)
int i, j;
unsigned char stbytes[3];
- mcd_registerdev(dev);
mcd_data[unit].flags = MCDPROBING;
#ifdef NOTDEF
diff --git a/sys/i386/isa/mse.c b/sys/i386/isa/mse.c
index 835e1e148580..b54417e024d5 100644
--- a/sys/i386/isa/mse.c
+++ b/sys/i386/isa/mse.c
@@ -11,7 +11,7 @@
* this software for any purpose. It is provided "as is"
* without express or implied warranty.
*
- * $Id: mse.c,v 1.26 1996/06/02 18:57:17 joerg Exp $
+ * $Id: mse.c,v 1.27 1996/06/08 09:37:51 bde Exp $
*/
/*
* Driver for the Logitech and ATI Inport Bus mice for use with 386bsd and
@@ -54,7 +54,6 @@
#include <sys/kernel.h>
#include <sys/ioctl.h>
#include <sys/uio.h>
-#include <sys/devconf.h>
#ifdef DEVFS
#include <sys/devfsext.h>
#endif /*DEVFS*/
@@ -205,27 +204,6 @@ static struct mse_types {
{ 0, },
};
-static struct kern_devconf kdc_mse[NMSE] = { {
- 0, 0, 0, /* filled in by dev_attach */
- "mse", 0, { MDDT_ISA, 0, "tty" },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0, /* parent */
- 0, /* parentdata */
- DC_UNCONFIGURED, /* state */
- "ATI or Logitech bus mouse adapter",
- DC_CLS_MISC /* class */
-} };
-
-static inline void
-mse_registerdev(struct isa_device *id)
-{
- if(id->id_unit)
- kdc_mse[id->id_unit] = kdc_mse[0];
- kdc_mse[id->id_unit].kdc_unit = id->id_unit;
- kdc_mse[id->id_unit].kdc_isa = id;
- dev_attach(&kdc_mse[id->id_unit]);
-}
-
int
mseprobe(idp)
register struct isa_device *idp;
@@ -233,7 +211,6 @@ mseprobe(idp)
register struct mse_softc *sc = &mse_sc[idp->id_unit];
register int i;
- mse_registerdev(idp);
/*
* Check for each mouse type in the table.
*/
@@ -259,7 +236,6 @@ mseattach(idp)
struct mse_softc *sc = &mse_sc[unit];
sc->sc_port = idp->id_iobase;
- kdc_mse[unit].kdc_state = DC_IDLE;
#ifdef DEVFS
sc->devfs_token =
devfs_add_devswf(&mse_cdevsw, unit << 1, DV_CHR, 0, 0,
@@ -290,7 +266,6 @@ mseopen(dev, flags, fmt, p)
if (sc->sc_flags & MSESC_OPEN)
return (EBUSY);
sc->sc_flags |= MSESC_OPEN;
- kdc_mse[MSE_UNIT(dev)].kdc_state = DC_BUSY;
sc->sc_obuttons = sc->sc_buttons = 0x7;
sc->sc_deltax = sc->sc_deltay = 0;
sc->sc_bytesread = PROTOBYTES;
@@ -320,7 +295,6 @@ mseclose(dev, flags, fmt, p)
s = spltty();
(*sc->sc_disablemouse)(sc->sc_port);
sc->sc_flags &= ~MSESC_OPEN;
- kdc_mse[MSE_UNIT(dev)].kdc_state = DC_IDLE;
splx(s);
return(0);
}
diff --git a/sys/i386/isa/ncr5380.c b/sys/i386/isa/ncr5380.c
index 2d24d15f3a36..2b0dbf7237d0 100644
--- a/sys/i386/isa/ncr5380.c
+++ b/sys/i386/isa/ncr5380.c
@@ -45,7 +45,6 @@
#include <sys/malloc.h>
#include <sys/buf.h>
#include <sys/proc.h>
-#include <sys/devconf.h>
#include <machine/clock.h>
@@ -244,14 +243,6 @@ static struct scsi_adapter nca_switch = {
static struct scsi_device nca_dev = { NULL, NULL, NULL, NULL, "nca", 0, {0} };
struct isa_driver ncadriver = { nca_probe, nca_attach, "nca" };
-static char nca_description [80];
-static struct kern_devconf nca_kdc[NNCA] = {{
- 0, 0, 0, "nca", 0, { MDDT_ISA, 0, "bio" },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN, &kdc_isa0, 0,
- DC_UNCONFIGURED, nca_description,
- DC_CLS_MISC /* host adapters aren't special */
-}};
-
/*
* Check if the device can be found at the port given and if so,
* detect the type of board. Set it up ready for further work.
@@ -263,12 +254,6 @@ int nca_probe (struct isa_device *dev)
adapter_t *z = &ncadata[dev->id_unit];
int i;
- if (dev->id_unit)
- nca_kdc[dev->id_unit] = nca_kdc[0];
- nca_kdc[dev->id_unit].kdc_unit = dev->id_unit;
- nca_kdc[dev->id_unit].kdc_isa = dev;
- dev_attach (&nca_kdc[dev->id_unit]);
-
/* Init fields used by our routines */
z->parity = (dev->id_flags & FLAG_NOPARITY) ? 0 :
MR_ENABLE_PARITY_CHECKING;
@@ -495,7 +480,6 @@ int nca_attach (struct isa_device *dev)
adapter_t *z = &ncadata[unit];
struct scsibus_data *scbus;
- sprintf (nca_description, "%s SCSI controller", z->name);
printf ("nca%d: type %s%s\n", unit, z->name,
(dev->id_flags & FLAG_NOPARITY) ? ", no parity" : "");
@@ -516,7 +500,6 @@ int nca_attach (struct isa_device *dev)
scbus->adapter_link = &z->sc_link;
/* ask the adapter what subunits are present */
- nca_kdc[unit].kdc_state = DC_BUSY;
scsi_attachdevs (scbus);
return (1);
diff --git a/sys/i386/isa/npx.c b/sys/i386/isa/npx.c
index ad03e2ac29b6..687ff738a4d0 100644
--- a/sys/i386/isa/npx.c
+++ b/sys/i386/isa/npx.c
@@ -32,7 +32,7 @@
* SUCH DAMAGE.
*
* from: @(#)npx.c 7.2 (Berkeley) 5/12/91
- * $Id: npx.c,v 1.29 1996/01/06 23:10:52 peter Exp $
+ * $Id: npx.c,v 1.30 1996/06/25 20:30:38 bde Exp $
*/
#include "npx.h"
@@ -47,7 +47,6 @@
#include <sys/conf.h>
#include <sys/file.h>
#include <sys/proc.h>
-#include <sys/devconf.h>
#include <sys/ioctl.h>
#include <sys/syslog.h>
#include <sys/signalvar.h>
@@ -158,30 +157,6 @@ _probetrap:
iret
");
-static struct kern_devconf kdc_npx[NNPX] = { {
- 0, 0, 0, /* filled in by dev_attach */
- "npx", 0, { MDDT_ISA, 0 },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0, /* parent */
- 0, /* parentdata */
- DC_UNCONFIGURED, /* state */
- "Floating-point unit",
- DC_CLS_MISC /* class */
-} };
-
-static inline void
-npx_registerdev(struct isa_device *id)
-{
- int unit;
-
- unit = id->id_unit;
- if (unit != 0)
- kdc_npx[unit] = kdc_npx[0];
- kdc_npx[unit].kdc_unit = unit;
- kdc_npx[unit].kdc_isa = id;
- dev_attach(&kdc_npx[unit]);
-}
-
/*
* Probe routine. Initialize cr0 to give correct behaviour for [f]wait
* whether the device exists or not (XXX should be elsewhere). Set flags
@@ -205,7 +180,6 @@ npxprobe(dvp)
* install suitable handlers and run with interrupts enabled so we
* won't need to do so much here.
*/
- npx_registerdev(dvp);
npx_intrno = NRSVIDT + ffs(dvp->id_irq) - 1;
save_eflags = read_eflags();
disable_intr();
@@ -366,9 +340,6 @@ npxattach(dvp)
printf("npx%d: no 387 emulator in kernel!\n", dvp->id_unit);
#endif
npxinit(__INITIAL_NPXCW__);
- if (npx_exists) {
- kdc_npx[dvp->id_unit].kdc_state = DC_BUSY;
- }
return (1); /* XXX unused */
}
diff --git a/sys/i386/isa/pcaudio.c b/sys/i386/isa/pcaudio.c
index 22c48c0436a2..0b4115941867 100644
--- a/sys/i386/isa/pcaudio.c
+++ b/sys/i386/isa/pcaudio.c
@@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: pcaudio.c,v 1.28 1996/06/09 14:23:13 joerg Exp $
+ * $Id: pcaudio.c,v 1.29 1996/07/17 20:18:56 joerg Exp $
*/
#include "pca.h"
@@ -38,7 +38,6 @@
#include <sys/ioctl.h>
#include <sys/file.h>
#include <sys/proc.h>
-#include <sys/devconf.h>
#include <sys/kernel.h>
#include <machine/clock.h>
@@ -263,34 +262,11 @@ pcaprobe(struct isa_device *dvp)
}
-static struct kern_devconf kdc_pca[NPCA] = { {
- 0, 0, 0, /* filled in by dev_attach */
- "pca", 0, { MDDT_ISA, 0, "tty" },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0, /* parent */
- 0, /* parentdata */
- DC_UNKNOWN, /* not supported */
- "PC speaker audio driver"
-} };
-
-
-static inline void
-pca_registerdev(struct isa_device *id)
-{
- if(id->id_unit)
- kdc_pca[id->id_unit] = kdc_pca[0];
- kdc_pca[id->id_unit].kdc_unit = id->id_unit;
- kdc_pca[id->id_unit].kdc_isa = id;
- dev_attach(&kdc_pca[id->id_unit]);
-}
-
-
static int
pcaattach(struct isa_device *dvp)
{
printf("pca%d: PC speaker audio driver\n", dvp->id_unit);
pca_init();
- pca_registerdev(dvp);
#ifdef DEVFS
pca_devfs_token =
devfs_add_devswf(&pca_cdevsw, 0, DV_CHR, 0, 0, 0600, "pcaudio");
diff --git a/sys/i386/isa/pcvt/pcvt_drv.c b/sys/i386/isa/pcvt/pcvt_drv.c
index debb60facf4d..03ad4fcc0834 100644
--- a/sys/i386/isa/pcvt/pcvt_drv.c
+++ b/sys/i386/isa/pcvt/pcvt_drv.c
@@ -106,13 +106,6 @@ static void vgapelinit(void); /* read initial VGA DAC palette */
static int pcvt_xmode_set(int on, struct proc *p); /* initialize for X mode */
#endif /* XSERVER && !PCVT_USL_VT_COMPAT */
-#if PCVT_FREEBSD > 205
-static struct kern_devconf kdc_vt[];
-static inline void vt_registerdev(struct isa_device *id, const char *name);
-static char vt_description[];
-#define VT_DESCR_LEN 40
-#endif /* PCVT_FREEBSD > 205 */
-
static d_open_t pcopen;
static d_close_t pcclose;
static d_read_t pcread;
@@ -135,35 +128,6 @@ pcdevtotty(Dev_t dev)
return get_pccons(dev);
}
-static char vt_descr[VT_DESCR_LEN] = "Graphics console: ";
-
-static struct kern_devconf kdc_vt[NVT] = {
- 0, 0, 0, /* filled in by dev_attach */
- "vt", 0, { MDDT_ISA, 0, "tty" },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0, /* parent */
- 0, /* parentdata */
- DC_UNCONFIGURED, /* until we know it better */
- vt_descr
-};
-
-static inline void
-vt_registerdev(struct isa_device *id, const char *name)
-{
- if(id->id_unit)
- kdc_vt[id->id_unit] = kdc_vt[0];
-
- kdc_vt[id->id_unit].kdc_unit = id->id_unit;
- kdc_vt[id->id_unit].kdc_isa = id;
-
- /* XXX only vt0 currently allowed */
- strncpy(vt_descr + sizeof("Graphics console: ") - 1,
- name,
- VT_DESCR_LEN - sizeof("Graphics console: "));
-
- dev_attach(&kdc_vt[id->id_unit]);
-}
-
#endif /* PCVT_FREEBSD > 205 */
#if PCVT_NETBSD > 100 /* NetBSD-current Feb 20 1995 */
@@ -369,11 +333,6 @@ pcattach(struct isa_device *dev)
async_update(UPDATE_START); /* start asynchronous updates */
#if PCVT_FREEBSD > 205
- /* mark the device busy now if we are the console */
- kdc_vt[dev->id_unit].kdc_state =
- pcvt_is_console? DC_IDLE: DC_BUSY;
- vt_registerdev(dev, (char *)vga_string(vga_type));
-
{
dev_t dev = makedev(CDEV_MAJOR, 0);
@@ -543,14 +502,6 @@ pcopen(Dev_t dev, int flag, int mode, struct proc *p)
splx(s);
}
-#if PCVT_FREEBSD > 205
- if(retval == 0)
- {
- /* XXX currently, only one vt device is supported */
- kdc_vt[0].kdc_state = DC_BUSY;
- }
-#endif
-
return(retval);
}
@@ -595,14 +546,6 @@ pcclose(Dev_t dev, int flag, int mode, struct proc *p)
#endif /* PCVT_USL_VT_COMPAT */
-#if PCVT_FREEBSD > 205
- if(!pcvt_is_console)
- {
- /* XXX currently, only one vt device is supported */
- kdc_vt[0].kdc_state = DC_IDLE;
- }
-#endif
-
return(0);
}
diff --git a/sys/i386/isa/pcvt/pcvt_hdr.h b/sys/i386/isa/pcvt/pcvt_hdr.h
index 2822b0510838..65abdf76a675 100644
--- a/sys/i386/isa/pcvt/pcvt_hdr.h
+++ b/sys/i386/isa/pcvt/pcvt_hdr.h
@@ -175,10 +175,6 @@
#include "machine/pc/display.h"
#endif /* PCVT_FREEBSD >= 200 */
-#if PCVT_FREEBSD > 205
-#include <sys/devconf.h>
-#endif
-
/* setup irq disable function to use */
#if !(PCVT_SLOW_INTERRUPT) && (PCVT_NETBSD > 9)
diff --git a/sys/i386/isa/psm.c b/sys/i386/isa/psm.c
index 385fefa62573..536046fb49d2 100644
--- a/sys/i386/isa/psm.c
+++ b/sys/i386/isa/psm.c
@@ -55,7 +55,6 @@
#include <sys/file.h>
#include <sys/proc.h>
#include <sys/conf.h>
-#include <sys/devconf.h>
#ifdef DEVFS
#include <sys/devfsext.h>
#endif /*DEVFS*/
@@ -140,27 +139,6 @@ static struct cdevsw psm_cdevsw =
psmioctl, nostop, nullreset, nodevtotty,
psmselect, nommap, NULL, "psm", NULL, -1 };
-static struct kern_devconf kdc_psm[NPSM] = { {
- 0, 0, 0, /* filled in by dev_attach */
- "psm", 0, { MDDT_ISA, 0, "tty" },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0, /* parent */
- 0, /* parentdata */
- DC_UNCONFIGURED, /* state */
- "PS/2 Mouse",
- DC_CLS_MISC /* class */
-} };
-
-static inline void
-psm_registerdev(struct isa_device *id)
-{
- if(id->id_unit)
- kdc_psm[id->id_unit] = kdc_psm[0];
- kdc_psm[id->id_unit].kdc_unit = id->id_unit;
- kdc_psm[id->id_unit].kdc_isa = id;
- dev_attach(&kdc_psm[id->id_unit]);
-}
-
static void
psm_write_dev(int ioport, u_char value)
{
@@ -185,8 +163,6 @@ psmprobe(struct isa_device *dvp)
/* XXX: Needs a real probe routine. */
int ioport, c, unit;
- psm_registerdev(dvp);
-
ioport=dvp->id_iobase;
unit=dvp->id_unit;
@@ -239,7 +215,6 @@ psmattach(struct isa_device *dvp)
/* Setup initial state */
sc->state = 0;
- kdc_psm[unit].kdc_state = DC_IDLE;
/* Done */
return (0); /* XXX eh? usually 1 indicates success */
@@ -269,7 +244,6 @@ psmopen(dev_t dev, int flag, int fmt, struct proc *p)
return (EBUSY);
/* Initialize state */
- kdc_psm[unit].kdc_state = DC_BUSY;
sc->state |= PSM_OPEN;
sc->rsel.si_flags = 0;
sc->rsel.si_pid = 0;
@@ -333,7 +307,6 @@ psmclose(dev_t dev, int flag, int fmt, struct proc *p)
/* Complete the close */
sc->state &= ~PSM_OPEN;
- kdc_psm[unit].kdc_state = DC_IDLE;
/* close is almost always successful */
return (0);
diff --git a/sys/i386/isa/qcam.c b/sys/i386/isa/qcam.c
index e1f2e8161fe5..9388da75acc8 100644
--- a/sys/i386/isa/qcam.c
+++ b/sys/i386/isa/qcam.c
@@ -43,7 +43,6 @@
#include <sys/ioctl.h>
#include <sys/uio.h>
#include <sys/malloc.h>
-#include <sys/devconf.h>
#include <sys/errno.h>
#ifdef DEVFS
#include <sys/devfsext.h>
@@ -115,42 +114,6 @@ static struct qcam_softc qcam_softc[NQCAM];
#define UNIT(dev) minor(dev)
-static struct kern_devconf kdc_qcam_template = {
- 0, 0, 0, /* filled in by dev_attach() */
- "qcam", /* kdc_name */
- 0, /* kdc_unit */
- { /* kdc_md */
- MDDT_ISA, /* mddc_devtype */
- 0, /* mddc_flags */
- "tty" /* mddc_imask[4] */
- },
- isa_generic_externalize, /* kdc_externalize */
- 0, /* kdc_internalize */
- 0, /* kdc_goaway */
- ISA_EXTERNALLEN, /* kdc_datalen */
- &kdc_isa0, /* kdc_parent */
- 0, /* kdc_parentdata */
- DC_UNCONFIGURED, /* kdc_state */
- "QuickCam video input", /* kdc_description */
- DC_CLS_MISC /* class */
-};
-
-static void
-qcam_registerdev (struct isa_device *id)
-{
- struct kern_devconf *kdc = &qcam_softc[id->id_unit].kdc;
-
- *kdc = kdc_qcam_template; /* byte-copy template */
-
- kdc->kdc_unit = id->id_unit;
- kdc->kdc_parentdata = id;
-
-#ifndef QCAM_MODULE /* there's a bug in dev_attach
- when running from an LKM */
- dev_attach(kdc);
-#endif
-}
-
static int
qcam_probe (struct isa_device *devp)
{
@@ -176,7 +139,6 @@ qcam_probe (struct isa_device *devp)
if (!qcam_detect(devp->id_iobase))
return 0; /* failure */
- qcam_registerdev(devp);
return 1; /* found */
}
@@ -187,7 +149,6 @@ qcam_attach (struct isa_device *devp)
qs->iobase = devp->id_iobase;
qs->unit = devp->id_unit;
- qs->kdc.kdc_state = DC_IDLE;
qs->flags |= QC_ALIVE;
/* force unidirectional parallel port mode? */
@@ -228,7 +189,6 @@ qcam_open (dev_t dev, int flags, int fmt, struct proc *p)
qs->init_req = 1; /* request initialization before scan */
qs->flags |= QC_OPEN;
- qs->kdc.kdc_state = DC_BUSY;
return 0;
}
@@ -245,7 +205,6 @@ qcam_close (dev_t dev, int flags, int fmt, struct proc *p)
}
qs->flags &= ~QC_OPEN;
- qs->kdc.kdc_state = DC_IDLE;
return 0;
}
diff --git a/sys/i386/isa/qcamdefs.h b/sys/i386/isa/qcamdefs.h
index ef80269347e0..56dafd8b32ef 100644
--- a/sys/i386/isa/qcamdefs.h
+++ b/sys/i386/isa/qcamdefs.h
@@ -69,7 +69,6 @@ struct qcam_softc {
u_char whitebalance;
#if defined(__FreeBSD__) && defined(KERNEL)
- struct kern_devconf kdc; /* kernel config database */
#ifdef DEVFS
void *devfs_token; /* device filesystem handle */
#endif /* DEVFS */
diff --git a/sys/i386/isa/qcamio.c b/sys/i386/isa/qcamio.c
index c3eb615dad44..e8adc308ee8d 100644
--- a/sys/i386/isa/qcamio.c
+++ b/sys/i386/isa/qcamio.c
@@ -46,7 +46,6 @@
#include <machine/cpufunc.h>
#ifdef KERNEL
#include <sys/systm.h>
-#include <sys/devconf.h>
#include <machine/clock.h>
#include <machine/qcam.h>
#else /* user mode version of driver */
diff --git a/sys/i386/isa/rc.c b/sys/i386/isa/rc.c
index 5614de5662cd..fd37df2b668b 100644
--- a/sys/i386/isa/rc.c
+++ b/sys/i386/isa/rc.c
@@ -46,7 +46,6 @@
#include <sys/uio.h>
#include <sys/kernel.h>
#include <sys/syslog.h>
-#include <sys/devconf.h>
#ifdef DEVFS
#include <sys/devfsext.h>
#endif /*DEVFS*/
@@ -185,7 +184,6 @@ static void rc_hardclose __P((struct rc_chans *));
static int rc_modctl __P((struct rc_chans *, int, int));
static void rc_start __P((struct tty *));
static int rc_param __P((struct tty *, struct termios *));
-static void rc_registerdev __P((struct isa_device *id));
static void rc_reinit __P((struct rc_softc *));
#ifdef RCDEBUG
static void printrcflags();
@@ -227,32 +225,6 @@ rcprobe(dvp)
return 0xF;
}
-static struct kern_devconf kdc_rc[NRC] = { {
- 0, 0, 0, /* filled in by dev_attach */
- "rc", 0, { MDDT_ISA, 0, "tty" },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0, /* parent */
- 0, /* parentdata */
- DC_UNCONFIGURED, /* state */
- "RISCom/8 multiport card",
- DC_CLS_SERIAL /* class */
-} };
-
-static void
-rc_registerdev(id)
- struct isa_device *id;
-{
- int unit;
-
- unit = id->id_unit;
- if (unit != 0)
- kdc_rc[unit] = kdc_rc[0];
- kdc_rc[unit].kdc_unit = unit;
- kdc_rc[unit].kdc_isa = id;
- kdc_rc[unit].kdc_state = DC_UNKNOWN;
- dev_attach(&kdc_rc[unit]);
-}
-
static int
rcattach(dvp)
struct isa_device *dvp;
@@ -273,8 +245,6 @@ rcattach(dvp)
printf("rc%d: %d chans, firmware rev. %c\n", dvp->id_unit,
CD180_NCHAN, (rcin(CD180_GFRCR) & 0xF) + 'A');
- rc_registerdev(dvp);
-
for (chan = 0; chan < CD180_NCHAN; chan++, rc++) {
rc->rc_rcb = rcb;
rc->rc_chan = chan;
diff --git a/sys/i386/isa/scd.c b/sys/i386/isa/scd.c
index 454cd5b20c47..f08439d03de5 100644
--- a/sys/i386/isa/scd.c
+++ b/sys/i386/isa/scd.c
@@ -41,7 +41,7 @@
*/
-/* $Id: scd.c,v 1.23 1996/07/12 04:11:25 bde Exp $ */
+/* $Id: scd.c,v 1.24 1996/07/23 21:51:39 phk Exp $ */
/* Please send any comments to micke@dynas.se */
@@ -63,7 +63,6 @@
#include <sys/errno.h>
#include <sys/dkbad.h>
#include <sys/disklabel.h>
-#include <sys/devconf.h>
#include <sys/kernel.h>
#ifdef DEVFS
#include <sys/devfsext.h>
@@ -199,27 +198,6 @@ static struct bdevsw scd_bdevsw =
{ scdopen, scdclose, scdstrategy, scdioctl, /*16*/
nodump, nopsize, 0, "scd", &scd_cdevsw, -1 };
-static struct kern_devconf kdc_scd[NSCD] = { {
- 0, 0, 0, /* filled in by dev_attach */
- "scd", 0, { MDDT_ISA, 0, "bio" },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0, /* parent */
- 0, /* parentdata */
- DC_UNCONFIGURED, /* status */
- "Sony CD-ROM drive", /* properly filled later */
- DC_CLS_RDISK /* class */
-} };
-
-static inline void
-scd_registerdev(struct isa_device *id)
-{
- if(id->id_unit)
- kdc_scd[id->id_unit] = kdc_scd[0];
- kdc_scd[id->id_unit].kdc_unit = id->id_unit;
- kdc_scd[id->id_unit].kdc_isa = id;
- dev_attach(&kdc_scd[id->id_unit]);
-}
-
int scd_attach(struct isa_device *dev)
{
int unit = dev->id_unit;
@@ -227,9 +205,7 @@ int scd_attach(struct isa_device *dev)
cd->iobase = dev->id_iobase; /* Already set by probe, but ... */
- kdc_scd[dev->id_unit].kdc_state = DC_IDLE;
/* name filled in probe */
- kdc_scd[dev->id_unit].kdc_description = scd_data[dev->id_unit].name;
printf("scd%d: <%s>\n", dev->id_unit, scd_data[dev->id_unit].name);
init_drive(dev->id_unit);
@@ -307,7 +283,6 @@ scdopen(dev_t dev, int flags, int fmt, struct proc *p)
cd->openflag = 1;
cd->flags |= SCDVALID;
- kdc_scd[unit].kdc_state = DC_BUSY;
return 0;
}
@@ -334,7 +309,6 @@ scdclose(dev_t dev, int flags, int fmt, struct proc *p)
cd->flags &= ~SCDSPINNING;
}
- kdc_scd[unit].kdc_state = DC_IDLE;
/* close channel */
cd->openflag = 0;
@@ -723,8 +697,6 @@ scd_probe(struct isa_device *dev)
bzero(&drive_config, sizeof(drive_config));
- scd_registerdev(dev);
-
again:
/* Reset drive */
write_control(dev->id_iobase, CBIT_RESET_DRIVE);
diff --git a/sys/i386/isa/seagate.c b/sys/i386/isa/seagate.c
index 0b78f1074e49..b8e31492c98a 100644
--- a/sys/i386/isa/seagate.c
+++ b/sys/i386/isa/seagate.c
@@ -60,7 +60,7 @@
* that category, with the possible exception of scanners and
* some of the older MO drives.
*
- * $Id: seagate.c,v 1.16 1996/01/07 19:22:37 gibbs Exp $
+ * $Id: seagate.c,v 1.17 1996/03/10 07:04:47 gibbs Exp $
*/
/*
@@ -121,7 +121,6 @@
#include <sys/malloc.h>
#include <sys/buf.h>
#include <sys/proc.h>
-#include <sys/devconf.h>
#include <machine/clock.h>
@@ -362,14 +361,6 @@ static struct scsi_adapter sea_switch = {
static struct scsi_device sea_dev = { NULL, NULL, NULL, NULL, "sea", 0, {0} };
struct isa_driver seadriver = { sea_probe, sea_attach, "sea" };
-static char sea_description [80]; /* XXX BOGUS!!! */
-static struct kern_devconf sea_kdc[NSEA] = {{
- 0, 0, 0, "sea", 0, { MDDT_ISA, 0, "bio" },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN, &kdc_isa0, 0,
- DC_UNCONFIGURED, sea_description,
- DC_CLS_MISC /* host adapters aren't special */
-} };
-
/* FD TMC885's can't handle detach & re-attach */
static int sea_select_cmd = CMD_DRVR_ENABLE | CMD_ATTN;
@@ -387,12 +378,6 @@ int sea_probe (struct isa_device *dev)
};
int i;
- if (dev->id_unit)
- sea_kdc[dev->id_unit] = sea_kdc[0];
- sea_kdc[dev->id_unit].kdc_unit = dev->id_unit;
- sea_kdc[dev->id_unit].kdc_isa = dev;
- dev_attach (&sea_kdc[dev->id_unit]);
-
/* Init fields used by our routines */
z->parity = (dev->id_flags & FLAG_NOPARITY) ? 0 : CMD_EN_PARITY;
z->scsi_addr = HOST_SCSI_ADDR;
@@ -551,8 +536,6 @@ int sea_attach (struct isa_device *dev)
adapter_t *z = &seadata[unit];
struct scsibus_data *scbus;
- sea_kdc[unit].kdc_state = DC_BUSY; /* host adapters are always busy */
- sprintf (sea_description, "%s SCSI controller", z->name);
printf ("\nsea%d: type %s%s\n", unit, z->name,
(dev->id_flags & FLAG_NOPARITY) ? ", no parity" : "");
diff --git a/sys/i386/isa/si.c b/sys/i386/isa/si.c
index bcb301da4496..369d57da12e5 100644
--- a/sys/i386/isa/si.c
+++ b/sys/i386/isa/si.c
@@ -30,7 +30,7 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
* NO EVENT SHALL THE AUTHORS BE LIABLE.
*
- * $Id: si.c,v 1.50 1996/08/03 00:21:44 peter Exp $
+ * $Id: si.c,v 1.51 1996/08/12 17:12:07 peter Exp $
*/
#ifndef lint
@@ -53,7 +53,6 @@ static const char si_copyright1[] = "@(#) (C) Specialix International, 1990,199
#include <sys/syslog.h>
#include <sys/malloc.h>
#include <sys/sysctl.h>
-#include <sys/devconf.h>
#ifdef DEVFS
#include <sys/devfsext.h>
#endif /*DEVFS*/
@@ -105,7 +104,6 @@ static void sidtrwakeup __P((void *chan));
static int siparam __P((struct tty *, struct termios *));
-static void si_registerdev __P((struct isa_device *id));
static int siprobe __P((struct isa_device *id));
static int siattach __P((struct isa_device *id));
static void si_modem_state __P((struct si_port *pp, struct tty *tp, int hi_ip));
@@ -163,7 +161,6 @@ struct si_softc {
int sc_irq; /* copy of attach irq */
int sc_eisa_iobase; /* EISA io port address */
int sc_eisa_irqbits;
- struct kern_devconf sc_kdc;
#ifdef DEVFS
struct {
void *ttyd;
@@ -253,31 +250,6 @@ static char *si_type[] = {
"SIEISA",
};
-
-static struct kern_devconf si_kdc[NSI] = { {
- 0, 0, 0, /* filled in by dev_attach */
- "si", 0, { MDDT_ISA, 0, "tty" },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0, /* parent */
- 0, /* parent data */
- DC_UNCONFIGURED, /* state */
- "Specialix SI/XIO Host adapter",
- DC_CLS_SERIAL, /* class */
-} };
-
-static void
-si_registerdev(id)
- struct isa_device *id;
-{
- if (id->id_unit != 0) {
- bcopy(&si_kdc[0], &si_kdc[id->id_unit], sizeof(si_kdc[0]));
- }
- si_kdc[id->id_unit].kdc_unit = id->id_unit;
- si_kdc[id->id_unit].kdc_isa = id;
- si_kdc[id->id_unit].kdc_state = DC_UNCONFIGURED;
- dev_attach(&si_kdc[id->id_unit]);
-}
-
/* Look for a valid board at the given mem addr */
static int
siprobe(id)
@@ -290,8 +262,6 @@ siprobe(id)
volatile unsigned char *maddr;
unsigned char *paddr;
- si_registerdev(id);
-
si_pollrate = POLLHZ; /* default 10 per second */
#ifdef REALPOLL
si_realpoll = 1; /* scan always */
@@ -645,9 +615,6 @@ mem_fail:
bzero(tp, sizeof(*tp) * nport);
si_tty = tp;
- /* mark the device state as attached */
- si_kdc[unit].kdc_state = DC_BUSY;
-
/*
* Scan round the ports again, this time initialising.
*/
diff --git a/sys/i386/isa/sio.c b/sys/i386/isa/sio.c
index cbf86b377607..2aa4dfc185d0 100644
--- a/sys/i386/isa/sio.c
+++ b/sys/i386/isa/sio.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
- * $Id: sio.c,v 1.143 1996/06/17 14:23:39 bde Exp $
+ * $Id: sio.c,v 1.144 1996/07/17 22:07:23 julian Exp $
*/
#include "opt_comconsole.h"
@@ -61,7 +61,6 @@
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/syslog.h>
-#include <sys/devconf.h>
#ifdef DEVFS
#include <sys/devfsext.h>
#endif
@@ -292,7 +291,6 @@ static void siointr1 __P((struct com_s *com));
static int commctl __P((struct com_s *com, int bits, int how));
static int comparam __P((struct tty *tp, struct termios *t));
static int sioprobe __P((struct isa_device *dev));
-static void sioregisterdev __P((struct isa_device *id));
static void siosettimeout __P((void));
static void comstart __P((struct tty *tp));
static timeout_t comwakeup;
@@ -363,17 +361,6 @@ static struct speedtab comspeedtab[] = {
{ -1, -1 }
};
-static struct kern_devconf kdc_sio[NSIO] = { {
- 0, 0, 0, /* filled in by dev_attach */
- driver_name, 0, { MDDT_ISA, 0, "tty" },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0, /* parent */
- 0, /* parentdata */
- DC_UNCONFIGURED, /* state */
- "Serial port",
- DC_CLS_SERIAL /* class */
-} };
-
#ifdef COM_ESP
/* XXX configure this properly. */
static Port_t likely_com_ports[] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8, };
@@ -468,8 +455,6 @@ siounload(struct pccard_dev *dp)
printf("sio%d already unloaded!\n",dp->isahd.id_unit);
return;
}
- kdc_sio[com->unit].kdc_state = DC_UNCONFIGURED;
- kdc_sio[com->unit].kdc_description = "Serial port";
if (com->tp && (com->tp->t_state & TS_ISOPEN)) {
com->gone = 1;
printf("sio%d: unload\n", dp->isahd.id_unit);
@@ -500,27 +485,6 @@ card_intr(struct pccard_dev *dp)
}
#endif /* NCRD > 0 */
-static void
-sioregisterdev(id)
- struct isa_device *id;
-{
- int unit;
-
- unit = id->id_unit;
-/*
- * If already registered, don't try to re-register.
- */
- if (kdc_sio[unit].kdc_isa)
- return;
- if (unit != 0)
- kdc_sio[unit] = kdc_sio[0];
- kdc_sio[unit].kdc_state = DC_UNCONFIGURED;
- kdc_sio[unit].kdc_description = "Serial port";
- kdc_sio[unit].kdc_unit = unit;
- kdc_sio[unit].kdc_isa = id;
- dev_attach(&kdc_sio[unit]);
-}
-
static int
sioprobe(dev)
struct isa_device *dev;
@@ -534,8 +498,6 @@ sioprobe(dev)
int result;
struct isa_device *xdev;
- sioregisterdev(dev);
-
if (!already_init) {
/*
* Turn off MCR_IENABLE for all likely serial ports. An unused
@@ -856,8 +818,6 @@ sioattach(isdp)
#ifdef DSI_SOFT_MODEM
if((inb(iobase+7) ^ inb(iobase+7)) & 0x80) {
printf(" Digicom Systems, Inc. SoftModem");
- kdc_sio[unit].kdc_description =
- "Serial port: Digicom Systems SoftModem";
goto determined_type;
}
#endif /* DSI_SOFT_MODEM */
@@ -878,8 +838,6 @@ sioattach(isdp)
outb(iobase + com_scr, scr);
if (scr1 != 0xa5 || scr2 != 0x5a) {
printf(" 8250");
- kdc_sio[unit].kdc_description =
- "Serial port: National 8250 or compatible";
goto determined_type;
}
}
@@ -888,36 +846,24 @@ sioattach(isdp)
switch (inb(com->int_id_port) & IIR_FIFO_MASK) {
case FIFO_RX_LOW:
printf(" 16450");
- kdc_sio[unit].kdc_description =
- "Serial port: National 16450 or compatible";
break;
case FIFO_RX_MEDL:
printf(" 16450?");
- kdc_sio[unit].kdc_description =
- "Serial port: maybe National 16450";
break;
case FIFO_RX_MEDH:
printf(" 16550?");
- kdc_sio[unit].kdc_description =
- "Serial port: maybe National 16550";
break;
case FIFO_RX_HIGH:
printf(" 16550A");
if (COM_NOFIFO(isdp)) {
printf(" fifo disabled");
- kdc_sio[unit].kdc_description =
- "Serial port: National 16550A, FIFO disabled";
} else {
com->hasfifo = TRUE;
com->tx_fifo_size = 16;
- kdc_sio[unit].kdc_description =
- "Serial port: National 16550A or compatible";
#ifdef COM_ESP
for (espp = likely_esp_ports; *espp != 0; espp++)
if (espattach(isdp, com, *espp)) {
com->tx_fifo_size = 1024;
- kdc_sio[unit].kdc_description =
- "Serial port: Hayes ESP";
break;
}
#endif
@@ -942,8 +888,6 @@ sioattach(isdp)
} else {
com->tx_fifo_size = 32;
printf(" 16650");
- kdc_sio[unit].kdc_description =
- "Serial port: Startech 16C650 or similar";
}
if (!com->tx_fifo_size)
printf(" fifo disabled");
@@ -991,8 +935,6 @@ determined_type: ;
#endif /* COM_MULTIPORT */
printf("\n");
- kdc_sio[unit].kdc_state = (unit == comconsole) ? DC_BUSY : DC_IDLE;
-
s = spltty();
com_addr(unit) = com;
splx(s);
@@ -1064,7 +1006,6 @@ open_top:
if (error != 0 || com->gone)
goto out;
}
- kdc_sio[unit].kdc_state = DC_BUSY;
if (tp->t_state & TS_ISOPEN) {
/*
* The device is open, so everything has been initialized.
@@ -1280,8 +1221,6 @@ comhardclose(com)
com->active_out = FALSE;
wakeup(&com->active_out);
wakeup(TSA_CARR_ON(tp)); /* restart any wopeners */
- if (!(com->state & CS_DTR_OFF) && unit != comconsole)
- kdc_sio[unit].kdc_state = DC_IDLE;
splx(s);
}
@@ -1342,8 +1281,6 @@ siodtrwakeup(chan)
com = (struct com_s *)chan;
com->state &= ~CS_DTR_OFF;
- if (com->unit != comconsole)
- kdc_sio[com->unit].kdc_state = DC_IDLE;
wakeup(&com->dtr_wait);
}
diff --git a/sys/i386/isa/spigot.c b/sys/i386/isa/spigot.c
index fd8197a0db92..cc383281a876 100644
--- a/sys/i386/isa/spigot.c
+++ b/sys/i386/isa/spigot.c
@@ -61,7 +61,6 @@ error "Can only have 1 spigot configured."
#include <sys/file.h>
#include <sys/uio.h>
#include <sys/malloc.h>
-#include <sys/devconf.h>
#include <sys/errno.h>
#include <sys/mman.h>
#ifdef DEVFS
@@ -111,38 +110,6 @@ static struct cdevsw spigot_cdevsw =
spigot_ioctl, nostop, nullreset, nodevtotty,/* Spigot */
spigot_select, spigot_mmap, NULL, "spigot", NULL, -1 };
-static struct kern_devconf kdc_spigot[NSPIGOT] = { {
- 0, /* kdc_next -> filled in by dev_attach() */
- 0, /* kdc_rlink -> filled in by dev_attach() */
- 0, /* kdc_number -> filled in by dev_attach() */
- "spigot", /* kdc_name */
- 0, /* kdc_unit */
- { /* kdc_md */
- MDDT_ISA, /* mddc_devtype */
- 0 /* mddc_flags */
- /* mddc_imask[4] */
- },
- isa_generic_externalize, /* kdc_externalize */
- 0, /* kdc_internalize */
- 0, /* kdc_goaway */
- ISA_EXTERNALLEN, /* kdc_datalen */
- &kdc_isa0, /* kdc_parent */
- 0, /* kdc_parentdata */
- DC_UNCONFIGURED, /* kdc_state - not supported */
- "Video Spigot frame grabber", /* kdc_description */
- DC_CLS_MISC /* class */
-} };
-
-static inline void
-spigot_registerdev(struct isa_device *id)
-{
- if(id->id_unit)
- kdc_spigot[id->id_unit] = kdc_spigot[0];
- kdc_spigot[id->id_unit].kdc_unit = id->id_unit;
- kdc_spigot[id->id_unit].kdc_isa = id;
- dev_attach(&kdc_spigot[id->id_unit]);
-}
-
static int
spigot_probe(struct isa_device *devp)
{
@@ -158,7 +125,6 @@ struct spigot_softc *ss=(struct spigot_softc *)&spigot_softc[devp->id_unit];
else {
status = 1; /* found */
ss->flags |= ALIVE;
- spigot_registerdev(devp);
}
return(status);
@@ -170,8 +136,6 @@ spigot_attach(struct isa_device *devp)
int unit;
struct spigot_softc *ss= &spigot_softc[unit = devp->id_unit];
- kdc_spigot[unit].kdc_state = DC_UNKNOWN;
-
ss->maddr = kvtop(devp->id_maddr);
ss->irq = devp->id_irq;
#ifdef DEVFS
diff --git a/sys/i386/isa/stallion.c b/sys/i386/isa/stallion.c
index 7a8805f8fb86..c417de3fef7f 100644
--- a/sys/i386/isa/stallion.c
+++ b/sys/i386/isa/stallion.c
@@ -33,7 +33,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: stallion.c,v 1.2 1996/05/04 08:44:42 peter Exp $
+ * $Id: stallion.c,v 1.3 1996/06/12 04:26:36 gpalmer Exp $
*/
/*****************************************************************************/
@@ -51,7 +51,6 @@
#include <sys/file.h>
#include <sys/uio.h>
#include <sys/syslog.h>
-#include <sys/devconf.h>
#include <machine/cpu.h>
#include <machine/clock.h>
#include <i386/isa/isa_device.h>
diff --git a/sys/i386/isa/syscons.c b/sys/i386/isa/syscons.c
index 6a635ad32c6f..02218f93302a 100644
--- a/sys/i386/isa/syscons.c
+++ b/sys/i386/isa/syscons.c
@@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: syscons.c,v 1.163 1996/09/01 18:16:05 sos Exp $
+ * $Id: syscons.c,v 1.164 1996/09/04 22:24:19 sos Exp $
*/
#include "sc.h"
@@ -46,7 +46,6 @@
#include <sys/syslog.h>
#include <sys/errno.h>
#include <sys/malloc.h>
-#include <sys/devconf.h>
#ifdef DEVFS
#include <sys/devfsext.h>
#endif
@@ -302,27 +301,6 @@ gotack:
return (IO_KBDSIZE);
}
-static struct kern_devconf kdc_sc[NSC] = {
- 0, 0, 0, /* filled in by dev_attach */
- "sc", 0, { MDDT_ISA, 0, "tty" },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0, /* parent */
- 0, /* parentdata */
- DC_BUSY, /* the console is almost always busy */
- "Graphics console",
- DC_CLS_DISPLAY /* class */
-};
-
-static inline void
-sc_registerdev(struct isa_device *id)
-{
- if(id->id_unit)
- kdc_sc[id->id_unit] = kdc_sc[0];
- kdc_sc[id->id_unit].kdc_unit = id->id_unit;
- kdc_sc[id->id_unit].kdc_isa = id;
- dev_attach(&kdc_sc[id->id_unit]);
-}
-
#if NAPM > 0
static int
scresume(void *dummy)
@@ -451,7 +429,6 @@ scattach(struct isa_device *dev)
scrn_timer();
update_leds(scp->status);
- sc_registerdev(dev);
printf("sc%d: ", dev->id_unit);
if (crtc_vga)
diff --git a/sys/i386/isa/ultra14f.c b/sys/i386/isa/ultra14f.c
index e0b29bd8311e..0ac82771dfc6 100644
--- a/sys/i386/isa/ultra14f.c
+++ b/sys/i386/isa/ultra14f.c
@@ -22,7 +22,7 @@
* today: Fri Jun 2 17:21:03 EST 1994
* added 24F support ++sg
*
- * $Id: ultra14f.c,v 1.46 1996/03/10 07:04:48 gibbs Exp $
+ * $Id: ultra14f.c,v 1.47 1996/05/22 00:04:06 dima Exp $
*/
#include <sys/types.h>
@@ -37,7 +37,6 @@
#include <sys/malloc.h>
#include <sys/buf.h>
#include <sys/proc.h>
-#include <sys/devconf.h>
#include <machine/clock.h>
@@ -336,27 +335,6 @@ static struct scsi_device uha_dev =
{ 0, 0 }
};
-static struct kern_devconf kdc_uha[NUHA] = { {
- 0, 0, 0, /* filled in by dev_attach */
- "uha", 0, { MDDT_ISA, 0, "bio" },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0, /* parent */
- 0, /* parentdata */
- DC_UNCONFIGURED, /* state */
- "UltraStore 14F or 34F SCSI host adapter",
- DC_CLS_MISC /* host adapters aren't special */
-} };
-
-static inline void
-uha_registerdev(struct isa_device *id)
-{
- if(id->id_unit)
- kdc_uha[id->id_unit] = kdc_uha[0];
- kdc_uha[id->id_unit].kdc_unit = id->id_unit;
- kdc_uha[id->id_unit].kdc_parentdata = id;
- dev_attach(&kdc_uha[id->id_unit]);
-}
-
#endif /*KERNEL */
#ifndef KERNEL
@@ -515,8 +493,6 @@ uhaprobe(dev)
}
bzero(uha->ub, sizeof(struct uha_bits));
- uha_registerdev(dev);
-
uhadata[unit] = uha;
uha->unit = unit;
uha->baseport = dev->id_iobase;
@@ -570,7 +546,6 @@ uha_attach(dev)
return 0;
scbus->adapter_link = &uha->sc_link;
- kdc_uha[unit].kdc_state = DC_BUSY;
/*
* ask the adapter what subunits are present
*/
diff --git a/sys/i386/isa/wcd.c b/sys/i386/isa/wcd.c
index 2723204a95ba..bf18d17daca2 100644
--- a/sys/i386/isa/wcd.c
+++ b/sys/i386/isa/wcd.c
@@ -26,7 +26,6 @@
#include <sys/malloc.h>
#include <sys/buf.h>
#include <sys/ioctl.h>
-#include <sys/devconf.h>
#include <sys/disklabel.h>
#include <sys/cdio.h>
#include <sys/conf.h>
@@ -61,7 +60,7 @@ static struct cdevsw wcd_cdevsw =
#ifndef ATAPI_STATIC
static
#endif
-int wcdattach(struct atapi*, int, struct atapi_params*, int, struct kern_devconf*);
+int wcdattach(struct atapi*, int, struct atapi_params*, int);
#define NUNIT (NWDC*2) /* Max. number of devices */
#define UNIT(d) ((minor(d) >> 3) & 3) /* Unit part of minor device number */
@@ -223,7 +222,6 @@ struct wcd {
struct cappage cap; /* Capabilities page info */
struct audiopage aumask; /* Audio page mask */
struct subchan subchan; /* Subchannel info */
- struct kern_devconf cf; /* Driver configuration info */
char description[80]; /* Device description */
#ifdef DEVFS
void *ra_devfs_token;
@@ -244,20 +242,12 @@ static int wcd_read_toc (struct wcd *t);
static int wcd_request_wait (struct wcd *t, u_char cmd, u_char a1, u_char a2,
u_char a3, u_char a4, u_char a5, u_char a6, u_char a7, u_char a8,
u_char a9, char *addr, int count);
-static int wcd_externalize (struct kern_devconf*, struct sysctl_req *);
-static int wcd_goaway (struct kern_devconf *kdc, int force);
static void wcd_describe (struct wcd *t);
static int wcd_open(dev_t dev, int rawflag);
static int wcd_setchan (struct wcd *t,
u_char c0, u_char c1, u_char c2, u_char c3);
static int wcd_eject (struct wcd *t, int closeit);
-static struct kern_devconf cftemplate = {
- 0, 0, 0, "wcd", 0, { MDDT_DISK, 0 },
- wcd_externalize, 0, wcd_goaway, DISK_EXTERNALLEN,
- 0, 0, DC_IDLE, "ATAPI compact disc",
-};
-
/*
* Dump the array in hexadecimal format for debugging purposes.
*/
@@ -271,23 +261,11 @@ static void wcd_dump (int lun, char *label, void *data, int len)
printf ("\n");
}
-static int wcd_externalize (struct kern_devconf *kdc, struct sysctl_req *req)
-{
- return disk_externalize (wcdtab[kdc->kdc_unit]->unit, req);
-}
-
-static int wcd_goaway (struct kern_devconf *kdc, int force)
-{
- dev_detach (kdc);
- return 0;
-}
-
#ifndef ATAPI_STATIC
static
#endif
int
-wcdattach (struct atapi *ata, int unit, struct atapi_params *ap, int debug,
- struct kern_devconf *parent)
+wcdattach (struct atapi *ata, int unit, struct atapi_params *ap, int debug)
{
struct wcd *t;
struct atapires result;
@@ -344,16 +322,6 @@ wcdattach (struct atapi *ata, int unit, struct atapi_params *ap, int debug,
wcd_dump (t->lun, "cap", &t->cap, sizeof t->cap);
}
- /* Register driver */
- t->cf = cftemplate;
- t->cf.kdc_unit = t->lun;
- t->cf.kdc_parent = parent;
- t->cf.kdc_description = t->description;
- strcpy (t->description, cftemplate.kdc_description);
- strcat (t->description, ": ");
- strncpy (t->description + strlen(t->description),
- ap->model, sizeof(ap->model));
- dev_attach (&t->cf);
#ifdef DEVFS
t->ra_devfs_token =
@@ -582,7 +550,6 @@ static void wcd_start (struct wcd *t)
blkno>>24, blkno>>16, blkno>>8, blkno, 0, nblk>>8, nblk, 0, 0,
0, 0, 0, 0, 0, (u_char*) bp->b_un.b_addr, bp->b_bcount,
wcd_done, t, bp);
- t->cf.kdc_state = DC_BUSY;
}
static void wcd_done (struct wcd *t, struct buf *bp, int resid,
@@ -595,7 +562,6 @@ static void wcd_done (struct wcd *t, struct buf *bp, int resid,
} else
bp->b_resid = resid;
biodone (bp);
- t->cf.kdc_state = DC_IDLE;
wcd_start (t);
}
@@ -639,11 +605,9 @@ static int wcd_request_wait (struct wcd *t, u_char cmd, u_char a1, u_char a2,
{
struct atapires result;
- t->cf.kdc_state = DC_BUSY;
result = atapi_request_wait (t->ata, t->unit, cmd,
a1, a2, a3, a4, a5, a6, a7, a8, a9, 0, 0, 0, 0, 0, 0,
addr, count);
- t->cf.kdc_state = DC_IDLE;
if (result.code) {
wcd_error (t, result);
return (EIO);
@@ -1078,10 +1042,8 @@ static int wcd_eject (struct wcd *t, int closeit)
struct atapires result;
/* Try to stop the disc. */
- t->cf.kdc_state = DC_BUSY;
result = atapi_request_wait (t->ata, t->unit, ATAPI_START_STOP,
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
- t->cf.kdc_state = DC_IDLE;
if (result.code == RES_ERR &&
((result.error & AER_SKEY) == AER_SK_NOT_READY ||
diff --git a/sys/i386/isa/wd.c b/sys/i386/isa/wd.c
index fe0e8d3aa1e0..334ebf2ee1f5 100644
--- a/sys/i386/isa/wd.c
+++ b/sys/i386/isa/wd.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)wd.c 7.2 (Berkeley) 5/9/91
- * $Id: wd.c,v 1.114 1996/08/12 00:53:02 wpaul Exp $
+ * $Id: wd.c,v 1.115 1996/08/23 02:52:44 dyson Exp $
*/
/* TODO:
@@ -77,7 +77,6 @@
#include <sys/proc.h>
#include <sys/uio.h>
#include <sys/malloc.h>
-#include <sys/devconf.h>
#ifdef DEVFS
#include <sys/devfsext.h>
#endif /*DEVFS*/
@@ -112,83 +111,6 @@ extern void wdstart(int ctrlr);
#define WDOPT_FORCEHD(x) (((x)&0x0f00)>>8)
#define WDOPT_MULTIMASK 0x00ff
-
-static int wd_goaway(struct kern_devconf *, int);
-static int wdc_goaway(struct kern_devconf *, int);
-static int wd_externalize(struct kern_devconf *, struct sysctl_req *);
-
-/*
- * Templates for the kern_devconf structures used when we attach.
- */
-static struct kern_devconf kdc_wd[NWD] = { {
- 0, 0, 0, /* filled in by kern_devconf.c */
- "wd", 0, { MDDT_DISK, 0 },
- wd_externalize, 0, wd_goaway, DISK_EXTERNALLEN,
- 0, /* parent */
- 0, /* parentdata */
- DC_UNKNOWN, /* state */
- "ST506/ESDI/IDE disk", /* description */
- DC_CLS_DISK /* class */
-} };
-
-static struct kern_devconf kdc_wdc[NWDC] = { {
- 0, 0, 0, /* filled in by kern_devconf.c */
- "wdc", 0, { MDDT_ISA, 0 },
- isa_generic_externalize, 0, wdc_goaway, ISA_EXTERNALLEN,
- &kdc_isa0, /* parent */
- 0, /* parentdata */
- DC_UNCONFIGURED, /* state */
- "ST506/ESDI/IDE disk controller",
- DC_CLS_MISC /* just an ordinary device */
-} };
-
-static inline void
-wd_registerdev(int ctlr, int unit)
-{
- if(unit != 0) {
- kdc_wd[unit] = kdc_wd[0];
- kdc_wd[unit].kdc_state = DC_IDLE;
- }
-
- kdc_wd[unit].kdc_unit = unit;
- kdc_wd[unit].kdc_parent = &kdc_wdc[ctlr];
- kdc_wdc[ctlr].kdc_state = DC_BUSY;
- dev_attach(&kdc_wd[unit]);
-}
-
-static inline void
-wdc_registerdev(struct isa_device *dvp)
-{
- int unit = dvp->id_unit;
-
- if(unit != 0) {
- kdc_wdc[unit] = kdc_wdc[0];
- kdc_wdc[unit].kdc_state = DC_IDLE;
- }
-
- kdc_wdc[unit].kdc_unit = unit;
- kdc_wdc[unit].kdc_parentdata = dvp;
- dev_attach(&kdc_wdc[unit]);
-}
-
-static int
-wdc_goaway(struct kern_devconf *kdc, int force)
-{
- if(force) {
- dev_detach(kdc);
- return 0;
- } else {
- return EBUSY; /* XXX fix */
- }
-}
-
-static int
-wd_goaway(struct kern_devconf *kdc, int force)
-{
- dev_detach(kdc);
- return 0;
-}
-
/*
* This biotab field doubles as a field for the physical unit number on
* the controller.
@@ -296,15 +218,6 @@ static timeout_t wdtimeout;
static int wdunwedge(struct disk *du);
static int wdwait(struct disk *du, u_char bits_wanted, int timeout);
-/*
- * Provide hw.devconf information.
- */
-static int
-wd_externalize(struct kern_devconf *kdc, struct sysctl_req *req)
-{
- return disk_externalize(wddrives[kdc->kdc_unit]->dk_unit, req);
-}
-
struct isa_driver wdcdriver = {
wdprobe, wdattach, "wdc",
};
@@ -342,7 +255,6 @@ wdprobe(struct isa_device *dvp)
du->dk_ctrlr = dvp->id_unit;
du->dk_port = dvp->id_iobase;
- wdc_registerdev(dvp);
/* check if we have registers that work */
outb(du->dk_port + wd_sdh, WDSD_IBM); /* set unit 0 */
@@ -446,7 +358,6 @@ wdattach(struct isa_device *dvp)
if (dvp->id_unit >= NWDC)
return (0);
- kdc_wdc[dvp->id_unit].kdc_state = DC_UNKNOWN; /* XXX */
TAILQ_INIT( &wdtab[dvp->id_unit].controller_queue);
for (wdup = isa_biotab_wdc; wdup->id_driver != 0; wdup++) {
@@ -515,7 +426,6 @@ wdattach(struct isa_device *dvp)
*/
wdtimeout(du);
- wd_registerdev(dvp->id_unit, lunit);
#ifdef DEVFS
mynor = dkmakeminor(unit, WHOLE_DISK_SLICE, RAW_PART);
du->dk_bdev = devfs_add_devswf(&wd_bdevsw, mynor,
@@ -555,8 +465,7 @@ wdattach(struct isa_device *dvp)
if (wddrives[lunit]->dk_ctrlr == dvp->id_unit &&
wddrives[lunit]->dk_unit == unit)
goto next;
- atapi_attach (dvp->id_unit, unit, dvp->id_iobase,
- &kdc_wdc[dvp->id_unit]);
+ atapi_attach (dvp->id_unit, unit, dvp->id_iobase);
next: }
#endif
/*
@@ -1171,7 +1080,6 @@ wdopen(dev_t dev, int flags, int fmt, struct proc *p)
while (du->dk_flags & DKFL_LABELLING)
tsleep((caddr_t)&du->dk_flags, PZERO - 1, "wdopen", 1);
#if 1
- kdc_wd[lunit].kdc_state = DC_BUSY;
wdsleep(du->dk_ctrlr, "wdopn1");
du->dk_flags |= DKFL_LABELLING;
du->dk_state = WANTOPEN;
@@ -1700,7 +1608,6 @@ int
wdclose(dev_t dev, int flags, int fmt, struct proc *p)
{
dsclose(dev, fmt, wddrives[dkunit(dev)]->dk_slices);
- kdc_wd[wddrives[dkunit(dev)]->dk_lunit].kdc_state = DC_IDLE;
return (0);
}
diff --git a/sys/i386/isa/wd7000.c b/sys/i386/isa/wd7000.c
index 0a81a947453a..22bd0e23ef64 100644
--- a/sys/i386/isa/wd7000.c
+++ b/sys/i386/isa/wd7000.c
@@ -62,7 +62,6 @@
#include <scsi/scsi_all.h>
#include <scsi/scsiconf.h>
-#include <sys/devconf.h>
#include <machine/clock.h>
@@ -72,17 +71,6 @@
#include <i386/isa/isa_device.h>
-static struct kern_devconf kdc_wds[NWDS] = { {
- 0, 0, 0,
- "wds", 0, {MDDT_ISA, 0, "bio"},
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0,
- 0,
- DC_UNCONFIGURED, /* state */
- "Western Digital WD-7000 SCSI host adapter",
- DC_CLS_MISC /* class */
-} };
-
static struct scsi_device wds_dev =
{
NULL,
@@ -263,12 +251,6 @@ wdsprobe(struct isa_device *dev)
dev->id_unit = wdsunit; /* XXX WRONG! */
wds[wdsunit].addr = dev->id_iobase;
- if(dev->id_unit)
- kdc_wds[dev->id_unit] = kdc_wds[0];
- kdc_wds[dev->id_unit].kdc_unit = dev->id_unit;
- kdc_wds[dev->id_unit].kdc_parentdata = dev;
- dev_attach(&kdc_wds[dev->id_unit]);
-
if(wds_init(dev) != 0)
return 0;
wdsunit++;
@@ -641,8 +623,6 @@ wdsattach(struct isa_device *dev)
return 0;
scbus->adapter_link = &wds[unit].sc_link;
- kdc_wds[unit].kdc_state = DC_BUSY;
-
scsi_attachdevs(scbus);
return 1;
diff --git a/sys/i386/isa/wt.c b/sys/i386/isa/wt.c
index 9c5f5af0ba2c..2722bc2f9719 100644
--- a/sys/i386/isa/wt.c
+++ b/sys/i386/isa/wt.c
@@ -20,7 +20,7 @@
* the original CMU copyright notice.
*
* Version 1.3, Thu Nov 11 12:09:13 MSK 1993
- * $Id: wt.c,v 1.33 1996/07/23 21:51:50 phk Exp $
+ * $Id: wt.c,v 1.34 1996/08/31 14:47:45 bde Exp $
*
*/
@@ -69,7 +69,6 @@
#include <sys/ioctl.h>
#include <sys/mtio.h>
#include <sys/proc.h>
-#include <sys/devconf.h>
#include <sys/conf.h>
#ifdef DEVFS
#include <sys/devfsext.h>
@@ -187,17 +186,6 @@ static int wtreadfm (wtinfo_t *t);
static int wtwritefm (wtinfo_t *t);
static int wtpoll (wtinfo_t *t, int mask, int bits);
-static struct kern_devconf kdc_wt[NWT] = { {
- 0, 0, 0, /* filled in by dev_attach */
- "wt", 0, { MDDT_ISA, 0, "bio" },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0, /* parent */
- 0, /* parentdata */
- DC_UNCONFIGURED, /* state */
- "Archive or Wangtek QIC-02/QIC-36 tape controller",
- DC_CLS_TAPE /* class */
-} };
-
static d_open_t wtopen;
static d_close_t wtclose;
static d_ioctl_t wtioctl;
@@ -213,16 +201,6 @@ static struct bdevsw wt_bdevsw =
{ wtopen, wtclose, wtstrategy, wtioctl, /*3*/
wtdump, wtsize, B_TAPE, "wt", &wt_cdevsw, -1 };
-static inline void
-wt_registerdev(struct isa_device *id)
-{
- if(id->id_unit)
- kdc_wt[id->id_unit] = kdc_wt[0];
- kdc_wt[id->id_unit].kdc_unit = id->id_unit;
- kdc_wt[id->id_unit].kdc_parentdata = id;
- dev_attach(&kdc_wt[id->id_unit]);
-}
-
/*
* Probe for the presence of the device.
@@ -232,8 +210,6 @@ wtprobe (struct isa_device *id)
{
wtinfo_t *t = wttab + id->id_unit;
- wt_registerdev(id);
-
t->unit = id->id_unit;
t->chan = id->id_drq;
t->port = id->id_iobase;
@@ -286,7 +262,6 @@ wtattach (struct isa_device *id)
printf ("wt%d: type <Wangtek>\n", t->unit);
t->flags = TPSTART; /* tape is rewound */
t->dens = -1; /* unknown density */
- kdc_wt[id->id_unit].kdc_state = DC_IDLE;
isa_dmainit(t->chan, 1024);
#ifdef DEVFS
@@ -389,7 +364,6 @@ wtopen (dev_t dev, int flag, int fmt, struct proc *p)
return(EBUSY);
t->flags = TPINUSE;
- kdc_wt[u].kdc_state = DC_BUSY;
if (flag & FREAD)
t->flags |= TPREAD;
@@ -439,7 +413,6 @@ wtclose (dev_t dev, int flags, int fmt, struct proc *p)
wtreadfm (t);
done:
t->flags &= TPREW | TPRMARK | TPSTART | TPTIMER;
- kdc_wt[u].kdc_state = DC_IDLE;
free (t->buf, M_TEMP);
isa_dma_release(t->chan);
return (0);
diff --git a/sys/isa/fd.c b/sys/isa/fd.c
index ac20996ae765..631157db1356 100644
--- a/sys/isa/fd.c
+++ b/sys/isa/fd.c
@@ -43,7 +43,7 @@
* SUCH DAMAGE.
*
* from: @(#)fd.c 7.4 (Berkeley) 5/25/91
- * $Id: fd.c,v 1.90 1996/07/12 07:40:59 bde Exp $
+ * $Id: fd.c,v 1.91 1996/07/23 21:51:33 phk Exp $
*
*/
@@ -69,7 +69,6 @@
#include <sys/malloc.h>
#include <sys/proc.h>
#include <sys/syslog.h>
-#include <sys/devconf.h>
#include <sys/dkstat.h>
#include <i386/isa/isa.h>
#include <i386/isa/isa_device.h>
@@ -85,80 +84,6 @@
#include <sys/devfsext.h>
#endif
-
-static int fd_goaway(struct kern_devconf *, int);
-static int fdc_goaway(struct kern_devconf *, int);
-static int fd_externalize(struct kern_devconf *, struct sysctl_req *);
-
-/*
- * Templates for the kern_devconf structures used when we attach.
- */
-static struct kern_devconf kdc_fd[NFD] = { {
- 0, 0, 0, /* filled in by kern_devconf.c */
- "fd", 0, { MDDT_DISK, 0 },
- fd_externalize, 0, fd_goaway, DISK_EXTERNALLEN,
- 0, /* parent */
- 0, /* parentdata */
- DC_UNCONFIGURED, /* state */
- "floppy disk",
- DC_CLS_DISK /* class */
-} };
-
-struct kern_devconf kdc_fdc[NFDC] = { {
- 0, 0, 0, /* filled in by kern_devconf.c */
- "fdc", 0, { MDDT_ISA, 0, "bio" },
- isa_generic_externalize, 0, fdc_goaway, ISA_EXTERNALLEN,
- 0, /* parent */
- 0, /* parentdata */
- DC_UNCONFIGURED, /* state */
- "floppy disk/tape controller",
- DC_CLS_MISC /* class */
-} };
-
-static inline void
-fd_registerdev(int ctlr, int unit)
-{
- if(unit != 0)
- kdc_fd[unit] = kdc_fd[0];
-
- kdc_fd[unit].kdc_unit = unit;
- kdc_fd[unit].kdc_parent = &kdc_fdc[ctlr];
- kdc_fd[unit].kdc_parentdata = 0;
- dev_attach(&kdc_fd[unit]);
-}
-
-static inline void
-fdc_registerdev(struct isa_device *dvp)
-{
- int unit = dvp->id_unit;
-
- if(unit != 0)
- kdc_fdc[unit] = kdc_fdc[0];
-
- kdc_fdc[unit].kdc_unit = unit;
- kdc_fdc[unit].kdc_parent = &kdc_isa0;
- kdc_fdc[unit].kdc_parentdata = dvp;
- dev_attach(&kdc_fdc[unit]);
-}
-
-static int
-fdc_goaway(struct kern_devconf *kdc, int force)
-{
- if(force) {
- dev_detach(kdc);
- return 0;
- } else {
- return EBUSY; /* XXX fix */
- }
-}
-
-static int
-fd_goaway(struct kern_devconf *kdc, int force)
-{
- dev_detach(kdc);
- return 0;
-}
-
#define b_cylin b_resid /* XXX now spelled b_cylinder elsewhere */
/* misuse a flag to identify format operation */
@@ -355,15 +280,6 @@ static struct bdevsw fd_bdevsw =
static struct isa_device *fdcdevs[NFDC];
-/*
- * Provide hw.devconf information.
- */
-static int
-fd_externalize(struct kern_devconf *kdc, struct sysctl_req *req)
-{
- return disk_externalize(fd_data[kdc->kdc_unit].fdsu, req);
-}
-
static int
fdc_err(fdcu_t fdcu, const char *s)
{
@@ -526,10 +442,6 @@ fdprobe(struct isa_device *dev)
fdcdevs[fdcu] = dev;
fdc_data[fdcu].baseport = dev->id_iobase;
-#ifndef DEV_LKM
- fdc_registerdev(dev);
-#endif
-
/* First - lets reset the floppy controller */
outb(dev->id_iobase+FDOUT, 0);
DELAY(100);
@@ -542,7 +454,6 @@ fdprobe(struct isa_device *dev)
{
return(0);
}
- kdc_fdc[fdcu].kdc_state = DC_IDLE;
return (IO_FDCSIZE);
}
@@ -636,20 +547,14 @@ fdattach(struct isa_device *dev)
case 0x80:
printf("NEC 765\n");
fdc->fdct = FDC_NE765;
- kdc_fdc[fdcu].kdc_description =
- "NEC 765 floppy disk/tape controller";
break;
case 0x81:
printf("Intel 82077\n");
fdc->fdct = FDC_I82077;
- kdc_fdc[fdcu].kdc_description =
- "Intel 82077 floppy disk/tape controller";
break;
case 0x90:
printf("NEC 72065B\n");
fdc->fdct = FDC_NE72065;
- kdc_fdc[fdcu].kdc_description =
- "NEC 72065B floppy disk/tape controller";
break;
default:
printf("unknown IC type %02x\n", ic_type);
@@ -708,46 +613,33 @@ fdattach(struct isa_device *dev)
fd->options = 0;
printf("fd%d: ", fdu);
- fd_registerdev(fdcu, fdu);
switch (fdt) {
case RTCFDT_12M:
printf("1.2MB 5.25in\n");
fd->type = FD_1200;
- kdc_fd[fdu].kdc_description =
- "1.2MB (1200K) 5.25in floppy disk drive";
break;
case RTCFDT_144M:
printf("1.44MB 3.5in\n");
fd->type = FD_1440;
- kdc_fd[fdu].kdc_description =
- "1.44MB (1440K) 3.5in floppy disk drive";
break;
case RTCFDT_288M:
case RTCFDT_288M_1:
printf("2.88MB 3.5in - 1.44MB mode\n");
fd->type = FD_1440;
- kdc_fd[fdu].kdc_description =
- "2.88MB (2880K) 3.5in floppy disk drive in 1.44 mode";
break;
case RTCFDT_360K:
printf("360KB 5.25in\n");
fd->type = FD_360;
- kdc_fd[fdu].kdc_description =
- "360KB 5.25in floppy disk drive";
break;
case RTCFDT_720K:
printf("720KB 3.5in\n");
fd->type = FD_720;
- kdc_fd[fdu].kdc_description =
- "720KB 3.5in floppy disk drive";
break;
default:
printf("unknown\n");
fd->type = NO_TYPE;
- dev_detach(&kdc_fd[fdu]);
continue;
}
- kdc_fd[fdu].kdc_state = DC_IDLE;
#ifdef DEVFS
mynor = fdu << 6;
fd->bdevs[0] = devfs_add_devswf(&fd_bdevsw, mynor, DV_BLK,
@@ -855,7 +747,6 @@ set_motor(fdcu_t fdcu, int fdsu, int turnon)
outb(fdc_data[fdcu].baseport+FDOUT, fdout);
fdc_data[fdcu].fdout = fdout;
- kdc_fdc[fdcu].kdc_state = (fdout & FDO_FRST)? DC_BUSY: DC_IDLE;
TRACE1("[0x%x->FDOUT]", fdout);
if(needspecify) {
@@ -1094,7 +985,6 @@ Fdopen(dev_t dev, int flags, int mode, struct proc *p)
}
fd_data[fdu].ft = fd_types + type - 1;
fd_data[fdu].flags |= FD_OPEN;
- kdc_fd[fdu].kdc_state = DC_BUSY;
return 0;
}
@@ -1112,7 +1002,6 @@ fdclose(dev_t dev, int flags, int mode, struct proc *p)
#endif
fd_data[fdu].flags &= ~FD_OPEN;
fd_data[fdu].options &= ~FDOPT_NORETRY;
- kdc_fd[fdu].kdc_state = DC_IDLE;
return(0);
}
diff --git a/sys/isa/sio.c b/sys/isa/sio.c
index cbf86b377607..2aa4dfc185d0 100644
--- a/sys/isa/sio.c
+++ b/sys/isa/sio.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
- * $Id: sio.c,v 1.143 1996/06/17 14:23:39 bde Exp $
+ * $Id: sio.c,v 1.144 1996/07/17 22:07:23 julian Exp $
*/
#include "opt_comconsole.h"
@@ -61,7 +61,6 @@
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/syslog.h>
-#include <sys/devconf.h>
#ifdef DEVFS
#include <sys/devfsext.h>
#endif
@@ -292,7 +291,6 @@ static void siointr1 __P((struct com_s *com));
static int commctl __P((struct com_s *com, int bits, int how));
static int comparam __P((struct tty *tp, struct termios *t));
static int sioprobe __P((struct isa_device *dev));
-static void sioregisterdev __P((struct isa_device *id));
static void siosettimeout __P((void));
static void comstart __P((struct tty *tp));
static timeout_t comwakeup;
@@ -363,17 +361,6 @@ static struct speedtab comspeedtab[] = {
{ -1, -1 }
};
-static struct kern_devconf kdc_sio[NSIO] = { {
- 0, 0, 0, /* filled in by dev_attach */
- driver_name, 0, { MDDT_ISA, 0, "tty" },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0, /* parent */
- 0, /* parentdata */
- DC_UNCONFIGURED, /* state */
- "Serial port",
- DC_CLS_SERIAL /* class */
-} };
-
#ifdef COM_ESP
/* XXX configure this properly. */
static Port_t likely_com_ports[] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8, };
@@ -468,8 +455,6 @@ siounload(struct pccard_dev *dp)
printf("sio%d already unloaded!\n",dp->isahd.id_unit);
return;
}
- kdc_sio[com->unit].kdc_state = DC_UNCONFIGURED;
- kdc_sio[com->unit].kdc_description = "Serial port";
if (com->tp && (com->tp->t_state & TS_ISOPEN)) {
com->gone = 1;
printf("sio%d: unload\n", dp->isahd.id_unit);
@@ -500,27 +485,6 @@ card_intr(struct pccard_dev *dp)
}
#endif /* NCRD > 0 */
-static void
-sioregisterdev(id)
- struct isa_device *id;
-{
- int unit;
-
- unit = id->id_unit;
-/*
- * If already registered, don't try to re-register.
- */
- if (kdc_sio[unit].kdc_isa)
- return;
- if (unit != 0)
- kdc_sio[unit] = kdc_sio[0];
- kdc_sio[unit].kdc_state = DC_UNCONFIGURED;
- kdc_sio[unit].kdc_description = "Serial port";
- kdc_sio[unit].kdc_unit = unit;
- kdc_sio[unit].kdc_isa = id;
- dev_attach(&kdc_sio[unit]);
-}
-
static int
sioprobe(dev)
struct isa_device *dev;
@@ -534,8 +498,6 @@ sioprobe(dev)
int result;
struct isa_device *xdev;
- sioregisterdev(dev);
-
if (!already_init) {
/*
* Turn off MCR_IENABLE for all likely serial ports. An unused
@@ -856,8 +818,6 @@ sioattach(isdp)
#ifdef DSI_SOFT_MODEM
if((inb(iobase+7) ^ inb(iobase+7)) & 0x80) {
printf(" Digicom Systems, Inc. SoftModem");
- kdc_sio[unit].kdc_description =
- "Serial port: Digicom Systems SoftModem";
goto determined_type;
}
#endif /* DSI_SOFT_MODEM */
@@ -878,8 +838,6 @@ sioattach(isdp)
outb(iobase + com_scr, scr);
if (scr1 != 0xa5 || scr2 != 0x5a) {
printf(" 8250");
- kdc_sio[unit].kdc_description =
- "Serial port: National 8250 or compatible";
goto determined_type;
}
}
@@ -888,36 +846,24 @@ sioattach(isdp)
switch (inb(com->int_id_port) & IIR_FIFO_MASK) {
case FIFO_RX_LOW:
printf(" 16450");
- kdc_sio[unit].kdc_description =
- "Serial port: National 16450 or compatible";
break;
case FIFO_RX_MEDL:
printf(" 16450?");
- kdc_sio[unit].kdc_description =
- "Serial port: maybe National 16450";
break;
case FIFO_RX_MEDH:
printf(" 16550?");
- kdc_sio[unit].kdc_description =
- "Serial port: maybe National 16550";
break;
case FIFO_RX_HIGH:
printf(" 16550A");
if (COM_NOFIFO(isdp)) {
printf(" fifo disabled");
- kdc_sio[unit].kdc_description =
- "Serial port: National 16550A, FIFO disabled";
} else {
com->hasfifo = TRUE;
com->tx_fifo_size = 16;
- kdc_sio[unit].kdc_description =
- "Serial port: National 16550A or compatible";
#ifdef COM_ESP
for (espp = likely_esp_ports; *espp != 0; espp++)
if (espattach(isdp, com, *espp)) {
com->tx_fifo_size = 1024;
- kdc_sio[unit].kdc_description =
- "Serial port: Hayes ESP";
break;
}
#endif
@@ -942,8 +888,6 @@ sioattach(isdp)
} else {
com->tx_fifo_size = 32;
printf(" 16650");
- kdc_sio[unit].kdc_description =
- "Serial port: Startech 16C650 or similar";
}
if (!com->tx_fifo_size)
printf(" fifo disabled");
@@ -991,8 +935,6 @@ determined_type: ;
#endif /* COM_MULTIPORT */
printf("\n");
- kdc_sio[unit].kdc_state = (unit == comconsole) ? DC_BUSY : DC_IDLE;
-
s = spltty();
com_addr(unit) = com;
splx(s);
@@ -1064,7 +1006,6 @@ open_top:
if (error != 0 || com->gone)
goto out;
}
- kdc_sio[unit].kdc_state = DC_BUSY;
if (tp->t_state & TS_ISOPEN) {
/*
* The device is open, so everything has been initialized.
@@ -1280,8 +1221,6 @@ comhardclose(com)
com->active_out = FALSE;
wakeup(&com->active_out);
wakeup(TSA_CARR_ON(tp)); /* restart any wopeners */
- if (!(com->state & CS_DTR_OFF) && unit != comconsole)
- kdc_sio[unit].kdc_state = DC_IDLE;
splx(s);
}
@@ -1342,8 +1281,6 @@ siodtrwakeup(chan)
com = (struct com_s *)chan;
com->state &= ~CS_DTR_OFF;
- if (com->unit != comconsole)
- kdc_sio[com->unit].kdc_state = DC_IDLE;
wakeup(&com->dtr_wait);
}
diff --git a/sys/isa/syscons.c b/sys/isa/syscons.c
index 6a635ad32c6f..02218f93302a 100644
--- a/sys/isa/syscons.c
+++ b/sys/isa/syscons.c
@@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: syscons.c,v 1.163 1996/09/01 18:16:05 sos Exp $
+ * $Id: syscons.c,v 1.164 1996/09/04 22:24:19 sos Exp $
*/
#include "sc.h"
@@ -46,7 +46,6 @@
#include <sys/syslog.h>
#include <sys/errno.h>
#include <sys/malloc.h>
-#include <sys/devconf.h>
#ifdef DEVFS
#include <sys/devfsext.h>
#endif
@@ -302,27 +301,6 @@ gotack:
return (IO_KBDSIZE);
}
-static struct kern_devconf kdc_sc[NSC] = {
- 0, 0, 0, /* filled in by dev_attach */
- "sc", 0, { MDDT_ISA, 0, "tty" },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0, /* parent */
- 0, /* parentdata */
- DC_BUSY, /* the console is almost always busy */
- "Graphics console",
- DC_CLS_DISPLAY /* class */
-};
-
-static inline void
-sc_registerdev(struct isa_device *id)
-{
- if(id->id_unit)
- kdc_sc[id->id_unit] = kdc_sc[0];
- kdc_sc[id->id_unit].kdc_unit = id->id_unit;
- kdc_sc[id->id_unit].kdc_isa = id;
- dev_attach(&kdc_sc[id->id_unit]);
-}
-
#if NAPM > 0
static int
scresume(void *dummy)
@@ -451,7 +429,6 @@ scattach(struct isa_device *dev)
scrn_timer();
update_leds(scp->status);
- sc_registerdev(dev);
printf("sc%d: ", dev->id_unit);
if (crtc_vga)
diff --git a/sys/kern/kern_devconf.c b/sys/kern/kern_devconf.c
index 4bc637982cb1..e69de29bb2d1 100644
--- a/sys/kern/kern_devconf.c
+++ b/sys/kern/kern_devconf.c
@@ -1,181 +0,0 @@
-/*
- * Copyright (c) 1994, Garrett A. Wollman. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id: kern_devconf.c,v 1.15 1996/06/12 15:10:27 joerg Exp $
- */
-
-/*
- * kern_devconf.c - manage device configuration table
- *
- * Garrett A. Wollman, October 1994.
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/proc.h>
-#include <sys/sysctl.h>
-#include <sys/devconf.h>
-
-struct kern_devconf *dc_list = 0;
-static unsigned dc_lastnum = 0;
-
-int
-dev_attach(struct kern_devconf *kdc)
-{
- int s = splclock();
- kdc->kdc_next = dc_list;
- if(kdc->kdc_next)
- kdc->kdc_next->kdc_rlink = &kdc->kdc_next;
- kdc->kdc_rlink = &dc_list;
- kdc->kdc_number = ++dc_lastnum;
- dc_list = kdc;
- splx(s);
- return 0;
-}
-
-int
-dev_detach(struct kern_devconf *kdc)
-{
- int s;
-
- s = splclock();
- *kdc->kdc_rlink = kdc->kdc_next;
- if(kdc->kdc_next)
- kdc->kdc_next->kdc_rlink = kdc->kdc_rlink;
- splx(s);
-
- return 0;
-}
-
-/*
- * NB: the device must do a dev_detach inside its shutdown routine, if it
- * succeeds. If no routine is specified, we assume no special treatment is
- * required.
- */
-int
-dev_shutdownall(int force)
-{
- int rv = 0;
- struct kern_devconf *kdc = dc_list;
-
- while(kdc) {
- if(!kdc->kdc_shutdown) {
- dev_detach(kdc);
- kdc = dc_list;
- continue;
- }
-
- if(kdc->kdc_shutdown(kdc, force)) {
- rv++;
- kdc = kdc->kdc_next;
- } else {
- kdc = dc_list;
- }
- }
- return rv;
-}
-
-static void
-make_devconf(struct kern_devconf *kdc, struct devconf *dc)
-{
- strncpy(dc->dc_name, kdc->kdc_name, sizeof dc->dc_name);
- dc->dc_name[(sizeof dc->dc_name) - 1] = '\0';
- dc->dc_unit = kdc->kdc_unit;
- dc->dc_number = kdc->kdc_number;
-
- if(kdc->kdc_parent) {
- strncpy(dc->dc_pname, kdc->kdc_parent->kdc_name, sizeof dc->dc_pname);
- dc->dc_pname[(sizeof dc->dc_pname) - 1] = '\0';
- dc->dc_punit = kdc->kdc_parent->kdc_unit;
- dc->dc_pnumber = kdc->kdc_parent->kdc_number;
- } else {
- bzero(dc->dc_pname, sizeof dc->dc_pname);
- dc->dc_punit = -1;
- dc->dc_pnumber = -1;
- }
-
- MACHDEP_COPYDEV(dc, kdc);
- dc->dc_state = kdc->kdc_state;
- dc->dc_class = kdc->kdc_class;
- dc->dc_datalen = kdc->kdc_datalen;
-
- strncpy(dc->dc_descr, kdc->kdc_description, sizeof dc->dc_descr);
- dc->dc_descr[(sizeof dc->dc_descr) - 1] = '\0';
-}
-
-static int
-sysctl_hw_devconfig SYSCTL_HANDLER_ARGS
-{
- int *name = (int *) arg1;
- u_int namelen = arg2;
- struct kern_devconf *kdc;
- struct devconf dc;
- int rv;
-
- /* all sysctl names at this level are terminal */
- if (namelen != 1)
- return ENOTDIR;
-
- if (name[0] == DEVCONF_NUMBER)
- return sysctl_handle_int(oidp, 0, dc_lastnum, req);
-
- for(kdc = dc_list; kdc; kdc = kdc->kdc_next) {
- if(kdc->kdc_number == name[0])
- break;
- }
-
- if(!kdc)
- return ENXIO;
-
- make_devconf(kdc, &dc);
-
- /*
- * Let the device specific externalization routines
- * handle the variable length data at the end of the
- * dc. Since the compiler may optimize alignment and
- * perform padding, we must do the subtraction to
- * determine the proper length. (dc_datalen includes the
- * externalized data so it can't be used)
- */
- rv = SYSCTL_OUT(req, &dc, (char *)&dc.dc_data - (char *)&dc);
- if(rv)
- return rv;
-
- if(kdc->kdc_externalize)
- rv = kdc->kdc_externalize(kdc, req);
- if(rv)
- return rv;
-
- if(!req->newptr)
- return 0;
-
- if(!kdc->kdc_internalize)
- return EOPNOTSUPP;
-
- rv = kdc->kdc_internalize(kdc, req);
- return rv;
-}
-
-SYSCTL_NODE(_hw, HW_DEVCONF, devconfig, CTLFLAG_RW, sysctl_hw_devconfig,"");
diff --git a/sys/kern/kern_shutdown.c b/sys/kern/kern_shutdown.c
index 00ab693229b8..32425265afb0 100644
--- a/sys/kern/kern_shutdown.c
+++ b/sys/kern/kern_shutdown.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)kern_shutdown.c 8.3 (Berkeley) 1/21/94
- * $Id: kern_shutdown.c,v 1.3 1996/08/22 03:50:20 julian Exp $
+ * $Id: kern_shutdown.c,v 1.4 1996/08/26 21:47:56 julian Exp $
*/
#include "opt_ddb.h"
@@ -53,7 +53,6 @@
#include <sys/malloc.h>
#include <sys/kernel.h>
#include <sys/sysctl.h>
-#include <sys/devconf.h>
#include <sys/conf.h>
#include <sys/sysproto.h>
diff --git a/sys/pc98/pc98/atapi.h b/sys/pc98/pc98/atapi.h
index 6f3f142fadae..d43241be8693 100644
--- a/sys/pc98/pc98/atapi.h
+++ b/sys/pc98/pc98/atapi.h
@@ -195,7 +195,6 @@ struct atapidrv { /* delayed attach info */
int unit; /* drive unit, 0/1 */
int port; /* controller base port */
int attached; /* the drive is attached */
- struct kern_devconf *parent; /* the devconf info pattern */
};
struct wcd;
@@ -223,7 +222,6 @@ struct atapi { /* ATAPI controller data */
u_char slow : 1; /* slow reaction device */
u_char attached[2]; /* units are attached to subdrivers */
struct atapi_params *params[2]; /* params for units 0,1 */
- struct kern_devconf *parent; /* parent configuration pattern */
struct atapicmd *queue; /* queue of commands to perform */
struct atapicmd *tail; /* tail of queue */
struct atapicmd *free; /* queue of free command blocks */
@@ -232,7 +230,6 @@ struct atapi { /* ATAPI controller data */
#ifdef KERNEL
struct atapi;
-struct kern_devconf;
extern struct atapidrv atapi_drvtab[4]; /* delayed attach info */
extern int atapi_ndrv; /* the number of potential drives */
@@ -248,7 +245,7 @@ extern struct atapi *atapi_tab; /* the table of atapi controllers */
#endif
#ifndef ATAPI_MODULE
-int atapi_attach (int ctlr, int unit, int port, struct kern_devconf*);
+int atapi_attach (int ctlr, int unit, int port);
#endif
/*
diff --git a/sys/pccard/pccard.c b/sys/pccard/pccard.c
index 9f3a7c5898c3..7cb4dae9f62d 100644
--- a/sys/pccard/pccard.c
+++ b/sys/pccard/pccard.c
@@ -39,9 +39,7 @@
#include <sys/proc.h>
#include <sys/ioctl.h>
#include <sys/syslog.h>
-#include <sys/devconf.h>
#include <sys/malloc.h>
-#include <sys/devconf.h>
#include <sys/conf.h>
#ifdef DEVFS
#include <sys/devfsext.h>
@@ -70,18 +68,6 @@
#include <machine/laptops.h>
#include <machine/md_var.h>
-extern struct kern_devconf kdc_cpu0;
-
-struct kern_devconf kdc_pccard0 = {
- 0, 0, 0, /* filled in by dev_attach */
- "pccard", 0, { MDDT_BUS, 0 },
- 0, 0, 0, BUS_EXTERNALLEN,
- &kdc_cpu0, /* parent is the CPU */
- 0, /* no parentdata */
- DC_UNCONFIGURED, /* until we see it */
- "PCCARD or PCMCIA bus",
- DC_CLS_BUS /* class */
-};
#define PCCARD_MEMSIZE (4*1024)
@@ -149,7 +135,6 @@ static struct cdevsw crd_cdevsw =
void
pccard_configure()
{
- dev_attach(&kdc_pccard0);
#include "pcic.h"
#if NPCIC > 0
@@ -397,7 +382,6 @@ pccard_alloc_slot(struct slot_ctrl *cp)
break;
if (slotno >= MAXSLOT)
return(0);
- kdc_pccard0.kdc_state = DC_BUSY;
MALLOC(sp, struct slot *, sizeof(*sp), M_DEVBUF, M_WAITOK);
bzero(sp, sizeof(*sp));
#ifdef DEVFS
diff --git a/sys/pccard/pcic.c b/sys/pccard/pcic.c
index a5ffb1222a71..b047c8aeaa9a 100644
--- a/sys/pccard/pcic.c
+++ b/sys/pccard/pcic.c
@@ -51,7 +51,6 @@
#include <sys/sysent.h>
#include <sys/exec.h>
#include <sys/lkm.h>
-#include <sys/devconf.h>
#include <machine/clock.h>
#include <machine/laptops.h>
@@ -74,21 +73,6 @@
#include <pccard/driver.h>
#include <pccard/slot.h>
-extern struct kern_devconf kdc_pccard0;
-
-struct kern_devconf kdc_pcic[PCIC_MAX_SLOTS] = {
- {
- 0, 0, 0, /* filled in by dev_attach */
- "pcic", 0, { MDDT_BUS, 0 },
- 0, 0, 0, BUS_EXTERNALLEN,
- &kdc_pccard0, /* parent is the CPU */
- 0, /* no parentdata */
- DC_UNKNOWN,
- "PCMCIA or PCCARD slot",
- DC_CLS_BUS /* class */
- }
-};
-
/*
* Prototypes for interrupt handler.
*/
@@ -265,7 +249,6 @@ pcic_unload(struct lkm_table *lkmtp, int cmd)
for (slot = 0; slot < PCIC_MAX_SLOTS; slot++, sp++) {
if (sp->slotp)
putb(sp, PCIC_STAT_INT, 0);
- kdc_pcic[slot].kdc_state = DC_UNCONFIGURED;
}
unregister_intr(pcic_irq, pcicintr);
}
@@ -703,18 +686,9 @@ pcic_probe ()
*/
validslots++;
sp->slot = slot;
- if (kdc_pcic[slot].kdc_state == DC_UNKNOWN) {
- if (slot != 0)
- kdc_pcic[slot] = kdc_pcic[0];
- kdc_pcic[slot].kdc_unit = slot;
- kdc_pcic[slot].kdc_state = DC_UNCONFIGURED;
- kdc_pcic[slot].kdc_description = cinfo.name;
- dev_attach(kdc_pcic+slot);
- }
slotp = pccard_alloc_slot(&cinfo);
if (slotp == 0)
continue;
- kdc_pcic[slot].kdc_state = DC_IDLE;
slotp->cdata = sp;
sp->slotp = slotp;
/*
@@ -758,21 +732,12 @@ pcic_probe ()
cinfo.irqs = 0x1468;
validslots++;
sp->slot = slot;
- if (kdc_pcic[slot].kdc_state == DC_UNKNOWN) {
- if (slot != 0)
- kdc_pcic[slot] = kdc_pcic[0];
- kdc_pcic[slot].kdc_unit = slot;
- kdc_pcic[slot].kdc_state = DC_UNCONFIGURED;
- kdc_pcic[slot].kdc_description = cinfo.name;
- dev_attach(kdc_pcic+slot);
- }
slotp = pccard_alloc_slot(&cinfo);
if (slotp == 0){
printf("pcic98: slotp == NULL\n");
goto pcic98_probe_end;
}
- kdc_pcic[slot].kdc_state = DC_IDLE;
slotp->cdata = sp;
sp->slotp = slotp;
@@ -1067,12 +1032,10 @@ pcicintr(int unit)
/* Check for a card in this slot */
if (inb(PCIC98_REG1) & PCIC98_CARDEXIST){
if (sp->slotp->laststate != filled){
- kdc_pcic[slot].kdc_state = DC_BUSY;;
pccard_event(sp->slotp, card_inserted);
}
} else {
if (sp->slotp->laststate != empty){
- kdc_pcic[slot].kdc_state = DC_IDLE;;
pccard_event(sp->slotp, card_removed);
}
}
@@ -1086,13 +1049,11 @@ pcicintr(int unit)
if (chg & PCIC_CDTCH) {
if ((getb(sp, PCIC_STATUS) & PCIC_CD) ==
PCIC_CD) {
- kdc_pcic[slot].kdc_state = DC_BUSY;;
pccard_event(sp->slotp,
card_inserted);
} else {
pccard_event(sp->slotp,
card_removed);
- kdc_pcic[slot].kdc_state = DC_IDLE;;
}
}
splx(s);
diff --git a/sys/pci/if_de.c b/sys/pci/if_de.c
index 3078142fd84c..32c3e6a8b8de 100644
--- a/sys/pci/if_de.c
+++ b/sys/pci/if_de.c
@@ -21,7 +21,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: if_de.c,v 1.48 1996/06/14 05:25:32 davidg Exp $
+ * $Id: if_de.c,v 1.49 1996/08/06 21:09:25 phk Exp $
*
*/
@@ -46,7 +46,6 @@
#include <sys/kernel.h>
#include <sys/proc.h> /* only for declaration of wakeup() used by vm.h */
#if defined(__FreeBSD__)
-#include <sys/devconf.h>
#include <machine/clock.h>
#elif defined(__bsdi__) || defined(__NetBSD__)
#include <sys/device.h>
@@ -3712,17 +3711,14 @@ static const int tulip_eisa_irqs[4] = { IRQ5, IRQ9, IRQ10, IRQ11 };
static int
tulip_pci_shutdown(
- struct kern_devconf * const kdc,
+ int unit,
int force)
{
- if (kdc->kdc_unit < tulip_count) {
- tulip_softc_t * const sc = TULIP_UNIT_TO_SOFTC(kdc->kdc_unit);
- TULIP_CSR_WRITE(sc, csr_busmode, TULIP_BUSMODE_SWRESET);
- DELAY(10); /* Wait 10 microseconds (actually 50 PCI cycles but at
- 33MHz that comes to two microseconds but wait a
- bit longer anyways) */
- }
- (void) dev_detach(kdc);
+ tulip_softc_t * const sc = TULIP_UNIT_TO_SOFTC(unit);
+ TULIP_CSR_WRITE(sc, csr_busmode, TULIP_BUSMODE_SWRESET);
+ DELAY(10); /* Wait 10 microseconds (actually 50 PCI cycles but at
+ 33MHz that comes to two microseconds but wait a
+ bit longer anyways) */
return 0;
}
diff --git a/sys/pci/if_fxp.c b/sys/pci/if_fxp.c
index fa64fca3c430..6da34be1e47f 100644
--- a/sys/pci/if_fxp.c
+++ b/sys/pci/if_fxp.c
@@ -24,7 +24,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: if_fxp.c,v 1.12 1996/04/08 01:31:41 davidg Exp $
+ * $Id: if_fxp.c,v 1.13 1996/06/01 23:25:10 gpalmer Exp $
*/
/*
@@ -39,7 +39,6 @@
#include <sys/mbuf.h>
#include <sys/malloc.h>
#include <sys/kernel.h>
-#include <sys/devconf.h>
#include <sys/syslog.h>
#include <net/if.h>
@@ -131,7 +130,7 @@ static u_char fxp_cb_config_template[] = {
static inline int fxp_scb_wait __P((struct fxp_csr *));
static char *fxp_probe __P((pcici_t, pcidi_t));
static void fxp_attach __P((pcici_t, int));
-static int fxp_shutdown __P((struct kern_devconf *, int));
+static int fxp_shutdown __P((int, int));
static void fxp_intr __P((void *));
static void fxp_start __P((struct ifnet *));
static int fxp_ioctl __P((struct ifnet *, int, caddr_t));
@@ -392,15 +391,14 @@ fxp_get_macaddr(sc)
* kernel memory doesn't get clobbered during warmboot.
*/
static int
-fxp_shutdown(kdc, force)
- struct kern_devconf *kdc;
+fxp_shutdown(unit, force)
+ int unit;
int force;
{
- struct fxp_softc *sc = fxp_sc[kdc->kdc_unit];
+ struct fxp_softc *sc = fxp_sc[unit];
fxp_stop(sc);
- (void) dev_detach(kdc);
return 0;
}
diff --git a/sys/pci/if_pdq.c b/sys/pci/if_pdq.c
index 4c749bb68f24..e4092cd9f489 100644
--- a/sys/pci/if_pdq.c
+++ b/sys/pci/if_pdq.c
@@ -21,7 +21,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: if_pdq.c,v 1.15 1996/03/23 19:29:10 fenner Exp $
+ * $Id: if_pdq.c,v 1.16 1996/06/18 01:22:40 bde Exp $
*
*/
@@ -97,7 +97,6 @@
#if NFEA > 0
#include <i386/isa/icu.h>
#ifdef __FreeBSD__
-#include <sys/devconf.h>
#include <i386/isa/isa_device.h>
#endif
#ifdef __bsdi__
@@ -619,26 +618,6 @@ pdq_eisa_devinit(
}
#ifdef __FreeBSD__
-static struct kern_devconf kdc_fea[NFEA] = { {
- 0, 0, 0, /* filled in by dev_attach */
- "fea", 0, { MDDT_ISA, 0, "net" },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0, /* parent */
- 0, /* parentdata */
- DC_BUSY, /* host adapters are always ``in use'' */
- "DEC DEFEA EISA FDDI Controller"
-} };
-
-static inline void
-pdq_eisa_registerdev(
- struct isa_device *id)
-{
- if (id->id_unit)
- kdc_fea[id->id_unit] = kdc_fea[0];
- kdc_fea[id->id_unit].kdc_unit = id->id_unit;
- kdc_fea[id->id_unit].kdc_parentdata = id;
- dev_attach(&kdc_fea[id->id_unit]);
-}
static int pdq_eisa_slots = ~1;
@@ -707,7 +686,6 @@ pdq_eisa_attach(
bcopy((caddr_t) sc->sc_pdq->pdq_hwaddr.lanaddr_bytes, sc->sc_ac.ac_enaddr, 6);
pdq_ifattach(sc, pdq_eisa_ifinit, pdq_eisa_ifreset, pdq_eisa_ifwatchdog);
- pdq_eisa_registerdev(id);
return 1;
}
diff --git a/sys/pci/if_vx.c b/sys/pci/if_vx.c
index f0e86e128d01..36b6ed67ed57 100644
--- a/sys/pci/if_vx.c
+++ b/sys/pci/if_vx.c
@@ -61,7 +61,6 @@
#if defined(__FreeBSD__)
#include <sys/systm.h>
#include <sys/kernel.h>
-#include <sys/devconf.h>
#endif
#include <sys/mbuf.h>
#include <sys/socket.h>
@@ -157,11 +156,10 @@ get_e(unit, offset)
static int
vx_pci_shutdown(
- struct kern_devconf * const kdc,
+ int unit,
int force)
{
- vxreset(kdc->kdc_unit);
- dev_detach(kdc);
+ vxreset(unit);
return 0;
}
diff --git a/sys/pci/meteor.c b/sys/pci/meteor.c
index b4c8b743103c..a03963b7c2dc 100644
--- a/sys/pci/meteor.c
+++ b/sys/pci/meteor.c
@@ -159,7 +159,6 @@
#include <sys/kernel.h>
#include <sys/proc.h>
#include <sys/signalvar.h>
-#include <sys/devconf.h>
#include <sys/mman.h>
#ifdef DEVFS
#include <sys/devfsext.h>
diff --git a/sys/pci/ncr.c b/sys/pci/ncr.c
index 93f1fe90d7b7..20e181cddc75 100644
--- a/sys/pci/ncr.c
+++ b/sys/pci/ncr.c
@@ -1,6 +1,6 @@
/**************************************************************************
**
-** $Id: ncr.c,v 1.75 1996/08/26 22:38:07 se Exp $
+** $Id: ncr.c,v 1.76 1996/08/27 20:41:02 se Exp $
**
** Device driver for the NCR 53C810 PCI-SCSI-Controller.
**
@@ -197,7 +197,6 @@
#ifndef __NetBSD__
-#include <sys/devconf.h>
#include <pci/pcivar.h>
#include <pci/pcireg.h>
#include <pci/ncrreg.h>
@@ -1254,7 +1253,7 @@ static void ncr_attach (pcici_t tag, int unit);
static char ident[] =
- "\n$Id: ncr.c,v 1.75 1996/08/26 22:38:07 se Exp $\n";
+ "\n$Id: ncr.c,v 1.76 1996/08/27 20:41:02 se Exp $\n";
static const u_long ncr_version = NCR_VERSION * 11
+ (u_long) sizeof (struct ncb) * 7
diff --git a/sys/pci/pci.c b/sys/pci/pci.c
index 6bc7c9d6c23d..db97c8b399c6 100644
--- a/sys/pci/pci.c
+++ b/sys/pci/pci.c
@@ -1,6 +1,6 @@
/**************************************************************************
**
-** $Id: pci.c,v 1.52 1996/09/02 21:23:04 se Exp $
+** $Id: pci.c,v 1.53 1996/09/05 21:28:51 se Exp $
**
** General subroutines for the PCI bus.
** pci_configure ()
@@ -53,13 +53,11 @@
#include <sys/kernel.h>
#include <sys/sysctl.h>
#include <sys/proc.h> /* declaration of wakeup(), used by vm.h */
-#include <sys/devconf.h>
#include <vm/vm.h>
#include <vm/vm_param.h>
#include <vm/pmap.h>
-#include <sys/devconf.h>
#include <i386/isa/isa_device.h> /* XXX inthand2_t */
@@ -77,21 +75,7 @@
**========================================================
*/
-extern struct kern_devconf kdc_cpu0;
-
-struct kern_devconf kdc_pci0 = {
- 0, 0, 0, /* filled in by dev_attach */
- "pci", 0, { MDDT_BUS, 0 },
- 0, 0, 0, BUS_EXTERNALLEN,
- &kdc_cpu0, /* parent is the CPU */
- 0, /* no parentdata */
- DC_BUSY, /* busses are always busy */
- "PCI bus",
- DC_CLS_BUS /* class */
-};
-
struct pci_devconf {
- struct kern_devconf pdc_kdc;
struct pci_info pdc_pi;
};
@@ -123,10 +107,6 @@ struct pcicb {
u_long pcicb_p_memlimit;
};
-static int pci_externalize (struct kern_devconf *, struct sysctl_req *);
-
-static int pci_internalize (struct kern_devconf *, struct sysctl_req *);
-
static void
not_supported (pcici_t tag, u_long type);
@@ -677,27 +657,7 @@ pci_bus_config (void)
pdcp -> pdc_pi.pi_bus = bus_no;
pdcp -> pdc_pi.pi_device = device;
pdcp -> pdc_pi.pi_func = func;
-
- pdcp -> pdc_kdc.kdc_name = dvp->pd_name;
- pdcp -> pdc_kdc.kdc_unit = unit;
-
- pdcp -> pdc_kdc.kdc_md.mddc_devtype = MDDT_PCI;
-
- pdcp -> pdc_kdc.kdc_externalize = pci_externalize;
- pdcp -> pdc_kdc.kdc_internalize = pci_internalize;
-
- pdcp -> pdc_kdc.kdc_datalen = PCI_EXTERNAL_LEN;
- pdcp -> pdc_kdc.kdc_parent = &kdc_pci0;
- pdcp -> pdc_kdc.kdc_parentdata = &pdcp->pdc_pi;
- pdcp -> pdc_kdc.kdc_state = DC_UNKNOWN;
- pdcp -> pdc_kdc.kdc_description = name;
- pdcp -> pdc_kdc.kdc_shutdown = dvp->pd_shutdown;
-
- /*
- ** And register this device
- */
-
- dev_attach (&pdcp->pdc_kdc);
+ pdcp -> pdc_pi.pi_unit = unit;
/*
** attach device
@@ -937,8 +897,6 @@ void pci_configure()
** hello world ..
*/
- dev_attach(&kdc_pci0);
-
pciroots = 1;
while (pciroots--) {
@@ -1196,39 +1154,6 @@ int pci_map_mem (pcici_t tag, u_long reg, vm_offset_t* va, vm_offset_t* pa)
return (1);
}
-/*------------------------------------------------------------
-**
-** Interface functions for the devconf module.
-**
-**------------------------------------------------------------
-*/
-
-static int
-pci_externalize (struct kern_devconf *kdcp, struct sysctl_req *req)
-{
- struct pci_externalize_buffer buffer;
- struct pci_info * pip = kdcp->kdc_parentdata;
- pcici_t tag;
- int i;
-
- tag = pcibus->pb_tag (pip->pi_bus, pip->pi_device, pip->pi_func);
-
- buffer.peb_pci_info = *pip;
-
- for (i=0; i<PCI_EXT_CONF_LEN; i++) {
- buffer.peb_config[i] = pci_conf_read (tag, i*4);
- };
-
- return SYSCTL_OUT(req, &buffer, sizeof buffer);
-}
-
-
-static int
-pci_internalize (struct kern_devconf *kdcp, struct sysctl_req *re)
-{
- return EOPNOTSUPP;
-}
-
/*-----------------------------------------------------------------------
**
** Pci meta interrupt handler
diff --git a/sys/pci/pcisupport.c b/sys/pci/pcisupport.c
index a4b6daab1b5b..dae2baca5522 100644
--- a/sys/pci/pcisupport.c
+++ b/sys/pci/pcisupport.c
@@ -1,6 +1,6 @@
/**************************************************************************
**
-** $Id: pcisupport.c,v 1.36 1996/09/05 21:34:12 se Exp $
+** $Id: pcisupport.c,v 1.37 1996/09/06 09:21:48 rgrimes Exp $
**
** Device driver for DEC/INTEL PCI chipsets.
**
@@ -46,7 +46,6 @@
#include <sys/systm.h>
#include <sys/malloc.h>
#include <sys/kernel.h>
-#include <sys/devconf.h>
#include <pci/pcivar.h>
#include <pci/pcireg.h>
diff --git a/sys/pci/pcivar.h b/sys/pci/pcivar.h
index 4f4a29f08745..51516ecce4ae 100644
--- a/sys/pci/pcivar.h
+++ b/sys/pci/pcivar.h
@@ -1,6 +1,6 @@
/**************************************************************************
**
-** $Id: pcivar.h,v 1.9 1996/01/25 18:32:00 se Exp $
+** $Id: pcivar.h,v 1.10 1996/03/19 15:02:58 bde Exp $
**
** Declarations for pci device drivers.
**
@@ -132,7 +132,7 @@ struct pci_device {
char* (*pd_probe ) (pcici_t tag, pcidi_t type);
void (*pd_attach) (pcici_t tag, int unit);
u_long *pd_count;
- int (*pd_shutdown) (struct kern_devconf *, int);
+ int (*pd_shutdown) (int, int);
};
/*-----------------------------------------------------------------
@@ -161,6 +161,7 @@ struct pci_info {
u_char pi_device;
u_char pi_func;
u_char pi_dummy;
+ u_char pi_unit;
};
#define PCI_EXT_CONF_LEN (16)
diff --git a/sys/scsi/cd.c b/sys/scsi/cd.c
index 7a71341cd9ac..d18add7cd458 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 2957ea6b783c..1a916d78f361 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 9fefeb57537f..5265429d17b3 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 1b715beaabc5..07e1db31634b 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 45ed3cba46da..cf2fec877099 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 c304cf26425f..696115be75a6 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 7da014e12065..0b0e41c4e000 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 6db9bc6c56a9..822b589899bb 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 d7fe9a9c100f..438e0bb3b088 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] =