# IDE devices
SUBSYSTEMS=="ide", KERNEL=="hd[a-z]*", PROGRAM="ide-devfs.sh %k %b %n", \
+ ACTION=="add", \
NAME="%c{1}", SYMLINK+="%k %c{2}"
# SCSI devices
-SUBSYSTEMS=="scsi", PROGRAM="scsi-devfs.sh %k %b %n", \
+SUBSYSTEMS=="scsi", PROGRAM="scsi-devfs.sh %k %b %n", ACTION=="add", \
NAME="%c{1}", SYMLINK+="%k %c{2}"
# RAID controllers
-KERNEL=="cciss!*|ida!*|rd!*", PROGRAM="raid-devfs.sh %k", \
+KERNEL=="cciss!*|ida!*|rd!*", PROGRAM="raid-devfs.sh %k", ACTION=="add", \
NAME="%c{1}", SYMLINK+="%k"
# other block devices
SYMLINK+="pilot"
# usbfs-like devices
-SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", \
+SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", ACTION=="add", \
NAME="%c"
# serial devices
KERNEL=="radio[0-9]*", NAME="v4l/%k"
KERNEL=="vbi[0-9]*", NAME="v4l/%k"
KERNEL=="vtx[0-9]*", NAME="v4l/%k"
-KERNEL=="dvb*", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}", \
+KERNEL=="dvb*", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}", ACTION=="add", \
NAME="%c"
KERNEL=="fb[0-9]*", NAME="fb/%n"
KERNEL=="card[0-9]*", NAME="dri/%k"
SUBSYSTEM=="aoe", KERNEL=="revalidate", NAME="etherd/%k"
# device mapper creates its own device nodes, so ignore these
-KERNEL=="dm-[0-9]*", NAME=""
KERNEL=="device-mapper", NAME="mapper/control"
# check if the device has already been claimed by a driver
ENV{DRIVER}=="?*", SUBSYSTEM!="input", GOTO="hotplug_driver_loaded"
+# this driver is broken and should not be loaded automatically (see #398962)
+SUBSYSTEM=="platform", ENV{MODALIAS}=="i82365", GOTO="hotplug_driver_loaded"
+
# load the drivers
-ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe $env{MODALIAS}"
+ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe --use-blacklist $env{MODALIAS}"
SUBSYSTEM=="ide", ENV{MODALIAS}!="?*", RUN+="ide.agent"
-SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", RUN+="/bin/sh -c 'while read id; do /sbin/modprobe pnp:d$$id; done < /sys$devpath/id'"
+SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", RUN+="/bin/sh -c 'while read id; do /sbin/modprobe --use-blacklist pnp:d$$id; done < /sys$devpath/id'"
SUBSYSTEM=="pcmcia_socket", RUN+="/sbin/modprobe pcmcia"
# rules for subsystems which lack proper hotplug support
-SUBSYSTEM=="i2o", RUN+="/sbin/modprobe i2o-block"
-#SUBSYSTEM=="mmc", RUN+="/sbin/modprobe mmc-block"
+SUBSYSTEM=="i2o", RUN+="/sbin/modprobe i2o_block"
+SUBSYSTEM=="mmc", RUN+="/sbin/modprobe mmc_block"
SUBSYSTEM=="scsi_device", ATTRS{type}=="0|7|14", RUN+="/sbin/modprobe sd_mod"
SUBSYSTEM=="scsi_device", ATTRS{type}=="1", RUN+="/sbin/modprobe osst", \
SUBSYSTEM=="scsi_device", ATTRS{type}=="1", RUN+="/sbin/modprobe st", \
ATTRS{vendor}!="Onstream"
SUBSYSTEM=="scsi_device", ATTRS{type}=="[45]", RUN+="/sbin/modprobe sr_mod"
+SUBSYSTEM=="scsi_device", ATTRS{type}=="8", RUN+="/sbin/modprobe ch"
SUBSYSTEM=="scsi_device", ATTRS{type}=="[235689]", RUN+="/sbin/modprobe sg"
SUBSYSTEM=="ide", ATTR{media}=="tape", RUN+="/sbin/modprobe ide-scsi"
# default permissions for block devices
SUBSYSTEM=="block", GROUP="disk"
-SUBSYSTEM=="block", ATTR{removable}=="1", GROUP="floppy"
+# the aacraid driver is broken and reports that disks removable (see #404927)
+SUBSYSTEM=="block", ATTRS{removable}=="1", \
+ DRIVERS!="aacraid", GROUP="floppy"
+# all block devices on these buses are "removable"
+SUBSYSTEM=="block", SUBSYSTEMS=="usb|ieee1394|mmc|pcmcia", GROUP="floppy"
# IDE devices
KERNEL=="hd[a-z]|pcd[0-9]*", DRIVERS=="ide-cdrom|pcd", \
SUBSYSTEMS=="scsi", ATTRS{type}=="1", GROUP="tape"
SUBSYSTEMS=="scsi", ATTRS{type}=="3", ATTRS{vendor}=="HP", GROUP="scanner"
SUBSYSTEMS=="scsi", ATTRS{type}=="3", ATTRS{vendor}=="Epson", GROUP="scanner"
+SUBSYSTEMS=="scsi", ATTRS{type}=="3", ATTRS{vendor}=="EPSON", GROUP="scanner"
SUBSYSTEMS=="scsi", ATTRS{type}=="5", GROUP="cdrom"
SUBSYSTEMS=="scsi", ATTRS{type}=="6", GROUP="scanner"
+SUBSYSTEMS=="scsi", ATTRS{type}=="8", GROUP="tape"
# USB devices
KERNEL=="legousbtower*", MODE="0666"
KERNEL=="sonypi", MODE="0666"
KERNEL=="agpgart", GROUP="video"
KERNEL=="nvram", GROUP="nvram"
-KERNEL=="rtc", GROUP="audio"
+KERNEL=="rtc|rtc[0-9]*", GROUP="audio"
KERNEL=="tpm*", MODE="0600", OWNER="tss", GROUP="tss"
KERNEL=="fuse", GROUP="fuse"
KERNEL=="kqemu", MODE="0666"
+KERNEL=="kvm", GROUP="kvm"
+KERNEL=="tun", MODE="0666"
KERNEL=="cdemu[0-9]*", GROUP="cdrom"
KERNEL=="pktcdvd[0-9]*", GROUP="cdrom"
KERNEL=="event[0-9]*", ATTRS{name}=="*dvb*|*DVB*|* IR *" \
MODE="0664", GROUP="video"
KERNEL=="js[0-9]*", MODE="0664"
+KERNEL=="lirc[0-9]*", GROUP="video"
# AOE character devices
SUBSYSTEM=="aoe", MODE="0220", GROUP="disk"
ACTION!="add", GOTO="no_volume_id"
# and we can safely ignore these kinds of devices
-KERNEL=="ram*|loop*|fd*|nbd*|dm-*", GOTO="no_volume_id"
+KERNEL=="ram*|loop*|fd*|nbd*|gnbd*|dm-*|md*", GOTO="no_volume_id"
# skip removable ide devices, because open(2) on them causes an events loop
KERNEL=="hd*[!0-9]", ATTR{removable}=="1", DRIVERS=="ide-cs|ide-floppy", \
GOTO="no_volume_id"
-KERNEL=="hd*[0-9]", ATTR{../removable}=="1", \
+KERNEL=="hd*[0-9]", ATTRS{removable}=="1", \
GOTO="no_volume_id"
# skip xen virtual hard disks
KERNEL=="hd*[!0-9]", \
IMPORT{program}="ata_id --export $tempnode"
-KERNEL=="sd*[!0-9]|sr*|st*", ATTRS{ieee1394_id}=="?*", \
+KERNEL=="sd*[!0-9]|sr*|st*|nst*", ATTRS{ieee1394_id}=="?*", \
ENV{ID_BUS}="ieee1394", ENV{ID_SERIAL}="$attr{ieee1394_id}"
-KERNEL=="sd*[!0-9]|sr*|st*", ENV{ID_SERIAL}=="", \
+KERNEL=="sd*[!0-9]|sr*|st*|nst*", ENV{ID_SERIAL}=="", \
IMPORT{program}="usb_id -x"
-KERNEL=="sd*[!0-9]|sr*|st*", ENV{ID_SERIAL}=="", \
+KERNEL=="sd*[!0-9]|sr*|st*|nst*", ENV{ID_SERIAL}=="", \
IMPORT{program}="scsi_id -g -x -s $devpath -d $tempnode"
-KERNEL=="sd*[!0-9]|sr*|st*", ENV{ID_SERIAL}=="", \
+KERNEL=="sd*[!0-9]|sr*|st*|nst*", ENV{ID_SERIAL}=="", \
+ IMPORT{program}="scsi_id -g -x -a -s $devpath -d $tempnode"
+KERNEL=="sg*", ATTRS{type}=="8", ENV{ID_SERIAL}=="", \
+ IMPORT{program}="scsi_id -g -x -s $devpath -d $tempnode"
+KERNEL=="sg*", ATTRS{type}=="8", ENV{ID_SERIAL}=="", \
IMPORT{program}="scsi_id -g -x -a -s $devpath -d $tempnode"
KERNEL=="dasd*[!0-9]", \
SYMLINK+="disk/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}"
KERNEL=="hd*[0-9]", ENV{ID_SERIAL}=="?*", \
SYMLINK+="disk/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}-part%n"
+KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL_SHORT}=="?*", \
+ ENV{ID_VENDOR}=="ATA", \
+ SYMLINK+="disk/by-id/ata-$env{ID_MODEL}-$env{ID_SERIAL_SHORT}"
+KERNEL=="sd*[0-9]", ENV{ID_SERIAL_SHORT}=="?*", \
+ ENV{ID_VENDOR}=="ATA", \
+ SYMLINK+="disk/by-id/ata-$env{ID_MODEL}-$env{ID_SERIAL_SHORT}-part%n"
+
+KERNEL=="mmcblk[0-9]", ATTR{name}=="?*", ATTR{serial}=="?*", \
+ ENV{ID_NAME}="$attr{name}", ENV{ID_SERIAL}="$attr{serial}", \
+ SYMLINK+="disk/by-id/mmc-$env{ID_NAME}_$env{ID_SERIAL}"
+KERNEL=="mmcblk[0-9]p[0-9]", ATTR{name}=="?*", ATTR{serial}=="?*", \
+ ENV{ID_NAME}="$attr{name}", ENV{ID_SERIAL}="$attr{serial}", \
+ SYMLINK+="disk/by-id/mmc-$env{ID_NAME}_$env{ID_SERIAL}-part%n"
+
+KERNEL=="*[!0-9]", ENV{ID_EDD}=="?*", \
+ SYMLINK+="disk/by-id/edd-$env{ID_EDD}"
+KERNEL=="*[0-9]", ENV{ID_EDD}=="?*", \
+ SYMLINK+="disk/by-id/edd-$env{ID_EDD}-part%n"
+
KERNEL=="sd*[!0-9]|dasd[!0-9]*|sr*", ENV{ID_SERIAL}=="?*", \
SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}"
KERNEL=="sd*[0-9]|dasd*[0-9]", ENV{ID_SERIAL}=="?*", \
SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}-part%n"
KERNEL=="st*", ENV{ID_SERIAL}=="?*", \
SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}"
-KERNEL=="*[!0-9]", ENV{ID_EDD}=="?*", \
- SYMLINK+="disk/by-id/edd-$env{ID_EDD}"
-KERNEL=="*[0-9]", ENV{ID_EDD}=="?*", \
- SYMLINK+="disk/by-id/edd-$env{ID_EDD}-part%n"
+KERNEL=="nst*", ENV{ID_SERIAL}=="?*", \
+ SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}-nst"
+KERNEL=="sg*", ATTRS{type}=="8", ENV{ID_SERIAL}=="?*", \
+ SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}"
KERNEL=="*[!0-9]|sr*", ENV{ID_PATH}=="?*", \
SYMLINK+="disk/by-path/$env{ID_PATH}"
SYMLINK+="pilot"
# usbfs-like devices
-SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", \
+SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", ACTION=="add", \
NAME="%c"
# serial devices
KERNEL=="capi[0-9]*", NAME="capi/%n"
# video devices
-KERNEL=="dvb*", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}", \
+KERNEL=="dvb*", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}", ACTION=="add", \
NAME="%c"
KERNEL=="card[0-9]*", NAME="dri/%k"
SUBSYSTEM=="aoe", KERNEL=="revalidate", NAME="etherd/%k"
# device mapper creates its own device nodes, so ignore these
-KERNEL=="dm-[0-9]*", NAME=""
KERNEL=="device-mapper", NAME="mapper/control"