[Fwd: [PARPORT] ECP, DMA, driver writing]

From: Derek Bouius (dbouius@abio.com)
Date: Fri Jun 23 2000 - 15:23:29 EDT

  • Next message: Richard Bonomo: "Re: [PARPORT] ECP, DMA, driver writing"

    I forgot to include the list name...

    --
    Derek Bouius     | American Biometric Company  | Tel:(613)736-5100x281
    dbouius@abio.com | 3429 Hawthorne Rd,Ottawa,ON | Fax:(613)736-1742
    

    attached mail follows:


    > I would like to see that.

    Ok, this is where my lack of patching skills become apparent...

    I changed ppdev.c to allocate the buffer as DMA but I am not sure if that is necessary. kbuffer = kmalloc (min (count, PP_BUFFER_SIZE), GFP_DMA );

    In parport_pc.c parport_pc_probe_port I added the line ending in // derek added

    #ifdef CONFIG_PARPORT_PC_FIFO if (p->dma != PARPORT_DMA_NOFIFO && priv->fifo_depth > 0 && p->irq != PARPORT_IRQ_NONE) { p->ops->compat_write_data = parport_pc_compat_write_block_pio; #ifdef CONFIG_PARPORT_1284 p->ops->ecp_write_data = parport_pc_ecp_write_block_pio; p->ops->ecp_read_data = parport_pc_ecp_read_block_pio; // derek added #endif /* IEEE 1284 support */

    Then add the following two lines in parport_pc.c into parport_pc_ecp_read_block_pio and comment out the ecp fifo while loop. This ends up making it always use dma. I know there are better ways, but it was a quick hack to try it out....

    if (port->dma != PARPORT_DMA_NONE) parport_pc_fifo_read_block_dma (port, buf, length);

    Then add the attached function (parport_pc_fifo_read_block_dma) into parport_pc.c

    I will try to find time to clean this up and do a proper patch against something more current, but that probably won't be this week.

    Hope this helps, Derek

    --
    Derek Bouius     | American Biometric Company  | Tel:(613)736-5100x281
    dbouius@abio.com | 3429 Hawthorne Rd,Ottawa,ON | Fax:(613)736-1742
    


    -- 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 : Fri Jun 23 2000 - 15:22:13 EDT