linux/drivers
Kay Sievers 263756ec22 [PATCH] ide: MODALIAS support for autoloading of ide-cd, ide-disk, ...
IDE: MODALIAS support for autoloading of ide-cd, ide-disk, ...

Add MODULE_ALIAS to IDE midlayer modules: ide-disk, ide-cd, ide-floppy and
ide-tape, to autoload these modules depending on the probed media type of
the IDE device.

It is used by udev and replaces the former agent shell script of the hotplug
package, which was required to lookup the media type in the proc filesystem.
Using proc was racy, cause the media file is created after the hotplug event
is sent out.

The module autoloading does not take any effect, until something like the
following udev rule is configured:
  SUBSYSTEM=="ide",  ACTION=="add", ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe $env{MODALIAS}"

The module ide-scsi will not be autoloaded, cause it requires manual
configuration. It can't be, and never was supported for automatic setup in
the hotplug package. Adding a MODULE_ALIAS to ide-scsi for all supported
media types, would just lead to a default blacklist entry anyway.

  $ modinfo ide-disk
  filename:       /lib/modules/2.6.15-rc4-g1b0997f5/kernel/drivers/ide/ide-disk.ko
  description:    ATA DISK Driver
  alias:          ide:*m-disk*
  license:        GPL
  ...

  $ modprobe -vn ide:m-disk
  insmod /lib/modules/2.6.15-rc4-g1b0997f5/kernel/drivers/ide/ide-disk.ko

  $ cat /sys/bus/ide/devices/0.0/modalias
  ide:m-disk

It also adds attributes to the IDE device:
  $ tree /sys/bus/ide/devices/0.0/
  /sys/bus/ide/devices/0.0/
  |-- bus -> ../../../../../../../bus/ide
  |-- drivename
  |-- media
  |-- modalias
  |-- power
  |   |-- state
  |   `-- wakeup
  `-- uevent

  $ cat /sys/bus/ide/devices/0.0/{modalias,drivename,media}
  ide:m-disk
  hda
  disk

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 16:18:09 -08:00
..
acorn
acpi [PATCH] driver core: replace "hotplug" by "uevent" 2006-01-04 16:18:08 -08:00
atm [PATCH] drivers/atm/adummy.c NULL noise removal 2005-12-15 10:04:31 -08:00
base [PATCH] Allow overlapping resources for platform devices 2006-01-04 16:18:08 -08:00
block [PATCH] cciss: fix for deregister_disk 2005-12-12 22:31:16 -08:00
bluetooth
cdrom
char Revert radeon AGP aperture offset changes 2005-12-29 13:01:54 -08:00
connector
cpufreq
crypto
dio
eisa
fc4 [SPARC]: introduce a SPARC Kconfig symbol 2005-12-22 23:09:54 -08:00
firmware [PATCH] dell_rbu: NULL noise removal 2005-12-15 10:04:30 -08:00
hwmon
i2c [PATCH] i2c: Fix i2c-mv64xxx compilation error 2005-12-16 11:25:25 -08:00
ide [PATCH] ide: MODALIAS support for autoloading of ide-cd, ide-disk, ... 2006-01-04 16:18:09 -08:00
ieee1394 [PATCH] driver core: replace "hotplug" by "uevent" 2006-01-04 16:18:08 -08:00
infiniband [PATCH] driver core: replace "hotplug" by "uevent" 2006-01-04 16:18:08 -08:00
input [PATCH] driver core: replace "hotplug" by "uevent" 2006-01-04 16:18:08 -08:00
isdn
macintosh [PATCH] driver core: replace "hotplug" by "uevent" 2006-01-04 16:18:08 -08:00
mca
md [PATCH] md: Change case of raid level reported in sys/mdX/md/level 2005-12-19 16:47:50 -08:00
media [PATCH] Simplify the VIDEO_SAA7134_OSS Kconfig dependency line 2005-12-29 13:21:16 -08:00
message [PATCH] i2o: Do not disable pci device when it's in use 2005-12-18 11:19:43 -08:00
mfd
misc
mmc [PATCH] driver core: replace "hotplug" by "uevent" 2006-01-04 16:18:08 -08:00
mtd [SPARC]: introduce a SPARC Kconfig symbol 2005-12-22 23:09:54 -08:00
net [TG3]: Update driver version and reldate. 2005-12-28 13:05:41 -08:00
nubus
oprofile
parisc
parport
pci [PATCH] driver core: replace "hotplug" by "uevent" 2006-01-04 16:18:08 -08:00
pcmcia [PATCH] driver core: replace "hotplug" by "uevent" 2006-01-04 16:18:08 -08:00
pnp [PATCH] keep pnpbios usermod_helper away from hotplug_path[] 2006-01-04 16:18:07 -08:00
rapidio
s390 [PATCH] driver kill hotplug word from sn and others fix 2006-01-04 16:18:08 -08:00
sbus [PATCH] sbus/char/uctrl: missing prototypes and NULL noise removal 2005-12-15 10:01:28 -08:00
scsi [PATCH] driver core: replace "hotplug" by "uevent" 2006-01-04 16:18:08 -08:00
serial [ARM] 3216/1: indent and typo in drivers/serial/pxa.c 2005-12-30 15:57:35 +00:00
sh
sn
tc
telephony
usb [PATCH] driver core: replace "hotplug" by "uevent" 2006-01-04 16:18:08 -08:00
video [VIDEO] sbuslib: Disallow private mmaps. 2005-12-24 12:06:10 -08:00
w1 [PATCH] driver core: replace "hotplug" by "uevent" 2006-01-04 16:18:08 -08:00
zorro
Kconfig
Makefile