Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!purdue!ames!oliveb!sun!sally!plocher From: plocher%sally@Sun.COM (John Plocher) Newsgroups: comp.unix.microport Subject: Re: lp driver for microport unix SYS V (LONG) Summary: Interrupts Message-ID: <103721@sun.Eng.Sun.COM> Date: 8 May 89 22:35:18 GMT References: <12503@ut-emx.UUCP> <102496@sun.Eng.Sun.COM> <427@cutsys.UUCP> <536@bilver.UUCP> Sender: news@sun.Eng.Sun.COM Reply-To: plocher@sun.UUCP (John Plocher) Organization: Sun Microsystems, Mountain View Lines: 73 +---- In <536@bilver.UUCP> bill vermillion writes: | +---- In <427@cutsys.UUCP> Bernie Hoffstadt writes: | | And how about all those parallel cards I've tried that cause a delay | | between printing each line under Unix, but work fine under Dos? | +---- | Delays in printing are not just a Unix problem. I have seen it on SCO's | I suspect it is something in the orignal sources supplied to uPort, SCO, and +---- The problem is related to interrupts: lp0 and lp1 both use interrupt 7 (lp2 uses interrupt 5) some parallel ports on Herc clones do not generate interrupts (correctly) The microport driver conceptually works as follows: OPEN Enable the port interrupts timeout(1 second, watchdog, device) WRITE loop till no more data dump text out till status = notready sleep( on something relating to this device) endloop INTR (Generated on the transition from notready to ready) wakeup( ...device) WATCHDOG (called once a second) wakeup( ...device) timeout(1 second, watchdog, device) CLOSE disable INTR and watchdog It does NOT do reliable interrupt sharing for lp0 and lp1. If interrupts are working the flow is: open turn on intr and watchdog write dump text till not ready sleep wakeup( BY INTERRUPT from printer) dump text till not ready sleep wakeup( BY INTERRUPT from printer) done with this "write" return close turn off intr and watchdog If interrupts are NOT working the flow is: open turn on intr and watchdog write dump text till not ready sleep watchdog activated because no interrupt for 1 second wakeup( by WATCHDOG) dump text till not ready sleep watchdog activated because no interrupt for 1 second wakeup( by WATCHDOG) done with this "write" return close turn off intr and watchdog -------- -John Plocher