2007-08-10 10:36:59 +00:00
|
|
|
# do not edit this file, it will be overwritten on update
|
|
|
|
|
2015-03-12 15:34:18 +00:00
|
|
|
# run a command on remove events
|
|
|
|
ACTION=="remove", ENV{REMOVE_CMD}!="", RUN+="$env{REMOVE_CMD}"
|
2015-03-27 14:42:04 +00:00
|
|
|
ACTION=="remove", GOTO="default_end"
|
2015-03-12 15:34:18 +00:00
|
|
|
|
2013-03-20 00:26:17 +00:00
|
|
|
SUBSYSTEM=="virtio-ports", KERNEL=="vport*", ATTR{name}=="?*", SYMLINK+="virtio-ports/$attr{name}"
|
|
|
|
|
2013-04-25 00:02:40 +00:00
|
|
|
# select "system RTC" or just use the first one
|
|
|
|
SUBSYSTEM=="rtc", ATTR{hctosys}=="1", SYMLINK+="rtc"
|
|
|
|
SUBSYSTEM=="rtc", KERNEL=="rtc0", SYMLINK+="rtc", OPTIONS+="link_priority=-100"
|
|
|
|
|
2021-03-10 09:17:23 +00:00
|
|
|
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", IMPORT{builtin}="usb_id", IMPORT{builtin}="hwdb --subsystem=usb"
|
2013-03-20 00:26:17 +00:00
|
|
|
ENV{MODALIAS}!="", IMPORT{builtin}="hwdb --subsystem=$env{SUBSYSTEM}"
|
|
|
|
|
2015-03-12 15:34:18 +00:00
|
|
|
ACTION!="add", GOTO="default_end"
|
2013-01-27 20:46:36 +00:00
|
|
|
|
2012-04-15 12:06:48 +00:00
|
|
|
SUBSYSTEM=="tty", KERNEL=="ptmx", GROUP="tty", MODE="0666"
|
|
|
|
SUBSYSTEM=="tty", KERNEL=="tty", GROUP="tty", MODE="0666"
|
|
|
|
SUBSYSTEM=="tty", KERNEL=="tty[0-9]*", GROUP="tty", MODE="0620"
|
2014-02-27 10:19:09 +00:00
|
|
|
SUBSYSTEM=="tty", KERNEL=="sclp_line[0-9]*", GROUP="tty", MODE="0620"
|
|
|
|
SUBSYSTEM=="tty", KERNEL=="ttysclp[0-9]*", GROUP="tty", MODE="0620"
|
|
|
|
SUBSYSTEM=="tty", KERNEL=="3270/tty[0-9]*", GROUP="tty", MODE="0620"
|
2012-04-15 12:06:48 +00:00
|
|
|
SUBSYSTEM=="vc", KERNEL=="vcs*|vcsa*", GROUP="tty"
|
2017-10-30 08:59:31 +00:00
|
|
|
KERNEL=="tty[A-Z]*[0-9]|ttymxc[0-9]*|pppox[0-9]*|ircomm[0-9]*|noz[0-9]*|rfcomm[0-9]*", GROUP="dialout"
|
2007-08-10 10:36:59 +00:00
|
|
|
|
2012-04-15 12:06:48 +00:00
|
|
|
SUBSYSTEM=="mem", KERNEL=="mem|kmem|port", GROUP="kmem", MODE="0640"
|
2007-08-10 10:36:59 +00:00
|
|
|
|
2014-06-12 12:59:53 +00:00
|
|
|
SUBSYSTEM=="input", GROUP="input"
|
2013-10-21 01:49:03 +00:00
|
|
|
SUBSYSTEM=="input", KERNEL=="js[0-9]*", MODE="0664"
|
2007-08-10 10:36:59 +00:00
|
|
|
|
2012-01-10 00:34:15 +00:00
|
|
|
SUBSYSTEM=="video4linux", GROUP="video"
|
|
|
|
SUBSYSTEM=="graphics", GROUP="video"
|
2017-10-31 15:46:24 +00:00
|
|
|
SUBSYSTEM=="drm", KERNEL!="renderD*", GROUP="video"
|
2013-01-27 20:46:36 +00:00
|
|
|
SUBSYSTEM=="dvb", GROUP="video"
|
2017-05-09 19:10:55 +00:00
|
|
|
SUBSYSTEM=="media", GROUP="video"
|
|
|
|
SUBSYSTEM=="cec", GROUP="video"
|
2007-08-10 10:36:59 +00:00
|
|
|
|
2017-10-31 15:46:24 +00:00
|
|
|
SUBSYSTEM=="drm", KERNEL=="renderD*", GROUP="render", MODE="@GROUP_RENDER_MODE@"
|
2017-10-31 15:56:19 +00:00
|
|
|
SUBSYSTEM=="kfd", GROUP="render", MODE="@GROUP_RENDER_MODE@"
|
2017-10-31 15:46:24 +00:00
|
|
|
|
2021-03-09 18:06:18 +00:00
|
|
|
SUBSYSTEM=="misc", KERNEL=="sgx_enclave", GROUP="sgx", MODE="0660"
|
|
|
|
|
2019-08-19 09:50:04 +00:00
|
|
|
# When using static_node= with non-default permissions, also update
|
|
|
|
# tmpfiles.d/static-nodes-permissions.conf.in to keep permissions synchronized.
|
|
|
|
|
2012-01-10 00:34:15 +00:00
|
|
|
SUBSYSTEM=="sound", GROUP="audio", \
|
2011-05-27 00:50:29 +00:00
|
|
|
OPTIONS+="static_node=snd/seq", OPTIONS+="static_node=snd/timer"
|
2009-09-16 18:08:50 +00:00
|
|
|
|
2013-01-27 20:46:36 +00:00
|
|
|
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", MODE="0664"
|
2007-08-10 10:36:59 +00:00
|
|
|
|
2010-07-11 10:32:12 +00:00
|
|
|
SUBSYSTEM=="firewire", ATTR{units}=="*0x00a02d:0x014001*", GROUP="video"
|
2007-08-10 10:36:59 +00:00
|
|
|
|
hwdb: add hardware database for unit of IEEE 1394
Current udev rules configures group owner of firewire character device
to video group, corresponding to nodes in IEEE 1394 in below cases:
1.the node with any unit for any minor version of IIDC version 1
specification defined by 1394 Trading Association
2.the node with any unit for specification defined by Point Grey Research
3.the node with any unit for AV/C device v1.0 defined by 1394 Trading
Association
4.the node with any unit for vendor-unique protocol defined by 1394
Trading Association
Nevertheless, case 3 and 4 can cover the node with any unit for audio
function as well. In the cases, it's convenient to assign audio group.
Additionally, some nodes are known to have layout different from
the specification defined by 1394 Trading Association. In the case,
it's required to add rules specific to them.
Furthermore, some nodes have no fields for vendor name and model name in
configuration ROM. In the case, it's required to add entries to hardware
database for users convenience.
For the above reasons, this commit adds rules to use information in
hardware database for known units in IEEE 1394. One database entry
corresponds to one unit. Two types of key are used to match the unit;
customized key from node context, kernel modalias of unit context.
The entry has the type of function, at least. Supplementally, it has
vendor and model names.
For your information, below statements with Python pyparsing module are
expected to parse all of the custom key and module alias in the list:
```
subsystem_prefix = pp.Literal('ieee1394:').suppress()
hex_to_int = lambda a: int(a[0], 16)
node_prefix = pp.Literal('node:').suppress()
prefixed_lower_hex = pp.Combine(pp.Literal('0x') + pp.Word(pp.srange('[a-z0-9]'), exact=6)).setParseAction(hex_to_int)
ven_in_node = pp.dictOf(pp.Literal('ven'), prefixed_lower_hex)
mo_in_node = pp.dictOf(pp.Literal('mo'), prefixed_lower_hex)
unit_in_node = pp.Group(prefixed_lower_hex + pp.Literal(':').suppress() + prefixed_lower_hex)
units_in_node = pp.Group(pp.Literal('units') + pp.ZeroOrMore(pp.Literal('*')).suppress() + unit_in_node + pp.ZeroOrMore(pp.Literal('*')).suppress())
node_parser = subsystem_prefix + node_prefix + ven_in_node + pp.Optional(mo_in_node) + units_in_node
higher_hex = pp.Word(pp.srange('[A-Z0-9]'), exact=8).setParseAction(hex_to_int)
ven_in_unit = pp.dictOf(pp.Literal('ven'), higher_hex)
mo_literal_in_unit = pp.dictOf(pp.Literal('mo'), higher_hex)
mo_in_unit = pp.dictOf(pp.Literal('mo'), higher_hex ^ pp.Literal('*'))
sp_in_unit = pp.dictOf(pp.Literal('sp'), higher_hex)
ver_in_unit = pp.dictOf(pp.Literal('ver'), higher_hex)
unit_parser = subsystem_prefix + ven_in_unit + mo_in_unit + sp_in_unit + ver_in_unit
key_parser = node_parser ^ unit_parser
```
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
2021-04-07 02:49:22 +00:00
|
|
|
SUBSYSTEM=="firewire", TEST=="units", TEST=="model", \
|
|
|
|
IMPORT{builtin}="hwdb 'ieee1394:node:ven$attr{vendor}mo$attr{model}units$attr{units}'"
|
|
|
|
|
|
|
|
SUBSYSTEM=="firewire", TEST=="units", TEST!="model", \
|
|
|
|
IMPORT{builtin}="hwdb 'ieee1394:node:ven$attr{vendor}units$attr{units}'"
|
|
|
|
|
|
|
|
SUBSYSTEM=="firewire", TEST=="units", ENV{IEEE1394_UNIT_FUNCTION_MIDI}=="1", GROUP="audio"
|
|
|
|
SUBSYSTEM=="firewire", TEST=="units", ENV{IEEE1394_UNIT_FUNCTION_AUDIO}=="1", GROUP="audio"
|
|
|
|
SUBSYSTEM=="firewire", TEST=="units", ENV{IEEE1394_UNIT_FUNCTION_VIDEO}=="1", GROUP="video"
|
|
|
|
|
2012-01-10 00:34:15 +00:00
|
|
|
KERNEL=="parport[0-9]*", GROUP="lp"
|
|
|
|
SUBSYSTEM=="printer", KERNEL=="lp*", GROUP="lp"
|
|
|
|
SUBSYSTEM=="ppdev", GROUP="lp"
|
|
|
|
KERNEL=="lp[0-9]*", GROUP="lp"
|
|
|
|
KERNEL=="irlpt[0-9]*", GROUP="lp"
|
2011-07-05 03:37:13 +00:00
|
|
|
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="*:0701??:*", GROUP="lp"
|
2007-08-10 10:36:59 +00:00
|
|
|
|
2009-01-05 11:34:55 +00:00
|
|
|
SUBSYSTEM=="block", GROUP="disk"
|
2011-11-07 22:21:29 +00:00
|
|
|
SUBSYSTEM=="block", KERNEL=="sr[0-9]*", GROUP="cdrom"
|
2009-05-22 14:44:53 +00:00
|
|
|
SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="4|5", GROUP="cdrom"
|
2012-04-15 12:06:48 +00:00
|
|
|
KERNEL=="sch[0-9]*", GROUP="cdrom"
|
2009-09-16 18:08:50 +00:00
|
|
|
KERNEL=="pktcdvd[0-9]*", GROUP="cdrom"
|
|
|
|
KERNEL=="pktcdvd", GROUP="cdrom"
|
2009-01-03 15:25:15 +00:00
|
|
|
|
2009-05-22 14:44:53 +00:00
|
|
|
SUBSYSTEM=="scsi_generic|scsi_tape", SUBSYSTEMS=="scsi", ATTRS{type}=="1|8", GROUP="tape"
|
|
|
|
SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="0", GROUP="disk"
|
2007-08-10 10:36:59 +00:00
|
|
|
KERNEL=="qft[0-9]*|nqft[0-9]*|zqft[0-9]*|nzqft[0-9]*|rawqft[0-9]*|nrawqft[0-9]*", GROUP="disk"
|
2014-06-18 01:37:32 +00:00
|
|
|
KERNEL=="loop-control", GROUP="disk", OPTIONS+="static_node=loop-control"
|
|
|
|
KERNEL=="btrfs-control", GROUP="disk"
|
2009-09-16 18:08:50 +00:00
|
|
|
KERNEL=="rawctl", GROUP="disk"
|
|
|
|
SUBSYSTEM=="raw", KERNEL=="raw[0-9]*", GROUP="disk"
|
|
|
|
SUBSYSTEM=="aoe", GROUP="disk", MODE="0220"
|
2008-12-09 03:18:21 +00:00
|
|
|
SUBSYSTEM=="aoe", KERNEL=="err", MODE="0440"
|
2007-08-10 10:36:59 +00:00
|
|
|
|
2013-10-21 01:49:03 +00:00
|
|
|
KERNEL=="rfkill", MODE="0664"
|
2013-01-27 20:46:36 +00:00
|
|
|
KERNEL=="tun", MODE="0666", OPTIONS+="static_node=net/tun"
|
2007-08-10 10:36:59 +00:00
|
|
|
|
2013-01-27 20:46:36 +00:00
|
|
|
KERNEL=="fuse", MODE="0666", OPTIONS+="static_node=fuse"
|
2010-05-25 13:10:21 +00:00
|
|
|
|
2018-01-08 09:49:15 +00:00
|
|
|
# The static_node is required on s390x and ppc (they are using MODULE_ALIAS)
|
|
|
|
KERNEL=="kvm", GROUP="kvm", MODE="@DEV_KVM_MODE@", OPTIONS+="static_node=kvm"
|
2017-03-27 10:34:24 +00:00
|
|
|
|
2021-01-13 08:56:26 +00:00
|
|
|
KERNEL=="vsock", MODE="0666"
|
2021-01-12 12:03:37 +00:00
|
|
|
KERNEL=="vhost-vsock", GROUP="kvm", MODE="@DEV_KVM_MODE@", OPTIONS+="static_node=vhost-vsock"
|
2021-01-13 08:56:26 +00:00
|
|
|
|
2021-01-13 09:12:26 +00:00
|
|
|
KERNEL=="vhost-net", GROUP="kvm", MODE="@DEV_KVM_MODE@", OPTIONS+="static_node=vhost-net"
|
|
|
|
|
2019-04-18 14:30:41 +00:00
|
|
|
KERNEL=="udmabuf", GROUP="kvm"
|
|
|
|
|
2017-02-28 20:28:21 +00:00
|
|
|
SUBSYSTEM=="ptp", ATTR{clock_name}=="KVM virtual PTP", SYMLINK += "ptp_kvm"
|
|
|
|
|
2021-02-26 10:25:31 +00:00
|
|
|
SUBSYSTEM=="ptp", ATTR{clock_name}=="hyperv", SYMLINK += "ptp_hyperv"
|
|
|
|
|
2020-12-02 12:45:35 +00:00
|
|
|
SUBSYSTEM=="dmi", ENV{ID_SYSFS_ATTRIBUTE_MODEL}=="", ENV{ID_VENDOR}="$attr{sys_vendor}", ENV{ID_MODEL}="$attr{product_name}"
|
|
|
|
SUBSYSTEM=="dmi", ENV{ID_SYSFS_ATTRIBUTE_MODEL}=="product_version", ENV{ID_VENDOR}="$attr{sys_vendor}", ENV{ID_MODEL}="$attr{product_version}"
|
|
|
|
|
2015-03-12 15:34:18 +00:00
|
|
|
LABEL="default_end"
|