Skip to contentSkip to conversation

hang with pcmcia wlan card

DISCUSSION Jaakko Niemi 4 participants 12 messages Jul 11, 2003 – Jul 13, 2003 Pcmcia

lore
Share & tools
lore
#0 lore raw

Hi,

My laptop (thinkpad 570e) hangs hard straight after bringing up interface with d-link dwl-650 wlan card. 2.5.73-bk1 works and 2.5.73-bk2 to 2.5.75-bk1 hang. If I boot without the card, everything comes up, but inserting the card results to a hang. Setting nmi_watchdog=2 has no effect.

So, what to try next?

                        --j
#1 lore raw
Quoted 8 lines

Hi,

My laptop (thinkpad 570e) hangs hard straight after bringing up interface with d-link dwl-650 wlan card. 2.5.73-bk1 works and 2.5.73-bk2 to 2.5.75-bk1 hang. If I boot without the card, everything comes up, but inserting the card results to a hang. Setting nmi_watchdog=2 has no effect.

Ok, bit more info: same thing happens with edimax 8139 based cardbus nic also. I've disabled apm and acpi from kernel and going to start going through the pci changes between 2.5.73-bk1 and bk2. Any clues would be much appreciated.

                --j
#2 lore raw
Quoted 9 lines · Jaakko Niemi
Quoted 8 lines

Hi,

My laptop (thinkpad 570e) hangs hard straight after bringing up interface with d-link dwl-650 wlan card. 2.5.73-bk1 works and 2.5.73-bk2 to 2.5.75-bk1 hang. If I boot without the card, everything comes up, but inserting the card results to a hang. Setting nmi_watchdog=2 has no effect.

Quoted 4 lines

Ok, bit more info: same thing happens with edimax 8139 based cardbus nic also. I've disabled apm and acpi from kernel and going to start going through the pci changes between 2.5.73-bk1 and bk2. Any clues would be much appreciated.

Its a hotplug/netdevice interaction, and it happens for many hotpluggable network devices, whether they be NE2K cards, wireless cards or whatever.

AFAICS, it isn't a PCMCIA nor cardbus problem.

Signature · 2 lines
Russell King ([email protected])                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html
#3 lore raw

well, at least it is this changeset for me (same problem)

Quoted 33 lines

--- linux-2.5.73-bk1/drivers/pcmcia/ti113x.h 2003-06-22 11:32:41.000000000 -0700
+++ linux-2.5.73-bk2/drivers/pcmcia/ti113x.h 2003-06-24 13:06:59.000000000 -0700

(quoted diff) +21 -0
@@ -175,6 +175,27 @@
      new = reg & ~I365_INTR_ENA;
      if (new != reg)
              exca_writeb(socket, I365_INTCTL, new);
+
+     /*
+      * If ISA interrupts don't work, then fall back to routing card
+      * interrupts to the PCI interrupt of the socket.
+      */
+     if (!socket->socket.irq_mask) {
+             int irqmux, devctl;
+
+             printk (KERN_INFO "ti113x: Routing card interrupts to
 PCI\n");
+
+             devctl = config_readb(socket, TI113X_DEVICE_CONTROL);
+             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);
+     }
+
      socket->socket.ss_entry->init = ti_init;
      return 0;

}

Quoted 29 lines · Russell King
Quoted 9 lines · Jaakko Niemi
Quoted 8 lines

Hi,

My laptop (thinkpad 570e) hangs hard straight after bringing up interface with d-link dwl-650 wlan card. 2.5.73-bk1 works and 2.5.73-bk2 to 2.5.75-bk1 hang. If I boot without the card, everything comes up, but inserting the card results to a hang. Setting nmi_watchdog=2 has no effect.

Quoted 4 lines

Ok, bit more info: same thing happens with edimax 8139 based cardbus nic also. I've disabled apm and acpi from kernel and going to start going through the pci changes between 2.5.73-bk1 and bk2. Any clues would be much appreciated.

Its a hotplug/netdevice interaction, and it happens for many hotpluggable network devices, whether they be NE2K cards, wireless cards or whatever.

AFAICS, it isn't a PCMCIA nor cardbus problem.

Signature · 8 lines
Russell King ([email protected])                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
Signature · 3 lines
Regards,

Wiktor Wodecki
#4 lore raw
Quoted 4 lines · Wiktor Wodecki

well, at least it is this changeset for me (same problem)

drivers/pcmcia/ti113x.h 2003-06-24 13:06:59.000000000 -0700

Quoted 2 lines
drivers/pcmcia/ti113x.h 2003-06-24 13:06:59.000000000 -0700 renamed from drivers/pcmcia/ti113x.h 2003-06-22 11:32:41.000000000 -0700 +0 -0

Yes, confirmed. Backing off this makes things work again.

                      --j
#5 lore raw
In reply to Wiktor Wodecki
Quoted 6 lines · Wiktor Wodecki

Review

Quoted 6 lines
(quoted diff) +6 -0
+      * If ISA interrupts don't work, then fall back to routing card
+      * interrupts to the PCI interrupt of the socket.
+      */
+     if (!socket->socket.irq_mask) {
+             int irqmux, devctl;
+

See the fix posted to the list a while ago and apply that and all should be well. The change you refer to breaks for some setups

#6 lore raw
Quoted 10 lines · Alan Cox
Quoted 6 lines · Wiktor Wodecki

Review

Quoted 6 lines
(quoted diff) +6 -0
+      * If ISA interrupts don't work, then fall back to routing card
+      * interrupts to the PCI interrupt of the socket.
+      */
+     if (!socket->socket.irq_mask) {
+             int irqmux, devctl;
+

See the fix posted to the list a while ago and apply that and all should be well. The change you refer to breaks for some setups

Was the fix against drivers/pcmcia/ti113x.h ? (other than backing off that patch..). If so, then I'm unable to locate it. Looks like I need local lkml archive anyway :)

                    --j
#7 lore raw
Quoted 9 lines · Jaakko Niemi
Quoted 8 lines · Alan Cox
Quoted 6 lines · Wiktor Wodecki
Quoted 6 lines
(quoted diff) +6 -0
+      * If ISA interrupts don't work, then fall back to routing card
+      * interrupts to the PCI interrupt of the socket.
+      */
+     if (!socket->socket.irq_mask) {
+             int irqmux, devctl;
+
Quoted 6 lines
Quoted 2 lines

See the fix posted to the list a while ago and apply that and all should be well. The change you refer to breaks for some setups

Was the fix against drivers/pcmcia/ti113x.h ? (other than backing off that patch..). If so, then I'm unable to locate it. Looks like I need local lkml archive anyway :)

The patch never went anywhere near lkml. It was sent to Pat Mochel primerily for testing (since Pat was able to produce the feedback last time around to solve the problem.) However, I haven't heard back from Pat.

I won't even bother putting this into my bk tree and asking Linus to pull; I'm sure someone else will integrate this into the kernel tree for me. (as happened previously, and as a result I need to sort out my bk tree.)

drivers/pcmcia/ti113x.h +14 -9
@@ -179,21 +179,26 @@
 	/*
 	 * 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) {
-		int irqmux, devctl;
-
-		printk (KERN_INFO "ti113x: Routing card interrupts to PCI\n");
+		u8 irqmux, devctl;
 
 		devctl = config_readb(socket, TI113X_DEVICE_CONTROL);
-		devctl &= ~TI113X_DCR_IMODE_MASK;
+		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 */
+			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);
+			config_writel(socket, TI122X_IRQMUX, irqmux);
+			config_writeb(socket, TI113X_DEVICE_CONTROL, devctl);
+		}
 	}
 
 	socket->socket.ss_entry->init = ti_init;
Signature · 2 lines
Russell King ([email protected])                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html
#8 lore raw
Quoted 13 lines · Russell King
Quoted 12 lines · Jaakko Niemi
Quoted 10 lines · Alan Cox
Quoted 6 lines · Wiktor Wodecki

Review

Quoted 6 lines
(quoted diff) +6 -0
+      * If ISA interrupts don't work, then fall back to routing card
+      * interrupts to the PCI interrupt of the socket.
+      */
+     if (!socket->socket.irq_mask) {
+             int irqmux, devctl;
+

See the fix posted to the list a while ago and apply that and all should be well. The change you refer to breaks for some setups

Quoted 8 lines
Quoted 3 lines

Was the fix against drivers/pcmcia/ti113x.h ? (other than backing off that patch..). If so, then I'm unable to locate it. Looks like I need local lkml archive anyway :)

The patch never went anywhere near lkml. It was sent to Pat Mochel primerily for testing (since Pat was able to produce the feedback last time around to solve the problem.) However, I haven't heard back from Pat.

I applied this to plain vanilla 2.5.75-bk1 and booted and everything seems working ok.

Quoted 4 lines

I won't even bother putting this into my bk tree and asking Linus to pull; I'm sure someone else will integrate this into the kernel tree for me. (as happened previously, and as a result I need to sort out my bk tree.)

I guess testing with a bit of different hardware would be good.

                        --j
#9 lore raw
Quoted 7 lines · Jaakko Niemi
Quoted 4 lines · Russell King

I won't even bother putting this into my bk tree and asking Linus to pull; I'm sure someone else will integrate this into the kernel tree for me. (as happened previously, and as a result I need to sort out my bk tree.)

I guess testing with a bit of different hardware would be good.

Oddly, that's what the rest of the community is for. Developers don't have access to all possible combinations of hardware.

However, the patch to ti113x.h came from 2.4-ac, and afaik there haven't been any reports of failure there. Also note that I was just the middle man in getting the original patch applied.

Signature · 2 lines
Russell King ([email protected])                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html
#10 lore raw
Quoted 3 lines · Russell King

However, the patch to ti113x.h came from 2.4-ac, and afaik there haven't been any reports of failure there. Also note that I was just the middle man in getting the original patch applied.

It took a while for the few laptops it bites to turn up. The new fix is in the newest -ac build tree and seems to fix the cases I've tested

#11 lore raw
In reply to Russell King
Quoted 22 lines · Russell King
Quoted 9 lines · Jaakko Niemi
Quoted 8 lines · Alan Cox
Quoted 6 lines · Wiktor Wodecki
Quoted 6 lines
(quoted diff) +6 -0
+      * If ISA interrupts don't work, then fall back to routing card
+      * interrupts to the PCI interrupt of the socket.
+      */
+     if (!socket->socket.irq_mask) {
+             int irqmux, devctl;
+
Quoted 6 lines
Quoted 2 lines

See the fix posted to the list a while ago and apply that and all should be well. The change you refer to breaks for some setups

Was the fix against drivers/pcmcia/ti113x.h ? (other than backing off that patch..). If so, then I'm unable to locate it. Looks like I need local lkml archive anyway :)

The patch never went anywhere near lkml. It was sent to Pat Mochel primerily for testing (since Pat was able to produce the feedback last time around to solve the problem.) However, I haven't heard back from Pat.

Quoted 4 lines

I won't even bother putting this into my bk tree and asking Linus to pull; I'm sure someone else will integrate this into the kernel tree for me. (as happened previously, and as a result I need to sort out my bk tree.)

oh, I'm sorry, I must have missed this patch. I just applied it on top of 2.5.75-bk2 and it fixes the problem for me. Please apply it and tell linus, thinks like that happen - don't be grumpy please :-)

Quoted 44 lines
drivers/pcmcia/ti113x.h +14 -9
@@ -179,21 +179,26 @@
 	/*
 	 * 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) {
-		int irqmux, devctl;
-
-		printk (KERN_INFO "ti113x: Routing card interrupts to PCI\n");
+		u8 irqmux, devctl;
 
 		devctl = config_readb(socket, TI113X_DEVICE_CONTROL);
-		devctl &= ~TI113X_DCR_IMODE_MASK;
+		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 */
+			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);
+			config_writel(socket, TI122X_IRQMUX, irqmux);
+			config_writeb(socket, TI113X_DEVICE_CONTROL, devctl);
+		}
 	}
 
 	socket->socket.ss_entry->init = ti_init;
Signature · 3 lines
-- 
Russell King ([email protected])                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html
Signature · 3 lines
Regards,

Wiktor Wodecki