RE: [PARPORT] EPP Problems?

WODECKI, Victor (
Fri, 14 Jan 2000 10:42:46 +1030

>> If I insert, before the failing ioctl, the following
>> mode = IEEE1284_MODE_EPP
>> ioctl (fd, PPSETMODE, &mode)
>> then the failing ioctrl (PPNEGOT) now succeeds, although ppdev then
>> seems to get stuck in a loop when I do the actual write() of the
>> address.
> Try putting a delay after the open. I think there's a bug
> somewhere. How does write get stuck in a loop?

I put a 1/2 second delay between each step (open, setmode, negot, write),
but with no difference in results.

I eventually found where the driver is getting stuck, I don't
know if it's a bug or not. Taking a local copy of ppdev.c, and
adding tracewrites as required, showed that in pp_write(), the
  while (bytes_written < count)
    wrote = parport_write (...)
This loops indefinitely, as parport_write calls ieee1284_epp_write_addr,
which always returns zero, as the first poll_peripheral in the for()
loop returns non-zero. (Line #1294 of the unmodifed ppdev.c)

-- To unsubscribe, send mail to: --
-- with the single word "unsubscribe" in the body of the message. --

This archive was generated by hypermail 2.0b3 on Thu 13 Jan 2000 - 19:19:32 EST