Re: [PARPORT] ppdev hangs on read

From: stef (svoltz@wanadoo.fr)
Date: Mon Nov 04 2002 - 02:08:36 EST

  • Next message: Tou Nou Thao: "[PARPORT] reading/writing to the parallel port"

    On Sat, Nov 02, 2002 at 06:08:32PM +0000, Tim Waugh wrote:
    > On Mon, Oct 28, 2002 at 09:05:25AM +0100, stef wrote:
    >
    > > After putting some debug messages, I get:
    > > Oct 28 08:44:51 xxxx kernel: parport_pc_epp_read_data(1) called
    > > Oct 28 08:44:51 xxxx kernel: parport_pc_epp_read_data timeout
    > > Oct 28 08:44:51 xxxx kernel: parport_pc_epp_read_data return 0 bytes
    > > Oct 28 08:44:51 xxxx kernel: ppdev: pp_read (fct=2) data got 0 bytes
    >
    > Was that with O_NONBLOCK set or not? We need both, to compare.

            O_NONBLOCK was not set.

    >
    > Tim.
    > */

            With O_NONBLOCK set, I get some timeouts:

    .....
    Nov 4 07:28:45 xxxx kernel: parport_pc_epp_read_data return 1 bytes
    Nov 4 07:28:45 xxxx kernel: parport_pc_epp_read_data(1) called
    Nov 4 07:28:45 xxxx kernel: parport_pc_epp_read_data timeout
    Nov 4 07:28:45 xxxx kernel: parport_pc_epp_read_data return 0 bytes
    Nov 4 07:28:45 xxxx kernel: parport_pc_epp_read_data(1) called
    Nov 4 07:28:45 xxxx kernel: parport_pc_epp_read_data return 1 bytes
    ......

            But since non blocking mode is set, we do not loop in pp_read. The resulting
    short read is ignored by the scanner backend (I'll have to add some error checks)
    without any harm.

    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 : Mon Nov 04 2002 - 02:15:07 EST