ata: fix ata_id_has_devslp()
authorNiklas Cassel <niklas.cassel@wdc.com>
Fri, 16 Sep 2022 12:28:33 +0000 (14:28 +0200)
committerDamien Le Moal <damien.lemoal@opensource.wdc.com>
Wed, 21 Sep 2022 02:18:24 +0000 (11:18 +0900)
commit9c6e09a434e1317e09b78b3b69cd384022ec9a03
treee07f312805223231794d5011c55c4e5811b4021e
parent690aa8c3ae308bc696ec8b1b357b995193927083
ata: fix ata_id_has_devslp()

ACS-5 section
7.13.6.36 Word 78: Serial ATA features supported
states that:

If word 76 is not 0000h or FFFFh, word 78 reports the features supported
by the device. If this word is not supported, the word shall be cleared
to zero.

(This text also exists in really old ACS standards, e.g. ACS-3.)

Additionally, move the macro to the other ATA_ID_FEATURE_SUPP macros
(which already have this check), thus making it more likely that the
next ATA_ID_FEATURE_SUPP macro that is added will include this check.

Fixes: 65fe1f0f66a5 ("ahci: implement aggressive SATA device sleep support")
Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
include/linux/ata.h