summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev')
-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
28 files changed, 62 insertions, 1244 deletions
diff --git a/sys/dev/ar/if_ar.c b/sys/dev/ar/if_ar.c
index 7758bcb..c7d678a 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 7758bcb..c7d678a 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 ce52aa5..86de9c2 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 2f44c29..4cb47cc 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 2f44c29..4cb47cc 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 3078142..32c3e6a 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 8e8f2f3..18e69c3 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 eb78d0b..b1807ef 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 4b0d464..12b6335 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 c037239..5bceffb 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 e360154..7840e8b 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 f0284ae..e16d9c3 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 ac20996..631157d 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 7648902..5d18329 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 fa64fca..6da34be 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 24e3829..4c8cf8d 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 abc3b74..08a14a4 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 c16c004..dcb1abc 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 835e1e1..b54417e 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 6bc7c9d..db97c8b 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 4f4a29f..51516ec 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 5614de5..fd37df2 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 454cd5b..f08439d 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 bcb301d..369d57d 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 cbf86b3..2aa4dfc 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 bf1cdd1..9d16b6b 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 bf1cdd1..9d16b6b 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 6a635ad..02218f9 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)
OpenPOWER on IntegriCloud