Patch "ata: fix ata_id_has_devslp()" has been added to the 4.19-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    ata: fix ata_id_has_devslp()

to the 4.19-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     ata-fix-ata_id_has_devslp.patch
and it can be found in the queue-4.19 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 41db7e87d92a0131b6b6d082ec7cb6e4682a25fb
Author: Niklas Cassel <niklas.cassel@xxxxxxx>
Date:   Fri Sep 16 14:28:33 2022 +0200

    ata: fix ata_id_has_devslp()
    
    [ Upstream commit 9c6e09a434e1317e09b78b3b69cd384022ec9a03 ]
    
    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@xxxxxxx>
    Signed-off-by: Damien Le Moal <damien.lemoal@xxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/include/linux/ata.h b/include/linux/ata.h
index 351e58312e7d..e9d24a23c0aa 100644
--- a/include/linux/ata.h
+++ b/include/linux/ata.h
@@ -581,6 +581,10 @@ struct ata_bmdma_prd {
 	((((id)[ATA_ID_SATA_CAPABILITY] != 0x0000) && \
 	  ((id)[ATA_ID_SATA_CAPABILITY] != 0xffff)) && \
 	 ((id)[ATA_ID_FEATURE_SUPP] & (1 << 2)))
+#define ata_id_has_devslp(id)	\
+	((((id)[ATA_ID_SATA_CAPABILITY] != 0x0000) && \
+	  ((id)[ATA_ID_SATA_CAPABILITY] != 0xffff)) && \
+	 ((id)[ATA_ID_FEATURE_SUPP] & (1 << 8)))
 #define ata_id_iordy_disable(id) ((id)[ATA_ID_CAPABILITY] & (1 << 10))
 #define ata_id_has_iordy(id) ((id)[ATA_ID_CAPABILITY] & (1 << 11))
 #define ata_id_u32(id,n)	\
@@ -593,7 +597,6 @@ struct ata_bmdma_prd {
 
 #define ata_id_cdb_intr(id)	(((id)[ATA_ID_CONFIG] & 0x60) == 0x20)
 #define ata_id_has_da(id)	((id)[ATA_ID_SATA_CAPABILITY_2] & (1 << 4))
-#define ata_id_has_devslp(id)	((id)[ATA_ID_FEATURE_SUPP] & (1 << 8))
 #define ata_id_has_ncq_autosense(id) \
 				((id)[ATA_ID_FEATURE_SUPP] & (1 << 7))
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux