[PARPORT] [patch] 2.4.0-test13-pre1: parport_pc 'hardware' parameter

From: Tim Waugh (twaugh@redhat.com)
Date: Fri Dec 15 2000 - 12:00:19 EST

  • Next message: Philip Blundell: "Re: [PARPORT] [patch] 2.4.0-test13-pre1: parport_pc 'hardware' parameter"

    Does anyone object to this patch?

    Tim.
    */

    --- linux-2.4.0-test13-pre1+/drivers/parport/ChangeLog.hardware Fri Dec 15 12:24:36 2000
    +++ linux-2.4.0-test13-pre1+/drivers/parport/ChangeLog Fri Dec 15 16:58:12 2000
    @@ -0,0 +1,5 @@
    +2000-12-15 Tim Waugh <twaugh@redhat.com>
    +
    + * parport_pc.c: New module parameter 'hardware'. Set to 0 to
    + disable the effect of CONFIG_PARPORT_PC_FIFO.
    +
    --- linux-2.4.0-test13-pre1+/drivers/parport/parport_pc.c.hardware Fri Dec 15 12:24:36 2000
    +++ linux-2.4.0-test13-pre1+/drivers/parport/parport_pc.c Fri Dec 15 16:58:12 2000
    @@ -89,6 +89,7 @@
     } superios[NR_SUPERIOS] __devinitdata = { {0,},};
     
     static int user_specified __devinitdata = 0;
    +static int hardware __devinitdata = 1;
     
     /* frob_control, but for ECR */
     static void frob_econtrol (struct parport *pb, unsigned char m,
    @@ -2805,7 +2806,7 @@
                     p->dma = PARPORT_DMA_NONE;
     
     #ifdef CONFIG_PARPORT_PC_FIFO
    - if (p->dma != PARPORT_DMA_NOFIFO &&
    + if (hardware && 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
    @@ -3423,6 +3424,25 @@
     MODULE_PARM(irq, "1-" __MODULE_STRING(PARPORT_PC_MAX_PORTS) "s");
     MODULE_PARM_DESC(dma, "DMA channel");
     MODULE_PARM(dma, "1-" __MODULE_STRING(PARPORT_PC_MAX_PORTS) "s");
    +
    +/* The parameters that this module accepts come from two different places:
    + * - when built as a module, io, io_hi, irq, and dma come from the above
    + * declarations
    + * - when built statically into the kernel, "parport=" is handled by
    + * code in parport_init.c.
    + *
    + * The initialisation function (parport_pc_init) gets _passed_ the arrays
    + * of I/O base address and interrupts etc., and so it doesn't know the
    + * difference.
    + *
    + * The "parport=" method does not know about anything but I/O base addresses,
    + * interrupts, and DMA channels, and so can't pass us anything more.
    + * Module parameter declarations past this point only work when parport_pc
    + * is built as a module, and can't be set using the "parport=" method.
    + */
    +
    +MODULE_PARM_DESC(fifo, "Use PIO/DMA or not");
    +MODULE_PARM(hardware, "i");
     
     int init_module(void)
     {

    -- 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 Dec 15 2000 - 12:02:10 EST