Re: [Strategic] Linux will never master Plug & Play !?

Alan Cox (alan@lxorguk.ukuu.org.uk)
Fri, 18 Apr 1997 19:04:17 +0100 (BST)


> All I'm asking for (first step) is a way to determine _all_ occupied
> resources the kernel knows about, and not only if the devices in question are
> in use. Then an automated algorithm (second step) can determine an assignment
> of the remaining resources to PnP cards via isapnp(8) and provide the values
> to the non-PnP driver modules of those cards (in-kernel, third step).

There is actually not a lot you need. The current behaviour is correct.

> Isn't this worth "breaking" the non-working interrupt-sharing-by-handler-
> switching ?

Why should you break it ?

IFF a device is using the IRQ you can't get to use it. All that is needed
to handle the PnP case therefore is

reserve_irq(irqnum)
unreserve_irq(irqnum)

and devices can mark that even if they aren't using the irq currently. Non
PnP devices can take note of that and will collide as before and work
as before. PnP devices will keep clear of those assignments.

Since reserve/unreserve_irq look something like

int irq_reserve_count[NUM_IRQS];
extern __inline__ void reserve_irq(int n){irq_reserve_count[n]++;}

its not serious code to add either. I'll take a look this weekend

Alan