From 67fb73e4b4e5848baf312fc6f34ffd439b632467 Mon Sep 17 00:00:00 2001 From: Brian Somers Date: Mon, 3 May 1999 09:32:31 +0000 Subject: [PATCH] Add an additional probe, hopefully allowing me to distinguish between the PC/Xi and PC/Xem boards. Now all I need is for someone with a PC/Xem to tell me what the probe says.... --- sys/dev/dgb/dgm.c | 16 ++++++++++------ sys/gnu/i386/isa/dgm.c | 16 ++++++++++------ 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/sys/dev/dgb/dgm.c b/sys/dev/dgb/dgm.c index c9d9cab943c..e274ea70f7e 100644 --- a/sys/dev/dgb/dgm.c +++ b/sys/dev/dgb/dgm.c @@ -1,5 +1,5 @@ /*- - * $Id: dgm.c,v 1.10 1999/04/28 10:51:58 dt Exp $ + * $Id: dgm.c,v 1.11 1999/05/02 21:39:52 peter Exp $ * * This driver and the associated header files support the ISA PC/Xem * Digiboards. Its evolutionary roots are described below. @@ -416,9 +416,16 @@ dgmprobe(dev) /* check type of card and get internal memory characteristics */ - v=inb(sc->port); + v = inb(sc->port); - printf("dgm%d: PC/Xem\n",dev->id_unit); + if (!(v & 0x1)) { + int second; + + outb(sc->port, 1); + second = inb(sc->port); + printf("dgm%d: PC/Xem (type %d, %d)\n", dev->id_unit, v, second); + } else + printf("dgm%d: PC/Xem (type %d)\n", dev->id_unit, v); sc->type=PCXEM; sc->mem_seg=0x8000; @@ -659,8 +666,6 @@ dgmattach(dev) shrinkmem=0; } -/* HERE */ - port->txptr=mem+( ((bc->tseg)<<4) & 0x7FFF ); port->rxptr=mem+( ((bc->rseg)<<4) & 0x7FFF ); port->txwin=FEPWIN | ((bc->tseg)>>11); @@ -1886,7 +1891,6 @@ dgmstart(tp) setwin(sc,0); head=bc->tin & wmask; -/*HERE*/ do { tail=bc->tout; } while (tail != bc->tout); tail=bc->tout & wmask; diff --git a/sys/gnu/i386/isa/dgm.c b/sys/gnu/i386/isa/dgm.c index c9d9cab943c..e274ea70f7e 100644 --- a/sys/gnu/i386/isa/dgm.c +++ b/sys/gnu/i386/isa/dgm.c @@ -1,5 +1,5 @@ /*- - * $Id: dgm.c,v 1.10 1999/04/28 10:51:58 dt Exp $ + * $Id: dgm.c,v 1.11 1999/05/02 21:39:52 peter Exp $ * * This driver and the associated header files support the ISA PC/Xem * Digiboards. Its evolutionary roots are described below. @@ -416,9 +416,16 @@ dgmprobe(dev) /* check type of card and get internal memory characteristics */ - v=inb(sc->port); + v = inb(sc->port); - printf("dgm%d: PC/Xem\n",dev->id_unit); + if (!(v & 0x1)) { + int second; + + outb(sc->port, 1); + second = inb(sc->port); + printf("dgm%d: PC/Xem (type %d, %d)\n", dev->id_unit, v, second); + } else + printf("dgm%d: PC/Xem (type %d)\n", dev->id_unit, v); sc->type=PCXEM; sc->mem_seg=0x8000; @@ -659,8 +666,6 @@ dgmattach(dev) shrinkmem=0; } -/* HERE */ - port->txptr=mem+( ((bc->tseg)<<4) & 0x7FFF ); port->rxptr=mem+( ((bc->rseg)<<4) & 0x7FFF ); port->txwin=FEPWIN | ((bc->tseg)>>11); @@ -1886,7 +1891,6 @@ dgmstart(tp) setwin(sc,0); head=bc->tin & wmask; -/*HERE*/ do { tail=bc->tout; } while (tail != bc->tout); tail=bc->tout & wmask;