Date: Sat, 20 Jan 2001 03:38:06 -0800 From: Peter Wemm <peter@netplex.com.au> To: Warner Losh <imp@harmony.village.org> Cc: cvs-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/i386/conf GENERIC Message-ID: <200101201138.f0KBc6k35368@mobile.wemm.org> In-Reply-To: <200101192017.f0JKHns55737@harmony.village.org>
index | next in thread | previous in thread | raw e-mail
Warner Losh wrote:
> *This message was transferred with a trial version of CommuniGate(tm) Pro*
> In message <200101191306.f0JD6bD25132@freefall.freebsd.org> Peter Wemm writes
:
> : At great personal risk to my sanity, turn off COMPAT_OLDISA and the
> : two drivers that depend on it - ie and le. The compat code has not been
> : disabled.
>
> There are still about a dozen drivers in the tree that depend on
> OLDISA, so it is premature to kill it completely.
>
> However, this is a good first step on that road.
>
> Warner
Have you looked at any of the stuff in sys/i386/isa lately? Some
of it is *so horrible* that it is almost unbearable.
Take a look at gpib.c for example:
/* Have memory for buffer? */
sc->sc_inbuf = malloc(BUFSIZE, M_DEVBUF, M_WAITOK);
if (sc->sc_inbuf == 0)
return(ENOMEM);
if (initgpib()) return(EBUSY);
sc->sc_flags |= OPEN;
sc->sc_count = 0;
oldcount=0;
if (unit!=0) { /*Someone is trying to access an actual device*/
/*So.. we'll address it to listen*/
enableremote(unit);
do {
status=inb(ISR2);
}
while (!(status&8)&&tsleep((caddr_t)&gpib_sc, GPIBPRI,"gpibpoll",1)==EWOULDBLOCK);
outb(CDOR,(unit&31)+32);/*address device to listen*/
do
status=inb(ISR2);
while (!(status&8)&&tsleep((caddr_t)&gpib_sc, GPIBPRI,"gpibpoll",1)==EWOULDBLOCK);
outb (CDOR,64); /*Address controller (me) to talk*/
do status=inb(ISR2);
while (!(status&8)&&tsleep((caddr_t)&gpib_sc, GPIBPRI,"gpibpoll",1)==EWOULDBLOCK);
outb(AUXMR,gts); /*Set to Standby (Controller)*/
do
status=inb(ISR1);
while (!(status&2)&&tsleep((caddr_t)&gpib_sc, GPIBPRI,"gpibpoll",1)==EWOULDBLOCK);
/*Set up the TURBO488 registers*/
outb(IMR2,0x30); /*we have to enable DMA (0x30) for turbo488 to work*/
outb(CNT0,0); /*NOTE this does not enable DMA to the host computer!!*/
outb(CNT1,0);
outb(CNT2,0);
outb(CNT3,0);
outb(CMDR,0x20);
outb(CFG,0x47); /* 16 bit, write, fifo B first, TMOE TIM */
outb(CMDR,0x10); /*RESET fifos*/
outb(CMDR,0x04); /*Tell TURBO488 to GO*/
}
return(0);
There is much much more, but this stuff is *truely* horrible.
Cheers,
-Peter
--
Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au
"All of this is for nothing if we don't go to the stars" - JMS/B5
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200101201138.f0KBc6k35368>
