2004-09-27 20:43:57

by Dax Kelson

[permalink] [raw]
Subject: thinkpad issue --No PCMCIA hotplug activity when onboard nic (e1000) down

Myself and a co-worker have two ThinkPads bought a few months apart. The
two model numbers are:

2373-KUU -- T42p 14" LCD
2373-CXU -- T42 15" LCD

Both have the following onboard NIC and cardbus controller
02:01.0 Ethernet controller: Intel Corp. 82540EP Gigabit Ethernet Controller (Mobile) (rev 03)
02:00.0 CardBus bridge: Texas Instruments PCI4520 PC card Cardbus Controller (rev 01)
02:00.1 CardBus bridge: Texas Instruments PCI4520 PC card Cardbus Controller (rev 01)

The issue:

Observed on both Laptops, under multiple distributions (Fedora
1/2/rawhide, SUSE 9.1, Debian Sarge) including 2.6.9-rc2.

Inserting a PCMCIA/Cardbus device (tried a few different cards) results
in no activity, dmesg output, or hotplug event. In order to recognize
the card, a manual invocation of "cardctl insert" must occur.

First (really strange) datapoint:

If the onboard nic has an IP address and is UP, then PCMCIA hotplug
works great! I can unplug and plug cards in, the drivers load, hotplug
runs and everything works as expected.

If I turn down the onboard NIC, "ifconfig eth0 down", then PCMCIA
hotplug stops working, bring the onboard NIC back up "ifconfig eth0 up",
then PCMCIA hotplug starts working again.

The IP address may be irrelevant, it may just need to be "up", but I
haven't tested that.

It took a long time to stumble on to this correlation.

Second datapoint:

If the card is inserted before powering on the laptop, the card will be
detected and drivers loaded during boot as expected independent of the
status of the onboard NIC.


Third datapoint:

Out of the box, nearly everything is using IRQ 11. I've spread things
around, but no change in behavior.

Fourth datapoint:

Running "cardctl insert" doesn't always work. The driver for the
PCMCIA/Cardbus devices seems to load partway (not all of the normal
printk's are seen), and any attempt to access the device (with ifconfig,
iwconfig, etc) results in a hang of that command. A reboot is required
to clear things up.

Fifth datpoint:

Windows XP has no troubles with PCMCIA.

Any and all help greatly appreciated,

Dax Kelson


2004-09-27 20:54:41

by Russell King

[permalink] [raw]
Subject: Re: thinkpad issue --No PCMCIA hotplug activity when onboard nic (e1000) down

On Mon, Sep 27, 2004 at 02:40:29PM -0600, Dax Kelson wrote:
> Myself and a co-worker have two ThinkPads bought a few months apart. The
> two model numbers are:
>
> 2373-KUU -- T42p 14" LCD
> 2373-CXU -- T42 15" LCD
>
> Both have the following onboard NIC and cardbus controller
> 02:01.0 Ethernet controller: Intel Corp. 82540EP Gigabit Ethernet Controller (Mobile) (rev 03)
> 02:00.0 CardBus bridge: Texas Instruments PCI4520 PC card Cardbus Controller (rev 01)
> 02:00.1 CardBus bridge: Texas Instruments PCI4520 PC card Cardbus Controller (rev 01)

Can you also provide the output of lspci -n for the above two
cardbus bridges please?

--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
2.6 Serial core

2004-09-27 21:07:52

by Dax Kelson

[permalink] [raw]
Subject: Re: thinkpad issue --No PCMCIA hotplug activity when onboard nic (e1000) down

On Mon, 2004-09-27 at 14:53, Russell King wrote:
> On Mon, Sep 27, 2004 at 02:40:29PM -0600, Dax Kelson wrote:
> > Myself and a co-worker have two ThinkPads bought a few months apart. The
> > two model numbers are:
> >
> > 2373-KUU -- T42p 14" LCD
> > 2373-CXU -- T42 15" LCD
> >
> > Both have the following onboard NIC and cardbus controller
> > 02:01.0 Ethernet controller: Intel Corp. 82540EP Gigabit Ethernet Controller (Mobile) (rev 03)
> > 02:00.0 CardBus bridge: Texas Instruments PCI4520 PC card Cardbus Controller (rev 01)
> > 02:00.1 CardBus bridge: Texas Instruments PCI4520 PC card Cardbus Controller (rev 01)
>
> Can you also provide the output of lspci -n for the above two
> cardbus bridges please?

Sure..

# lspci -n | grep 02:00
02:00.0 Class 0607: 104c:ac46 (rev 01)
02:00.1 Class 0607: 104c:ac46 (rev 01)


2004-09-27 22:05:19

by Russell King

[permalink] [raw]
Subject: Re: thinkpad issue --No PCMCIA hotplug activity when onboard nic (e1000) down

On Mon, Sep 27, 2004 at 03:06:05PM -0600, Dax Kelson wrote:
> On Mon, 2004-09-27 at 14:53, Russell King wrote:
> > On Mon, Sep 27, 2004 at 02:40:29PM -0600, Dax Kelson wrote:
> > > Myself and a co-worker have two ThinkPads bought a few months apart. The
> > > two model numbers are:
> > >
> > > 2373-KUU -- T42p 14" LCD
> > > 2373-CXU -- T42 15" LCD
> > >
> > > Both have the following onboard NIC and cardbus controller
> > > 02:01.0 Ethernet controller: Intel Corp. 82540EP Gigabit Ethernet Controller (Mobile) (rev 03)
> > > 02:00.0 CardBus bridge: Texas Instruments PCI4520 PC card Cardbus Controller (rev 01)
> > > 02:00.1 CardBus bridge: Texas Instruments PCI4520 PC card Cardbus Controller (rev 01)
> >
> > Can you also provide the output of lspci -n for the above two
> > cardbus bridges please?
>
> Sure..
>
> # lspci -n | grep 02:00
> 02:00.0 Class 0607: 104c:ac46 (rev 01)
> 02:00.1 Class 0607: 104c:ac46 (rev 01)

Can you try this patch please? Thanks.

===== drivers/pcmcia/yenta_socket.c 1.59 vs edited =====
--- 1.59/drivers/pcmcia/yenta_socket.c 2004-08-22 15:39:15 +01:00
+++ edited/drivers/pcmcia/yenta_socket.c 2004-09-27 23:03:57 +01:00
@@ -1091,6 +1091,7 @@
CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_4410, TI12XX),
CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_4450, TI12XX),
CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_4451, TI12XX),
+ CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_4520, TI12XX),

CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_1250, TI1250),
CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_1410, TI1250),
===== include/linux/pci_ids.h 1.176 vs edited =====
--- 1.176/include/linux/pci_ids.h 2004-08-28 19:46:04 +01:00
+++ edited/include/linux/pci_ids.h 2004-09-27 23:03:54 +01:00
@@ -734,6 +734,7 @@
#define PCI_DEVICE_ID_TI_1251B 0xac1f
#define PCI_DEVICE_ID_TI_4410 0xac41
#define PCI_DEVICE_ID_TI_4451 0xac42
+#define PCI_DEVICE_ID_TI_4520 0xac46
#define PCI_DEVICE_ID_TI_1410 0xac50
#define PCI_DEVICE_ID_TI_1420 0xac51
#define PCI_DEVICE_ID_TI_1451A 0xac52


--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
2.6 Serial core

2004-09-28 00:18:13

by Dax Kelson

[permalink] [raw]
Subject: Re: thinkpad issue --No PCMCIA hotplug activity when onboard nic (e1000) down

On Mon, 2004-09-27 at 16:04, Russell King wrote:

> Can you try this patch please? Thanks.
>
> ===== drivers/pcmcia/yenta_socket.c 1.59 vs edited =====
> --- 1.59/drivers/pcmcia/yenta_socket.c 2004-08-22 15:39:15 +01:00
> +++ edited/drivers/pcmcia/yenta_socket.c 2004-09-27 23:03:57 +01:00
> @@ -1091,6 +1091,7 @@
> CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_4410, TI12XX),
> CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_4450, TI12XX),
> CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_4451, TI12XX),
> + CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_4520, TI12XX),
>
> CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_1250, TI1250),
> CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_1410, TI1250),
> ===== include/linux/pci_ids.h 1.176 vs edited =====
> --- 1.176/include/linux/pci_ids.h 2004-08-28 19:46:04 +01:00
> +++ edited/include/linux/pci_ids.h 2004-09-27 23:03:54 +01:00
> @@ -734,6 +734,7 @@
> #define PCI_DEVICE_ID_TI_1251B 0xac1f
> #define PCI_DEVICE_ID_TI_4410 0xac41
> #define PCI_DEVICE_ID_TI_4451 0xac42
> +#define PCI_DEVICE_ID_TI_4520 0xac46
> #define PCI_DEVICE_ID_TI_1410 0xac50
> #define PCI_DEVICE_ID_TI_1420 0xac51
> #define PCI_DEVICE_ID_TI_1451A 0xac52

I'm EXTREMELY happy to report that this patch works and I can now
hotplug PCMCIA devices successfully on my Thinkpad T42p.

>From my perspective, please apply.

Dax Kelson
Guru Labs