Bug 42715 - regression - hard freeze during PCMCIA probe
Summary: regression - hard freeze during PCMCIA probe
Status: RESOLVED OBSOLETE
Alias: None
Product: Drivers
Classification: Unclassified
Component: PCMCIA (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: linux-pcmcia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-01 22:45 UTC by neologix
Modified: 2016-02-01 18:50 UTC (History)
2 users (show)

See Also:
Kernel Version: 509b0865fbd8ab6c820397706dde980c1c285538
Subsystem:
Regression: Yes
Bisected commit-id:


Attachments
lcpsi -vvv (15.57 KB, text/plain)
2012-02-01 22:45 UTC, neologix
Details
2.6.32 dmesg (41.86 KB, text/plain)
2012-02-01 22:47 UTC, neologix
Details
2.6.37 dmesg (18.57 KB, text/plain)
2012-02-01 22:49 UTC, neologix
Details
/proc/ioports (1.53 KB, text/plain)
2012-02-05 12:09 UTC, neologix
Details

Description neologix 2012-02-01 22:45:39 UTC
Created attachment 72249 [details]
lcpsi -vvv

Hello,

I'm experiencing random (1 out of 3 times) freezes with 2.6.37 and later during PCMCIA probe:

When that happens, the lines printed by the kernel are the following:
"""
[    9.425089] yenta_cardbus 0000:02:04.1: ISA IRQ mask 0x0cb8, PCI irq 18
[    9.425100] yenta_cardbus 0000:02:04.1: Socket status: 30000006
[    9.425110] pci_bus 0000:02: Raising subordinate bus# of parent bus (#02) from #06 to #0a
[    9.425132] yenta_cardbus 0000:02:04.1: pcmcia: parent PCI bridge window: [io  0x3000-0x7fff]
[    9.425143] pcmcia_socket pcmcia_socket1: cs: IO port probe 0x3000-0x7fff: excluding 0x3000-0x30ff 0x3400-0x34ff 0x3800-0x38ff
"""

A successful boot will instead list some more ranges:

"""
[    9.425143] pcmcia_socket pcmcia_socket1: cs: IO port probe 0x3000-0x7fff: excluding 0x3000-0x30ff 0x3400-0x34ff 0x3800-0x38ff 0x3c00-0x3cff 0x7000-0x70ff 0x7400-0x743f
[    9.443240] yenta_cardbus 0000:02:04.1: pcmcia: parent PCI bridge window: [mem 0xe8100000-0xe97fffff]
[    9.443252] pcmcia_socket pcmcia_socket1: cs: memory probe 0xe8100000-0xe97fffff: excluding 0xe8100000-0xe826ffff 0xe83e0000-0xe882ffff 0xe8b10000-0xe90cffff
[    9.443301] yenta_cardbus 0000:02:04.1: pcmcia: parent PCI bridge window: [mem 0x50000000-0x57ffffff pref]
[    9.443311] pcmcia_socket pcmcia_socket1: cs: memory probe 0x50000000-0x57ffffff: excluding 0x50000000-0x57ffffff
[    9.469880] parport_pc 00:0b: reported by Plug and Play ACPI
[    9.469943] parport0: PC-style at 0x378 (0x778), irq 7 [PCSPP,TRISTATE]
[    9.544240] cfg80211: Calling CRDA to update world regulatory domain
[    9.602151] [drm] Initialized drm 1.1.0 20060810
[    9.666391] pcmcia_socket pcmcia_socket1: cs: IO port probe 0x100-0x3af: excluding nothing: probe failed.
[    9.666533] pcmcia_socket pcmcia_socket1: cs: IO port probe 0x3e0-0x4ff: excluding nothing: probe failed.
[    9.666614] pcmcia_socket pcmcia_socket1: cs: IO port probe 0x820-0x8ff: excluding nothing: probe failed.
[    9.666685] pcmcia_socket pcmcia_socket1: cs: IO port probe 0xc00-0xcf7: excluding nothing: probe failed.
[    9.666764] pcmcia_socket pcmcia_socket1: cs: memory probe 0x0c0000-0x0fffff: excluding 0xc0000-0xfffff
[    9.666827] pcmcia_socket pcmcia_socket1: cs: memory probe 0xa0000000-0xa0ffffff: excluding 0xa0000000-0xa0ffffff
[    9.666888] pcmcia_socket pcmcia_socket1: cs: memory probe 0x60000000-0x60ffffff: excluding 0x60000000-0x60ffffff
[    9.666948] pcmcia_socket pcmcia_socket1: cs: IO port probe 0xa00-0xaff: excluding nothing: probe failed.
"""

This did not happend with 2.6.32, which, for info, lists the following:
"""
[    9.812931] yenta_cardbus 0000:02:04.0: pcmcia: parent PCI bridge I/O window: 0x3000 - 0x7fff
[    9.812941] pcmcia_socket pcmcia_socket0: cs: IO port probe 0x3000-0x7fff: clean.
[    9.815360] yenta_cardbus 0000:02:04.0: pcmcia: parent PCI bridge Memory window: 0xe8100000 - 0xe97fffff
[    9.815369] yenta_cardbus 0000:02:04.0: pcmcia: parent PCI bridge Memory window: 0x50000000 - 0x57ffffff
"""

I'm currently bisecting the commit, but it seems that the probing code has changed a lot around 2.6.34.
I'd be happy to provide any relevant information, or test patches.

Cheers.
Comment 1 neologix 2012-02-01 22:47:10 UTC
Created attachment 72250 [details]
2.6.32 dmesg
Comment 2 neologix 2012-02-01 22:49:27 UTC
Created attachment 72251 [details]
2.6.37 dmesg
Comment 3 neologix 2012-02-05 12:09:17 UTC
Here's the commit that introduced the regression:

"""
commit 509b0865fbd8ab6c820397706dde980c1c285538
Author: Dominik Brodowski <linux@dominikbrodowski.net>
Date:   Thu Apr 8 19:23:07 2010 +0200

    pcmcia: fix io_probe due to parent (PCI) resources
    
    Similar to commit 7a96e87d, we need to be aware of any parent PCI
    device when requesting IO regions, even only for testing
    ("probing").
    
    Reported-by: Komuro <komurojun-mbn@nifty.com>
    Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
"""

Since this commit, do_io_probe() probes I/O ranges it didn't probe before, which results in random freezes on my machine (and a few others, after doing a quick search for "cs: IO port brobe + freeze").
Fow now, I disable IO probing by setting pcmcia_rsrc.probe_io=0, but it should probably be looked into.
I'm attaching /proc/ioports.
Comment 4 neologix 2012-02-05 12:09:59 UTC
Created attachment 72288 [details]
/proc/ioports
Comment 5 Alan 2013-12-23 14:26:41 UTC
If this is still present in modern kernels please update the bug
Comment 6 Sean M. Pappalardo 2016-02-01 18:49:20 UTC
This does indeed still happen in kernel 3.16.7 (from Debian 8.2) on applicable hardware (Compaq R3000 series notebook, R3306US in my case.)
Comment 7 Sean M. Pappalardo 2016-02-01 18:50:36 UTC
Using the boot option  pcmcia_rsrc.probe_io=0  gets around the problem.

Note You need to log in before you can comment on or make changes to this bug.