From 6b3b9d73e08d8939aaf54f85bb47495171f49e20 Mon Sep 17 00:00:00 2001 From: Hannes Reinecke Date: Mon, 7 Mar 2011 08:56:44 +0100 Subject: 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 Acked-by: Tejun Heo Signed-off-by: Jeff Garzik --- include/linux/ata.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/linux/ata.h') diff --git a/include/linux/ata.h b/include/linux/ata.h index 0c4929fa34d..198e1ea2b2e 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h @@ -89,6 +89,7 @@ enum { ATA_ID_SPG = 98, ATA_ID_LBA_CAPACITY_2 = 100, ATA_ID_SECTOR_SIZE = 106, + ATA_ID_WWN = 108, ATA_ID_LOGICAL_SECTOR_SIZE = 117, /* and 118 */ ATA_ID_LAST_LUN = 126, ATA_ID_DLF = 128, @@ -103,6 +104,7 @@ enum { ATA_ID_SERNO_LEN = 20, ATA_ID_FW_REV_LEN = 8, ATA_ID_PROD_LEN = 40, + ATA_ID_WWN_LEN = 8, ATA_PCI_CTL_OFS = 2, @@ -815,6 +817,11 @@ static inline int ata_id_has_unload(const u16 *id) return 0; } +static inline bool ata_id_has_wwn(const u16 *id) +{ + return (id[ATA_ID_CSF_DEFAULT] & 0xC100) == 0x4100; +} + static inline int ata_id_form_factor(const u16 *id) { u16 val = id[168]; -- cgit v1.2.3