summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorthompsa <thompsa@FreeBSD.org>2010-04-21 21:51:14 +0000
committerthompsa <thompsa@FreeBSD.org>2010-04-21 21:51:14 +0000
commit31257c45676b6404dfd580abbffec543f3a32962 (patch)
treee4f00b7f9fafb73d2a125c63648a41cef3ed82f7 /etc
parente4ec9310381d70de9e1d9878ec8468b0ff97e4ef (diff)
downloadFreeBSD-src-31257c45676b6404dfd580abbffec543f3a32962.zip
FreeBSD-src-31257c45676b6404dfd580abbffec543f3a32962.tar.gz
Change usb devd events from fake attach to a notify. The ugen device is not a
proper device_t so it faked the devctl event to appear like one, this is now a notify which allows more information to be passed. We notify for both the device attach/detach and for each usb interface. A devd rule can now match on the interface properties, including composite devices which may have a uvideo interface and also usound and possibly uhid too. An example to match a umass device with a scsi subclass and BBB protocol would be notify 100 { match "system" "USB"; match "subsystem" "INTERFACE"; match "type" "ATTACH"; match "intclass" "0x08"; match "intsubclass" "0x06"; match "intprotocol" "0x50"; action ... }; The old attach devctl event has been retained for the moment to make merging to 8.1 easier. This was never compatible with 7.x or earlier due to the ugen regex change needed. Reviewed by: warner MFC after: 1 week
Diffstat (limited to 'etc')
-rw-r--r--etc/devd.conf14
-rw-r--r--etc/devd/uath.conf156
2 files changed, 99 insertions, 71 deletions
diff --git a/etc/devd.conf b/etc/devd.conf
index 696ac7c..8827e3b 100644
--- a/etc/devd.conf
+++ b/etc/devd.conf
@@ -138,12 +138,14 @@ attach 100 {
# This entry starts the ColdSync tool in daemon mode. Make sure you have an up
# to date /usr/local/etc/palms. We override the 'listen' settings for port and
# type in /usr/local/etc/coldsync.conf.
-attach 100 {
- device-name "ugen[0-9]+";
- match "vendor" "0x082d";
- match "product" "0x0100";
- match "release" "0x0100";
- action "/usr/local/bin/coldsync -md -p /dev/$device-name -t usb";
+notify 100 {
+ match "system" "USB";
+ match "subsystem" "DEVICE";
+ match "type" "ATTACH";
+ match "vendor" "0x082d";
+ match "product" "0x0100";
+ match "release" "0x0100";
+ action "/usr/local/bin/coldsync -md -p /dev/$cdev -t usb";
};
#
diff --git a/etc/devd/uath.conf b/etc/devd/uath.conf
index 33bee69..dc4019c 100644
--- a/etc/devd/uath.conf
+++ b/etc/devd/uath.conf
@@ -4,117 +4,143 @@
# Accton
# SMCWUSB-G and SMCWUSBT-G2
-attach 100 {
- device-name "ugen[0-9.]+";
- match "vendor" "0x083a";
- match "product" "(0x4505|0x4507)";
- action "/usr/sbin/uathload -d /dev/$device-name";
+notify 100 {
+ match "system" "USB";
+ match "subsystem" "DEVICE";
+ match "type" "ATTACH";
+ match "vendor" "0x083a";
+ match "product" "(0x4505|0x4507)";
+ action "/usr/sbin/uathload -d /dev/$cdev";
};
# Atheros Communications
# AR5523
-attach 100 {
- device-name "ugen[0-9.]+";
- match "vendor" "0x168c";
- match "product" "0x0002";
- action "/usr/sbin/uathload -d /dev/$device-name";
+notify 100 {
+ match "system" "USB";
+ match "subsystem" "DEVICE";
+ match "type" "ATTACH";
+ match "vendor" "0x168c";
+ match "product" "0x0002";
+ action "/usr/sbin/uathload -d /dev/$cdev";
};
# Atheros Communications
# AR5523
-attach 100 {
- device-name "ugen[0-9.]+";
- match "vendor" "0x0cf3";
- match "product" "(0x0002|0x0004|0x0006)";
- action "/usr/sbin/uathload -d /dev/$device-name";
+notify 100 {
+ match "system" "USB";
+ match "subsystem" "DEVICE";
+ match "type" "ATTACH";
+ match "vendor" "0x0cf3";
+ match "product" "(0x0002|0x0004|0x0006)";
+ action "/usr/sbin/uathload -d /dev/$cdev";
};
# Conceptronic
# AR5523
-attach 100 {
- device-name "ugen[0-9.]+";
- match "vendor" "0x0d8e";
- match "product" "(0x7802|0x7812)";
- action "/usr/sbin/uathload -d /dev/$device-name";
+notify 100 {
+ match "system" "USB";
+ match "subsystem" "DEVICE";
+ match "type" "ATTACH";
+ match "vendor" "0x0d8e";
+ match "product" "(0x7802|0x7812)";
+ action "/usr/sbin/uathload -d /dev/$cdev";
};
# D-Link
# DWL-AG132, DWL-G132 and DWL-AG122
-attach 100 {
- device-name "ugen[0-9.]+";
- match "vendor" "0x2001";
- match "product" "(0x3a01|0x3a03|0x3a05)";
- action "/usr/sbin/uathload -d /dev/$device-name";
+notify 100 {
+ match "system" "USB";
+ match "subsystem" "DEVICE";
+ match "type" "ATTACH";
+ match "vendor" "0x2001";
+ match "product" "(0x3a01|0x3a03|0x3a05)";
+ action "/usr/sbin/uathload -d /dev/$cdev";
};
# D-Link
# DWA-120
-attach 100 {
- device-name "ugen[0-9.]+";
- match "vendor" "0x07d1";
- match "product" "0x3a0c";
- action "/usr/sbin/uathload -d /dev/$device-name";
+notify 100 {
+ match "system" "USB";
+ match "subsystem" "DEVICE";
+ match "type" "ATTACH";
+ match "vendor" "0x07d1";
+ match "product" "0x3a0c";
+ action "/usr/sbin/uathload -d /dev/$cdev";
};
# Gigaset
# SMCWUSBT-G
-attach 100 {
- device-name "ugen[0-9.]+";
- match "vendor" "0x1690";
- match "product" "(0x0711|0x0713)";
- action "/usr/sbin/uathload -d /dev/$device-name";
+notify 100 {
+ match "system" "USB";
+ match "subsystem" "DEVICE";
+ match "type" "ATTACH";
+ match "vendor" "0x1690";
+ match "product" "(0x0711|0x0713)";
+ action "/usr/sbin/uathload -d /dev/$cdev";
};
# Global Sun Technology
# AR5523
-attach 100 {
- device-name "ugen[0-9.]+";
- match "vendor" "0x16ab";
- match "product" "(0x7802|0x7812)";
- action "/usr/sbin/uathload -d /dev/$device-name";
+notify 100 {
+ match "system" "USB";
+ match "subsystem" "DEVICE";
+ match "type" "ATTACH";
+ match "vendor" "0x16ab";
+ match "product" "(0x7802|0x7812)";
+ action "/usr/sbin/uathload -d /dev/$cdev";
};
# BayNETGEAR
# WG111U
-attach 100 {
- device-name "ugen[0-9.]+";
- match "vendor" "0x0846";
- match "product" "0x4301";
- action "/usr/sbin/uathload -d /dev/$device-name";
+notify 100 {
+ match "system" "USB";
+ match "subsystem" "DEVICE";
+ match "type" "ATTACH";
+ match "vendor" "0x0846";
+ match "product" "0x4301";
+ action "/usr/sbin/uathload -d /dev/$cdev";
};
# Netgear
# WG111T and WPN111
-attach 100 {
- device-name "ugen[0-9.]+";
- match "vendor" "0x1385";
- match "product" "(0x4251|0x5f01)";
- action "/usr/sbin/uathload -d /dev/$device-name";
+notify 100 {
+ match "system" "USB";
+ match "subsystem" "DEVICE";
+ match "type" "ATTACH";
+ match "vendor" "0x1385";
+ match "product" "(0x4251|0x5f01)";
+ action "/usr/sbin/uathload -d /dev/$cdev";
};
# U-MEDIA Communications
# TEW-444UB and AR5523
-attach 100 {
- device-name "ugen[0-9.]+";
- match "vendor" "0x157e";
- match "product" "(0x3007|0x3206)";
- action "/usr/sbin/uathload -d /dev/$device-name";
+notify 100 {
+ match "system" "USB";
+ match "subsystem" "DEVICE";
+ match "type" "ATTACH";
+ match "vendor" "0x157e";
+ match "product" "(0x3007|0x3206)";
+ action "/usr/sbin/uathload -d /dev/$cdev";
};
# Wistron NeWeb
# AR5523
-attach 100 {
- device-name "ugen[0-9.]+";
- match "vendor" "0x1435";
- match "product" "(0x0827|0x0829)";
- action "/usr/sbin/uathload -d /dev/$device-name";
+notify 100 {
+ match "system" "USB";
+ match "subsystem" "DEVICE";
+ match "type" "ATTACH";
+ match "vendor" "0x1435";
+ match "product" "(0x0827|0x0829)";
+ action "/usr/sbin/uathload -d /dev/$cdev";
};
# Z-Com
# AR5523
-attach 100 {
- device-name "ugen[0-9.]+";
- match "vendor" "0x0cde";
- match "product" "0x0013";
- action "/usr/sbin/uathload -d /dev/$device-name";
+notify 100 {
+ match "system" "USB";
+ match "subsystem" "DEVICE";
+ match "type" "ATTACH";
+ match "vendor" "0x0cde";
+ match "product" "0x0013";
+ action "/usr/sbin/uathload -d /dev/$cdev";
};
OpenPOWER on IntegriCloud