Re: PATCH: Support PCI device sorting (Re: PCI device order problem)

From: Jeff Garzik (jgarzik@pobox.com)
Date: Sat Oct 26 2002 - 17:29:23 EST


H. J. Lu wrote:

>On Sat, Oct 26, 2002 at 06:04:00PM -0400, Jeff Garzik wrote:
>
>
>>Which is the entire problem. The kernel compiles and builds just fine
>>right now, without your function.
>>
>>
>>
>
>Without my patch or my function? My patched file has
>
> if ((pci_probe & PCI_BUS_SORT) && !(pci_probe & PCI_NO_SORT))
> pci_sort_by_bus_slot_func();
>#ifdef CONFIG_PCI_BIOS
> else if ((pci_probe & PCI_BIOS_SORT) && !(pci_probe & PCI_NO_SORT))
> pcibios_sort();
>#endif
>
>That is pci_sort_by_bus_slot_func () will be called if PCI_BUS_SORT is
>set. It is independent of whether CONFIG_PCI_SORT_BY_BUS_SLOT_FUNC is
>set or not, which sets PCI_BUS_SORT. If pci_sort_by_bus_slot_func is
>not defined when CONFIG_PCI_SORT_BY_BUS_SLOT_FUNC is not set. How can
>kernel compile?
>
I am obviously not being understood / not communicating myself clearly.

Your patch unconditionally adds a new function.
Don't do that. Wrap it in an ifdef, like you propose below.

>I added pci=nobussort since it might not be safe for all MBs. Then I
>added "pci=bussort". I have no problem taking out "pci=bussort". If you
>don't want "pci=bussort", please say so. I can provide a new patch which
>won't define pci_sort_by_bus_slot_func if CONFIG_PCI_SORT_BY_BUS_SLOT
>is not set and won't have "pci=bussort" either.
>
>

You're still missing the point here too.

Your patch has the potential to suddenly make systems unbootable, to
suddenly reverse people's ethX interface numbering, etc. No command
line options in the world will save lkml from being deluged by tons of
"my system doesn't network anymore" bug reports.

The basic point is "let's proceed with caution, and test test test
before applying this patch."

    Jeff

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Oct 31 2002 - 22:00:32 EST