Re: ISAPNP using an invalid IRQ, 2.4.0-test7

2000-09-18 Thread M.H.VanLeeuwen

Jaroslav Kysela wrote:
> 
> On Tue, 29 Aug 2000, M.H.VanLeeuwen wrote:
> 
> > With default BIOS settings, IRQ 5 is unavailable for ISA yet
> > it is being assigned by the ne.c driver and NFS root system
> > doesn't finish booting.
> >
> > Is this a driver problem or a ISAPNP problem?
> 
> It is general IRQ manager problem. ISA PnP code cannot determine which
> interrupts cannot be used. I think that we need some next layer between
> IO APIC control code and Plug & Play routines to exchange this information
> to prevent allocation of a free but unuseable IRQ for ISA PnP devices.
> 
> Jaroslav
> 

Jaroslav,

This patch is a first approximation to the above problem, can U look it over?

Basically, it discards any unusable IO_APIC IRQs from the list of IRQs that
ISA PNP is trying to allocate from - but only if IO_APIC IRQs are available.
This works for none APIC systems as well since io_apic_irqs s/b zero if
APIC's don't exist.

Comments?
Martin

--- /home/mhvl/linux.orig/drivers/pnp/isapnp.c  Tue Jul 25 20:25:14 2000
+++ isapnp.cMon Sep 18 21:28:39 2000
@@ -33,10 +33,10 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
+#include 

 LIST_HEAD(isapnp_cards);
 LIST_HEAD(isapnp_devices);
@@ -1598,6 +1598,8 @@

if (irq < 0 || irq > 15)
return 1;
+   if (!IO_APIC_IRQ(irq) && io_apic_irqs)
+   return 1;
for (i = 0; i < 16; i++) {
if (isapnp_reserve_irq[i] == irq)
return 1;
--- /home/mhvl/linux.orig/drivers/pnp/isapnp_proc.c Wed Jul 12 23:58:43 2000
+++ isapnp_proc.c   Wed Sep 13 22:39:47 2000
@@ -30,6 +30,7 @@
 #include 
 #include 
 #include 
+#include 

 struct isapnp_info_buffer {
char *buffer;   /* pointer to begin of buffer */
@@ -448,7 +449,7 @@

isapnp_printf(buffer, "%sIRQ ", space);
for (i = 0; i < 16; i++)
-   if (irq->map & (1

Re: ISAPNP using an invalid IRQ, 2.4.0-test7

2000-08-30 Thread M.H.VanLeeuwen

Jaroslav Kysela wrote:
> 
> On Tue, 29 Aug 2000, M.H.VanLeeuwen wrote:
> 
> > With default BIOS settings, IRQ 5 is unavailable for ISA yet
> > it is being assigned by the ne.c driver and NFS root system
> > doesn't finish booting.
> >
> > Is this a driver problem or a ISAPNP problem?
> 
> It is general IRQ manager problem. ISA PnP code cannot determine which
> interrupts cannot be used. I think that we need some next layer between
> IO APIC control code and Plug & Play routines to exchange this information
> to prevent allocation of a free but unuseable IRQ for ISA PnP devices.
> 
> Jaroslav

Kind of what I figured, too bad Linux 2.4 PNP is akin to Plug'N Pray (trademark MS ;)).
It seems as though 2.4 is taking a step backwards since the same system/bios setup
worked just fine on 2.2 with userland PNP utilities.  Making PNP work for more
cases would sure be nice.

Do you know of anyone actively working to make the above kernel adjustments?
Can it be done relatively easily?

Martin
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/