Philip Blundell (philb@gnu.org)
Sat, 20 Mar 1999 13:16:11 +0000
>What I've done to cope with signals is to set "abort" in the new task_data
>struct to 1, and use the running count in task_data as the number of bytes
>that have been transferred. The idea is that the low-level driver makes
>sure that task_data.count is always correct when task_data.abort is set.
If I interrupt printing with ^C I now get something like this:
parport1: Using compatibility mode
parport1: Operation interrupted at 240
parport1: wrote 240/512 bytes
parport1: lp released parport while in use!
To deal with this and make sure the count is right, I think there maybe needs
to be an explicit synchronisation call into the low-level driver rather than
just setting td->abort and hoping for the best. The good news is that I
haven't had a crash yet. :-)
The thing about writing to non-responding devices not being correctly
interrupted may have been a red herring. If /dev/lp0 is my QuickCam and I do:
$ dd if=/dev/zero of=/dev/lp0
then I can interrupt the operation with no problems. But if I do
$ echo >/dev/lp0
then the only way to stop it seems to be to use kill -9. From dmesg and
strace it seems that SIGINT is being correctly delivered and the write is
returning but bash is deciding to immediately retry it.
BTW, I tried setting my onboard parallel port to `ECP+EPP' mode in the BIOS.
I now get this:
0x278: FIFO is 16 bytes
0x278: readIntrThreshold is 1
0x278: writeIntrThreshold is 1
0x278: PWord is 8 bits
0x278: Interrupts are ISA-Pulses
parport1: PC-style at 0x278 (0x678) [SPP,ECP,ECPEPP,ECPPS2]
parport1: cpp_daisy: aa5500ff(98)
assign_addrs: aa5500ff(98)
parport1: In mode 0x04
parport1: Using nibble mode
parport1: Nibble timeout at event 9 0
parport1: In compatibility (forward idle) mode
I'm not sure if the device ID having stopped working again is caused by this
or just coincidental. Unfortunately the printer I have here doesn't seem to
support readback, ECP mode or anything exciting like that. I'll have to try
to half-inch the Laserjet again and see if it's any better.
p.
-- To unsubscribe, send mail to: linux-parport-request@torque.net --
-- with the single word "unsubscribe" in the body of the message. --
This archive was generated by hypermail 2.0b3 on Sun 28 Mar 1999 - 17:04:02 EST