1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-19 02:29:40 +00:00

Remove devconf, it never grew up to be of any use.

This commit is contained in:
Poul-Henning Kamp 1996-09-06 23:09:20 +00:00
parent cb3c44d787
commit bfbb029d87
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=18084
125 changed files with 187 additions and 4219 deletions

View File

@ -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 @@ asm
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 */
}

View File

@ -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);
}
/*

View File

@ -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 @@ bounds_check_with_label(struct buf *bp, struct disklabel *lp, int wlabel)
bp->b_flags |= B_ERROR;
return(-1);
}
int
disk_externalize(int drive, struct sysctl_req *req)
{
return SYSCTL_OUT(req, &drive, sizeof drive);
}

View File

@ -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 */
@ -486,43 +470,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

View File

@ -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 @@ asm
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 */
}

View File

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

View File

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

View File

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

View File

@ -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 @@ sioopen(dev, flag, mode, p)
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);
}

View File

@ -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 @@ sioopen(dev, flag, mode, p)
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);
}

View File

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

View File

@ -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 @@ dgbattach(dev)
hidewin(sc);
dgbregisterdev(dev);
/* register the polling function */
timeout(dgbpoll, (void *)unit, hz/25);
@ -1040,8 +1007,6 @@ dgbopen(dev, flag, mode, p)
* 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));

View File

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

View File

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

View File

@ -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_ */

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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 @@ siattach(id)
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.
*/

View File

@ -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 @@ sioopen(dev, flag, mode, p)
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);
}

View File

@ -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.
@ -265,11 +213,6 @@ srprobe(struct isa_device *id)
u_char mar;
sca_regs *sca = 0;
/*
* Register the card.
*/
src_registerdev(id);
/*
* Now see if the card is realy there.
*
@ -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.

View File

@ -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.
@ -265,11 +213,6 @@ srprobe(struct isa_device *id)
u_char mar;
sca_regs *sca = 0;
/*
* Register the card.
*/
src_registerdev(id);
/*
* Now see if the card is realy there.
*
@ -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.

View File

@ -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 @@ scprobe(struct isa_device *dev)
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)

View File

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

View File

@ -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 @@ dgbattach(dev)
hidewin(sc);
dgbregisterdev(dev);
/* register the polling function */
timeout(dgbpoll, (void *)unit, hz/25);
@ -1040,8 +1007,6 @@ dgbopen(dev, flag, mode, p)
* 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));

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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_ */

View File

@ -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);
}
/*

View File

@ -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 @@ bounds_check_with_label(struct buf *bp, struct disklabel *lp, int wlabel)
bp->b_flags |= B_ERROR;
return(-1);
}
int
disk_externalize(int drive, struct sysctl_req *req)
{
return SYSCTL_OUT(req, &drive, sizeof drive);
}

View File

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

View File

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

View File

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

View File

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

View File

@ -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
/*

View File

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

View File

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

View File

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

View File

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

View File

@ -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 @@ sioopen(dev, flag, mode, p)
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);
}

View File

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

View File

@ -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 @@ ftattach(isadev, fdup, unithasfd)
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 */
}

View File

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

View File

@ -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 */

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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.
@ -265,11 +213,6 @@ srprobe(struct isa_device *id)
u_char mar;
sca_regs *sca = 0;
/*
* Register the card.
*/
src_registerdev(id);
/*
* Now see if the card is realy there.
*
@ -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.

View File

@ -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 */
@ -486,43 +470,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

View File

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

View File

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

View File

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

View File

@ -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
@ -1334,25 +1321,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

View File

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

View File

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

View File

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

View File

@ -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 @@ asm
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 */
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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 */

View File

@ -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 */

View File

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

View File

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

View File

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

View File

@ -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 @@ siattach(id)
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.
*/

View File

@ -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 @@ sioopen(dev, flag, mode, p)
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);
}

View File

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

View File

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

View File

@ -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 @@ scprobe(struct isa_device *dev)
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)

View File

@ -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
*/

View File

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

View File

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

View File

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

View File

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

View File

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

Some files were not shown because too many files have changed in this diff Show More