From 4b1fc32788a3f443e13a80c2a848535d2ee59fcd Mon Sep 17 00:00:00 2001 From: Julian Wiedmann Date: Tue, 6 Jul 2021 10:07:15 +0200 Subject: ccw.udev: match BIND uevent for ccw network devices Instead of matching the ADD uevent for a hard-coded list of ccw device types, wait until the device is actually bound to a driver that follows the ccwgroup model. This way we don't need to maintain a hard-coded list of device types, and avoid trying to apply a configuration for devices that the kernel drivers don't even support. Also when building the ccwgroup device via /sys/bus/ccwgroup/.../group, the ccwgroup bus code requires that the ccw devices are bound to the correct ccw_driver. So matching the ADD uevent seems too early. This eliminates support of some truly ancient device types (P390, CLAW), and allows for phasing out support of eg. OSN and OSX. Note that this requires kernel-side support that was added in 4.14 with commit 1455cf8dbfd0 ("driver core: emit uevents when device is bound to a driver"). Signed-off-by: Julian Wiedmann --- ccw.udev | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/ccw.udev b/ccw.udev index a12ad05..ea8eb84 100644 --- a/ccw.udev +++ b/ccw.udev @@ -1,13 +1,4 @@ -ACTION!="add|change", GOTO="ccw_end" +ACTION!="bind|change", GOTO="ccw_end" SUBSYSTEM!="ccw", GOTO="ccw_end" -ATTRS{cutype}=="1731/01", RUN+="ccw_init" -ATTRS{cutype}=="1731/02", RUN+="ccw_init" -ATTRS{cutype}=="1731/05", RUN+="ccw_init" -ATTRS{cutype}=="1731/06", RUN+="ccw_init" -ATTRS{cutype}=="3088/01", RUN+="ccw_init" -ATTRS{cutype}=="3088/08", RUN+="ccw_init" -ATTRS{cutype}=="3088/60", RUN+="ccw_init" -ATTRS{cutype}=="3088/61", RUN+="ccw_init" -ATTRS{cutype}=="3088/1e", RUN+="ccw_init" -ATTRS{cutype}=="3088/1f", RUN+="ccw_init" +DRIVER=="ctcm|lcs|qeth", RUN+="ccw_init" LABEL="ccw_end" -- cgit