|
|
24d93b |
From b004a9938ed1a8bb2007d0442512c6802c3a6bd1 Mon Sep 17 00:00:00 2001
|
|
|
24d93b |
From: Sasikumar Chandrasekaran <sasikumar.pc@broadcom.com>
|
|
|
24d93b |
Date: Tue, 10 Jan 2017 18:20:45 -0500
|
|
|
24d93b |
Subject: [PATCH 03/11] scsi: megaraid_sas: EEDP Escape Mode Support for SAS3.5
|
|
|
24d93b |
Generic Megaraid Controllers
|
|
|
24d93b |
|
|
|
24d93b |
An UNMAP command on a PI formatted device will leave the Logical Block Application
|
|
|
24d93b |
Tag and Logical Block Reference Tag as all F's (for those LBAs that are unmapped).
|
|
|
24d93b |
To avoid IO errors if those LBAs are subsequently read before they are written with
|
|
|
24d93b |
valid tag fields, the MPI SCSI IO requests need to set the EEDPFlags element EEDP
|
|
|
24d93b |
Escape Mode field, Bits [7:6] appropriately. A value of 2 should be set to disable
|
|
|
24d93b |
all PI checks if the Logical Block Application Tag is 0xFFFF for PI types 1 and 2.
|
|
|
24d93b |
A value of 3 should be set to disable all PI checks if the Logical Block Application
|
|
|
24d93b |
Tag is 0xFFFF and the Logical Block Reference Tag is 0xFFFFFFFF for PI type 3.
|
|
|
24d93b |
|
|
|
24d93b |
Signed-off-by: Sasikumar Chandrasekaran <sasikumar.pc@broadcom.com>
|
|
|
24d93b |
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
|
|
|
24d93b |
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
|
|
|
24d93b |
---
|
|
|
24d93b |
drivers/scsi/megaraid/megaraid_sas_fusion.c | 1 +
|
|
|
24d93b |
drivers/scsi/megaraid/megaraid_sas_fusion.h | 2 ++
|
|
|
24d93b |
2 files changed, 3 insertions(+)
|
|
|
24d93b |
|
|
|
24d93b |
diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c
|
|
|
24d93b |
index c64b85a..27c6a1f 100644
|
|
|
24d93b |
--- a/drivers/scsi/megaraid/megaraid_sas_fusion.c
|
|
|
24d93b |
+++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c
|
|
|
24d93b |
@@ -1589,6 +1589,7 @@ megasas_set_pd_lba(struct MPI2_RAID_SCSI_IO_REQUEST *io_request, u8 cdb_len,
|
|
|
24d93b |
MPI2_SCSIIO_EEDPFLAGS_CHECK_REFTAG |
|
|
|
24d93b |
MPI2_SCSIIO_EEDPFLAGS_CHECK_REMOVE_OP |
|
|
|
24d93b |
MPI2_SCSIIO_EEDPFLAGS_CHECK_APPTAG |
|
|
|
24d93b |
+ MPI25_SCSIIO_EEDPFLAGS_DO_NOT_DISABLE_MODE |
|
|
|
24d93b |
MPI2_SCSIIO_EEDPFLAGS_CHECK_GUARD);
|
|
|
24d93b |
} else {
|
|
|
24d93b |
io_request->EEDPFlags = cpu_to_le16(
|
|
|
24d93b |
diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.h b/drivers/scsi/megaraid/megaraid_sas_fusion.h
|
|
|
24d93b |
index 80eaee2..3cd3d0a 100644
|
|
|
24d93b |
--- a/drivers/scsi/megaraid/megaraid_sas_fusion.h
|
|
|
24d93b |
+++ b/drivers/scsi/megaraid/megaraid_sas_fusion.h
|
|
|
24d93b |
@@ -175,6 +175,8 @@ enum REGION_TYPE {
|
|
|
24d93b |
#define MPI2_SCSIIO_EEDPFLAGS_CHECK_APPTAG (0x0200)
|
|
|
24d93b |
#define MPI2_SCSIIO_EEDPFLAGS_CHECK_GUARD (0x0100)
|
|
|
24d93b |
#define MPI2_SCSIIO_EEDPFLAGS_INSERT_OP (0x0004)
|
|
|
24d93b |
+/* EEDP escape mode */
|
|
|
24d93b |
+#define MPI25_SCSIIO_EEDPFLAGS_DO_NOT_DISABLE_MODE (0x0040)
|
|
|
24d93b |
#define MPI2_FUNCTION_SCSI_IO_REQUEST (0x00) /* SCSI IO */
|
|
|
24d93b |
#define MPI2_FUNCTION_SCSI_TASK_MGMT (0x01)
|
|
|
24d93b |
#define MPI2_REQ_DESCRIPT_FLAGS_HIGH_PRIORITY (0x03)
|
|
|
24d93b |
--
|
|
|
24d93b |
1.8.3.1
|
|
|
24d93b |
|