All of lore.kernel.org
 help / color / mirror / Atom feed
* PCIe bus enumeration
@ 2015-01-22  8:46 J.Hwan Kim
  2015-01-22 11:37 ` Greg KH
  0 siblings, 1 reply; 15+ messages in thread
From: J.Hwan Kim @ 2015-01-22  8:46 UTC (permalink / raw)
  To: kernelnewbies

Hi,

Is there any method for assigning PCIe bus fixed?

For example, my device pcie bus number is changed
when another pcie device is inserted.

I have a 4 same pcie device and i want to identify each device
according to the pci bus number (according to pcie slot they are 
inserted into).

When i change kernel boot parameter for kernel to assign the pci bus number,
the result was the same.

Is there any method for that?

Thanks in advance.


Regards,
J.Hwan Kim.

^ permalink raw reply	[flat|nested] 15+ messages in thread
* PCIe bus enumeration
@ 2014-07-03 16:45 Federico Vaga
  2014-07-03 19:43 ` Bjorn Helgaas
  0 siblings, 1 reply; 15+ messages in thread
From: Federico Vaga @ 2014-07-03 16:45 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: linux-pci, linux-kernel, Michel Arruat

Hello,

(I haven't a deep knowledge of the PCIe specification, maybe I'm just 
missing something)

is there a way to force the PCI subsystem to assign a bus-number to 
every PCIe bridge, even if there is nothing connected?


My aim is to have a bus enumeration constant and independent from what 
I plugged on the system. So, I can associate a physical slot to linux 
device address bb:dd.f. Is it possible?

I can do the mapping with a simple shell script by discovering the 
"new" bus number, but I'm wondering if there is a way to have a 
constant bus enumeration.



My Humble Observation
---------------------
It seems (to me) that for PCI the kernel assigns a bus-number to every 
PCI bridges and sub-bridges even if there is nothing connected:


e.g. from lspci -t

      [...]
      +-1e.0-[04-05]----0c.0-[05]--

00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 92)
04:0c.0 PCI bridge: Texas Instruments PCI2050 PCI-to-PCI Bridge (rev 
02)


The behavior on PCIe seems different. When there is nothing plugged on 
a bus, then the kernel doesn't assign any bus-number and it doesn't 
detect any PCI-Bridge at all. So, when I reboot the system with a new 
PCIe card the bus enumeration may change.


I tried to use the following pci kernel parameters:

assign-busses : because I want to force the kernel to re-enumerate the 
busses, hopefully _all_ buses even if they are empty.

pcie_scan_all : not clear the explanation, but it sounds like it tells 
to the kernel to inspect everything.

bfsort : because, maybe, for a bfsort it must assign a number to each 
bridge at the same level before inspect the next one.

noacpi : in order to scan independently from BIOS information


The result is always the same (empty buses are not enumerated). 



Thank you :)

-- 
Federico Vaga

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

end of thread, other threads:[~2015-01-22 11:37 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-22  8:46 PCIe bus enumeration J.Hwan Kim
2015-01-22 11:37 ` Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2014-07-03 16:45 Federico Vaga
2014-07-03 19:43 ` Bjorn Helgaas
2014-07-03 20:40   ` Federico Vaga
2014-07-03 22:04     ` Bjorn Helgaas
2014-07-04  7:55       ` Federico Vaga
2014-07-04 21:26         ` Bjorn Helgaas
2014-07-07  7:29           ` Federico Vaga
2014-07-07 17:34             ` Bjorn Helgaas
2014-07-08  7:15               ` Federico Vaga
2014-07-08 18:23                 ` Bjorn Helgaas
2014-07-08 19:20                   ` Federico Vaga
2014-07-08 20:27                     ` Bjorn Helgaas
2014-08-07 14:59                       ` Federico Vaga

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.