]> git.baikalelectronics.ru Git - kernel.git/commit
ata: fix ata_id_has_devslp()
authorNiklas Cassel <niklas.cassel@wdc.com>
Fri, 16 Sep 2022 12:28:33 +0000 (14:28 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Oct 2022 11:22:38 +0000 (13:22 +0200)
commit130bc0885ab094f89e62748a7a59effd4a9050ed
tree37ed90ce9cf99dac40ac59a4388b765f406837c3
parent35f071ff82adf48a5e66b55e99ef3df0f88f7e0c
ata: fix ata_id_has_devslp()

[ Upstream commit c25235902b0fc5ff78fab35023b15ebbb30b128f ]

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: 2eedf630a0e5 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/linux/ata.h