summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTzafrir Cohen <tzafrir.cohen@xorcom.com>2010-01-04 17:01:34 +0000
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>2010-01-04 17:01:34 +0000
commit93d8fdabda61304f653f5b4a433ac846992f5fdd (patch)
tree9c0e1ce768acf752e50d933b5fcf809b3246c683
parent08bfd6fc5340aafd7d0642801a0bce7560cde14d (diff)
Fix udev rules to work with more recent kernels.
Note that this change will not work on most older systems (e.g.: Centos5, with its udev 0.95) if the matching change of xpp_fxloader in tools (r7752) is not applied. * Replace deprecated 'BUS' with 'SUBSYSTEM' * Sysfs{} should be replaced with ATTR{}. Sadly the former is not supported in recent udev, and the latter is not supported in udev 0.95. Workaround: use PRODUCT from the environment. * Use a single rule. * While we're at it, add the missing comma to the astribank_hook line (which surprisingly worked without it). git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7753 a0bf4364-ded3-4de4-8d8a-66a801d63aff
-rw-r--r--drivers/dahdi/xpp/xpp.rules13
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/dahdi/xpp/xpp.rules b/drivers/dahdi/xpp/xpp.rules
index 300a437..93f772d 100644
--- a/drivers/dahdi/xpp/xpp.rules
+++ b/drivers/dahdi/xpp/xpp.rules
@@ -1,16 +1,11 @@
-BUS!="usb", ACTION!="add", GOTO="xpp_usb_add_end"
-KERNEL=="*_ep*", GOTO="xpp_usb_add_end"
-KERNEL=="[0-9]*", GOTO="xpp_usb_add_end"
-
# Load firmware into the Xorcom Astribank device:
-SYSFS{idVendor}=="e4e4", SYSFS{idProduct}=="11[3456][013]", \
- RUN+="/usr/share/dahdi/xpp_fxloader udev $sysfs{idVendor}/$sysfs{idProduct}/$sysfs{bcdDevice}"
-
-LABEL="xpp_usb_add_end"
+SUBSYSTEM=="usb", ACTION=="add", \
+ENV{PRODUCT}=="e4e4/11[3456][013]/*", ENV{DEVTYPE}!="usb_interface", \
+ RUN+="/usr/share/dahdi/xpp_fxloader udev $env{PRODUCT}"
# Hotplug hook for Astribank up/down
# If you need this functionality, copy the astribank_hook.sample
# to $XPP_INIT_DIR/astribank_hook
#
# By default XPP_INIT_DIR="/usr/share/dahdi"
-KERNEL=="xbus*" RUN+="%E{XPP_INIT_DIR}/astribank_hook udev $kernel $sysfs{status} $sysfs{connector}"
+KERNEL=="xbus*", RUN+="%E{XPP_INIT_DIR}/astribank_hook udev $kernel $sysfs{status} $sysfs{connector}"