Question regarding IRQF_SHARED and pcmcia driver
kristoffer.ericson at gmail.com
Fri Jan 11 04:20:58 EST 2008
On Fri, 11 Jan 2008 01:08:46 +0100
Peter Stuge <stuge-linux-pcmcia at cdy.org> wrote:
> On Wed, Jan 09, 2008 at 09:02:57PM -0800, Kristoffer Ericson wrote:
> > Still debugging hd64461 pcmcia driver. My best guess is that it for
> > some reason cannot register the pccard irq and therefore bugs out
> > when socket IRQ returns IRQ_NONE.
> Is this an "ISA" device? pccard=pcmcia or pccard=cardbus?
> The socket itself has one interrupt, which will be used at least for
> Cardbus cards, which are really just PCI devices AFAIK.
> PCMCIA is more like ISA and it may not neccessarily be the same
> interrupt that is used for them?
The same interrupt source (79) is used for both pcmcia slot and pcmcia card (16bit), so I divide them
by detecting where the interrupt came from.
> > More specificly I suspect it tries to request the pccard irq
> > without IRQF_SHARED flag and therefore is unable to aquire it.
> > Anyhow, short questions:
> I'll speculate a bit, maybe it'll help.
Really appreciate it, haven't gotten any other feedback from anyone.
> > 1) purpose of socket->functions? I see its checked in
> > pcmcia_request_irq and if > 1 it should set pccard IRQ to type
> > IRQF_SHARED.
> > I thought if socket.irq = pci.irq it would guess that its dealing
> > with a shared interrupt.
> I think socket.irq will always be = pci.irq since the socket is
> pretty much the PCI device.
> I don't know exactly how linux-pcmcia works, maybe socket->functions
> is linux-pcmcia interrupt sharing for PCMCIA cards?
> > 2) Best way to reserve pccard irq interrupt? And does the handler
> > get replaced by the proper driver handler?
> Again, do you mean cardbus or pcmcia? And what exactly is the hd64461
> - card host or card?
pcmcia (16bit). hd64461 is a companion chip that provides features like pcmcia, lcd,...
> > From what I can tell the socket interrupt is working fine
> > (detecting changes properly) but everytime it pushes IRQ_NONE
> > (interrupt ment for pccard interrupt) it oopses with "nobody
> > cared..".
> Because there is no driver that requested the irq I guess?
Haven't thought about it like that, but you are correct. I always suspected the driver simply had issues getting
the irq, but it could also mean that no driver is loaded (and thus no irq request). This driver is based on an old one which used port-translations, you know the crappy PORT 0xblablabla = (real adress) 0xblobloblo, so I might have gotten an adress wrong and in there
caused the driver to fail its probing. Thoughts?
Anyway, please give more feedback if you can. :)
> Linux PCMCIA reimplementation list
Kristoffer Ericson <Kristoffer.Ericson at Gmail.com>
More information about the linux-pcmcia