1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-02-04 17:47:03 +03:00
Viktor Mihajlovski a496a238e8 udev: fix slot based network names on s390
The s390 PCI driver assigns the hotplug slot name from the
function_id attribute of the PCI device using a 8 char hexadecimal
format to match the underlying firmware/hypervisor notation.

Further, there's always a one-to-one mapping between a PCI
function and a hotplug slot, as individual functions can
hot plugged even for multi-function devices.

As the generic matching code will always try to parse the slot
name in /sys/bus/pci/slots as a positive decimal number, either
a wrong value might be produced for ID_NET_NAME_SLOT if
the slot name consists of decimal numbers only, or none at all
if a character in the range from 'a' to 'f' is encountered.

Additionally, the generic code assumes that two interfaces
share a hotplug slot, if they differ only in the function part
of the PCI address. E.g., for an interface with the PCI address
dddd:bb:aa.f, it will match the device to the first slot with
an address dddd:bb:aa. As more than one slot may have this address
for the s390 PCI driver, the wrong slot may be selected.

To resolve this we're adding a new naming schema version with the
flag NAMING_SLOT_FUNCTION_ID, which enables the correct matching
of hotplug slots if the device has an attribute named function_id.
The ID_NET_NAME_SLOT property will only be produced if there's
a file /sys/bus/pci/slots/<slotname> where <slotname> matches
the value of /sys/bus/pci/devices/.../function_id in 8 char
hex notation.

Fixes #19016
See also #19078
2021-04-02 18:08:23 +02:00
..
2020-11-25 09:48:17 +01:00
2021-03-02 09:48:20 +01:00
2020-12-17 20:02:32 +01:00
2020-03-27 20:12:44 +01:00
2021-03-11 19:24:53 +01:00
2020-12-16 17:21:48 +01:00
2021-02-25 14:55:17 +01:00
2021-01-04 11:01:17 +00:00
2021-02-21 19:20:47 +01:00
2021-01-04 11:01:17 +00:00
2020-12-18 12:59:29 +09:00
2021-01-15 10:33:28 +01:00
2021-02-04 19:17:50 +01:00
2021-03-31 10:26:07 +02:00
2020-11-09 13:23:58 +09:00
2020-12-17 20:02:32 +01:00
2020-12-16 17:21:48 +01:00
2020-12-17 20:02:32 +01:00