- From: Ian Abbott <abbotti_at_mev.co.uk>
- Date: Fri, 09 Jun 2006 14:08:07 +0100
Hi Torben,
On 06/06/06 15:29, you wrote:
> mandag 05 juni 2006 11:36 skrev Ian Abbott:
> Before applying this patch, Ian Abbott's patch id=155 (see bug #221) should be
> applied.
[snip]
See comments below:
> diff -u -r ./comedi/drivers/ni_labpc_cs.c ../comedi-cvs20060516-labpc-patched/comedi/drivers/ni_labpc_cs.c
> --- ./comedi/drivers/ni_labpc_cs.c 2006-06-06 14:57:03.000000000 +0200
> +++ ../comedi-cvs20060516-labpc-patched/comedi/drivers/ni_labpc_cs.c 2006-06-06 14:55:47.000000000 +0200
> _at__at_ -144,7 +144,11 _at__at_
> */
> #ifdef PCMCIA_DEBUG
> static int pc_debug = PCMCIA_DEBUG;
> + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
> +module_param(pc_debug, int, 0444);
> + #else
> MODULE_PARM(pc_debug, "i");
> + #endif
> #define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args)
> static char *version =
> "ni_labpc.c, based on dummy_cs.c 1.31 2001/08/24 12:13:13";
> _at__at_ -158,13 +162,19 _at__at_
>
> /* The old way: bit map of interrupts to choose from */
> /* This means pick from 15, 14, 12, 11, 10, 9, 7, 5, 4, and 3 */
> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
> +static int irq_mask = 0xdeb8;
> +static int irq_list[4] = { -1 };
> +module_param(irq_mask, int, 0444);
> +module_param_array(irq_list, int, NULL, 0444);
> +#else
> static u_int irq_mask = 0xdeb8;
> /* Newer, simpler way of listing specific interrupts */
> static int irq_list[4] = { -1 };
>
> MODULE_PARM(irq_mask, "i");
> MODULE_PARM(irq_list, "1-4i");
> -
> +#endif
I raised bug #224 to deal with the module parameter stuff. The new
moduleparam.h compatibility header and the patch attached to that bug
should sort out module parameters. (The new compatibility header file
should be saved as "$COMEDI_TOP_LEVEL/include/linux/moduleparam.h" for
some value of $COMEDI_TOP_LEVEL.)
> /*====================================================================*/
>
> /*
> _at__at_ -300,11 +310,15 _at__at_
> #endif
> /* Interrupt setup */
> link->irq.Attributes = IRQ_TYPE_EXCLUSIVE | IRQ_FORCED_PULSE;
> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
> + link->irq.IRQInfo1 = IRQ_PULSE_ID;
> +#else
> link->irq.IRQInfo1 = IRQ_INFO2_VALID | IRQ_PULSE_ID;
> if (irq_list[0] == -1)
> link->irq.IRQInfo2 = irq_mask;
> else for (i = 0; i < 4; i++)
> link->irq.IRQInfo2 |= 1 << irq_list[i];
> +#endif
> link->irq.Handler = NULL;
>
> /*
I think it should still work if you omit this part of the patch, as
IRQInfo2 should be ignored anyway. Is it possible for you to test the
driver with the IRQInfo2 stuff left in for 2.6.16 to see if it still works?
I think I'll update my PCMCIA patches anyway to get rid of the IRQInfo2
stuff for 2.6.11 upwards. Thanks for the info!
--
-=( Ian Abbott _at_ MEV Ltd. E-mail: <abbotti_at_mev.co.uk> )=-
-=( Tel: +44 (0)161 477 1898 FAX: +44 (0)161 718 3587 )=-
Received on 2006-06-09Z12:08:07