[RHEL7,COMMIT] ms/libata: fixup ZAC device disabling

Submitted by Konstantin Khorenko on Oct. 1, 2019, 2:49 p.m.

Details

Message ID 201910011449.x91Enslm015639@finist-ce7.sw.ru
State New
Series "ms/libata: fixup ZAC device disabling"
Headers show

Commit Message

Konstantin Khorenko Oct. 1, 2019, 2:49 p.m.
The commit is pushed to "branch-rh7-3.10.0-957.27.2.vz7.107.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-957.27.2.vz7.107.11
------>
commit 17b9c3b14b25305711e202a8a0dcc36b62f1e26d
Author: Hannes Reinecke <hare@suse.de>
Date:   Tue Oct 1 17:49:54 2019 +0300

    ms/libata: fixup ZAC device disabling
    
    libata device disabling is ... curious. So add the correct
    definitions that we can disable ZAC devices properly.
    
    Signed-off-by: Hannes Reinecke <hare@suse.com>
    Signed-off-by: Tejun Heo <tj@kernel.org>
    
    https://pmc.acronis.com/browse/VSTOR-26930
    (cherry picked from commit 3a92945b24c7ff46757a3d5d5112bfc62d2e45b2)
    Signed-off-by: Ildar Ismagilov <ildar.ismagilov@virtuozzo.com>
    
    =====================
    Patchset description:
    
    Add support of SMR ATA disk
    
    This patchset adds support of SMR ATA disk through SCSI generic interface
    aka /dev/sgX.
    
    The SCSI generic interface is used by libzbc library for communicate
    with SMR disk. These patches allow us to use SMR disk through
    "ata" backend of libzbc ("scsi" and "block" backends aren't supported).
    
    These patches were tested with following command:
     libzbc/test/zbc_test.sh /dev/sgX
    
    JIRA: https://pmc.acronis.com/browse/VSTOR-26930
    
    Damien Le Moal (1):
      libata: Fix ATA request sense
    
    Hannes Reinecke (5):
      libata: Implement ATA_DEV_ZAC
      libata-scsi: Update SATL for ZAC drives
      libata: Implement NCQ autosense
      libata: Implement support for sense data reporting
      libata: fixup ZAC device disabling
---
 include/linux/libata.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/include/linux/libata.h b/include/linux/libata.h
index 3ce5f0366f29..388376b0c64e 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -192,7 +192,8 @@  enum {
 	ATA_DEV_SEMB		= 7,	/* SEMB */
 	ATA_DEV_SEMB_UNSUP	= 8,	/* SEMB (unsupported) */
 	ATA_DEV_ZAC		= 9,	/* ZAC device */
-	ATA_DEV_NONE		= 10,	/* no device */
+	ATA_DEV_ZAC_UNSUP	= 10,	/* ZAC device (unsupported) */
+	ATA_DEV_NONE		= 11,	/* no device */
 
 	/* struct ata_link flags */
 	ATA_LFLAG_NO_HRST	= (1 << 1), /* avoid hardreset */
@@ -1518,7 +1519,8 @@  static inline unsigned int ata_class_enabled(unsigned int class)
 static inline unsigned int ata_class_disabled(unsigned int class)
 {
 	return class == ATA_DEV_ATA_UNSUP || class == ATA_DEV_ATAPI_UNSUP ||
-		class == ATA_DEV_PMP_UNSUP || class == ATA_DEV_SEMB_UNSUP;
+		class == ATA_DEV_PMP_UNSUP || class == ATA_DEV_SEMB_UNSUP ||
+		class == ATA_DEV_ZAC_UNSUP;
 }
 
 static inline unsigned int ata_class_absent(unsigned int class)