diff options
author | wollman <wollman@FreeBSD.org> | 1995-04-12 20:48:13 +0000 |
---|---|---|
committer | wollman <wollman@FreeBSD.org> | 1995-04-12 20:48:13 +0000 |
commit | 6a8d3a357d2d39cf1274d89e9ee73459574e038d (patch) | |
tree | 3733f361a8298b0f38c2e4586c976a9240816ec2 /sys/i386/eisa | |
parent | 669ed5b46ea62e3997fc8495702ddc9078fa7031 (diff) | |
download | FreeBSD-src-6a8d3a357d2d39cf1274d89e9ee73459574e038d.zip FreeBSD-src-6a8d3a357d2d39cf1274d89e9ee73459574e038d.tar.gz |
Add a class field to devconf and mst drivers.
For those where it was easy, drivers were also fixed to call
dev_attach() during probe rather than attach (in keeping with the
new design articulated in a mail message five months ago). For
a few that were really easy, correct state tracking was added as well.
The `fd' driver was fixed to correctly fill in the description.
The CPU identify code was fixed to attach a `cpu' device. The code
was also massively reordered to fill in cpu_model with somethingremotely
resembling what identifycpu() prints out. A few bytes saved by using
%b to format the features list rather than lots of ifs.
Diffstat (limited to 'sys/i386/eisa')
-rw-r--r-- | sys/i386/eisa/aha1742.c | 13 | ||||
-rw-r--r-- | sys/i386/eisa/aic7770.c | 12 |
2 files changed, 17 insertions, 8 deletions
diff --git a/sys/i386/eisa/aha1742.c b/sys/i386/eisa/aha1742.c index ebbd4bb..b411f81 100644 --- a/sys/i386/eisa/aha1742.c +++ b/sys/i386/eisa/aha1742.c @@ -14,7 +14,7 @@ * * commenced: Sun Sep 27 18:14:01 PDT 1992 * - * $Id: aha1742.c,v 1.29 1995/03/23 09:00:18 rgrimes Exp $ + * $Id: aha1742.c,v 1.30 1995/03/28 07:55:23 bde Exp $ */ #include <sys/types.h> @@ -325,8 +325,9 @@ static struct kern_devconf kdc_ahb[NAHB] = { { isa_generic_externalize, 0, 0, ISA_EXTERNALLEN, &kdc_isa0, /* parent */ 0, /* parentdata */ - DC_BUSY, /* host adapters are always ``in use'' */ - "Adaptec 174x-series SCSI host adapter" + DC_UNCONFIGURED, /* always start out here in probe */ + "Adaptec 174x-series SCSI host adapter", + DC_CLS_MISC /* host adapters aren't special */ } }; static inline void @@ -506,6 +507,10 @@ ahbprobe1(dev) bzero(ahb, sizeof(struct ahb_data)); ahbdata[unit] = ahb; ahb->baseport = dev->id_iobase; +#ifndef DEV_LKM + ahb_registerdev(dev); +#endif /* DEV_LKM */ + /* * Try initialise a unit at this location * sets up dma and bus speed, loads ahb->vect @@ -543,7 +548,7 @@ ahb_attach(dev) ahb->sc_link.adapter = &ahb_switch; ahb->sc_link.device = &ahb_dev; - ahb_registerdev(dev); + kdc_ahb[unit].kdc_state = DC_BUSY; /* host adapters are always busy */ /* * ask the adapter what subunits are present */ diff --git a/sys/i386/eisa/aic7770.c b/sys/i386/eisa/aic7770.c index 0fde1ed..2cfb904 100644 --- a/sys/i386/eisa/aic7770.c +++ b/sys/i386/eisa/aic7770.c @@ -19,7 +19,7 @@ * 4. Modifications may be freely made to this file if the above conditions * are met. * - * $Id: aic7770.c,v 1.11 1995/03/07 08:58:22 gibbs Exp $ + * $Id: aic7770.c,v 1.12 1995/03/31 13:36:57 gibbs Exp $ */ #include <sys/param.h> @@ -65,8 +65,9 @@ static struct kern_devconf kdc_aic7770[NAHC] = { { isa_generic_externalize, 0, 0, ISA_EXTERNALLEN, &kdc_isa0, /* parent */ 0, /* parentdata */ - DC_BUSY, /* host adapters are always ``in use'' */ - "Adaptec aic7770 based SCSI host adapter" + DC_UNCONFIGURED, /* always start out here */ + "Adaptec aic7770 based SCSI host adapter", + DC_CLS_MISC /* host adapters aren't special */ } }; static inline void @@ -120,6 +121,9 @@ aic7770probe(struct isa_device *dev) if ( sig_id[3] == valid_ids[i].id ) { int unit = dev->id_unit; dev->id_iobase = port; +#ifndef DEV_LKM + aic7770_registerdev(dev); +#endif /* DEV_LKM */ if(ahcprobe(unit, port, valid_ids[i].type)){ /* @@ -144,7 +148,7 @@ aic7770_attach(dev) struct isa_device *dev; { int unit = dev->id_unit; - aic7770_registerdev(dev); + kdc_aic7770[unit].kdc_state = DC_BUSY; /* host adapters always busy */ return ahc_attach(unit); } |