[PARPORT] Non-interrupting PIO for PPF and ECP modes

From: Tom Perkins (tomp@trperkins.2y.net)
Date: Sat Nov 24 2001 - 19:48:47 EST

  • Next message: Tim Waugh: "Re: [PARPORT] Non-interrupting PIO for PPF and ECP modes"

    Hi Tim and All,

    Per Tim's suggestion I've been working on code to provide PPF and ECP
    PIO support with no reliance on interrupts. I've been working against
    the parport_pc modules in 2.4.14. I've reached a point where I need
    some questions answered.

    In the function parport_pc_compat_write_block_pio

    1.) The setting of the phase to FWD_DATA and FWD_DATA_IDLE would seem
    incorrect?

    2.) Changing the mode to ECR_TST looks illegal -- Violates the rule that
    ECR_PS2 must be visited first? This code is the same for the
    ecp_write_block code. In the MS version of 1284 spec I thought a
    control single STROBE was used to stop transfer? Is this correct and
    what should be used for compat_write_block?

    CODE FRAGMENTS:

    /* Parallel Port FIFO mode (ECP chipsets) */
    size_t parport_pc_compat_write_block_pio (struct parport *port,

            .
            .
            .

            port->physport->ieee1284.phase = IEEE1284_PH_FWD_DATA; <----???

            .
            .
            .

                    printk (KERN_DEBUG "%s: FIFO is stuck\n", port->name);

                    /* Prevent further data transfer. */
                    frob_econtrol (port, 0xe0, ECR_TST << 5); <--------????
            .
            .
            .

            port->physport->ieee1284.phase = IEEE1284_PH_FWD_IDLE; <----??

            .
            .
            .

            return written;
    }

    Regards,
    Tom

    -- 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 : Sat Nov 24 2001 - 19:56:54 EST