lp driver for microport unix SYS V (LONG)

John Plocher plocher%sally at Sun.COM
Tue May 9 08:35:18 AEST 1989


+---- In <536 at bilver.UUCP> bill vermillion writes:
| +---- In <427 at 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



More information about the Comp.unix.microport mailing list