I have 2 wireless pci cards (same model, but can work under 2 different modes) on the bus. They share the same driver. What I want to do is to hack the driver like this: check the pci index, the first probed device (index 0) will be configured as mode A, the next one (index 1) will be configured as mode B.
so I want to know if they are probed in the same order every time the system init.
If the probe order is random, is there any other way can do that?
I tried this: plug the same card into difference slots, and check what I got under /sys/devices/pci0000:00. the result are all the same. so the kernel know nothing about the physical slot at all? I was thinking maybe the kernel know which physical slot the card was mounted on. pity..
To answer: No, they are not in general.
To what you are trying to resolve: No need to do that since it's fixed in modern
kernelsLinux systems, The name of network interface is linked to the physical slot of the device. You will always have same names until you physically move the cards.Correction. Initially I thought that this is provided by kernel. No, it's provided by user space helper, i.e. udev.
Origin: https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/
Example: