Skip to contentSkip to conversation

32bit parisc kernel 2.6.1 and pcmcia

parisc-linux Helge Deller 3 participants 10 messages Jan 18, 2004 – Jan 20, 2004

lore
Share & tools
lore
#0 lore raw
rdi:~# uname -a
Linux rdi 2.6.1-pa7 #252 Sun Jan 18 20:09:08 CET 2004 parisc GNU/Linux
rdi:~# lsmod
Module                  Size  Used by
serial_cs               8392  1

dmesg: (This is my RDI Precisionbook B160L laptop)
Found devices:
1. Merlin+ 132 Dino PS/2 Port at 0xfff81000 [1] { 10, 0x0, 0x022, 0x00096 }
2. Phantom PseudoBC GSC+ Port at 0xffc00000 [8] { 7, 0x0, 0x504, 0x00000 }
3. Dino PCI Bridge at 0xfff80000 [8/0] { 13, 0x3, 0x680, 0x0000a }, additional addresses: 0xf0800000
4. Merlin+ 132 Dino RS-232 at 0xfff83000 [8/0/63] { 10, 0x0, 0x022, 0x0008c }
5. Merlin 160 Core BA at 0xffd00000 [8/16] { 11, 0x0, 0x03d, 0x00081 }, additional addresses: 0xffd0c000 0xffc00000
6. Merlin 160 Core Centronics at 0xffd02000 [8/16/0] { 10, 0x0, 0x03d, 0x00074 }, additional addresses: 0xffd01000 0xffd03000
7. Merlin 160 Core Audio at 0xffd04000 [8/16/1] { 10, 0x4, 0x03d, 0x0007b }
8. Merlin 160 Core RS-232 at 0xffd05000 [8/16/4] { 10, 0x0, 0x03d, 0x0008c }
9. Merlin 160 Core SCSI at 0xffd06000 [8/16/5] { 10, 0x0, 0x03d, 0x00082 }
10. Merlin 160 Core LAN (802.3) at 0xffd07000 [8/16/6] { 10, 0x0, 0x03d, 0x0008a }
11. Merlin 160 Core PS/2 Port at 0xffd08000 [8/16/7] { 10, 0x0, 0x03d, 0x00084 }
12. Merlin 160 Core PS/2 Port at 0xffd08100 [8/16/8] { 10, 0x0, 0x03d, 0x00084 }
13. Merlin 160 Core PC Floppy at 0xffd0a000 [8/16/10] { 10, 0x0, 0x03d, 0x00083 }
14. Gecko GSC Core Graphics at 0xf8000000 [8/24] { 10, 0x0, 0x016, 0x00085 }, additional addresses: 0xf0011000
15. Merlin L2 160 (9000/778/B160L) at 0xfffbe000 [62] { 0, 0x0, 0x502, 0x00004 }
16. Memory at 0xfffbf000 [63] { 1, 0x0, 0x067, 0x00009 }
CPU(s): 1 x PA7300LC (PCX-L2) at 160.000000 MHz
Lasi version 0 at 0xffd00000 found.
Dino parisc8:0 version 3.1 found at 0xfff80000
PCI: Bus 1, cardbus bridge: 0000:00:02.0
PCI: Bus 5, cardbus bridge: 0000:00:02.1

..now inserting my TDK ISDN/serial modem PCMCIA card....

kernel messages:
Dino fff80000: stuck interrupt 4
cs IO ports 0x0-0x7 allocated in parent Dino I/O Port

rdi:~# cat /proc/interrupts
           CPU00
 32:     252074      PARISC-CPU  timer
 33:      28596      PARISC-CPU  lasi
 34:         39      PARISC-CPU  Dino parisc8:0
 82:          0            Lasi  harmony
 86:       8089            Lasi  parisc8:16:5
 87:      20507            Lasi  i82596
 88:          0            Lasi  parport0
 98:        100  Dino parisc8:0  yenta
 99:          0  Dino parisc8:0  yenta
rdi:~# cardctl info
PRODID_1=""
PRODID_2=""
PRODID_3=""
PRODID_4=""
MANFID=0000,0000
FUNCID=255
PRODID_1="TDK"
PRODID_2="Global Pro ISDN V.90"
PRODID_3="C7500010"
PRODID_4=""
MANFID=0105,410a
FUNCID=2

Any ideas why I get the above "Dino fff80000: stuck interrupt 4" message ? It seems further interrupts are not delivered to serial_cs....

Thanks,
Helge

#1 lore raw
Quoted 2 lines · Helge Deller

Dino fff80000: stuck interrupt 4
cs IO ports 0x0-0x7 allocated in parent Dino I/O Port

Erk, I assume this is a yenta socket with two PCMCIA slots?

I wasn't sure what the setting should be when I constructed the code in the pa patch set (I only did it to get my PCI<->cardbus bridge working with a single slot yenta PCI card).

What information does the Yenta driver print?

James

#4 lore raw
In reply to Helge Deller
Quoted 1 line · Helge Deller

Dino fff80000: stuck interrupt 4

The message means the IRQ was asserted and whatever handlers are registered for that IRQ did not clear the IRQ level.

Quoted 2 lines

Any ideas why I get the above "Dino fff80000: stuck interrupt 4" message ? It seems further interrupts are not delivered to serial_cs....

When the PCI IRQ line is asserted, dino will only generate one interrupt to the CPU. CPU needs to read DINO_ILR and verify the IRQ has been de-asserted after the interrupt handler has been called. If PCI IRQ line is still asserted, we first assume several devices share the line and call the interrupt handlers again (goto ilr_again). If the PCI IRQ line is still asserted after testing ILR several times, (well, 100 times to be exact - see ilr_loop) , then we assume a HW defect. We driver writers don't like to admit something didn't register for the proper interrupt. But that is likely the case here and explains the message and only one interrupt.

I'd be curious if both sockets report the same IRQ (4) when inserting the PCMCIA card.

BTW, since PARISC doesn't tolerate accessing invalid MMIO addresses like x86 does, it wouldn't surprise me if you see HPMC's during PCMCIA device removal/eject operations. I suspect (but don't know for sure) that card eject on x86 only works becuase x86 returns garbage (-1 or 0 or something) for reads to non-responding address spaces.

hth,
grant

#5 lore raw
Quoted 9 lines · Grant Grundler
Quoted 1 line · Helge Deller

Dino fff80000: stuck interrupt 4

The message means the IRQ was asserted and whatever handlers are registered for that IRQ did not clear the IRQ level.

Quoted 2 lines

Any ideas why I get the above "Dino fff80000: stuck interrupt 4" message ? It seems further interrupts are not delivered to serial_cs....

Quoted 7 lines

When the PCI IRQ line is asserted, dino will only generate one interrupt to the CPU. CPU needs to read DINO_ILR and verify the IRQ has been de-asserted after the interrupt handler has been called. If PCI IRQ line is still asserted, we first assume several devices share the line and call the interrupt handlers again (goto ilr_again). If the PCI IRQ line is still asserted after testing ILR several times, (well, 100 times to be exact - see ilr_loop) , then we assume a HW defect.

Yes, that's exactly what I see:

rdi:~# cat /proc/interrupts
           CPU00
 98:        100  Dino parisc8:0  yenta
 99:          0  Dino parisc8:0  yenta
Quoted 6 lines

We driver writers don't like to admit something didn't register for the proper interrupt. But that is likely the case here and explains the message and only one interrupt.

I'd be curious if both sockets report the same IRQ (4) when inserting the PCMCIA card.

Yes, I get this "Dino fff80000: stuck interrupt 4" when inserting the card in any of the two slots.

Quoted 6 lines

BTW, since PARISC doesn't tolerate accessing invalid MMIO addresses like x86 does, it wouldn't surprise me if you see HPMC's during PCMCIA device removal/eject operations. I suspect (but don't know for sure) that card eject on x86 only works becuase x86 returns garbage (-1 or 0 or something) for reads to non-responding address spaces.

Happend not yet :-)
Let's see, when the driver tries to access the card....

Thanks for the explanation,
Helge

#2 lore raw
In reply to James Bottomley
Quoted 5 lines · James Bottomley
Quoted 2 lines · Helge Deller

Dino fff80000: stuck interrupt 4
cs IO ports 0x0-0x7 allocated in parent Dino I/O Port

Erk, I assume this is a yenta socket with two PCMCIA slots?

Yes.

Quoted 5 lines

I wasn't sure what the setting should be when I constructed the code in the pa patch set (I only did it to get my PCI<->cardbus bridge working with a single slot yenta PCI card).

What information does the Yenta driver print?

dmesg gives:
Dino parisc8:0 version 3.1 found at 0xfff80000
PCI: Bus 1, cardbus bridge: 0000:00:02.0
PCI: Bus 5, cardbus bridge: 0000:00:02.1
SCSI subsystem initialized
Linux Kernel Card Services
options: [pci] [cardbus]
....
Yenta: CardBus bridge found at 0000:00:02.0 [0000:0000]
Yenta: ISA IRQ mask 0x0000, PCI irq 98
Socket status: 30000007
Yenta: CardBus bridge found at 0000:00:02.1 [0000:0000]
Yenta: ISA IRQ mask 0x0000, PCI irq 99
Socket status: 30000007

rdi:~# lspci -v
00:02.0 CardBus bridge: Cirrus Logic PD 6832 PCMCIA/CardBus Ctrlr (rev c1)
        Flags: bus master, medium devsel, latency 168, IRQ 98
        Memory at f0800000 (32-bit, non-prefetchable) [size=4K]
        Bus: primary=00, secondary=01, subordinate=04, sec-latency=176
        Memory window 0: f0900000-f09ff000
        Memory window 1: f0a00000-f0aff000
        I/O window 0: 00000400-000004ff
        I/O window 1: 00000800-000008ff
        16-bit legacy interface ports at 0001

00:02.1 CardBus bridge: Cirrus Logic PD 6832 PCMCIA/CardBus Ctrlr (rev c1)

        Flags: bus master, medium devsel, latency 168, IRQ 99
        Memory at f0801000 (32-bit, non-prefetchable) [size=4K]
        Bus: primary=00, secondary=05, subordinate=08, sec-latency=176
        Memory window 0: f0b00000-f0bff000
        Memory window 1: f0c00000-f0cff000
        I/O window 0: 00000c00-00000cff
        I/O window 1: 00001000-000010ff

Helge

#6 lore raw
In reply to Helge Deller
Quoted 1 line · Helge Deller

..now inserting my TDK ISDN/serial modem PCMCIA card....

Sorry, I'm an idiot...these type of cards don't seem to work (they seem to require ISA IRQ routing rules, which we can't provide).

Do you have a network or wireless card you could try instead?

James

#3 lore raw
In reply to Helge Deller
Quoted 6 lines · Helge Deller

Yenta: CardBus bridge found at 0000:00:02.0 [0000:0000]
Yenta: ISA IRQ mask 0x0000, PCI irq 98
Socket status: 30000007
Yenta: CardBus bridge found at 0000:00:02.1 [0000:0000]
Yenta: ISA IRQ mask 0x0000, PCI irq 99
Socket status: 30000007

Hmm, that's not too good. It should look something like

Yenta: CardBus bridge found at 0000:00:02.0 [0000:0000]
Yenta: setting irqmux to INTA,INTB
Yenta: Enabling burst memory read transactions
Yenta: Using CSCINT to route CSC interrupts to PCI
Yenta: Routing CardBus interrupts to PCI
Yenta: ISA IRQ mask 0x0000, PCI irq 98
Socket status: 30000410
cs MEM ports 0xf0804000-0xf0804fff allocated in parent Dino parisc8:0 LMMIO 0
others)
cs IO ports 0x0-0x3f allocated in parent Dino I/O Port

The relevant points are the lines routing all the interrupts to PCI (because we can't do ISA interrupts).

The fixes I put into yenta were only for the PCI1410 (well, 13xx) yenta sockets, probably something extra has to be done to fix this one up.

James

#7 lore raw
In reply to James Bottomley
Quoted 5 lines · James Bottomley
Quoted 1 line · Helge Deller

..now inserting my TDK ISDN/serial modem PCMCIA card....

Sorry, I'm an idiot...these type of cards don't seem to work (they seem to require ISA IRQ routing rules, which we can't provide).

Wouldn't it be possible to write a wrapper, which simulated the ISA IRQs 0-15 and routes them to dino instead ?
Isn't this similiar like the hack we have for the EISA driver ? And maybe we are lucky and no PA-machine has both, EISA and PCMCIA. Would this be possible ?

Quoted 1 line

Do you have a network or wireless card you could try instead?

Sadly no, only one other ISDN card (AVM).

Helge

#8 lore raw
Quoted 5 lines · Helge Deller
Quoted 2 lines

Sorry, I'm an idiot...these type of cards don't seem to work (they seem to require ISA IRQ routing rules, which we can't provide).

Wouldn't it be possible to write a wrapper, which simulated the ISA IRQs 0-15 and routes them to dino instead ?

Yes

Quoted 3 lines

Isn't this similiar like the hack we have for the EISA driver ? And maybe we are lucky and no PA-machine has both, EISA and PCMCIA. Would this be possible ?

Certainly. Need to write the "glue" that aliases the ESIA IRQs (IRQ region 0) to which ever Dino IRQ region is handling them. In other words, convert the PCI interrupts to ISA interrupts. If you could fake the ISA driver into using PCI interrupts (ie IRQs > 15), then one could register device driver interrupt handler directly with Dino. Otherwise, an intermediate interrupt handler will be needed that translates the Dino interrupt into whatever IRQ the PCMCIA/ISA device thinks it's using.

I don't konw any of the details, that's just the overview. In particular, how to determine which Dino is the right one. On RDI PrecisionBook laptop, it might be simple and maybe just make some assumptions based on that implementation.

grant

#9 lore raw
In reply to Helge Deller
Quoted 5 lines · Helge Deller

Wouldn't it be possible to write a wrapper, which simulated the ISA IRQs 0-15 and routes them to dino instead ?
Isn't this similiar like the hack we have for the EISA driver ? And maybe we are lucky and no PA-machine has both, EISA and PCMCIA. Would this be possible ?

OK...Just to confirm what you're getting yourself into:

The yenta socket is a deep black art. It also covers a multitude of slightly different standards (from different manufacturers). I learned enough of the sourcery to say the required incantations for my particular needs (which were a B180 with a PCI<->cardbus yenta socket that came free with my zoom wireless card).

In order to get my setup to work, I also had to replumb virtually the whole of the dino PCI system (I needed this because the B180 firmware barfed at the PCMCIA socket and simply disabled it).

The point, I'm afraid, is that although I got it work for me, I'll bet not much of the magic is transferrable, so you may also find yourself ploughing through the yenta specs...

If this hasn't deterred you, then read on intrepid adventurer.

One of the things you seem to have from the error messages is IRQ misrouting. Could you boot up (or stop PCMCIA, remove all the modules, including the core and restart) with a card in the socket? The socket status should tell us which one, and the IRQ line is given by lspci. Since the chip is both PCI device functions, it's not impossible to have the IRQ routings messed up.

James