Re: [PARPORT] ppdev hangs on read

From: Tim Waugh (twaugh@redhat.com)
Date: Sun Oct 13 2002 - 12:13:41 EDT

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

    On Thu, Oct 10, 2002 at 09:31:38PM +0200, VOLTZ Stéphane wrote:

    > Here's the end of the strace:
    >
    >
    > ioctl(3, PPWDATA, 0xbffff39f) = 0
    > ioctl(3, PPWDATA, 0xbffff39f) = 0
    > ioctl(3, PPWDATA, 0xbffff39f) = 0
    > ioctl(3, PPWDATA, 0xbffff39f) = 0
    > ioctl(3, PPWDATA, 0xbffff39f) = 0
    > ioctl(3, PPRCONTROL, 0xbffff3a3) = 0
    > ioctl(3, PPRCONTROL, 0xbffff3a3) = 0
    > ioctl(3, PPWCONTROL, 0xbffff39f) = 0
    > ioctl(3, PPWCONTROL, 0xbffff39f) = 0
    > ioctl(3, PPRCONTROL, 0xbffff3a3) = 0
    > ioctl(3, PPWCONTROL, 0xbffff39f) = 0
    > ioctl(3, PPWCONTROL, 0xbffff39f) = 0
    > ioctl(3, PPWCONTROL, 0xbffff39f) = 0
    > ioctl(3, PPWCONTROL, 0xbffff39f) = 0
    > ioctl(3, PPWDATA, 0xbffff39f) = 0
    > ioctl(3, PPWDATA, 0xbffff39f) = 0
    > ioctl(3, PPWCONTROL, 0xbffff39f) = 0
    > ioctl(3, PPWDATA, 0xbffff7df) = 0
    > ioctl(3, PPWCONTROL, 0xbffff7df) = 0
    > ioctl(3, PPSETMODE, 0xbffff81c) = 0
    > write(3, "J", 1) = 0
    > ioctl(3, PPSETMODE, 0xbffff81c) = 0
    > write(3, "\0", 1) = 0
    > ioctl(3, PPSETMODE, 0xbffff818) = 0
    > write(3, "\r", 1) = 0
    > ioctl(3, PPDATADIR, 0xbffff818) = 0
    > ioctl(3, PPSETMODE, 0xbffff818) = 0
    > read(3, 0xbffff816, 1) = ? ERESTARTSYS (To be restarted)
    > --- SIGTERM (Terminated) ---
    > +++ killed by SIGTERM +++
    >
    >
    > And here's the affected code:
    >
    > breg = (unsigned char) (reg);
    > mode = IEEE1284_MODE_EPP | IEEE1284_ADDR;
    > rc = ioctl (fd, PPSETMODE, &mode);
    > if (rc)
    > DBG (0, "ppdev ioctl returned <%s> (%s:%d)\n", strerror (errno),
    > __FILE__, __LINE__);
    > rc = write (fd, &breg, 1);
    >
    > mode = 1; /* data_reverse */
    > rc = ioctl (fd, PPDATADIR, &mode);
    >
    > mode = IEEE1284_MODE_EPP | IEEE1284_DATA;
    > rc = ioctl (fd, PPSETMODE, &mode);
    > if (rc)
    > DBG (0, "ppdev ioctl returned <%s> (%s:%d)\n", strerror (errno),
    > __FILE__, __LINE__);
    > rc = read (fd, &bval, 1);
    > value = bval;
    >
    > mode = 0; /* forward */
    > rc = ioctl (fd, PPDATADIR, &mode); /* program blocks here */

    I think you mean that it blocks at the read(), a few lines above that.

    > Any suggestion ?

    Not really. You said that 'EPP' works but 'ECP+EPP' doesn't (in the
    BIOS). What are the 'dmesg' lines that parport logs for each of
    these?

    Tim.
    */



    -- 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 : Sun Oct 13 2002 - 12:20:45 EDT