Re: [PATCH] PCI detection in 2.2.x and 2.4.0

From: Rasmus Andersen (rasmus@jaquet.dk)
Date: Fri Oct 06 2000 - 13:35:17 EST


> Some years ago, the PCI routines have really used this strategy
> (and the obsolete help text reflects this situation), but unfortunately,
> there exist machines where the direct access detection gives bogus
> results, so it's much better to ask the BIOS first. Also, it's conceptually
> cleaner to use a well-defined BIOS interface than to probe random
> ports (well, they are random on all non-PCI machines).
>
> These are the reasons why I'd prefer keeping the current code and
> just fixing the documentation.

Having had time to think, I think there is a discrepancy between
what you say here and the code: If CONFIG_PCI_GOANY=y the code
now goes through BIOS first and then (irrespectively of the
BIOS scan) directly. If going directly isn't nice, wouldn't we
be better off by checking on the return from the BIOS scan
before poking directly?

Examply patch below. If you concur, I will submit this along with
updated documentation to Linus later.

--- linux-240-test9-clean/arch/i386/kernel/pci-pc.c Mon Oct 2 22:28:26 2000
+++ linux/arch/i386/kernel/pci-pc.c Fri Oct 6 20:24:46 2000
@@ -969,7 +969,7 @@
         }
 #endif
 #ifdef CONFIG_PCI_DIRECT
- if (pci_probe & (PCI_PROBE_CONF1 | PCI_PROBE_CONF2))
+ if (!bios && (pci_probe & (PCI_PROBE_CONF1 | PCI_PROBE_CONF2)))
                 dir = pci_check_direct();
 #endif
         if (dir)

-- 
Regards,
        Rasmus(rasmus@jaquet.dk)

You know how dumb the average guy is? Well, by definition, half of them are even dumber than that. -- J.R. "Bob" Dobbs - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Oct 07 2000 - 21:00:19 EST