RFC: removing irq_mask and irq_list from client drivers

Pavel Roskin proski at gnu.org
Fri Apr 23 19:28:40 BST 2004


Hello!

I wonder if anybody still needs irq_mask and irq_list parameters used in
all client drivers.  Their purpose is to set possible ISA IRQs for the
card.  The mask is assigned to link->irq.IRQInfo2, which is then combined
with the IRQ map in the driver.

I think most cards should be fine with whatever interrupt they get.  In
fact, dump_cis shows "irq mask 0xffff [level] [pulse]" for every card I
have tested.  The list of allowed IRQs list can already be set by the user
in /etc/pcmcia/config.opts.  I don't see any reason for a card (unless
it's a really old, broken card) to avoid specific IRQs that both the user
and the driver consider available.

The reason I'm asking is because I'm a co-maintainer of Orinoco driver and
I want to convert it to the new style module parameters.  We maintain a
separate branch that is compatible with 2.4 kernels.  This is needed to
attract more testers.

The compatibility header will provide module_param replacement macro.
However, providing backward compatibility for a module_param_array would
be tricky if possible at all.  Using several ifdefs would mean even more
cruft in the compatibility branch.

The patch I'm going to apply is attached.  I'd like to hear objection if
any.  If the patch is OK, similar patches could be applied to other PCMCIA
drivers.

-- 
Regards,
Pavel Roskin
-------------- next part --------------
--- orinoco_cs.c
+++ orinoco_cs.c
@@ -54,18 +54,9 @@ MODULE_LICENSE("Dual MPL/GPL");
 
 /* Module parameters */
 
-/* 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 */
-static uint irq_mask = 0xdeb8;
-/* Newer, simpler way of listing specific interrupts */
-static int irq_list[4] = { -1 };
-
 /* Some D-Link cards have buggy CIS. They do work at 5v properly, but
  * don't have any CIS entry for it. This workaround it... */
 static int ignore_cis_vcc; /* = 0 */
-
-MODULE_PARM(irq_mask, "i");
-MODULE_PARM(irq_list, "1-4i");
 MODULE_PARM(ignore_cis_vcc, "i");
 MODULE_PARM_DESC(ignore_cis_vcc, "Allow voltage mismatch between card and socket");
 
@@ -164,7 +155,7 @@ orinoco_cs_attach(void)
 	struct orinoco_pccard *card;
 	dev_link_t *link;
 	client_reg_t client_reg;
-	int ret, i;
+	int ret;
 
 	dev = alloc_orinocodev(sizeof(*card), orinoco_cs_hard_reset);
 	if (! dev)
@@ -179,11 +170,7 @@ orinoco_cs_attach(void)
 	/* Interrupt setup */
 	link->irq.Attributes = IRQ_TYPE_EXCLUSIVE | IRQ_HANDLE_PRESENT;
 	link->irq.IRQInfo1 = IRQ_INFO2_VALID | IRQ_LEVEL_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];
+	link->irq.IRQInfo2 = 0xffffffff;	/* Any ISA IRQ */
 	link->irq.Handler = orinoco_interrupt;
 	link->irq.Instance = dev; 
 


More information about the linux-pcmcia mailing list