From 856c4663930988118d9f355aad66811dd6df06de Mon Sep 17 00:00:00 2001 From: Hannes Reinecke Date: Mon, 25 Apr 2016 12:45:55 +0200 Subject: libata: support device-managed ZAC devices Device-managed ZAC devices just set the zoned capabilities field in INQUIRY byte 69 (cf ACS-4). This corresponds to the 'zoned' field in the block device characteristics VPD page. As this is only defined in SPC-5/SBC-4 we also need to update the supported SCSI version descriptor. Reviewed-by: Shaun Tancheff Tested-by: Shaun Tancheff Signed-off-by: Hannes Reinecke Signed-off-by: Tejun Heo --- include/linux/ata.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/linux/ata.h') diff --git a/include/linux/ata.h b/include/linux/ata.h index e62703201e84..ac1cb9310dea 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h @@ -935,6 +935,11 @@ static inline bool ata_id_is_ssd(const u16 *id) return id[ATA_ID_ROT_SPEED] == 0x01; } +static inline u8 ata_id_zoned_cap(const u16 *id) +{ + return (id[ATA_ID_ADDITIONAL_SUPP] & 0x3); +} + static inline bool ata_id_pio_need_iordy(const u16 *id, const u8 pio) { /* CF spec. r4.1 Table 22 says no IORDY on PIO5 and PIO6. */ -- cgit v1.2.3