2003-07-11 16:05:24

by Jaakko Niemi

[permalink] [raw]
Subject: hang with pcmcia wlan card


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


2003-07-12 16:09:04

by Jaakko Niemi

[permalink] [raw]
Subject: Re: hang with pcmcia wlan card


> 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

2003-07-12 16:18:17

by Russell King

[permalink] [raw]
Subject: Re: hang with pcmcia wlan card

On Sat, Jul 12, 2003 at 07:22:53PM +0300, Jaakko Niemi wrote:
>
> > 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.

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.

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

2003-07-12 16:34:51

by Wiktor Wodecki

[permalink] [raw]
Subject: Re: hang with pcmcia wlan card

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

> --- 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
> @@ -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;
> }


On Sat, Jul 12, 2003 at 05:30:39PM +0100, Russell King wrote:
> On Sat, Jul 12, 2003 at 07:22:53PM +0300, Jaakko Niemi wrote:
> >
> > > 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.
>
> 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.
>
> --
> 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/

--
Regards,

Wiktor Wodecki


Attachments:
(No filename) (2.54 kB)
(No filename) (189.00 B)
Download all attachments

2003-07-12 17:14:52

by Jaakko Niemi

[permalink] [raw]
Subject: Re: hang with pcmcia wlan card

Wiktor Wodecki <[email protected]> writes:

> well, at least it is this changeset for me (same problem)
>
>> --- 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

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

--j

2003-07-13 02:59:41

by Sven Dowideit

[permalink] [raw]
Subject: Re: hang with pcmcia wlan card

> well, at least it is this changeset for me (same problem)
>
>> --- 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

me too :)

my cisco aironet 350 now works, and does not hang my 2.5.75 vanilla

thankyou
sven


Attachments:
signature.asc (189.00 B)
This is a digitally signed message part

2003-07-13 08:34:42

by Alan

[permalink] [raw]
Subject: Re: hang with pcmcia wlan card

On Sad, 2003-07-12 at 17:48, Wiktor Wodecki wrote:
> > + * 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

2003-07-13 10:33:36

by Jaakko Niemi

[permalink] [raw]
Subject: Re: hang with pcmcia wlan card

Russell King <[email protected]> writes:

> On Sun, Jul 13, 2003 at 12:50:33PM +0300, Jaakko Niemi wrote:
>> Alan Cox <[email protected]> writes:
>> > On Sad, 2003-07-12 at 17:48, Wiktor Wodecki wrote:
>> >> > + * 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 :)
>
> 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.

> 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


2003-07-13 10:47:52

by Wiktor Wodecki

[permalink] [raw]
Subject: Re: hang with pcmcia wlan card

On Sun, Jul 13, 2003 at 11:00:16AM +0100, Russell King wrote:
> On Sun, Jul 13, 2003 at 12:50:33PM +0300, Jaakko Niemi wrote:
> > Alan Cox <[email protected]> writes:
> > > On Sad, 2003-07-12 at 17:48, Wiktor Wodecki wrote:
> > >> > + * 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 :)
>
> 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.)

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 :-)

>
> --- orig/drivers/pcmcia/ti113x.h Wed Jul 2 22:44:06 2003
> +++ linux/drivers/pcmcia/ti113x.h Sun Jul 6 22:52:41 2003
> @@ -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;
>
>
> --
> Russell King ([email protected]) The developer of ARM Linux
> http://www.arm.linux.org.uk/personal/aboutme.html

--
Regards,

Wiktor Wodecki


Attachments:
(No filename) (3.05 kB)
(No filename) (189.00 B)
Download all attachments

2003-07-13 10:57:24

by Alan

[permalink] [raw]
Subject: Re: hang with pcmcia wlan card

On Sul, 2003-07-13 at 12:00, Russell King wrote:
> 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

2003-07-13 10:46:00

by Russell King

[permalink] [raw]
Subject: Re: hang with pcmcia wlan card

On Sun, Jul 13, 2003 at 01:48:22PM +0300, Jaakko Niemi wrote:
> Russell King <[email protected]> writes:
> > 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.

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

2003-07-13 09:35:47

by Jaakko Niemi

[permalink] [raw]
Subject: Re: hang with pcmcia wlan card

Alan Cox <[email protected]> writes:

> On Sad, 2003-07-12 at 17:48, Wiktor Wodecki wrote:
>> > + * 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

2003-07-13 09:45:58

by Russell King

[permalink] [raw]
Subject: Re: hang with pcmcia wlan card

On Sun, Jul 13, 2003 at 12:50:33PM +0300, Jaakko Niemi wrote:
> Alan Cox <[email protected]> writes:
> > On Sad, 2003-07-12 at 17:48, Wiktor Wodecki wrote:
> >> > + * 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 :)

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.)

--- orig/drivers/pcmcia/ti113x.h Wed Jul 2 22:44:06 2003
+++ linux/drivers/pcmcia/ti113x.h Sun Jul 6 22:52:41 2003
@@ -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;


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