[PATCH rdma-core 15/21] umad: Match only umad kernel devices in the udev rule

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Otherwise udev matches issm and umad for each resulting in systemd
warnings:

 systemd[1]: sys-subsystem-rdma-devices-mlx4_0:1-umad.device: Dev sys-subsystem-rdma-devices-mlx4_0:1-umad.device appeared twice with different sysfs paths /sys/devices/pci0000:00/0000:00:04.0/infiniband_mad/issm0 and /sys/devices/pci0000:00/0000:00:04.0/infiniband_mad/umad0

Fixes: d35e5c4f7169 ("srp_daemon.service: Add support for hot-plugging")
Fixes: 5a6f287a3cdf ("libibumad: Introduce the /dev/infiniband/umad/${ibdev}:${port}.device alias")
Signed-off-by: Jason Gunthorpe <jgunthorpe@xxxxxxxxxxxxxxxxxxxx>
---
 libibumad/libibumad.udev-rules | 2 +-
 srp_daemon/srp_daemon.rules    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libibumad/libibumad.udev-rules b/libibumad/libibumad.udev-rules
index b9f565eceaf3a3..cfb790e051ced7 100644
--- a/libibumad/libibumad.udev-rules
+++ b/libibumad/libibumad.udev-rules
@@ -1 +1 @@
-ACTION=="add", SUBSYSTEM=="infiniband_mad", TAG+="systemd", ENV{SYSTEMD_ALIAS}="/sys/subsystem/rdma/devices/$attr{ibdev}:$attr{port}/umad"
+ACTION=="add", SUBSYSTEM=="infiniband_mad", KERNEL=="*umad*", TAG+="systemd", ENV{SYSTEMD_ALIAS}="/sys/subsystem/rdma/devices/$attr{ibdev}:$attr{port}/umad"
diff --git a/srp_daemon/srp_daemon.rules b/srp_daemon/srp_daemon.rules
index 1210adef5b592b..6780d5421de7b4 100644
--- a/srp_daemon/srp_daemon.rules
+++ b/srp_daemon/srp_daemon.rules
@@ -1 +1 @@
-ACTION=="add", SUBSYSTEM=="infiniband_mad", PROGRAM:="/usr/bin/systemctl show srp_daemon -p ActiveState", RESULT=="ActiveState=active", ENV{SYSTEMD_WANTS}+="srp_daemon_port@$attr{ibdev}:$attr{port}.service"
+ACTION=="add", SUBSYSTEM=="infiniband_mad", KERNEL=="*umad*", PROGRAM:="/usr/bin/systemctl show srp_daemon -p ActiveState", RESULT=="ActiveState=active", ENV{SYSTEMD_WANTS}+="srp_daemon_port@$attr{ibdev}:$attr{port}.service"
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux