summaryrefslogtreecommitdiffstats
path: root/sys/dev/ep
diff options
context:
space:
mode:
authorwollman <wollman@FreeBSD.org>1994-10-23 21:28:03 +0000
committerwollman <wollman@FreeBSD.org>1994-10-23 21:28:03 +0000
commit7b8e09399aded7c12a148b104ccf05419e73ba88 (patch)
treec2370b235711beb410091996b92230bc38cd2a7e /sys/dev/ep
parent5727d2fc7e7202ade434ecfa3f1e91a6f714d47e (diff)
downloadFreeBSD-src-7b8e09399aded7c12a148b104ccf05419e73ba88.zip
FreeBSD-src-7b8e09399aded7c12a148b104ccf05419e73ba88.tar.gz
Finished device configuration database work for all ISA devices (except `ze')
and all SCSI devices (except that it's not done quite the way I want). New information added includes: - A text description of the device - A ``state''---unknown, unconfigured, idle, or busy - A generic parent device (with support in the m.i. code) - An interrupt mask type field (which will hopefully go away) so that . ``doconfig'' can be written This requires a new version of the `lsdev' program as well (next commit).
Diffstat (limited to 'sys/dev/ep')
-rw-r--r--sys/dev/ep/if_ep.c26
1 files changed, 24 insertions, 2 deletions
diff --git a/sys/dev/ep/if_ep.c b/sys/dev/ep/if_ep.c
index 5868576..a526ca3 100644
--- a/sys/dev/ep/if_ep.c
+++ b/sys/dev/ep/if_ep.c
@@ -21,8 +21,8 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * From: if_ep.c,v 1.9 1994/01/25 10:46:29 deraadt Exp $
- * $Id: if_ep.c,v 1.12 1994/09/03 18:10:43 ats Exp $
+ * From: if_ep.c,v 1.9 1994/01/25 10:46:29 deraadt Exp
+ * $Id: if_ep.c,v 1.13 1994/09/16 13:33:41 davidg Exp $
*/
#include "ep.h"
@@ -40,6 +40,7 @@
#include <sys/ioctl.h>
#include <sys/errno.h>
#include <sys/syslog.h>
+#include <sys/devconf.h>
#if defined(__NetBSD__)
#include <sys/select.h>
#endif
@@ -119,6 +120,26 @@ struct isa_driver epdriver = {
"ep"
};
+static struct kern_devconf kdc_ep[NEP] = { {
+ 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_BUSY, /* network interfaces are always ``open'' */
+ "3Com 3C509 Ethernet adapter"
+} };
+
+static inline void
+ep_registerdev(struct isa_device *id)
+{
+ if(id->id_unit)
+ kdc_ep[id->id_unit] = kdc_ep[0];
+ kdc_ep[id->id_unit].kdc_unit = id->id_unit;
+ kdc_ep[id->id_unit].kdc_parentdata = id;
+ dev_attach(&kdc_ep[id->id_unit]);
+}
+
static int send_ID_sequence __P((u_short));
static u_short epreadeeprom __P((int, int));
static int epbusyeeprom __P((int, ushort));
@@ -377,6 +398,7 @@ epattach(is)
ifp->if_watchdog = epwatchdog;
if_attach(ifp);
+ ep_registerdev(is);
/*
* Fill the hardware address into ifa_addr if we find an
OpenPOWER on IntegriCloud