summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorthompsa <thompsa@FreeBSD.org>2010-04-29 22:40:12 +0000
committerthompsa <thompsa@FreeBSD.org>2010-04-29 22:40:12 +0000
commitc4a3a58edda8a2549c49bafcd5cce978a821be55 (patch)
tree657e96872a4e05d4d5579a6b2949a92c25340820 /sbin
parentfa6043268584ee2a93fdcb3876b59ccb2609ee2e (diff)
downloadFreeBSD-src-c4a3a58edda8a2549c49bafcd5cce978a821be55.zip
FreeBSD-src-c4a3a58edda8a2549c49bafcd5cce978a821be55.tar.gz
MFC r207020, r207027, r207072.
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. Document the new USB notification types.
Diffstat (limited to 'sbin')
-rw-r--r--sbin/devd/devd.conf.556
1 files changed, 55 insertions, 1 deletions
diff --git a/sbin/devd/devd.conf.5 b/sbin/devd/devd.conf.5
index f7efefb..17c5e09 100644
--- a/sbin/devd/devd.conf.5
+++ b/sbin/devd/devd.conf.5
@@ -250,18 +250,40 @@ CIS-vendor.
Device class.
.It Li device
Device ID.
+.It Li devclass
+Device Class (USB)
+.It Li devsubclass
+Device Sub-class (USB)
.It Li device-name
Name of attached/detached device.
+.It Li endpoints
+Endpoint count (USB)
.It Li function
Card functions.
+.It Li interface
+Interface ID (USB)
+.It Li intclass
+Interface Class (USB)
+.It Li intprotocol
+Interface Protocol (USB)
+.It Li intsubclass
+Interface Sub-class (USB)
.It Li manufacturer
Manufacturer ID (pccard).
+.It Li mode
+Peripheral mode (USB)
.It Li notify
Match the value of the
.Dq Li notify
variable.
+.It Li parent
+Parent device
+.It Li port
+Hub port number (USB)
.It Li product
-Product ID (pccard).
+Product ID (pccard/USB).
+.It Li release
+Hardware revision (USB)
.It Li serial
Serial Number (USB).
.It Li slot
@@ -342,6 +364,27 @@ The
node is destroyed.
.El
.El
+.It Li USB
+Events related to the USB subsystem.
+.Bl -tag -width ".Sy Subsystem" -compact
+.It Sy Subsystem
+.It Li DEVICE
+.Bl -tag -width ".Li DETACH" -compact
+.It Sy Type
+.It Li ATTACH
+USB device is attached to the system.
+.It Li DETACH
+USB device is detached from the system.
+.El
+.It Li INTERFACE
+.Bl -tag -width ".Li DETACH" -compact
+.It Sy Type
+.It Li ATTACH
+USB interface is attached from a device.
+.It Li DETACH
+USB interface is detached from a device.
+.El
+.El
.It Li coretemp
Events related to the
.Xr coretemp 4
@@ -461,6 +504,17 @@ notify 0 {
};
#
+# Match a USB device type
+#
+notify 0 {
+ match "system" "USB";
+ match "subsystem" "INTERFACE";
+ match "type" "ATTACH";
+ match "intclass" "0x0e";
+ action "logger USB video device attached";
+};
+
+#
# Try to configure ath and wi devices with pccard_ether
# as they are attached.
#
OpenPOWER on IntegriCloud