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 <shaun.tancheff@seagate.com>
Tested-by: Shaun Tancheff <shaun.tancheff@seagate.com>
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
Hannes Reinecke 2016-04-25 12:45:55 +02:00 committed by Tejun Heo
parent 284b3b77ea
commit 856c466393
2 changed files with 15 additions and 9 deletions

View file

@ -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. */