All of lore.kernel.org
 help / color / mirror / Atom feed
From: Helge Deller <deller@gmx.de>
To: James Bottomley <James.Bottomley@steeleye.com>
Cc: parisc-linux@lists.parisc-linux.org,
	Russell King <rmk+pcmcia@arm.linux.org.uk>,
	linux-pcmcia@lists.infradead.org,
	Kyle McMartin <kyle@parisc-linux.org>
Subject: Re: [parisc-linux] Re: [PATCH] PCMCIA: Disable probing on parisc
Date: Sun, 11 Dec 2005 23:35:02 +0100	[thread overview]
Message-ID: <200512112335.03032.deller@gmx.de> (raw)
In-Reply-To: <1134333477.3367.16.camel@mulgrave>

[-- Attachment #1: Type: text/plain, Size: 2117 bytes --]

On Sunday 11 December 2005 21:37, James Bottomley wrote:
> On Sun, 2005-12-11 at 19:55 +0100, Helge Deller wrote:
> > Seems ok, but I still have the "stuck IRQ" problem:
> 
> Hmm, perhaps the place to start for this is the firmware information:
> In my system, the firmware actually disables the PCMCIA bridge (I assume
> because it doesn't understand it).  That's why I added all the code to
> dino to redo the entire PCI resource tree, so that it automatically
> brings up the PCMCIA bridge.  However, your firmware should understand
> the PCMCIA bridge, but it might have some other way of routing the IRQ.

Grant helped me to analyze this problem.
The pcmcia irq line seems to be allways off-by-one, e.g. PCI irq 25 got local irq 2 on dino which was wrong and should have become "1".
Grants comment on this was: "Sounds like we need a quirk in drivers/pci/quirks.c to deal with this."
 "or our algorithm for routing IRQ_PIN to INTERRUPT_LINE routing is broken."

Based on that I just created the attached patch. With it pcmcia now works for me.
Maybe you have an idea if something in dino is wrong ?

Helge

dmesg:
PCI: Cirrus Cardbus IRQ fixup for 0000:00:02.0, from 25 to 24 (old native irq=2)
Yenta: CardBus bridge found at 0000:00:02.0 [0000:0000]
PCI: Bus 1, cardbus bridge: 0000:00:02.0
  IO window: 00000400-000005ff
  IO window: 00000800-000009ff
  PREFETCH window: f0c00000-f0ffffff
  MEM window: f0900000-f09fffff
Yenta: ISA IRQ mask 0x0000, PCI irq 24
Socket status: 30000007
pcmcia: parent PCI bridge I/O window: 0x0 - 0xffff
pcmcia: parent PCI bridge Memory window: 0xf0800000 - 0xf0ffffff
PCI: Cirrus Cardbus IRQ fixup for 0000:00:02.1, from 26 to 25 (old native irq=3)
Yenta: CardBus bridge found at 0000:00:02.1 [0000:0000]
PCI: Bus 5, cardbus bridge: 0000:00:02.1
  IO window: 00000c00-00000dff
  IO window: 00001000-000011ff
  PREFETCH window: f0a00000-f0afffff
  MEM window: f0b00000-f0bfffff
Yenta: ISA IRQ mask 0x0000, PCI irq 25
Socket status: 30000007
pcmcia: parent PCI bridge I/O window: 0x0 - 0xffff
pcmcia: parent PCI bridge Memory window: 0xf0800000 - 0xf0ffffff
ds: ds_open(socket 0)

[-- Attachment #2: diff --]
[-- Type: text/plain, Size: 1358 bytes --]

Index: quirks.c
===================================================================
RCS file: /var/cvs/linux-2.6/drivers/pci/quirks.c,v
retrieving revision 1.35
diff -u -p -r1.35 quirks.c
--- quirks.c	12 Nov 2005 04:08:03 -0000	1.35
+++ quirks.c	11 Dec 2005 22:22:58 -0000
@@ -862,6 +862,28 @@ static void __init quirk_eisa_bridge(str
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82375,	quirk_eisa_bridge );
 
 /*
+ * Cirrus 6832 Cardbus reports wrong irq on RDI Tadpole PARISC Laptop.
+ */
+#if defined(CONFIG_PARISC)
+static void __devinit quirk_hp_cardbus(struct pci_dev *dev)
+{
+        u8 irq, new_irq;
+
+	new_irq = dev->irq - 1;
+        pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq);
+
+	printk(KERN_ERR "PCI: Cirrus Cardbus IRQ fixup for %s, from %d to %d (old native irq=%d)\n",
+                        pci_name(dev), dev->irq, new_irq, irq);
+	dev->irq = new_irq;
+
+	udelay(15);     /* unknown if delay really needed */
+	pci_write_config_byte(dev, PCI_INTERRUPT_LINE, new_irq);
+
+}
+DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_CIRRUS,	PCI_DEVICE_ID_CIRRUS_6832,	quirk_hp_cardbus );
+#endif
+
+/*
  * On ASUS P4B boards, the SMBus PCI Device within the ICH2/4 southbridge
  * is not activated. The myth is that Asus said that they do not want the
  * users to be irritated by just another PCI Device in the Win98 device

[-- Attachment #3: Type: text/plain, Size: 169 bytes --]

_______________________________________________
parisc-linux mailing list
parisc-linux@lists.parisc-linux.org
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux

  reply	other threads:[~2005-12-11 22:35 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-04  6:04 [parisc-linux] [PATCH] PCMCIA: Disable probing on parisc Kyle McMartin
2005-12-04 10:33 ` [parisc-linux] " Russell King
2005-12-04 17:52   ` Kyle McMartin
2005-12-05 21:32   ` James Bottomley
2005-12-05 22:03     ` Russell King
2005-12-06  0:45       ` James Bottomley
2005-12-06  9:36         ` Russell King
2005-12-06 13:36           ` James Bottomley
2005-12-07 12:21             ` Dominik Brodowski
2005-12-07 14:01               ` James Bottomley
2005-12-11  6:50               ` Grant Grundler
2005-12-11 15:14                 ` James Bottomley
2005-12-11 17:50                   ` Grant Grundler
2005-12-11 18:01                     ` James Bottomley
2005-12-11 18:55                       ` Helge Deller
2005-12-11 19:09                         ` Matthew Wilcox
2005-12-11 19:49                         ` Dominik Brodowski
2005-12-11 20:37                         ` James Bottomley
2005-12-11 22:35                           ` Helge Deller [this message]
2005-12-12  7:30                             ` Grant Grundler
2005-12-12 14:45                               ` James Bottomley
2005-12-12 21:17                                 ` Helge Deller
2005-12-13 22:28                                   ` Grant Grundler
2005-12-11 19:48                       ` Dominik Brodowski
2005-12-11 20:23                         ` James Bottomley
2005-12-06  8:14       ` Grant Grundler
2005-12-06  9:49         ` Russell King
2005-12-06 16:46           ` Grant Grundler
2005-12-11  7:41           ` Grant Grundler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200512112335.03032.deller@gmx.de \
    --to=deller@gmx.de \
    --cc=James.Bottomley@steeleye.com \
    --cc=grundler@parisc-linux.org \
    --cc=kyle@parisc-linux.org \
    --cc=linux-pcmcia@lists.infradead.org \
    --cc=parisc-linux@lists.parisc-linux.org \
    --cc=rmk+pcmcia@arm.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.