Vijay Subramanian
unread,Feb 23, 2021, 1:31:17 AM2/23/21You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
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.