Re: [PARPORT] ppdev and EPP mode

From: Tim Waugh (twaugh@redhat.com)
Date: Thu Apr 13 2000 - 04:47:42 EDT

  • Next message: Vince Weaver: "Re: [PARPORT] ppdev and EPP mode"

    On Wed, 12 Apr 2000, Vince Weaver wrote:

    > I am not sure what the intel bug is. If I comment that code out,
    > things aren't right either because then my port is detected as EPP the
    > first time around, and then things won't work.

    Hmm. The Intel bug is that basically the 'timeout' bit doesn't work
    properly, so you don't get any feedback about whether you lost data. David
    Campbell wrote that code originally, and I'm a bit hesitant to change it.

    I think it might be related to the EPP transfers going through the FIFO.

    > about the rest... I have to add a
    >
    > parport_pc_data_forward(pb);

    Oh, of course.

    > With this change, plus the "0x24" in front of reads, and now
    > everything works perfectly... Vince

    Here's the patch I'm about to send to Linus then.

    Tim.
    */

    Index: linux/drivers/parport/parport_pc.c
    diff -u linux/drivers/parport/parport_pc.c:1.1.1.29 linux/drivers/parport/parport_pc.c:1.51
    --- linux/drivers/parport/parport_pc.c:1.1.1.29 Thu Apr 13 09:12:48 2000
    +++ linux/drivers/parport/parport_pc.c Thu Apr 13 09:41:27 2000
    @@ -427,6 +427,8 @@
             size_t got;
     
             frob_econtrol (port, 0xe0, ECR_EPP << 5);
    + parport_pc_data_reverse (port);
    + parport_pc_write_control (port, 0x4);
             got = parport_pc_epp_read_data (port, buf, length, flags);
             frob_econtrol (port, 0xe0, ECR_PS2 << 5);
     
    @@ -440,6 +442,8 @@
             size_t written;
     
             frob_econtrol (port, 0xe0, ECR_EPP << 5);
    + parport_pc_write_control (port, 0x4);
    + parport_pc_data_forward (port);
             written = parport_pc_epp_write_data (port, buf, length, flags);
             frob_econtrol (port, 0xe0, ECR_PS2 << 5);
     
    @@ -452,6 +456,8 @@
             size_t got;
     
             frob_econtrol (port, 0xe0, ECR_EPP << 5);
    + parport_pc_data_reverse (port);
    + parport_pc_write_control (port, 0x4);
             got = parport_pc_epp_read_addr (port, buf, length, flags);
             frob_econtrol (port, 0xe0, ECR_PS2 << 5);
     
    @@ -465,6 +471,8 @@
             size_t written;
     
             frob_econtrol (port, 0xe0, ECR_EPP << 5);
    + parport_pc_write_control (port, 0x4);
    + parport_pc_data_forward (port);
             written = parport_pc_epp_write_addr (port, buf, length, flags);
             frob_econtrol (port, 0xe0, ECR_PS2 << 5);
     
    @@ -1733,7 +1741,7 @@
             oecr = inb (ECONTROL (pb));
             /* Search for SMC style EPP+ECP mode */
             outb (0x80, ECONTROL (pb));
    -
    + outb (0x04, CONTROL (pb));
             result = parport_EPP_supported(pb);
     
             outb (oecr, ECONTROL (pb));

    -- 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 Apr 13 2000 - 04:53:29 EDT