Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.development.system > #802

udev rule not triggered on ubuntu 20.04

Newsgroups comp.os.linux.development.system
Date 2021-02-22 22:31 -0800
Message-ID <0333992b-d898-431e-a86e-04abf23c6bb3n@googlegroups.com> (permalink)
Subject udev rule not triggered on ubuntu 20.04
From Vijay Subramanian <vspvijay@gmail.com>

Show all headers | View raw


udev rule does not trigger after pci hotreset via setpci

udev rule (which was placed in /etc/udev/rules.d/00pci_dev_removal_entry.rules)

ACTION=="add" ATTRS{class}=="0x010802" RUN+="echo PCI_device_class_0x010802_detected > /tmp/udev_notification.out"

ACTION=="remove" ATTRS{class}=="0x010802" RUN+="echo PCI_device_class_0x010802_removed > /tmp/udev_notification.out"

There is no sign of udev rule getting triggered or running after doing the below,

sudo udevadm control --reload-rules && udevadm trigger

& here are the steps done to trigger the udev rule,

setpci -s 0000:02:02.0 BRIDGE_CONTROL=$(printf "%04x" $((0x0010|0x40))) (hot reset command via setpci)
setpci -s 0000:02:02.0 BRIDGE_CONTROL=0x0010 (enable pci device via setpci)
echo 1 > /sys/bus/pci/devices/0000:05:00.0/rescan
Tested the above udev rule on ubuntu 20.04. Point to be noted is, after doing setpci(hot reset both disable & enable) able to see pci dev entry removed & added to the "lspci" command.

So, there are no issues related to setpci.

Any leads to help as to find why the udev rule was not getting triggered would be appreciated.

Back to comp.os.linux.development.system | Previous | Next | Find similar


Thread

udev rule not triggered on ubuntu 20.04 Vijay Subramanian <vspvijay@gmail.com> - 2021-02-22 22:31 -0800

csiph-web