linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* PCI device order problem
@ 2002-10-24 23:39 H. J. Lu
  2002-10-24 23:49 ` Jeff Garzik
  0 siblings, 1 reply; 31+ messages in thread
From: H. J. Lu @ 2002-10-24 23:39 UTC (permalink / raw)
  To: linux kernel

In arch/i386/kernel/pci-pc.c, there are

/*
 * Sort the device list according to PCI BIOS. Nasty hack, but since some
 * fool forgot to define the `correct' device order in the PCI BIOS specs
 * and we want to be (possibly bug-to-bug ;-]) compatible with older kernels 
 * which used BIOS ordering, we are bound to do this... 
 */

static void __devinit pcibios_sort(void)

The problem is on my MB:

00:00.0 Host bridge: Intel Corp. e7500 [Plumas] DRAM Controller (rev 03)
00:00.1 Class ff00: Intel Corp. e7500 [Plumas] DRAM Controller Error Reporting ( rev 03)
00:03.0 PCI bridge: Intel Corp. e7500 [Plumas] HI_C Virtual PCI Bridge (F0) (rev 03)
00:03.1 Class ff00: Intel Corp. e7500 [Plumas] HI_C Virtual PCI Bridge (F1) (rev 03)
00:1d.0 USB Controller: Intel Corp. 82801CA/CAM USB (Hub  (rev 02)
00:1d.1 USB Controller: Intel Corp. 82801CA/CAM USB (Hub  (rev 02)
00:1e.0 PCI bridge: Intel Corp. 82801BA/CA/DB PCI Bridge (rev 42)
00:1f.0 ISA bridge: Intel Corp. 82801CA ISA Bridge (LPC) (rev 02)
00:1f.1 IDE interface: Intel Corp. 82801CA IDE U100 (rev 02)
00:1f.3 SMBus: Intel Corp. 82801CA/CAM SMBus (rev 02)
01:0c.0 VGA compatible controller: ATI Technologies Inc Rage XL (rev 27)
02:1c.0 PIC: Intel Corp. 82870P2 P64H2 I/OxAPIC (rev 03)
02:1d.0 PCI bridge: Intel Corp. 82870P2 P64H2 Hub PCI Bridge (rev 03)
02:1e.0 PIC: Intel Corp. 82870P2 P64H2 I/OxAPIC (rev 03)
02:1f.0 PCI bridge: Intel Corp. 82870P2 P64H2 Hub PCI Bridge (rev 03)
03:07.0 Ethernet controller: Intel Corp. 82546EB Gigabit Ethernet Controller (rev 01)
03:07.1 Ethernet controller: Intel Corp. 82546EB Gigabit Ethernet Controller (rev 01)
03:08.0 RAID bus controller: 3ware Inc 3ware 7000-series ATA-RAID (rev 01)

Eth1 becomes:
03:07.0 Ethernet controller: Intel Corp. 82546EB Gigabit Ethernet Controller (rev 01)

and eth0 becomes:
03:07.1 Ethernet controller: Intel Corp. 82546EB Gigabit Ethernet Controller (rev 01)

Is that a good idea to have an option to sort the PCI device by PCI bus and
slot numbers?


H.J.

^ permalink raw reply	[flat|nested] 31+ messages in thread
* RE: PCI device order problem
@ 2002-10-25  0:21 Leech, Christopher
  2002-10-25  0:31 ` Jeff Garzik
  2002-10-25  0:40 ` H. J. Lu
  0 siblings, 2 replies; 31+ messages in thread
From: Leech, Christopher @ 2002-10-25  0:21 UTC (permalink / raw)
  To: 'Jeff Garzik', H. J. Lu; +Cc: linux kernel

I've heard some grumbling about this with specific motherboards and 82546
LOMs. While I understand what's happening, and that using nameif to manage
this is the correct answer, I am a bit surprised that function 1 would be
placed on the global PCI device list before function 0 for a multi-function
device.

-- Chris Leech


> >>Without answering your specific question, but addressing $subject, 
> >>what
> >>problem is caused by the PCI device order you see?
> >>    
> >>
> >
> >It is different from the hardware documentation. The hardware manual 
> >says it has 2 NICs, NIC 1 (03:07.0) and NIC2 (03:07.1), which makes 
> >senses to me. NIC 1 is a special one which supports IPMI over LAN. 
> >Since we only use one NIC now, we'd like to use NIC 1 and 
> call it eth0.
> >  
> >
> 
> Well, overall, depending on ordering is error-prone (as you see).  I 
> would suggest migrating to a less-fragile scheme.  nameif and ethtool 
> together should get you exactly the device you need...  
> (though I wonder 
> why simply using eth1 is so awful, if this situation is constant...)
> 
>     Jeff

^ permalink raw reply	[flat|nested] 31+ messages in thread
* RE: PCI device order problem
@ 2002-10-25  0:25 Leech, Christopher
  2002-10-25  0:39 ` H. J. Lu
  0 siblings, 1 reply; 31+ messages in thread
From: Leech, Christopher @ 2002-10-25  0:25 UTC (permalink / raw)
  To: 'H. J. Lu', Jeff Garzik; +Cc: linux kernel


If you're that concerned about possible ordering changes due to future BIOS
upgrades, I'd suggest setting up an /etc/mactab and using nameif to control
interface naming from userspace.

-- Chris Leech

> -----Original Message-----
> From: H. J. Lu [mailto:hjl@lucon.org] 
> We can use eth1. It is just very confusing since Linux and 
> hardware manual don't agree which one is the first NIC. Also, 
> when we upgrade the BIOS, the BIOS order may change. As for 
> other schemes, we don't want to change every software which 
> access ethX.

^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2002-10-28  0:20 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-24 23:39 PCI device order problem H. J. Lu
2002-10-24 23:49 ` Jeff Garzik
2002-10-24 23:56   ` H. J. Lu
2002-10-25  0:14     ` Jeff Garzik
2002-10-25  0:18       ` H. J. Lu
2002-10-25 10:00     ` Alan Cox
2002-10-25 16:11       ` H. J. Lu
2002-10-26  3:26         ` PATCH: Support PCI device sorting (Re: PCI device order problem) H. J. Lu
2002-10-26 21:12           ` Jeff Garzik
2002-10-26 21:27             ` H. J. Lu
2002-10-26 21:34               ` Jeff Garzik
2002-10-26 21:44                 ` H. J. Lu
2002-10-26 22:04                   ` Jeff Garzik
2002-10-26 22:20                     ` H. J. Lu
2002-10-26 22:29                       ` Jeff Garzik
2002-10-26 22:53                         ` H. J. Lu
2002-10-26 22:58                           ` Jeff Garzik
2002-10-26 23:45                             ` Alan Cox
2002-10-26 23:53                             ` H. J. Lu
2002-10-26 23:57                               ` Jeff Garzik
2002-10-27  0:05                                 ` Jeff Garzik
2002-10-27  0:25                                   ` H. J. Lu
2002-10-27 17:42                                     ` Greg KH
2002-10-27 20:42                                       ` H. J. Lu
2002-10-28  0:26                                         ` Jeff Garzik
2002-10-27  0:30                                   ` Alan Cox
  -- strict thread matches above, loose matches on Subject: below --
2002-10-25  0:21 PCI device order problem Leech, Christopher
2002-10-25  0:31 ` Jeff Garzik
2002-10-25  0:40 ` H. J. Lu
2002-10-25  0:25 Leech, Christopher
2002-10-25  0:39 ` H. J. Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).