Hannes Reinecke 9983bed390 scsi: Add scsi_vpd_lun_id()
Add a function scsi_vpd_lun_id() to return a unique device
identifcation based on the designation descriptors of
VPD page 0x83.

As devices might implement several descriptors the order
of preference is:
- NAA IEE Registered Extended
- EUI-64 based 16-byte
- EUI-64 based 12-byte
- NAA IEEE Registered
- NAA IEEE Extended
A SCSI name string descriptor is preferred to all of them
if the identification is longer than 16 bytes.

The returned unique device identification will be formatted
as a SCSI Name string to avoid clashes between different
designator types.

[mkp: Fixed up kernel doc comment from Johannes]

Signed-off-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Ewan Milne <emilne@redhat.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2015-12-02 16:40:19 -05:00
..
2012-02-19 08:08:58 -06:00
2015-12-02 16:36:14 -05:00
2015-12-02 16:40:19 -05:00
2015-08-28 13:14:57 -07:00
2015-06-01 07:32:42 -07:00
2015-11-09 17:11:57 -08:00
2014-07-17 22:07:37 +02:00
2005-04-16 15:20:36 -07:00
2015-05-18 13:35:56 -04:00