Skip to contentSkip to conversation

Omnibook PCMCIA slots unusable after suspend.

DISCUSSION Jon Fairbairn 3 participants 8 messages Sep 10, 2003 – Sep 17, 2003

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

[I'm not subscribed, so please Cc me in any replies]

In short: I'm using an HP Ombibook 800CT, have started using a Carbus PCMCIA network card and am losing the card after suspends.

I've tried searching lkml for similar things but didn't find anything that seemed close enough, so here's a little more detail (though I don't want to add too much until I know you want to hear about it).

"modprobe yenta_socket" normally logs:

Sep  4 21:39:10 graffito kernel: Linux Kernel Card Services 3.1.22
Sep  4 21:39:10 graffito kernel:   options:  [pci] [cardbus] [pm]
Sep  4 21:39:10 graffito kernel: PCI: Found IRQ 9 for device 00:04.0
Sep  4 21:39:10 graffito kernel: PCI: Found IRQ 7 for device 00:04.1
Sep  4 21:39:10 graffito kernel: Yenta IRQ list 0448, PCI irq9
Sep  4 21:39:10 graffito kernel: Socket status: 30000020
Sep  4 21:39:10 graffito kernel: Yenta IRQ list 0448, PCI irq7
Sep  4 21:39:10 graffito kernel: Socket status: 30000006

but after "apm --suspend" I get the same except:

Sep  6 23:23:55 graffito kernel: Socket status: 66012d18
...
Sep  6 23:23:55 graffito kernel: Socket status: 2a035c8a

The effect of this is that it can't see anything in the socket, so I can't get it to load the driver for the PCMCIA card. It only happens if the machine has been on battery power during the suspend. It doesn't happen if the socket is set to PCIC mode in the BIOS, though in that case I can't use the card anyway. It happens whether or not the card is present, and whether or not cardmgr is running, and it happens in 2.4.21, 2.4.22 and 2.6.0-test4.

Rebooting without powering off clears the condition, but nothing else I've tried (cardctl eject &c, loading and unloading modules round the suspend, using setpci to restore the registers of the bridge, passing do_apm=0 to pcmcia_core) makes any difference.

The card in question is a netgear FA511, but I don't think that's relevant as the problem happens even if I don't plug it in until after the suspend, and so long as yenta_socket reports a sensible status it works fine (with the tulip driver).

Please let me know if you need more information.

Thanks,

Jón

Signature · 1 line
Jón Fairbairn
#1 lore raw
Quoted 3 lines · Jon Fairbairn

In short: I'm using an HP Ombibook 800CT, have started using a Carbus PCMCIA network card and am losing the card after suspends.

I'm only interested in the 2.6.0-test5 results.

Please run lspci -vvb twice - once when you have just booted the machine, and once when you resume.

Quoted 9 lines
Sep  4 21:39:10 graffito kernel: Linux Kernel Card Services 3.1.22
Sep  4 21:39:10 graffito kernel:   options:  [pci] [cardbus] [pm]
Sep  4 21:39:10 graffito kernel: PCI: Found IRQ 9 for device 00:04.0
Sep  4 21:39:10 graffito kernel: PCI: Found IRQ 7 for device 00:04.1
Sep  4 21:39:10 graffito kernel: Yenta IRQ list 0448, PCI irq9
Sep  4 21:39:10 graffito kernel: Socket status: 30000020
Sep  4 21:39:10 graffito kernel: Yenta IRQ list 0448, PCI irq7
Sep  4 21:39:10 graffito kernel: Socket status: 30000006
Quoted 5 lines

but after "apm --suspend" I get the same except:

Sep  6 23:23:55 graffito kernel: Socket status: 66012d18
...
Sep  6 23:23:55 graffito kernel: Socket status: 2a035c8a

It looks like the cardbus controller configuration wasn't correctly restored.

Signature · 5 lines
Russell King ([email protected])	http://www.arm.linux.org.uk/personal/
Linux kernel maintainer of:
  2.6 ARM Linux   - http://www.arm.linux.org.uk/
  2.6 PCMCIA      - http://pcmcia.arm.linux.org.uk/
  2.6 Serial core
#2 lore raw
Quoted 6 lines · On 2003-09-10 at 23:45BST Russell King wrote:
Quoted 3 lines · Jon Fairbairn

In short: I'm using an HP Ombibook 800CT, have started using a Carbus PCMCIA network card and am losing the card after suspends.

I'm only interested in the 2.6.0-test5 results.

OK. Pause for recompilation...

Quoted 2 lines

Please run lspci -vvb twice - once when you have just booted the machine, and once when you resume.

The following is done without unloading the modules round the suspend.

Before:
------
00:00.0 Host bridge: VLSI Technology Inc 82C535 (rev 03)
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort+ >SERR- <PERR-
Latency: 0

00:01.0 PCI bridge: VLSI Technology Inc 82C534 [Eagle] (rev 03) (prog-if 00 [Normal decode])
Control: I/O+ Mem+ BusMaster+ SpecCycle+ MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 0
Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
I/O behind bridge: 00004000-00007fff
Memory behind bridge: 20000000-2fffffff
Prefetchable memory behind bridge: 30000000-3fffffff
BridgeCtl: Parity- SERR- NoISA- VGA- MAbort- >Reset+ FastB2B-

00:02.0 Class ff00: VLSI Technology Inc 82C532 (rev 02)
Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-

00:03.0 VGA compatible controller: Neomagic Corporation NM2070 [MagicGraph 128] (rev 01) (prog-if 00 [VGA])
Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Interrupt: pin A routed to IRQ 0
Region 0: Memory at c0000000 (32-bit, prefetchable)

00:04.0 CardBus bridge: Texas Instruments PCI1130 (rev 04)

	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
	Status: Cap- 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
	Latency: 168, cache line size 08
	Interrupt: pin A routed to IRQ 9
	Region 0: Memory at 000e6000 (32-bit, non-prefetchable)
	Bus: primary=00, secondary=02, subordinate=05, sec-latency=176
	Memory window 0: 10000000-103ff000 (prefetchable)
	Memory window 1: 10400000-107ff000
	I/O window 0: 00008000-000080ff
	I/O window 1: 00008400-000084ff
	BridgeCtl: Parity- SERR- ISA- VGA- MAbort- >Reset- 16bInt- PostWrite+
	16-bit legacy interface ports at 0001

00:04.1 CardBus bridge: Texas Instruments PCI1130 (rev 04)

	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
	Status: Cap- 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
	Latency: 168, cache line size 08
	Interrupt: pin B routed to IRQ 7
	Region 0: Memory at 000e7000 (32-bit, non-prefetchable)
	Bus: primary=00, secondary=06, subordinate=09, sec-latency=176
	Memory window 0: 10800000-10bff000 (prefetchable)
	Memory window 1: 10c00000-10fff000
	I/O window 0: 00008800-000088ff
	I/O window 1: 00008c00-00008cff
	BridgeCtl: Parity- SERR- ISA- VGA- MAbort- >Reset+ 16bInt+ PostWrite+
	16-bit legacy interface ports at 0001

00:06.0 IRDA controller: VLSI Technology Inc 82C147 (rev 02)
Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Interrupt: pin A routed to IRQ 0
Region 0: I/O ports at 1000 [disabled]

02:00.0 Ethernet controller: Linksys Fast Ethernet 10/100 (rev 11)

	Subsystem: Netgear FA511 10/100
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
	Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
	Latency: 64 (63750ns min, 63750ns max)
	Interrupt: pin A routed to IRQ 9
	Region 0: I/O ports at 8000
	Region 1: Memory at 10400000 (32-bit, non-prefetchable)
	Capabilities: [c0] Power Management version 2
		Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=100mA PME(D0+,D1+,D2+,D3hot+,D3cold+)
		Status: D0 PME-Enable- DSel=0 DScale=0 PME-

------
After:
------

00:00.0 Host bridge: VLSI Technology Inc 82C535 (rev 03)
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort+ >SERR- <PERR-
Latency: 0

00:01.0 PCI bridge: VLSI Technology Inc 82C534 [Eagle] (rev 03) (prog-if 00 [Normal decode])
Control: I/O+ Mem+ BusMaster+ SpecCycle+ MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 0
Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
I/O behind bridge: 00004000-00007fff
Memory behind bridge: 20000000-2fffffff
Prefetchable memory behind bridge: 30000000-3fffffff
BridgeCtl: Parity- SERR- NoISA- VGA- MAbort- >Reset+ FastB2B-

00:02.0 Class ff00: VLSI Technology Inc 82C532 (rev 02)
Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-

00:03.0 VGA compatible controller: Neomagic Corporation NM2070 [MagicGraph 128] (rev 01) (prog-if 00 [VGA])
Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Interrupt: pin A routed to IRQ 0
Region 0: Memory at c0000000 (32-bit, prefetchable)

00:04.0 CardBus bridge: Texas Instruments PCI1130 (rev 04)

	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
	Status: Cap- 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
	Latency: 168, cache line size 08
	Interrupt: pin A routed to IRQ 9
	Region 0: Memory at 000e6000 (32-bit, non-prefetchable)
	Bus: primary=00, secondary=02, subordinate=05, sec-latency=176
	Memory window 0: 10000000-103ff000 (prefetchable)
	Memory window 1: 10400000-107ff000
	I/O window 0: 00008000-000080ff
	I/O window 1: 00008400-000084ff
	BridgeCtl: Parity- SERR- ISA- VGA- MAbort- >Reset+ 16bInt- PostWrite+
	16-bit legacy interface ports at 0001

00:04.1 CardBus bridge: Texas Instruments PCI1130 (rev 04)

	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
	Status: Cap- 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
	Latency: 168, cache line size 08
	Interrupt: pin B routed to IRQ 7
	Region 0: Memory at 000e7000 (32-bit, non-prefetchable)
	Bus: primary=00, secondary=06, subordinate=09, sec-latency=176
	Memory window 0: 10800000-10bff000 (prefetchable)
	Memory window 1: 10c00000-10fff000
	I/O window 0: 00008800-000088ff
	I/O window 1: 00008c00-00008cff
	BridgeCtl: Parity- SERR- ISA- VGA- MAbort- >Reset+ 16bInt+ PostWrite+
	16-bit legacy interface ports at 0001

00:06.0 IRDA controller: VLSI Technology Inc 82C147 (rev 02)
Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Interrupt: pin A routed to IRQ 0
Region 0: I/O ports at 1000 [disabled]

02:00.0 Class ffff: Linksys Fast Ethernet 10/100 (rev ff) (prog-if ff)
!!! Unknown header type 7f

------

So there's a Reset- v a Reset+ there.

Curiously, the output after a suspend on mains is the same (says diff) as the output after a suspend on battery, even though the former doesn't stop it working while the latter does.

Quoted 5 lines
Quoted 2 lines

...

Sep  6 23:23:55 graffito kernel: Socket status: 2a035c8a

It looks like the cardbus controller configuration wasn't correctly restored.

Indeed, though it always seems to give the same dodgy looking status.

Quoted 4 lines
Signature · 3 lines
Russell King ([email protected])	http://www.arm.linux.org.uk/personal/
Linux kernel maintainer of:
  2.6 ARM Linux   - http://www.arm.linux.org.uk/

Wish I still had an ARM...

Signature · 1 line
Jón Fairbairn
#3 lore raw
In reply to Russell King
Quoted 4 lines · Russell King
Quoted 3 lines · Jon Fairbairn

In short: I'm using an HP Ombibook 800CT, have started using a Carbus PCMCIA network card and am losing the card after suspends.

I had a similar problem with my OB800. It turned out the problem is the BIOS maps the yenta memory window into legacy address range below 1MB. What happens next is the host bridge doesn't restore the access to the legacy area on pci. IIRC Linus' comment was it's not the hostbridge's fault because mapping pci memory resource to legacy area would be bogus in the first place.

Quoted 8 lines
Quoted 5 lines

but after "apm --suspend" I get the same except:

Sep  6 23:23:55 graffito kernel: Socket status: 66012d18
...
Sep  6 23:23:55 graffito kernel: Socket status: 2a035c8a

It looks like the cardbus controller configuration wasn't correctly restored.

Yep, this is what happens fo me in the sitation above. And the next time one inserts/ejects any card the box dies in interrupt storm because the irq cannot be acknoledged.

The patch below is how I work around this issue: fixup to force the kernel to forget the bogus mapping and create a new sane one. Works for me since ages (2.4-test IIRC). Maybe it would help here too.

Martin

-----------------------

drivers/pci/quirks.c +49 -0
@@ -490,6 +490,54 @@
 	pci_write_config_dword(dev, PCI_CB_LEGACY_MODE_BASE, 0);
 }
 
+/* BIOS might have mapped the cardbus memory resource to a bogus location
+ * in legacy memory area and the hostbridge somehow loses this window
+ * after pm-suspend (seen on OB800).
+ * We try to detect and fix this by re-assigning the resource if we
+ * find it mapped to legacy area <1M. But we don't try, if the (obsolete)
+ * MEM_TYPE_1M flag is set, just in case...
+ */
+
+static void __devinit quirk_cardbus_map(struct pci_dev *dev)
+{
+	u32		temp, extend;
+	struct resource	*res;
+
+	if (dev->class != (PCI_CLASS_BRIDGE_CARDBUS << 8))
+		return;
+
+	res = &dev->resource[0];
+	if (!(res->flags & IORESOURCE_MEM))
+		return; 		/* not cardbus memory map */
+
+	/* done if already mapped above 1MB legacy area */
+	if (res->start >= 0x00100000UL)
+		return;
+
+	pci_read_config_dword(dev, PCI_BASE_ADDRESS_0, &temp);
+
+	if (temp & PCI_BASE_ADDRESS_MEM_TYPE_64)
+		return;		/* don't touch 64-bit mappings */
+
+	if (temp & PCI_BASE_ADDRESS_MEM_TYPE_1M) {
+		printk(KERN_DEBUG "%s: cardbus memory with obsolete 1M flag\n",
+			__FUNCTION__);
+		return;
+	}
+
+	/* re-read required size and flags from device */
+
+	pci_write_config_dword(dev, PCI_BASE_ADDRESS_0, ~0UL);
+	pci_read_config_dword(dev, PCI_BASE_ADDRESS_0, &temp);
+	extend = ~(u32)(temp & PCI_BASE_ADDRESS_MEM_MASK);
+
+	res->start = 0;			/* will be mapped to new sane location */
+	res->end = res->start + extend;
+	res->flags = IORESOURCE_MEM;
+	if (temp & PCI_BASE_ADDRESS_MEM_PREFETCH)
+		res->flags |= IORESOURCE_PREFETCH;
+}
+
 /*
  * Following the PCI ordering rules is optional on the AMD762. I'm not
  * sure what the designers were smoking but let's not inhale...
@@ -807,6 +855,7 @@
 	{ PCI_FIXUP_HEADER,     PCI_ANY_ID,             PCI_ANY_ID,                     quirk_ide_bases },
 	{ PCI_FIXUP_HEADER,     PCI_VENDOR_ID_VIA,	PCI_ANY_ID,                     quirk_via_bridge },
 	{ PCI_FIXUP_FINAL,	PCI_ANY_ID,		PCI_ANY_ID,			quirk_cardbus_legacy },
+	{ PCI_FIXUP_HEADER,	PCI_ANY_ID,		PCI_ANY_ID,			quirk_cardbus_map },
 
 #ifdef CONFIG_X86_IO_APIC 
 	{ PCI_FIXUP_FINAL,	PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_82C686,	quirk_via_ioapic },
#4 lore raw

[please cc me as not subscribed]

Quoted 10 lines · On 2003-09-11 at 23:18+0200 Martin Diehl wrote:
Quoted 4 lines · Russell King
Quoted 3 lines · Jon Fairbairn

In short: I'm using an HP Ombibook 800CT, have started using a Carbus PCMCIA network card and am losing the card after suspends.

I had a similar problem with my OB800. It turned out the problem is the BIOS maps the yenta memory window into legacy address range below 1MB.

This appears to be the correct diagnosis. I applied your patch to 2.4.22 and the Omnibook now correctly restarts the network after a suspend. Vielen dank!

What's the status of a patch like this? It's obviously of use to more than one person, and it took me a great deal of time to find you and your solution -- I suspect fainter hearted folk might just have given up and said "Linux doesn't work with this combination of hardware" which would have been a shame.

I haven't tried it with 2.6 yet; I don't normally get into test kernels, but I might try out of curiosity. I'll post the result if anyone indicates that it's a worthwhile thing to do.

Quoted 3 lines

Yep, this is what happens fo me in the sitation above. And the next time one inserts/ejects any card the box dies in interrupt storm because the irq cannot be acknoledged.

I think I got that too, at least, reinserting the card caused a lockup. With the patch applied I can eject and reinsert, which is fortunate because there seems to be another problem where the card switches off when I switch VCs, but it's hard to reproduce. (and inconvenient because /usr is on nfs on this machine)

Thanks again,

Jón

Signature · 1 line
Jón Fairbairn
#5 lore raw

Sorry for the delay...

Quoted 7 lines · Jon Fairbairn
Quoted 3 lines

I had a similar problem with my OB800. It turned out the problem is the BIOS maps the yenta memory window into legacy address range below 1MB.

This appears to be the correct diagnosis. I applied your patch to 2.4.22 and the Omnibook now correctly restarts the network after a suspend. Vielen dank!

You're welcome.

Quoted 6 lines

What's the status of a patch like this? It's obviously of use to more than one person, and it took me a great deal of time to find you and your solution -- I suspect fainter hearted folk might just have given up and said "Linux doesn't work with this combination of hardware" which would have been a shame.

Well, I've sent it to lkml once or twice some years ago. It was apparently lost in the noise and I personally didn't care much resending it because nobody else reported a similar problem. So I've just included it in my local patchset - just the "fixed and forget because nobody else reports this problem" case ;-)

Quoted 4 lines

I haven't tried it with 2.6 yet; I don't normally get into test kernels, but I might try out of curiosity. I'll post the result if anyone indicates that it's a worthwhile thing to do.

Right, except for some fuzz the patch should work with both 2.4 and 2.6 - at least it does for me. I'm not sure if this is the best possible way to work around the issue. But it does the job and I've taken considerable care to avoid breaking other boxes.

Of course I personally have no objections wrt. including it in the official tree. Russel, what do you think - do you want to apply it? Or shall I send it to Greg directly?

Quoted 10 lines
Quoted 3 lines

Yep, this is what happens fo me in the sitation above. And the next time one inserts/ejects any card the box dies in interrupt storm because the irq cannot be acknoledged.

I think I got that too, at least, reinserting the card caused a lockup. With the patch applied I can eject and reinsert, which is fortunate because there seems to be another problem where the card switches off when I switch VCs, but it's hard to reproduce. (and inconvenient because /usr is on nfs on this machine)

No idea - sounds strange to me. No such problem here with any of serial_cs, pcnet_cs or orinoco_cs with my ob800 (neither 2.4 nor 2.6).

Martin

#6 lore raw
Quoted 3 lines · Martin Diehl

Of course I personally have no objections wrt. including it in the official tree. Russel, what do you think - do you want to apply it? Or shall I send it to Greg directly?

I think it would be a good idea to forward it to Greg, especially if Linus seemed to think the current behaviour is wrong. Certainly allocating the yenta resources in the memory hole seems like a silly thing to do.

Quoted 10 lines · Jon Fairbairn
Quoted 6 lines

I think I got that too, at least, reinserting the card caused a lockup. With the patch applied I can eject and reinsert, which is fortunate because there seems to be another problem where the card switches off when I switch VCs, but it's hard to reproduce. (and inconvenient because /usr is on nfs on this machine)

No idea - sounds strange to me. No such problem here with any of serial_cs, pcnet_cs or orinoco_cs with my ob800 (neither 2.4 nor 2.6).

The following patch may help to track down this problem. Assuming Jon has sysfs mounted on /sys, there should be a bunch of files in /sys/class/pcmcia_socket/*/* - if Jon could get those to me after its gone wrong, it may be helpful.

I'll also see about merging a patch which fixes up the debugging (and adds some more) so we can see what's going on.

drivers/pcmcia/Makefile +1 -1
@@ -2,7 +2,7 @@
 # Makefile for the kernel pcmcia subsystem (c/o David Hinds)
 #
 
-obj-$(CONFIG_PCMCIA)				+= pcmcia_core.o ds.o
+obj-$(CONFIG_PCMCIA)				+= pcmcia_core.o ds.o pcmcia_debug.o
 obj-$(CONFIG_YENTA) 				+= yenta_socket.o
 
 obj-$(CONFIG_I82365)				+= i82365.o
drivers/pcmcia/pcmcia_debug.c new file +153 -0

153 lines not on this page · raw message

Signature · 5 lines
Russell King ([email protected])	http://www.arm.linux.org.uk/personal/
Linux kernel maintainer of:
  2.6 ARM Linux   - http://www.arm.linux.org.uk/
  2.6 PCMCIA      - http://pcmcia.arm.linux.org.uk/
  2.6 Serial core
#7 lore raw
Quoted 6 lines · On 2003-09-16 at 23:56BST Russell King wrote:
Quoted 3 lines · Martin Diehl

Of course I personally have no objections wrt. including it in the official tree. Russel, what do you think - do you want to apply it? Or shall I send it to Greg directly?

I think it would be a good idea to forward it to Greg

That might please me :-)

Quoted 10 lines
Quoted 10 lines · Jon Fairbairn
Quoted 6 lines

I think I got that too, at least, reinserting the card caused a lockup. With the patch applied I can eject and reinsert, which is fortunate because there seems to be another problem where the card switches off when I switch VCs, but it's hard to reproduce. (and inconvenient because /usr is on nfs on this machine)

No idea - sounds strange to me. No such problem here with any of serial_cs, pcnet_cs or orinoco_cs with my ob800 (neither 2.4 nor 2.6).

I've experimented a bit more. With 2.4.22 the problem occurs predictably if I initiate a suspend while displaying an X console. The system resumes OK, but when I next change to a text VC, the light goes out on the network card (and I get swamped with log messages about nfs server not responding), but I can clear it up by physically ejecting and reinserting the network card. After that it's back to normal. I can't see any clues in the logs -- as far as I can see the nfs errors start without being preceded by any other error, and inserting the card just brings it back up as if nothing had been wrong.

Quoted 5 lines

The following patch may help to track down this problem. Assuming Jon has sysfs mounted on /sys, there should be a bunch of files in /sys/class/pcmcia_socket/*/* - if Jon could get those to me after its gone wrong, it may be helpful.

I applied Martin's patch to 2.6.0-test5, and that seems to solve the original problem. I also applied your patch, but haven't had any luck getting the stuff from /sys. With 2.6.0-test5 patched like this (I didn't try it without your patch, I'm afraid), if I initiate suspend from a text VC all is fine, but if I initiate it from X, the machine suspends, but when turned back on it just locks up with a blank display. No apparent response to anything I do to the keyboard, including magic sysrq :-(. Not mounting sysfs doesn't change the behaviour AFAICT.

It's not exactly a show-stopper as bracketing the apm sequence with appropriate calls to chvt avoids it.

I haven't tried your patch with 2.4 as it doesn't have sysfs -- or is there some way of retrofitting it?

Cheers,

Jón

Signature · 1 line
Jón Fairbairn                                 [email protected]