1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-13 00:58:27 +03:00
Etienne Champetier 0a4ecc54cb udev-builtin-net_id: use firmware_node/sun for ID_NET_NAME_SLOT
pci_get_hotplug_slot() has the following limitations:
- if slots are not hotpluggable, they are not in /sys/bus/pci/slots.
- the address at /sys/bus/pci/slots/X/addr doesn't contains the function part,
  so on some system, 2 different slots with different _SUN end up with the same
  hotplug_slot, leading to naming conflicts.
- it tries all parent devices until it finds a slot number, which is incorrect,
  and what led to NAMING_BRIDGE_MULTIFUNCTION_SLOT being disabled.

The use of PCI hotplug to find the slot (ACPI _SUN) was introduced in
0035597a30
"udev: net_id - export PCI hotplug slot names" on 2012/11/26.
At the same time on the kernel side we got
bb74ac23b1
"ACPI: create _SUN sysfs file" on 2012/11/16.

Using PCI hotplug was the only way at the time, but now 12 years later we can use
firmware_node/sun sysfs file.
Looking at a small selection of server HW, for HPE (Gen10 DL325), the _SUN is attached
to the NIC device, whereas for Dell (R640/R6515/R6615) and Cisco (UCSC-C220-M5SX),
the _SUN is on the first parent pcieport.

We still fallback to pci_get_hotplug_slot() to handle the s390 case and
maybe some other coner cases (_SUN on grand parent device that is not a
bridge ?).
2024-07-21 18:36:37 +01:00
..
2024-06-20 14:26:13 +09:00
2024-04-15 10:40:11 +02:00
2023-12-25 09:15:53 +01:00
2024-03-20 15:24:11 +01:00
2024-03-04 16:12:23 +04:00
2024-04-23 01:42:11 +09:00
2024-05-15 14:19:01 +02:00
2024-04-19 13:25:32 +01:00
2023-12-26 08:59:53 +01:00
2023-12-26 08:59:53 +01:00
2023-12-26 13:10:36 +01:00
2023-12-26 13:10:36 +01:00
2024-06-12 18:36:21 +09:00
2023-12-24 09:32:26 +01:00
2023-12-24 10:46:55 +01:00
2024-03-04 16:12:23 +04:00
2024-07-10 10:08:59 +02:00
2024-03-20 15:24:11 +01:00
2024-05-13 19:53:51 +09:00