ata: add ata_port_is_frozen() helper
authorNiklas Cassel <niklas.cassel@wdc.com>
Fri, 7 Oct 2022 13:23:37 +0000 (15:23 +0200)
committerDamien Le Moal <damien.lemoal@opensource.wdc.com>
Tue, 18 Oct 2022 04:53:24 +0000 (13:53 +0900)
At the request of the libata maintainer, introduce a ata_port_is_frozen()
helper function.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
include/linux/libata.h

index fe99017..af4953b 100644 (file)
@@ -1043,6 +1043,11 @@ static inline int ata_port_is_dummy(struct ata_port *ap)
        return ap->ops == &ata_dummy_port_ops;
 }
 
+static inline bool ata_port_is_frozen(const struct ata_port *ap)
+{
+       return ap->pflags & ATA_PFLAG_FROZEN;
+}
+
 extern int ata_std_prereset(struct ata_link *link, unsigned long deadline);
 extern int ata_wait_after_reset(struct ata_link *link, unsigned long deadline,
                                int (*check_ready)(struct ata_link *link));