kernel-aes67/drivers/ide
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
..
arm
cris
h8300
legacy
mips [PATCH] ide: AU1200 IDE update 2005-12-15 02:17:46 +01:00
pci [PATCH] via82cxxx IDE: Add VT8251 ISA bridge 2005-12-15 02:11:55 +01:00
ppc
ide-cd.c [PATCH] ide: MODALIAS support for autoloading of ide-cd, ide-disk, ... 2006-01-04 16:18:09 -08:00
ide-cd.h [PATCH] ide-cd: remove write-only cmd field from struct cdrom_info 2005-12-15 02:20:49 +01:00
ide-disk.c [PATCH] ide: MODALIAS support for autoloading of ide-cd, ide-disk, ... 2006-01-04 16:18:09 -08:00
ide-dma.c [PATCH] ide: core modifications for AU1200 2005-12-15 02:16:18 +01:00
ide-floppy.c [PATCH] ide: MODALIAS support for autoloading of ide-cd, ide-disk, ... 2006-01-04 16:18:09 -08:00
ide-generic.c
ide-io.c
ide-iops.c
ide-lib.c
ide-pnp.c
ide-probe.c
ide-proc.c
ide-tape.c [PATCH] ide: MODALIAS support for autoloading of ide-cd, ide-disk, ... 2006-01-04 16:18:09 -08:00
ide-taskfile.c [PATCH] ide: remove dead code from flagged_taskfile() 2005-11-19 22:17:55 +01:00
ide-timing.h
ide.c [PATCH] ide: MODALIAS support for autoloading of ide-cd, ide-disk, ... 2006-01-04 16:18:09 -08:00
Kconfig [PATCH] ide: AU1200 IDE update 2005-12-15 02:17:46 +01:00
Makefile
setup-pci.c