* Oops when inserting PCMCIA flash card (IDE)
@ 2003-02-24 16:00 Michel Lanners
2003-02-24 16:51 ` Jeffery von Ronne
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Michel Lanners @ 2003-02-24 16:00 UTC (permalink / raw)
To: linuxppc-dev
Hi all,
For a number of kernel versions (at least 4 months) I get a kernel oops
when inserting a CF card in my TiBook's PCMCIA slot.
I started debugging the problem today, and have thus far come to this:
Oops: kernel access of bad area, sig: 11
NIP: C00D9948 XER: 00000000 LR: C00D834C SP: D70D7530 REGS: d70d7480 TRAP: 0300 Not tainted
Using defaults from ksymoops -t elf32-powerpc -a powerpc:common
MSR: 00009032 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11
TASK = d70d6000[355] 'cardmgr' Last syscall: 54
last math d5608000 last altivec 00000000
GPR00: 00000F94 D70D7530 D70D6000 00000107 000088B8 00000001 D70D7520 C0270000
GPR08: 00000000 C00D9948 0000001F D70D7470 82002422 10021F3C 00000000 00000000
GPR16: 00000000 00000000 00000000 00000000 00009032 C59440E0 FFFFFFFF 0000011E
GPR24: C0230000 00000000 00000000 C0230000 C0230000 00418570 C02A2400 000088B7
Call backtrace:
C00D83E0 C00D85A4 C00D933C C00DF820 C00E0420 C00F0304 C00F0760
C00F0A0C C0114FC8 C01165CC C00F01B0 C0111EE4 C0112C74 C004F024
C00064FC 20202020 10003428 100048F8 0FEC3E24 00000000
which ksymoops decodes:
Trace; c00d83e0 <autoirq_report+e44/f10>
Trace; c00d85a4 <probe_hwif+f8/3d4>
Trace; c00d933c <export_probe_for_drive+180/700>
Trace; c00df820 <ide_probe_module+30/4c>
Trace; c00e0420 <ide_register_hw+160/1b0>
Trace; c00f0304 <proc_ide_destroy+3b4/13bc>
Trace; c00f0760 <proc_ide_destroy+810/13bc>
Trace; c00f0a0c <proc_ide_destroy+abc/13bc>
Trace; c0114fc8 <pcmcia_register_client+270/298>
Trace; c01165cc <CardServices+170/891c>
Trace; c00f01b0 <proc_ide_destroy+260/13bc>
Trace; c0111ee4 <unregister_pccard_driver+62c/16bc>
Trace; c0112c74 <unregister_pccard_driver+13bc/16bc>
Trace; c004f024 <kill_fasync+49c/4c0>
Trace; c00064fc <set_context+27c4/29f8>
The NIP in the oops points to ide_mm_inb(); it's trying to read from the
IDE ports. However, the port the new IDE interface got assinged seems to
be 0x100 (see r3: 0x107, which is port_base + IDE_STATUS_OFFSET). This
is of course outside of the range the PCMCIA controller has:
pooh:/etc/ppp# cat /proc/ioports
00000000-007fffff : /pci@f2000000
00001000-00008fff : PCI CardBus #11
00009000-000090ff : PCI CardBus #11
00802000-01001fff : /pci@f0000000
00802400-008024ff : ATI Technologies Inc Rage Mobility M3 AGP 2x
ff7fe000-ffffdfff : /pci@f4000000
So the problem seems to be the PCMCIA code gets the wrong ports for the
PCMCIA card?
Anybody with any help as to where I can look for the problem?
This used to work OK, but as I said, broke a few onths ago.
Cheers, and thanks
Michel
-------------------------------------------------------------------------
Michel Lanners | " Read Philosophy. Study Art.
23, Rue Paul Henkes | Ask Questions. Make Mistakes.
L-1710 Luxembourg |
email mlan@cpu.lu |
http://www.cpu.lu/~mlan | Learn Always. "
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Oops when inserting PCMCIA flash card (IDE)
2003-02-24 16:00 Oops when inserting PCMCIA flash card (IDE) Michel Lanners
@ 2003-02-24 16:51 ` Jeffery von Ronne
2003-02-24 17:40 ` Benjamin Herrenschmidt
2003-02-25 5:39 ` Paul Mackerras
2 siblings, 0 replies; 5+ messages in thread
From: Jeffery von Ronne @ 2003-02-24 16:51 UTC (permalink / raw)
To: linuxppc-dev
On Mon, Feb 24, 2003 at 05:00:03PM +0100, Michel Lanners wrote:
> For a number of kernel versions (at least 4 months) I get a kernel oops
> when inserting a CF card in my TiBook's PCMCIA slot.
FWIW, mine's been broken off and on throughout the 2.4.x series.
Sometimes the driver has refused to load, do to resource prbolems.
Sometimes the machine will crash, probably, because interrupts are not
being handled correctly during DE device probe. I don't think I've
ever had a kernel that slept properly with a CF card. I'm currently
using 2.4.20-pre9-ben0 from October 14 (kernel compiled 00:03:50 Oct 15),
which seems to work as long as I don't put my TiPB to sleep with the
CF card in.
--
Jeffery von Ronne <jronne@ics.uci.edu>
Graduate Student Researcher
University of California, Irvine
"sed fortius fide et gaude in Christo" -Luther
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Oops when inserting PCMCIA flash card (IDE)
2003-02-24 16:00 Oops when inserting PCMCIA flash card (IDE) Michel Lanners
2003-02-24 16:51 ` Jeffery von Ronne
@ 2003-02-24 17:40 ` Benjamin Herrenschmidt
2003-02-25 5:39 ` Paul Mackerras
2 siblings, 0 replies; 5+ messages in thread
From: Benjamin Herrenschmidt @ 2003-02-24 17:40 UTC (permalink / raw)
To: mlan; +Cc: linuxppc-dev
On Mon, 2003-02-24 at 17:00, Michel Lanners wrote:
> The NIP in the oops points to ide_mm_inb(); it's trying to read from the
> IDE ports. However, the port the new IDE interface got assinged seems to
> be 0x100 (see r3: 0x107, which is port_base + IDE_STATUS_OFFSET). This
> is of course outside of the range the PCMCIA controller has:
>
> pooh:/etc/ppp# cat /proc/ioports
> 00000000-007fffff : /pci@f2000000
> 00001000-00008fff : PCI CardBus #11
> 00009000-000090ff : PCI CardBus #11
> 00802000-01001fff : /pci@f0000000
> 00802400-008024ff : ATI Technologies Inc Rage Mobility M3 AGP 2x
> ff7fe000-ffffdfff : /pci@f4000000
>
> So the problem seems to be the PCMCIA code gets the wrong ports for the
> PCMCIA card?
No, the ranges above are for cardbus, not pcmcia. pcmcia usually
assign resources outside of this range, and 0x100 looks like a
correct port. I'm not sure what is wrong, I'd say ide_mm_inb is
the wrong set of iops, it should be ide_inb instead (it's IO
port access, not MMIO), now we have to figure out why ide_mm_inb
got a assigned, I suspect ide_cs actually tried to re-use an IDE
slot that was initialized for ide-pmac (which is mmio).
There are various breakage with IDE in pre4, which is why I don't
quite suggest using my bk tree for now, I'm waiting for Alan &
Marcelo to sync all of Alan recent fixes before I really look into
debugging these.
Ben.
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Oops when inserting PCMCIA flash card (IDE)
2003-02-24 16:00 Oops when inserting PCMCIA flash card (IDE) Michel Lanners
2003-02-24 16:51 ` Jeffery von Ronne
2003-02-24 17:40 ` Benjamin Herrenschmidt
@ 2003-02-25 5:39 ` Paul Mackerras
2003-02-25 16:44 ` Michel Lanners
2 siblings, 1 reply; 5+ messages in thread
From: Paul Mackerras @ 2003-02-25 5:39 UTC (permalink / raw)
To: mlan; +Cc: linuxppc-dev
Michel Lanners writes:
> For a number of kernel versions (at least 4 months) I get a kernel oops
> when inserting a CF card in my TiBook's PCMCIA slot.
[snip]
> The NIP in the oops points to ide_mm_inb(); it's trying to read from the
> IDE ports. However, the port the new IDE interface got assinged seems to
It should of course be using ide_inb().
The problem is that there are 3 IDE interfaces on the tibook, and the
third one doesn't have anything attached. Thus ide2 gets set up as a
pmac-ide interface but ends up with the `present' flag false, since
the IDE layer has no way to represent an interface that is present but
has no drives attached. Then when you plug in the CF card it gets to
use ide2, but the data structures don't get properly initialized and
it goes off and tries to use pmac-ide routines on it.
I explained this problem to Alan Cox but didn't get him to focus on it
long enough to fix it properly. In the meantime I am using this hack:
diff -urN linux-2.5/drivers/ide/ide.c pmac-2.5/drivers/ide/ide.c
--- linux-2.5/drivers/ide/ide.c 2003-02-22 12:30:01.000000000 +1100
+++ pmac-2.5/drivers/ide/ide.c 2003-02-25 16:37:40.000000000 +1100
@@ -904,6 +904,7 @@
ide_unregister(index);
if (hwif->present)
return -1;
+ init_hwif_data(index);
memcpy(&hwif->hw, hw, sizeof(*hw));
memcpy(hwif->io_ports, hwif->hw.io_ports, sizeof(hwif->hw.io_ports));
hwif->irq = hw->irq;
Regards,
Paul.
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Oops when inserting PCMCIA flash card (IDE)
2003-02-25 5:39 ` Paul Mackerras
@ 2003-02-25 16:44 ` Michel Lanners
0 siblings, 0 replies; 5+ messages in thread
From: Michel Lanners @ 2003-02-25 16:44 UTC (permalink / raw)
To: paulus; +Cc: linuxppc-dev
On 25 Feb, this message from Paul Mackerras echoed through cyberspace:
> Michel Lanners writes:
>
>> For a number of kernel versions (at least 4 months) I get a kernel oops
>> when inserting a CF card in my TiBook's PCMCIA slot.
> [snip]
>> The NIP in the oops points to ide_mm_inb(); it's trying to read from the
>> IDE ports. However, the port the new IDE interface got assinged seems to
>
> It should of course be using ide_inb().
[snip]
> In the meantime I am using this hack:
[snip]
Thanks Paul, works OK for me on BenH's 2.4.21-pre3.
Hope you get Alan to find a final fix :-)
Cheers
Michel
-------------------------------------------------------------------------
Michel Lanners | " Read Philosophy. Study Art.
23, Rue Paul Henkes | Ask Questions. Make Mistakes.
L-1710 Luxembourg |
email mlan@cpu.lu |
http://www.cpu.lu/~mlan | Learn Always. "
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-02-25 16:44 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-24 16:00 Oops when inserting PCMCIA flash card (IDE) Michel Lanners
2003-02-24 16:51 ` Jeffery von Ronne
2003-02-24 17:40 ` Benjamin Herrenschmidt
2003-02-25 5:39 ` Paul Mackerras
2003-02-25 16:44 ` Michel Lanners
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).