diff options
author | Hannes Reinecke <hare@suse.de> | 2011-03-07 02:56:44 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2011-03-14 02:59:37 -0400 |
commit | 6b3b9d73e08d8939aaf54f85bb47495171f49e20 (patch) | |
tree | 585aa0ee0cee78b1fb773073712bae5fd2467d72 /drivers/ata | |
parent | 60a230e4a62be6837335911b09101bd8aeb7c95a (diff) |
libata: Include WWN ID in inquiry VPD emulation
As per SAT-3 the WWN ID should be included in the VPD page 0x83
(device identification) emulation.
Signed-off-by: Hannes Reinecke <hare@suse.de>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/libata-scsi.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index c11675f34b93..a83419991357 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c | |||
@@ -2056,6 +2056,17 @@ static unsigned int ata_scsiop_inq_83(struct ata_scsi_args *args, u8 *rbuf) | |||
2056 | ATA_ID_SERNO_LEN); | 2056 | ATA_ID_SERNO_LEN); |
2057 | num += ATA_ID_SERNO_LEN; | 2057 | num += ATA_ID_SERNO_LEN; |
2058 | 2058 | ||
2059 | if (ata_id_has_wwn(args->id)) { | ||
2060 | /* SAT defined lu world wide name */ | ||
2061 | /* piv=0, assoc=lu, code_set=binary, designator=NAA */ | ||
2062 | rbuf[num + 0] = 1; | ||
2063 | rbuf[num + 1] = 3; | ||
2064 | rbuf[num + 3] = ATA_ID_WWN_LEN; | ||
2065 | num += 4; | ||
2066 | ata_id_string(args->id, (unsigned char *) rbuf + num, | ||
2067 | ATA_ID_WWN, ATA_ID_WWN_LEN); | ||
2068 | num += ATA_ID_WWN_LEN; | ||
2069 | } | ||
2059 | rbuf[3] = num - 4; /* page len (assume less than 256 bytes) */ | 2070 | rbuf[3] = num - 4; /* page len (assume less than 256 bytes) */ |
2060 | return 0; | 2071 | return 0; |
2061 | } | 2072 | } |