Re: [PARPORT] ppdev hangs on read

From: stef (svoltz@wanadoo.fr)
Date: Thu Oct 24 2002 - 01:45:16 EDT

  • Next message: Tim Waugh: "Re: [PARPORT] ppdev hangs on read"

    On Wed, Oct 23, 2002 at 10:01:15AM +0100, Tim Waugh wrote:
    > On Wed, Oct 23, 2002 at 07:16:10AM +0200, stef wrote:
    >
    > > The are also a few lines changed in parport_pc.c regard non
    > > blocking read changes. Would it be an interesting test to back out
    > > these changes, or will this fail due changes in timeout handling ?
    >
    > By all means, but I don't think that they affect EPP operations. The
    > most useful test would be to put printks in at various places starting
    > at ppdev.c so we can find out what read functions are returning what
    > and why.
    >
    > The fact that setting O_NONBLOCK causes it to start working means that
    > something isn't working right. The loop in ppdev.c is:
    >
    > 1. mark the device's timeout as 'never' if O_NONBLOCK is set
    > 2. call parport_read
    > 3. if we got bytes, stop
    > 4. if O_NONBLOCK is set, stop
    > 5. loop to step 2
    >
    > The parport_read function just calls the appropriate read function in
    > the low-level driver (parport_pc in this case, which falls back on
    > ieee1284_ops if there's no hardware EPP support).
    >
    > And parport_pc's read functions for EPP didn't have any changes for
    > O_NONBLOCK. And neither did ieee1284_ops.
    >
    > Can someone try actually turning on all the DEBUG macros in the
    > parport code and adding printks to things like ppdev.c, parport_pc.c
    > and ieee1284_ops.c around EPP read code path, so we can actually see
    > what's going on?
    >
    > Tim.
    > */

            Here's the log with DEBUG defined in parport modules:

    parport0: PC-style at 0x278 [PCSPP,TRISTATE,EPP]
    parport0: Peripheral not IEEE1284 compliant (0x86)
    ppdev0: registered pardevice
    parport0: Peripheral not IEEE1284 compliant (0x86)
    parport0: Using EPP mode
    parport0: wrote 1/1 bytes
    .....
    parport0: wrote 1/1 bytes
    parport0: Using EPP mode
    parport0: wrote 1/1 bytes
    parport0: Using EPP mode
    parport0: wrote 1/1 bytes
    parport0: Using EPP mode
    parport0: wrote 1/1 bytes
    parport0: Using EPP mode
    parport0: wrote 1/1 bytes
    parport0: Using EPP mode
    parport0: wrote 0/1 bytes
    parport0: Using EPP mode
    parport0: wrote 0/1 bytes
    parport0: Using EPP mode
    parport0: wrote 0/1 bytes

            after changing debug message to show if it is data or addr we get:

    ....
    parport0: wrote 1/1 data bytes
    parport0: Using EPP mode
    parport0: wrote 1/1 addr bytes
    parport0: Using EPP mode
    parport0: wrote 1/1 addr bytes
    parport0: Using EPP mode
    parport0: wrote 1/1 data bytes
    parport0: Using EPP mode
    parport0: wrote 0/1 addr bytes
    parport0: Using EPP mode
    parport0: wrote 0/1 data bytes
    parport0: Using EPP mode
    parport0: wrote 0/1 addr bytes

            then adding some printk into parport_ieee1284_epp_write_addr gives no
    message. I am missing something there. So any advice is welcome.

    Regards,
            Stef

    -- 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 2b29 : Thu Oct 24 2002 - 01:52:02 EDT