diff options
| author | Damien Le Moal <dlemoal@kernel.org> | 2025-06-27 09:42:33 +0900 |
|---|---|---|
| committer | Damien Le Moal <dlemoal@kernel.org> | 2025-06-30 10:25:45 +0900 |
| commit | a0f26fcc383965e0522b81269062a9278bc802fe (patch) | |
| tree | 0479b535388efbc949914baf9400b21a4e24ee7f /drivers/ata/libata.h | |
| parent | d0b3b7b22dfa1f4b515fd3a295b3fd958f9e81af (diff) | |
ata: libata: Remove ATA_DFLAG_ZAC device flag
The ATA device flag ATA_DFLAG_ZAC is used to indicate if a devie is a
host managed or host aware zoned device. However, this flag is not used
in the hot path and only used during device scanning/revalidation and
for inquiry and sense SCSI command translation.
Save one bit from struct ata_device flags field by replacing this flag
with the internal helper function ata_dev_is_zac(). This function
returns true if the device class is ATA_DEV_ZAC (host managed ZAC device
case) or if its identify data reports it supports the zoned command set
(host aware ZAC device case).
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Niklas Cassel <cassel@kernel.org>
Diffstat (limited to 'drivers/ata/libata.h')
| -rw-r--r-- | drivers/ata/libata.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/ata/libata.h b/drivers/ata/libata.h index ce5c628fa6fd..48ee7acb87af 100644 --- a/drivers/ata/libata.h +++ b/drivers/ata/libata.h @@ -44,6 +44,13 @@ static inline bool ata_sstatus_online(u32 sstatus) return (sstatus & 0xf) == 0x3; } +static inline bool ata_dev_is_zac(struct ata_device *dev) +{ + /* Host managed device or host aware device */ + return dev->class == ATA_DEV_ZAC || + ata_id_zoned_cap(dev->id) == 0x01; +} + #ifdef CONFIG_ATA_FORCE extern void ata_force_cbl(struct ata_port *ap); #else |