chiark / gitweb /
417bfd5de46ec9aa1c38dc9697aff0f195b1a2b5
[elogind.git] / rules / debian / 80-drivers.rules
1 ACTION!="add", GOTO="hotplug_not_add_event"
2
3 # check if the device has already been claimed by a driver
4 ENV{DRIVER}=="?*", SUBSYSTEM!="input", GOTO="hotplug_driver_loaded"
5
6 # this driver is broken and should not be loaded automatically on kernels
7 # < 2.6.21 (see #398962)
8 SUBSYSTEM=="platform", ENV{MODALIAS}=="i82365", GOTO="hotplug_driver_loaded"
9
10 # load the drivers
11 ENV{MODALIAS}=="?*", \
12         RUN+="/sbin/modprobe --use-blacklist $env{MODALIAS}"
13
14 SUBSYSTEM=="pnp",       ENV{MODALIAS}!="?*", \
15         RUN+="/bin/sh -c '/sbin/modprobe --use-blacklist --all $$(while read id; do echo pnp:d$$id; done < /sys$devpath/id)'"
16
17 SUBSYSTEM=="pcmcia_socket",                     RUN+="/sbin/modprobe pcmcia"
18
19 # rules for subsystems which lack proper hotplug support
20 SUBSYSTEM=="i2o",                               RUN+="/sbin/modprobe i2o_block"
21 SUBSYSTEM=="mmc",                               RUN+="/sbin/modprobe mmc_block"
22 SUBSYSTEM=="memstick",  RUN+="/sbin/modprobe --all ms_block mspro_block"
23 SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="SD",   RUN+="/sbin/modprobe tifm_sd"
24 SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="MS",   RUN+="/sbin/modprobe tifm_ms"
25
26 # needed for kernels < 2.6.22
27 SUBSYSTEM=="scsi_device", ATTRS{type}=="0|7|14", RUN+="/sbin/modprobe sd_mod"
28 SUBSYSTEM=="scsi_device", ATTRS{type}=="1",     RUN+="/sbin/modprobe osst", \
29         ATTRS{vendor}=="Onstream", ATTRS{model}!="ADR*"
30 SUBSYSTEM=="scsi_device", ATTRS{type}=="1",     RUN+="/sbin/modprobe st", \
31         ATTRS{vendor}=="Onstream", ATTRS{model}=="ADR*"
32 SUBSYSTEM=="scsi_device", ATTRS{type}=="1",     RUN+="/sbin/modprobe st", \
33         ATTRS{vendor}!="Onstream"
34 SUBSYSTEM=="scsi_device", ATTRS{type}=="[45]",  RUN+="/sbin/modprobe sr_mod"
35 SUBSYSTEM=="scsi_device", ATTRS{type}=="8",     RUN+="/sbin/modprobe ch"
36
37 SUBSYSTEM=="scsi_device", ATTRS{type}=="[235689]", TEST!="[module/sg]", \
38                                                 RUN+="/sbin/modprobe sg"
39
40 SUBSYSTEM=="ide", ATTR{media}=="tape",          RUN+="/sbin/modprobe ide-scsi"
41
42 # From here on follows the hotplug agents which do not load modules
43 LABEL="hotplug_driver_loaded"
44
45 # FIXME: does a sane default exist?
46 #SUBSYSTEM=="scsi_device", ATTRS{idVendor}=="...", \
47 #       RUN+="scsi-re-add"
48
49 SUBSYSTEM=="firmware",                          RUN+="firmware.agent"
50
51 LABEL="hotplug_not_add_event"
52
53 SUBSYSTEM=="net",                               RUN+="net.agent"
54
55 SUBSYSTEM=="atm",                               RUN+="dsl-modem.agent"
56
57 # Log every event to /dev/hotplug.log (for debugging).
58 #RUN+="logger.agent"
59