aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ata.h
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2011-03-07 02:56:44 -0500
committerJeff Garzik <jgarzik@pobox.com>2011-03-14 02:59:37 -0400
commit6b3b9d73e08d8939aaf54f85bb47495171f49e20 (patch)
tree585aa0ee0cee78b1fb773073712bae5fd2467d72 /include/linux/ata.h
parent60a230e4a62be6837335911b09101bd8aeb7c95a (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 'include/linux/ata.h')
-rw-r--r--include/linux/ata.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/ata.h b/include/linux/ata.h
index 0c4929fa34d3..198e1ea2b2eb 100644
--- a/include/linux/ata.h
+++ b/include/linux/ata.h
@@ -89,6 +89,7 @@ enum {
89 ATA_ID_SPG = 98, 89 ATA_ID_SPG = 98,
90 ATA_ID_LBA_CAPACITY_2 = 100, 90 ATA_ID_LBA_CAPACITY_2 = 100,
91 ATA_ID_SECTOR_SIZE = 106, 91 ATA_ID_SECTOR_SIZE = 106,
92 ATA_ID_WWN = 108,
92 ATA_ID_LOGICAL_SECTOR_SIZE = 117, /* and 118 */ 93 ATA_ID_LOGICAL_SECTOR_SIZE = 117, /* and 118 */
93 ATA_ID_LAST_LUN = 126, 94 ATA_ID_LAST_LUN = 126,
94 ATA_ID_DLF = 128, 95 ATA_ID_DLF = 128,
@@ -103,6 +104,7 @@ enum {
103 ATA_ID_SERNO_LEN = 20, 104 ATA_ID_SERNO_LEN = 20,
104 ATA_ID_FW_REV_LEN = 8, 105 ATA_ID_FW_REV_LEN = 8,
105 ATA_ID_PROD_LEN = 40, 106 ATA_ID_PROD_LEN = 40,
107 ATA_ID_WWN_LEN = 8,
106 108
107 ATA_PCI_CTL_OFS = 2, 109 ATA_PCI_CTL_OFS = 2,
108 110
@@ -815,6 +817,11 @@ static inline int ata_id_has_unload(const u16 *id)
815 return 0; 817 return 0;
816} 818}
817 819
820static inline bool ata_id_has_wwn(const u16 *id)
821{
822 return (id[ATA_ID_CSF_DEFAULT] & 0xC100) == 0x4100;
823}
824
818static inline int ata_id_form_factor(const u16 *id) 825static inline int ata_id_form_factor(const u16 *id)
819{ 826{
820 u16 val = id[168]; 827 u16 val = id[168];