diff options
author | gibbs <gibbs@FreeBSD.org> | 1994-11-18 20:34:30 +0000 |
---|---|---|
committer | gibbs <gibbs@FreeBSD.org> | 1994-11-18 20:34:30 +0000 |
commit | ea0a6a1c2804891a7dc21e565f18616c8090c4b3 (patch) | |
tree | f84cdffbbc589df210d9ede8d680d475b9c5b9b2 /sys | |
parent | f8fe13413690f6fbe0951b180e1450e15fff8a3f (diff) | |
download | FreeBSD-src-ea0a6a1c2804891a7dc21e565f18616c8090c4b3.zip FreeBSD-src-ea0a6a1c2804891a7dc21e565f18616c8090c4b3.tar.gz |
Register with devconfg so we show up in lsdev.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/i386/eisa/aic7770.c | 26 | ||||
-rw-r--r-- | sys/i386/isa/aic7770.c | 26 | ||||
-rw-r--r-- | sys/i386/scsi/aic7xxx.c | 26 |
3 files changed, 75 insertions, 3 deletions
diff --git a/sys/i386/eisa/aic7770.c b/sys/i386/eisa/aic7770.c index fea3132..58e0731 100644 --- a/sys/i386/eisa/aic7770.c +++ b/sys/i386/eisa/aic7770.c @@ -18,7 +18,7 @@ * * commenced: Sun Sep 27 18:14:01 PDT 1992 * - * $Id: aic7770.c,v 1.3 1994/11/18 09:03:09 jkh Exp $ + * $Id: aic7770.c,v 1.4 1994/11/18 09:14:14 gibbs Exp $ */ /* * TODO: @@ -57,6 +57,7 @@ #include <machine/cpufunc.h> #include <scsi/scsi_all.h> #include <scsi/scsiconf.h> +#include <sys/devconf.h> #define AHC_NSEG 256 /* number of dma segments supported */ #define PAGESIZ 4096 @@ -146,6 +147,27 @@ struct scsi_device ahc_dev = { 0, 0 } }; +static struct kern_devconf kdc_ahc[NAHC] = { { + 0, 0, 0, /* filled in by dev_attach */ + "ahc", 0, { MDDT_ISA, 0, "bio" }, + 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" +} }; + +static inline void +ahc_registerdev(struct isa_device *id) +{ + if(id->id_unit) + kdc_ahc[id->id_unit] = kdc_ahc[0]; + kdc_ahc[id->id_unit].kdc_unit = id->id_unit; + kdc_ahc[id->id_unit].kdc_parentdata = id; + dev_attach(&kdc_ahc[id->id_unit]); +} + + /* * All of these should be in a separate header file shared by the sequencer * code and the kernel level driver. The only catch is that we would need to @@ -827,6 +849,8 @@ ahc_attach(dev) * supports more than one channel. XXX */ + ahc_registerdev(dev); + /* * ask the adapter what subunits are present */ diff --git a/sys/i386/isa/aic7770.c b/sys/i386/isa/aic7770.c index fea3132..58e0731 100644 --- a/sys/i386/isa/aic7770.c +++ b/sys/i386/isa/aic7770.c @@ -18,7 +18,7 @@ * * commenced: Sun Sep 27 18:14:01 PDT 1992 * - * $Id: aic7770.c,v 1.3 1994/11/18 09:03:09 jkh Exp $ + * $Id: aic7770.c,v 1.4 1994/11/18 09:14:14 gibbs Exp $ */ /* * TODO: @@ -57,6 +57,7 @@ #include <machine/cpufunc.h> #include <scsi/scsi_all.h> #include <scsi/scsiconf.h> +#include <sys/devconf.h> #define AHC_NSEG 256 /* number of dma segments supported */ #define PAGESIZ 4096 @@ -146,6 +147,27 @@ struct scsi_device ahc_dev = { 0, 0 } }; +static struct kern_devconf kdc_ahc[NAHC] = { { + 0, 0, 0, /* filled in by dev_attach */ + "ahc", 0, { MDDT_ISA, 0, "bio" }, + 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" +} }; + +static inline void +ahc_registerdev(struct isa_device *id) +{ + if(id->id_unit) + kdc_ahc[id->id_unit] = kdc_ahc[0]; + kdc_ahc[id->id_unit].kdc_unit = id->id_unit; + kdc_ahc[id->id_unit].kdc_parentdata = id; + dev_attach(&kdc_ahc[id->id_unit]); +} + + /* * All of these should be in a separate header file shared by the sequencer * code and the kernel level driver. The only catch is that we would need to @@ -827,6 +849,8 @@ ahc_attach(dev) * supports more than one channel. XXX */ + ahc_registerdev(dev); + /* * ask the adapter what subunits are present */ diff --git a/sys/i386/scsi/aic7xxx.c b/sys/i386/scsi/aic7xxx.c index fea3132..58e0731 100644 --- a/sys/i386/scsi/aic7xxx.c +++ b/sys/i386/scsi/aic7xxx.c @@ -18,7 +18,7 @@ * * commenced: Sun Sep 27 18:14:01 PDT 1992 * - * $Id: aic7770.c,v 1.3 1994/11/18 09:03:09 jkh Exp $ + * $Id: aic7770.c,v 1.4 1994/11/18 09:14:14 gibbs Exp $ */ /* * TODO: @@ -57,6 +57,7 @@ #include <machine/cpufunc.h> #include <scsi/scsi_all.h> #include <scsi/scsiconf.h> +#include <sys/devconf.h> #define AHC_NSEG 256 /* number of dma segments supported */ #define PAGESIZ 4096 @@ -146,6 +147,27 @@ struct scsi_device ahc_dev = { 0, 0 } }; +static struct kern_devconf kdc_ahc[NAHC] = { { + 0, 0, 0, /* filled in by dev_attach */ + "ahc", 0, { MDDT_ISA, 0, "bio" }, + 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" +} }; + +static inline void +ahc_registerdev(struct isa_device *id) +{ + if(id->id_unit) + kdc_ahc[id->id_unit] = kdc_ahc[0]; + kdc_ahc[id->id_unit].kdc_unit = id->id_unit; + kdc_ahc[id->id_unit].kdc_parentdata = id; + dev_attach(&kdc_ahc[id->id_unit]); +} + + /* * All of these should be in a separate header file shared by the sequencer * code and the kernel level driver. The only catch is that we would need to @@ -827,6 +849,8 @@ ahc_attach(dev) * supports more than one channel. XXX */ + ahc_registerdev(dev); + /* * ask the adapter what subunits are present */ |