[patches 6/8] pcmcia: remove racy try_irq()

David Hinds dhinds at sonic.net
Tue Jan 11 15:11:45 EST 2005


On Tue, Jan 11, 2005 at 05:59:00PM +0100, Dominik Brodowski wrote:

> Remove the racy try_irq/check_irq/undo_irq interface, and try to
> register the correct handler directly in pcmcia_request_irq(). Also,
> remove the unneeded database in rsrc_mgr, as the kernel IRQ
> subsystem does that for us.

I don't think this will work, unless you require that cards register a
handler at the time the interrupt is selected, which would break some
drivers (serial_cs, ide-cs at least).  The kernel serial driver only
registers an interrupt when a port is in-use.  So if you plug in two
PCMCIA serial cards, both will get the same interrupt assigned, unless
you change things around so that the serial interrupt handler is
registered at card insertion time.

This exposes a basic problem with the kernel's scheme for managing
system resources: it does not distinguish between a piece of hardware
occupying a resource, and a driver using a resource to talk to some
hardware.  Because the kernel relies on drivers to reserve resources,
the kernel resource database can't be depended on for hot plug
resource allocation.

-- Dave



More information about the linux-pcmcia mailing list