summaryrefslogtreecommitdiffstats
path: root/sys/dev/dgb
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1998-04-21 21:06:57 +0000
committerbrian <brian@FreeBSD.org>1998-04-21 21:06:57 +0000
commit7914b665ae42ef64075912c42a8457c8d4fadff2 (patch)
treef5398a67eb98de7051ebfb51ed5d7742c1d152b5 /sys/dev/dgb
parentc38ab8d4d99a1e2287b26e3b4ca4bff00fff9fb3 (diff)
downloadFreeBSD-src-7914b665ae42ef64075912c42a8457c8d4fadff2.zip
FreeBSD-src-7914b665ae42ef64075912c42a8457c8d4fadff2.tar.gz
- breakage of the warnings about pessimized i/o port types.
- pessimized i/o port types. - other pessimized types. - Don't use DEBUG (causes LINT warnings). Use DGB_DEBUG instead. - commented out code. - cloned code that doesn't apply ("Smarts" is for the cy driver only). Submitted by: bde
Diffstat (limited to 'sys/dev/dgb')
-rw-r--r--sys/dev/dgb/dgb.c39
-rw-r--r--sys/dev/dgb/dgreg.h4
2 files changed, 12 insertions, 31 deletions
diff --git a/sys/dev/dgb/dgb.c b/sys/dev/dgb/dgb.c
index ac85d85..27ee53b 100644
--- a/sys/dev/dgb/dgb.c
+++ b/sys/dev/dgb/dgb.c
@@ -1,5 +1,5 @@
/*-
- * dgb.c $Id: dgb.c,v 1.33 1998/04/21 02:39:48 brian Exp $
+ * dgb.c $Id: dgb.c,v 1.34 1998/04/21 21:06:22 brian Exp $
*
* Digiboard driver.
*
@@ -67,14 +67,9 @@
#include <gnu/i386/isa/dgbios.h>
#include <gnu/i386/isa/dgfep.h>
-#define DEBUG
-#include <gnu/i386/isa/dgreg.h>
-/* This avoids warnings: we're an isa device only
- * so it does not matter...
- */
-#undef outb
-#define outb outbv
+#define DGB_DEBUG /* Enable debugging info via sysctl */
+#include <gnu/i386/isa/dgreg.h>
#define CALLOUT_MASK 0x80
#define CONTROL_MASK 0x60
@@ -171,8 +166,8 @@ struct dgb_softc {
u_char unit; /* unit number */
u_char type; /* type of card: PCXE, PCXI, PCXEVE */
u_char altpin; /* do we need alternate pin setting ? */
- ushort numports; /* number of ports on card */
- ushort port; /* I/O port */
+ int numports; /* number of ports on card */
+ int port; /* I/O port */
u_char *vmem; /* virtual memory address */
long pmem; /* physical memory address */
int mem_seg; /* internal memory segment */
@@ -193,7 +188,6 @@ static struct tty dgb_tty[NDGBPORTS];
/* Interrupt handling entry points. */
static void dgbpoll __P((void *unit_c));
-/*static void dgbintr __P((int unit));*/
/* Device switch entry points. */
#define dgbreset noreset
@@ -309,9 +303,10 @@ dgbflags(struct dbgflagtbl *tbl, tcflag_t input)
return output;
}
+#ifdef DGB_DEBUG
static int dgbdebug=0;
-SYSCTL_INT(_debug, OID_AUTO, dgb_debug, CTLFLAG_RW,
- &dgbdebug, 0, "");
+SYSCTL_INT(_debug, OID_AUTO, dgb_debug, CTLFLAG_RW, &dgbdebug, 0, "");
+#endif
static __inline int setwin __P((struct dgb_softc *sc, unsigned addr));
static __inline int setinitwin __P((struct dgb_softc *sc, unsigned addr));
@@ -321,8 +316,8 @@ static __inline void towin __P((struct dgb_softc *sc, int win));
/*Helg: to allow recursive dgb...() calls */
typedef struct
{ /* If we were called and don't want to disturb we need: */
- short port, /* write to this port */
- data; /* this data on exit */
+ int port; /* write to this port */
+ u_char data; /* this data on exit */
/* or DATA_WINOFF to close memory window on entry */
} BoardMemWinState; /* so several channels and even boards can coexist */
#define DATA_WINOFF 0
@@ -1569,15 +1564,6 @@ dgbpoll(unit_c)
timeout(dgbpoll, unit_c, hz/POLLSPERSEC);
}
-
-#if 0
-static void
-dgbintr(unit)
- int unit;
-{
-}
-#endif
-
static int
dgbioctl(dev, cmd, data, flag, p)
dev_t dev;
@@ -2328,11 +2314,6 @@ disc_optim(tp, t)
struct tty *tp;
struct termios *t;
{
- /*
- * XXX can skip a lot more cases if Smarts. Maybe
- * (IGNCR | ISTRIP | IXON) in c_iflag. But perhaps we
- * shouldn't skip if (TS_CNTTB | TS_LNCH) is set in t_state.
- */
if (!(t->c_iflag & (ICRNL | IGNCR | IMAXBEL | INLCR | ISTRIP | IXON))
&& (!(t->c_iflag & BRKINT) || (t->c_iflag & IGNBRK))
&& (!(t->c_iflag & PARMRK)
diff --git a/sys/dev/dgb/dgreg.h b/sys/dev/dgb/dgreg.h
index 9d339e5..8b520fb 100644
--- a/sys/dev/dgb/dgreg.h
+++ b/sys/dev/dgb/dgreg.h
@@ -1,5 +1,5 @@
/*-
- * dgreg.h $Id$
+ * dgreg.h $Id: dgreg.h,v 1.7 1997/02/22 09:29:43 peter Exp $
*
* Digiboard driver.
*
@@ -359,7 +359,7 @@ struct channel {
/* debugging printout */
-#ifdef DEBUG
+#ifdef DGB_DEBUG
#define DPRINT1(l,a1) (dgbdebug&l ? printf(a1) : 0)
#define DPRINT2(l,a1,a2) (dgbdebug&l ? printf(a1,a2) : 0)
#define DPRINT3(l,a1,a2,a3) (dgbdebug&l ? printf(a1,a2,a3) : 0)
OpenPOWER on IntegriCloud