Orinoco_cs quit working, RequestIRQ: Resource in use

Pavel Roskin proski at gnu.org
Wed Nov 12 00:00:00 GMT 2003


On Fri, 7 Nov 2003, Russell King wrote:

> On Thu, Nov 06, 2003 at 04:14:33PM -0800, Penelope Fudd wrote:
> > I'm upgrading this Dell Inspiron 7500, RedHat 9 system to the 2.6
> > kernel, and it's almost all working.  All, except for my wireless
> > card(s).
>
> RTFWP. (Read the fine web page)  See the URL below.

There were 3 URLs before.  The right one is
http://lists.infradead.org/mailman/listinfo/linux-pcmcia

But I don't think the reason is missing CONFIG_ISA.  Maybe it's the IRQ
problem with TI bridges.  Note this line from the original message:

 11:          0          XT-PIC  Texas Instruments PCI1225, Texas
Instruments PCI1225 (#2)

The interrupt count is zero.  2.4.21 with Red Hat patches may have my
patch for Ti, but the latest 2.6 kernels have it disabled.

I believe the last version of my patch is correct.  I didn't have a chance
to test it on adapters with two sockets, but it's still much better
than nothing.  Penelope, I'll be glad to help you if my patch fixes
the problem only in one of the sockets.  I'll appreciate the kernel log
(as shown by dmesg) even if everything works or nothing seems to change.

Also, my patch does affect ti12xx and ti14xx models but not ti11xx.
That's intentional.  ti11xx need a separate fix because it doesn't have
the irqmux register.  Perhaps it only needs changes in
TI113X_DEVICE_CONTROL.  It's easy to do, but I don't have enough knowledge
to make sure it's safe (i.e. we need another sign that the card is in a
definitely _improper_ state).

The patch against 2.6.0-test9 is attached.  The only difference from the
previous version is in a comment.

As a side note, I tried to program EEPROM on my ti1410, and found that
it's present on the board, but doesn't appear to work.  VPPD0 and VPPD1
are connected to a little chip (almost the same size as EEPROM) instead of
resistors.  MFUNC1 and MFUNC4 are connected to the serial EEPROM.
Reading from EEPROM didn't work.  Writing to EEPROM put the adapter to
such state that I could only boot with pci=off.  Fortunately, power cycle
fixed this.

In short, we cannot rely on EEPROM.  If irqmux is uninitialized, we must
do something anyway, at least warn the user.  Setting irqmux to PCI
interrupt delivery looks reasonable because we don't know of any devices
requiring ISA interrupts (serial or parallel) but not initialized properly
by BIOS or EEPROM.

-- 
Regards,
Pavel Roskin
-------------- next part --------------
--- linux.orig/drivers/pcmcia/ti113x.h
+++ linux/drivers/pcmcia/ti113x.h
@@ -281,33 +281,6 @@
 
 	ti_set_zv(socket);
 
-#if 0
-	/*
-	 * If ISA interrupts don't work, then fall back to routing card
-	 * interrupts to the PCI interrupt of the socket.
-	 *
-	 * Tweaking this when we are using serial PCI IRQs causes hangs
-	 *   --rmk
-	 */
-	if (!socket->socket.irq_mask) {
-		u8 irqmux, devctl;
-
-		devctl = config_readb(socket, TI113X_DEVICE_CONTROL);
-		if ((devctl & TI113X_DCR_IMODE_MASK) != TI12XX_DCR_IMODE_ALL_SERIAL) {
-			printk (KERN_INFO "ti113x: Routing card interrupts to PCI\n");
-
-			devctl &= ~TI113X_DCR_IMODE_MASK;
-
-			irqmux = config_readl(socket, TI122X_IRQMUX);
-			irqmux = (irqmux & ~0x0f) | 0x02; /* route INTA */
-			irqmux = (irqmux & ~0xf0) | 0x20; /* route INTB */
-
-			config_writel(socket, TI122X_IRQMUX, irqmux);
-			config_writeb(socket, TI113X_DEVICE_CONTROL, devctl);
-		}
-	}
-#endif
-
 	return 0;
 }
 
@@ -347,6 +320,33 @@
 	printk(KERN_INFO "Yenta: Routing CardBus interrupts to %s\n",
 		(val & TI1250_DIAG_PCI_IREQ) ? "PCI" : "ISA");
 
+	/*
+	 * If ISA interrupts don't work, fall back to routing card
+	 * interrupts to the PCI bus.  Only do it if multifunction
+	 * routing register (irqmux) is in the default state, i.e.
+	 * it wasn't initialized from EEPROM.
+	 */
+	if (!socket->socket.irq_mask) {
+		u32 irqmux;
+
+		irqmux = config_readl(socket, TI122X_IRQMUX);
+
+		if (irqmux == 0) {
+			u8 devctl;
+
+			printk (KERN_INFO "ti113x: Uninitialized IRQ routing "
+				"detected, enabling PCI interrupts\n");
+
+			/* Route INTA to MFUNC0 */
+			config_writel(socket, TI122X_IRQMUX, 0x02);
+
+			/* Enable parallel PCI interrupts */
+			devctl = config_readb(socket, TI113X_DEVICE_CONTROL);
+			devctl &= ~TI113X_DCR_IMODE_MASK;
+			config_writeb(socket, TI113X_DEVICE_CONTROL, devctl);
+		}
+	}
+
 	return ti_override(socket);
 }
 
@@ -366,26 +366,6 @@
 		config_writeb(socket, TI1250_DIAGNOSTIC, diag);
 	}
 
-#if 0
-	/*
-	 * This is highly machine specific, and we should NOT touch
-	 * this register - we have no knowledge how the hardware
-	 * is actually wired.
-	 *
-	 * If we're going to do this, we should probably look into
-	 * using the subsystem IDs.
-	 *
-	 * On ThinkPad 380XD, this changes MFUNC0 from the ISA IRQ3
-	 * output (which it is) to IRQ2.  We also change MFUNC1
-	 * from ISA IRQ4 to IRQ6.
-	 */
-	irqmux = config_readl(socket, TI122X_IRQMUX);
-	irqmux = (irqmux & ~0x0f) | 0x02; /* route INTA */
-	if (!(ti_sysctl(socket) & TI122X_SCR_INTRTIE))
-		irqmux = (irqmux & ~0xf0) | 0x20; /* route INTB */
-	config_writel(socket, TI122X_IRQMUX, irqmux);
-#endif
-
 	return ti12xx_override(socket);
 }
 


More information about the linux-pcmcia mailing list