All of lore.kernel.org
 help / color / mirror / Atom feed
* [parisc-linux] 32bit parisc kernel 2.6.1 and pcmcia
@ 2004-01-18 19:59 Helge Deller
  2004-01-18 23:44 ` James Bottomley
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Helge Deller @ 2004-01-18 19:59 UTC (permalink / raw)
  To: PARISC list

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [parisc-linux] 32bit parisc kernel 2.6.1 and pcmcia
  2004-01-18 19:59 [parisc-linux] 32bit parisc kernel 2.6.1 and pcmcia Helge Deller
@ 2004-01-18 23:44 ` James Bottomley
  2004-01-19  9:07   ` Helge Deller
  2004-01-19  5:59 ` Grant Grundler
  2004-01-19 14:35 ` James Bottomley
  2 siblings, 1 reply; 10+ messages in thread
From: James Bottomley @ 2004-01-18 23:44 UTC (permalink / raw)
  To: Helge Deller; +Cc: PARISC list

On Sun, 2004-01-18 at 14:59, Helge Deller wrote:
> 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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [parisc-linux] 32bit parisc kernel 2.6.1 and pcmcia
  2004-01-18 19:59 [parisc-linux] 32bit parisc kernel 2.6.1 and pcmcia Helge Deller
  2004-01-18 23:44 ` James Bottomley
@ 2004-01-19  5:59 ` Grant Grundler
  2004-01-19  9:03   ` Helge Deller
  2004-01-19 14:35 ` James Bottomley
  2 siblings, 1 reply; 10+ messages in thread
From: Grant Grundler @ 2004-01-19  5:59 UTC (permalink / raw)
  To: Helge Deller; +Cc: PARISC list

On Sun, Jan 18, 2004 at 08:59:34PM +0100, Helge Deller wrote:
> 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.

> 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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [parisc-linux] 32bit parisc kernel 2.6.1 and pcmcia
  2004-01-19  5:59 ` Grant Grundler
@ 2004-01-19  9:03   ` Helge Deller
  0 siblings, 0 replies; 10+ messages in thread
From: Helge Deller @ 2004-01-19  9:03 UTC (permalink / raw)
  To: parisc-linux; +Cc: Grant Grundler

On Monday 19 January 2004 06:59, Grant Grundler wrote:
> On Sun, Jan 18, 2004 at 08:59:34PM +0100, Helge Deller wrote:
> > 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.
> 
> > 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.

Yes, that's exactly what I see:
rdi:~# cat /proc/interrupts
           CPU00
 98:        100  Dino parisc8:0  yenta
 99:          0  Dino parisc8:0  yenta

> 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.

> 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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [parisc-linux] 32bit parisc kernel 2.6.1 and pcmcia
  2004-01-18 23:44 ` James Bottomley
@ 2004-01-19  9:07   ` Helge Deller
  2004-01-19 14:38     ` James Bottomley
  0 siblings, 1 reply; 10+ messages in thread
From: Helge Deller @ 2004-01-19  9:07 UTC (permalink / raw)
  To: parisc-linux; +Cc: James Bottomley

On Monday 19 January 2004 00:44, James Bottomley wrote:
> On Sun, 2004-01-18 at 14:59, Helge Deller wrote:
> > 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.
 
> 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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [parisc-linux] 32bit parisc kernel 2.6.1 and pcmcia
  2004-01-18 19:59 [parisc-linux] 32bit parisc kernel 2.6.1 and pcmcia Helge Deller
  2004-01-18 23:44 ` James Bottomley
  2004-01-19  5:59 ` Grant Grundler
@ 2004-01-19 14:35 ` James Bottomley
  2004-01-19 21:48   ` Helge Deller
  2 siblings, 1 reply; 10+ messages in thread
From: James Bottomley @ 2004-01-19 14:35 UTC (permalink / raw)
  To: Helge Deller; +Cc: PARISC list

On Sun, 2004-01-18 at 14:59, Helge Deller wrote:
> ..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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [parisc-linux] 32bit parisc kernel 2.6.1 and pcmcia
  2004-01-19  9:07   ` Helge Deller
@ 2004-01-19 14:38     ` James Bottomley
  0 siblings, 0 replies; 10+ messages in thread
From: James Bottomley @ 2004-01-19 14:38 UTC (permalink / raw)
  To: Helge Deller; +Cc: PARISC list

On Mon, 2004-01-19 at 04:07, Helge Deller wrote:
> 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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [parisc-linux] 32bit parisc kernel 2.6.1 and pcmcia
  2004-01-19 14:35 ` James Bottomley
@ 2004-01-19 21:48   ` Helge Deller
  2004-01-20  0:50     ` Grant Grundler
  2004-01-20  1:16     ` James Bottomley
  0 siblings, 2 replies; 10+ messages in thread
From: Helge Deller @ 2004-01-19 21:48 UTC (permalink / raw)
  To: parisc-linux; +Cc: James Bottomley

On Monday 19 January 2004 15:35, James Bottomley wrote:
> On Sun, 2004-01-18 at 14:59, Helge Deller wrote:
> > ..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 ?

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

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

Helge

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [parisc-linux] 32bit parisc kernel 2.6.1 and pcmcia
  2004-01-19 21:48   ` Helge Deller
@ 2004-01-20  0:50     ` Grant Grundler
  2004-01-20  1:16     ` James Bottomley
  1 sibling, 0 replies; 10+ messages in thread
From: Grant Grundler @ 2004-01-20  0:50 UTC (permalink / raw)
  To: Helge Deller; +Cc: James Bottomley, parisc-linux

On Mon, Jan 19, 2004 at 10:48:29PM +0100, Helge Deller wrote:
> > 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

> 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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [parisc-linux] 32bit parisc kernel 2.6.1 and pcmcia
  2004-01-19 21:48   ` Helge Deller
  2004-01-20  0:50     ` Grant Grundler
@ 2004-01-20  1:16     ` James Bottomley
  1 sibling, 0 replies; 10+ messages in thread
From: James Bottomley @ 2004-01-20  1:16 UTC (permalink / raw)
  To: Helge Deller; +Cc: PARISC list

On Mon, 2004-01-19 at 16:48, Helge Deller wrote:
> 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

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2004-01-20  1:16 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-18 19:59 [parisc-linux] 32bit parisc kernel 2.6.1 and pcmcia Helge Deller
2004-01-18 23:44 ` James Bottomley
2004-01-19  9:07   ` Helge Deller
2004-01-19 14:38     ` James Bottomley
2004-01-19  5:59 ` Grant Grundler
2004-01-19  9:03   ` Helge Deller
2004-01-19 14:35 ` James Bottomley
2004-01-19 21:48   ` Helge Deller
2004-01-20  0:50     ` Grant Grundler
2004-01-20  1:16     ` James Bottomley

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.