Bug 205975 - FC6 kernel: sort PCI device list breadth-first
Summary: FC6 kernel: sort PCI device list breadth-first
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: rawhide
Hardware: All
OS: Linux
medium
high
Target Milestone: ---
Assignee: Dave Jones
QA Contact: Brian Brock
URL: http://marc.theaimsgroup.com/?l=linux...
Whiteboard:
Depends On:
Blocks: 209484 210588
TreeView+ depends on / blocked
 
Reported: 2006-09-11 03:36 UTC by Matt Domsch
Modified: 2015-01-04 22:28 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-04-23 18:52:36 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
linux-2.6-pci-bfsort.patch (7.51 KB, patch)
2006-10-05 21:08 UTC, Matt Domsch
no flags Details | Diff

Description Matt Domsch 2006-09-11 03:36:40 UTC
Description of problem:
http://marc.theaimsgroup.com/?l=linux-kernel&m=115774419608542&w=2

Problem:
New Dell PowerEdge servers have 2 embedded ethernet ports, which are
labeled NIC1 and NIC2 on the chassis, in the BIOS setup screens, and
in the printed documentation.  Assuming no other add-in ethernet ports
in the system, Linux 2.4 kernels name these eth0 and eth1
respectively.  Many people have come to expect this naming.  Linux 2.6
kernels name these eth1 and eth0 respectively (backwards from
expectations).  I also have reports that various Sun and HP servers
have similar behavior.

Patch in the URL above, as well as ongoing discussion as to whether or not it
should really be applied.

DaveJ has participated in the thread.  I'd like to see this patch applied for
FC6 so people with new x9xx PowerEdge servers and FC6 won't have the
mis-enumeration.  I also expect you'll want the extra testing FCtest brings to
this issue before applying it for RHEL5.

Separately, I'm still working on a tool that could let anaconda and the
initscripts/udev do the proper naming, and hope to have something usable this
week or so.

Thanks,
Matt

Comment 1 Dave Jones 2006-09-11 07:04:14 UTC
I still have the same concerns about breaking existing setups.  I want to see
this sit in -mm for a while before we put it in Fedora.


Comment 2 Konrad Rzeszutek 2006-09-11 14:29:37 UTC
I expect this would also re-order the list of storage devices that Anaconda
would see? If it is, and it now sees the same storage devices as the BIOS sees
as first, that would be good. Or is this only for network devices?

Comment 3 Matt Domsch 2006-09-11 14:54:35 UTC
It's not only for NICs, no.  However, we have EDD and unique MBR signatures 
anaconda can use already to solve the storage problem.

Comment 4 Matt Domsch 2006-09-13 20:54:22 UTC
davej, what if instead we made it a kernel command line option to enable with
default being disabled?  Rather than default enabled with option 'pci=nosort', I
could easily default disabled, with option 'pci=bfsort'.  How would you feel
about that for FC6?

Thanks,
Matt

Comment 5 Dave Jones 2006-09-14 05:12:58 UTC
sounds safe to me.


Comment 6 Konrad Rzeszutek 2006-09-18 13:56:39 UTC
Matt,

I think that the patch would benefit upstream kernel as well. If possible,
please post it on LKML as well.

Comment 7 Alan Cox 2006-09-19 22:00:20 UTC
IMHO this is a udev problem.

We already have pci=reverse btw but be aware that several drivers turn out to
make mistakes about device ordering if you do this, and I suspect a pci=nosort
would have a similar failure set.


Comment 8 Matt Domsch 2006-09-19 22:13:07 UTC
I've already gotten failure reports when this hit -mm. :-(  I've asked it be
dropped again from there.

I'm going to proceed down a different path, which is to let the kernel do its
thing, but let a udev helper / anaconda-callable library app return the "right"
name as BIOS would see it.  Then it's pretty easily extensible.  First pass
sorts the ethernet devices by embedded vs add-in; subsort PCI breadth-first. 
Enumerate all embeddeds, then enumerate devices in the slots 1..N, breadth-first
in the slots.

Second pass will require an SMBIOS spec extension (which I've got BIOS guys on
the SMBIOS committee, so that should happen), to let BIOS explicitly give its
naming for each device.  Then the app can use that info if available (falling
back otherwise) to do the naming.

I'll close this request for now, as #204945 is open following this userspace
solution.

Comment 9 Matt Domsch 2006-10-05 15:37:23 UTC
Re-opening, now that a modified version has been in -mm since 2006-09-30.

http://marc.theaimsgroup.com/?l=linux-mm-commits&m=115958255609603&w=2

This adds pci=bfsort and pci=nobfsort (the default), and uses DMI entries to 
enable it for the 4 affected Dell systems for their default.  Should be safe 
for everyone that way.

Comment 10 Matt Domsch 2006-10-05 15:38:08 UTC
Re-opening, now that a modified version has been in -mm since 2006-09-30.

http://marc.theaimsgroup.com/?l=linux-mm-commits&m=115958255609603&w=2

This adds pci=bfsort and pci=nobfsort (the default), and uses DMI entries to 
enable it for the 4 affected Dell systems for their default.  Should be safe 
for everyone that way.

Comment 11 Matt Domsch 2006-10-05 21:08:20 UTC
Created attachment 137863 [details]
linux-2.6-pci-bfsort.patch

Here's a re-diff of the patch against the FC6-devel rawhide kernel.  Had to fix
up only the Documentation/kernel-parameters.txt file as upstream has a new pci=
entry that 2.6.18 doesn't yet.

Comment 12 Matt Domsch 2006-12-13 13:55:23 UTC
I'm fine with this request landing in the 2.6.19 update kernel for FC6 when 
that's released as it was in upstream for 2.6.19.  Then this can be closed.


Note You need to log in before you can comment on or make changes to this bug.