linux-mips
[Top] [All Lists]

RE: pcmcia - failed to initialize IDE interface

To: <linux-mips@linux-mips.org>
Subject: RE: pcmcia - failed to initialize IDE interface
From: "Aeschbacher, Fabrice" <Fabrice.Aeschbacher@siemens.com>
Date: Fri, 27 Apr 2007 10:00:06 +0200
Cc: "lkml" <linux-kernel@vger.kernel.org>, <linux-pcmcia@lists.infradead.org>
In-reply-to: <20070425190753.fb8c272d.akpm@linux-foundation.org>
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
Thread-index: AceHqEmPYMhqH9+RSm+Ie3xgpMcxxgA9vZhw
Thread-topic: pcmcia - failed to initialize IDE interface
I think I isolated the problem: in ide-cs.c, ide_config() is calling
pcmcia_request_irq(), and this function happens to set irq=35. This irq
was not rejected later in ide_probe.c, hwif_init():

  ide0: Disabled unable to get IRQ 35

I noticed that the old kernel 2.4.26 used irq=40 here. So I tried to
force pcmcia_request_irq() to set irq=40, like follows:

--- linux-2.6.20.7-orig/drivers/pcmcia/pcmcia_resource.c
2007-04-15 21:08:02.000000000 +0200
+++ linux-2.6.20.7/drivers/pcmcia/pcmcia_resource.c     2007-04-27
09:20:41.000000000 +0200
@@ -867,6 +867,7 @@
                printk(KERN_WARNING "pcmcia: request for exclusive IRQ
could not be fulfilled.\n");
                printk(KERN_WARNING "pcmcia: the driver needs updating
to supported shared IRQ lines.\n");
        }
+       irq = 40;
        c->irq.Attributes = req->Attributes;
        s->irq.AssignedIRQ = req->AssignedIRQ = irq;
        s->irq.Config++;

and this happens to work: ide_config() succeeds, and finally I can mount
the CF and use it.

Other values for irq (i tried 39, 41) won't work either.

Which would be the correct way to make pcmcia_request_irq() use the
correct value of 40?

Fabrice


> -----Original Message-----
> From: Andrew Morton [mailto:akpm@linux-foundation.org] 
> Sent: Donnerstag, 26. April 2007 04:08
> To: Aeschbacher, Fabrice
> Cc: lkml; linux-mips@linux-mips.org
> Subject: Re: pcmcia - failed to initialize IDE interface
> 
> On Wed, 25 Apr 2007 15:27:26 +0200 "Aeschbacher, Fabrice" 
> <Fabrice.Aeschbacher@siemens.com> wrote:
> 
> > Hi,
> > 
> > [kernel 2.6.20.7, arch=mips, processor=amd au1550]
> > 
> > I'm trying to install a 2.6 kernel on an Alchemy au1550, and having 
> > problem with the pcmcia socket, where I plugged a 
> CompactFlash card. 
> > The card seems to be recognized by the kernel, appears in 
> > /sys/bus/pcmcia/devices, but not in /proc/bus/pccard, and I can't 
> > access the device (/dev/hda).
> > 
> > The relevant console messages:
> > ----------------------------------------------------------------
> > pccard: PCMCIA card inserted into slot 0
> > pcmcia: registering new device pcmcia0.0
> > hda: SanDisk SDCFB-64, CFA DISK drive
> > ide0: Disabled unable to get IRQ 35.
> > ide0: failed to initialize IDE interface
> > ide0: I/O resource 0x10200E-0x10200E not free.
> > ide0: ports already in use, skipping probe
> > ide0: I/O resource 0x10200E-0x10200E not free.
> > ide0: ports already in use, skipping probe
> > ide0: I/O resource 0x10200E-0x10200E not free.
> > ide0: ports already in use, skipping probe
> > ide0: I/O resource 0x10200E-0x10200E not free.
> > ide0: ports already in use, skipping probe
> > ide0: I/O resource 0x10200E-0x10200E not free.
> > ide0: ports already in use, skipping probe
> > ide0: I/O resource 0x10200E-0x10200E not free.
> > ide0: ports already in use, skipping probe
> > ide0: I/O resource 0x10200E-0x10200E not free.
> > ide0: ports already in use, skipping probe
> > ide0: I/O resource 0x10200E-0x10200E not free.
> > ide0: ports already in use, skipping probe
> > ide0: I/O resource 0x10200E-0x10200E not free.
> > ide0: ports already in use, skipping probe
> > ide-cs: ide_register() at 0x102000 & 0x10200e, irq 35 failed
> > ----------------------------------------------------------------
> > 
> > Here is the relevant part of the kernel config:
> > CONFIG_IDE=y
> > CONFIG_IDE_GENERIC=y
> > CONFIG_BLK_DEV_IDE=y
> > CONFIG_BLK_DEV_IDECS=y
> > CONFIG_PCCARD=y
> > CONFIG_PCMCIA_DEBUG=y
> > CONFIG_PCMCIA=y
> > CONFIG_PCMCIA_AU1X00=y
> > 
> 
> (cc'ed linux-mips)
> 
> Perhaps /proc/ioports will tell us where the conflict lies.
> 
> The output of `dmesg -s 1000000' might also be needed.
> 

<Prev in Thread] Current Thread [Next in Thread>