linux/include/scsi
Michael Tokarev d7b8bcb0a0 [SCSI] modalias for scsi devices
The following patch adds support for sysfs/uevent modalias
attribute for scsi devices (like disks, tapes, cdroms etc),
based on whatever current sd.c, sr.c, st.c and osst.c drivers
supports.

The modalias format is like this:

 scsi:type-0x04

(for TYPE_WORM, handled by sr.c now).

Several comments.

o This hexadecimal type value is because all TYPE_XXX constants
  in include/scsi/scsi.h are given in hex, but __stringify() will
  not convert them to decimal (so it will NOT be scsi:type-4).
  Since it does not really matter in which format it is, while
  both modalias in module and modalias attribute match each other,
  I descided to go for that 0x%02x format (and added a comment in
  include/scsi/scsi.h to keep them that way), instead of changing
  them all to decimal.

o There was no .uevent routine for SCSI bus.  It might be a good
  idea to add some more ueven environment variables in there.

o osst.c driver handles tapes too, like st.c, but only SOME tapes.
  With this setup, hotplug scripts (or whatever is used by the
  user) will try to load both st and osst modules for all SCSI
  tapes found, because both modules have scsi:type-0x01 alias).
  It is not harmful, but one extra module is no good either.
  It is possible to solve this, by exporting more info in
  modalias attribute, including vendor and device identification
  strings, so that modalias becomes something like
    scsi:type-0x12:vendor-Adaptec LTD:device-OnStream Tape Drive
  and having that, match for all 3 attributes, not only device
  type.  But oh well, vendor and device strings may be large,
  and they do contain spaces and whatnot.
  So I left them for now, awaiting for comments first.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-04-17 18:15:04 -04:00
..
Kbuild [HEADERS] One line per header in Kbuild files to reduce conflicts 2006-09-19 12:43:58 +01:00
iscsi_if.h [SCSI] iscsi: add async notification of session events 2006-06-29 11:14:42 -04:00
iscsi_proto.h [SCSI] iscsi: rename DEFAULT_MAX_RECV_DATA_SEGMENT_LENGTH 2007-03-11 11:26:50 -05:00
libiscsi.h [PATCH] severing module.h->sched.h 2006-12-04 02:00:22 -05:00
libsas.h Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 2007-02-11 11:44:25 -08:00
libsrp.h [SCSI] scsi tgt: SCSI RDMA Protocol library functions 2006-12-03 09:27:33 -06:00
sas.h [SCSI] aci94xx: implement link rate setting 2006-09-07 15:20:23 -05:00
scsi.h [SCSI] modalias for scsi devices 2007-04-17 18:15:04 -04:00
scsi_cmnd.h [SCSI] tgt: rm bio hacks in scsi tgt 2007-03-11 11:31:33 -05:00
scsi_dbg.h [SCSI] constants.c: cleanup, verbose result printing 2007-03-11 11:14:02 -05:00
scsi_device.h [SCSI] modalias for scsi devices 2007-04-17 18:15:04 -04:00
scsi_devinfo.h Merge ../scsi-rc-fixes-2.6 2006-04-14 15:47:45 -05:00
scsi_driver.h [BLOCK] update SCSI to use new blk_ordered for barriers 2006-01-06 09:52:55 +01:00
scsi_eh.h [SCSI] remove scsi_request infrastructure 2006-06-10 16:24:40 -05:00
scsi_host.h [SCSI] expose eh_timed_out to the host template 2007-03-20 10:56:49 -05:00
scsi_ioctl.h [SCSI] unify SCSI_IOCTL_SEND_COMMAND implementations 2006-04-13 10:13:15 -05:00
scsi_netlink.h [SCSI] SCSI & FC transport: extend event vendor id's to 64bits 2006-09-02 15:35:15 -05:00
scsi_netlink_fc.h [SCSI] SCSI & FC transport: extend event vendor id's to 64bits 2006-09-02 15:35:15 -05:00
scsi_tcq.h [PATCH] helper function for retrieving scsi_cmd given host based block layer tag 2006-10-04 19:32:09 +02:00
scsi_tgt.h [SCSI] scsi tgt: scsi target lib functionality 2006-11-25 13:17:18 -06:00
scsi_tgt_if.h [SCSI] tgt: fix sesnse buffer problems 2007-03-11 11:39:27 -05:00
scsi_transport.h [SCSI] scsi_transport.h should include scsi_device.h 2007-02-16 10:14:42 -06:00
scsi_transport_fc.h [SCSI] fc_transport: update potential link speeds 2007-03-20 10:52:04 -05:00
scsi_transport_iscsi.h WorkStruct: make allyesconfig 2006-11-22 14:57:56 +00:00
scsi_transport_sas.h [SCSI] libsas: Clean up discovery failure handler code 2007-01-27 10:05:15 -06:00
scsi_transport_spi.h [SCSI] spi transport class: export spi_dv_pending 2007-02-02 20:44:25 -06:00
scsicam.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
sd.h [SCSI] sd: implement START/STOP management 2007-03-20 12:06:20 -05:00
sg.h [SCSI] sg: fixes for large page_size 2006-09-26 09:23:15 -07:00
srp.h [SCSI] srp.h: Add I/O Class values 2006-06-17 20:37:38 -07:00