From ea0a6a1c2804891a7dc21e565f18616c8090c4b3 Mon Sep 17 00:00:00 2001 From: gibbs Date: Fri, 18 Nov 1994 20:34:30 +0000 Subject: Register with devconfg so we show up in lsdev. --- sys/i386/eisa/aic7770.c | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'sys/i386/eisa') 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 #include #include +#include #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 */ -- cgit v1.1