mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
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 <[email protected]> Acked-by: Tejun Heo <[email protected]> Signed-off-by: Jeff Garzik <[email protected]>
This commit is contained in:
parent
60a230e4a6
commit
6b3b9d73e0
2 changed files with 18 additions and 0 deletions
|
|
@ -2056,6 +2056,17 @@ static unsigned int ata_scsiop_inq_83(struct ata_scsi_args *args, u8 *rbuf)
|
|||
ATA_ID_SERNO_LEN);
|
||||
num += ATA_ID_SERNO_LEN;
|
||||
|
||||
if (ata_id_has_wwn(args->id)) {
|
||||
/* SAT defined lu world wide name */
|
||||
/* piv=0, assoc=lu, code_set=binary, designator=NAA */
|
||||
rbuf[num + 0] = 1;
|
||||
rbuf[num + 1] = 3;
|
||||
rbuf[num + 3] = ATA_ID_WWN_LEN;
|
||||
num += 4;
|
||||
ata_id_string(args->id, (unsigned char *) rbuf + num,
|
||||
ATA_ID_WWN, ATA_ID_WWN_LEN);
|
||||
num += ATA_ID_WWN_LEN;
|
||||
}
|
||||
rbuf[3] = num - 4; /* page len (assume less than 256 bytes) */
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue