summaryrefslogtreecommitdiff
path: root/etc/udev/gentoo/30-kernel-compat.rules
diff options
context:
space:
mode:
Diffstat (limited to 'etc/udev/gentoo/30-kernel-compat.rules')
-rw-r--r--etc/udev/gentoo/30-kernel-compat.rules47
1 files changed, 47 insertions, 0 deletions
diff --git a/etc/udev/gentoo/30-kernel-compat.rules b/etc/udev/gentoo/30-kernel-compat.rules
new file mode 100644
index 0000000000..7bc55c6f75
--- /dev/null
+++ b/etc/udev/gentoo/30-kernel-compat.rules
@@ -0,0 +1,47 @@
+# do not edit this file, it will be overwritten on update
+
+ACTION!="add", GOTO="kernel_compat_end"
+
+# workarounds needed to synchronize with sysfs
+DEVPATH=="/devices/*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus"
+
+# needed for kernels <2.6.16
+SUBSYSTEM=="net", WAIT_FOR_SYSFS="address"
+
+# needed for kernels <2.6.17
+SUBSYSTEM=="net", ENV{PHYSDEVDRIVER}=="?*", WAIT_FOR_SYSFS="device/driver"
+
+
+
+# needed for kernels <2.6.22
+SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", NAME="%c", GROUP="usb", MODE="0664"
+
+
+
+# this driver is broken and should not be loaded automatically
+# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=398962
+# needed for kernels <2.6.21
+SUBSYSTEM=="platform", ENV{MODALIAS}=="i82365", ENV{MODALIAS}=""
+
+# No need for more code, as MODALIAS is present
+ENV{MODALIAS}=="?*", GOTO="kernel_compat_end"
+
+# needed for kernels <2.6.22
+SUBSYSTEM!="scsi_device", GOTO="kernel_compat_end"
+
+ # Parts taken from redhat-rules
+ # sd: 0 TYPE_DISK, 7 TYPE_MOD, 14 TYPE_RBC
+ # sr: 4 TYPE_WORM, 5 TYPE_ROM
+ # st/osst: 1 TYPE_TAPE
+
+ ATTRS{type}=="0|7|14", RUN+="modprobe.sh sd_mod"
+ ATTRS{type}=="4|5", RUN+="modprobe.sh sr_mod"
+ ATTRS{type}=="8", RUN+="modprobe.sh ch"
+
+ ATTRS{type}=="1", ATTRS{vendor}=="On[sS]tream", \
+ ATTRS{model}!="ADR*", RUN+="modprobe.sh osst", GOTO="kernel_compat_end"
+ ATTRS{type}=="1", RUN+="modprobe.sh st"
+
+LABEL="kernel_compat_end"
+
+