|
|
a8a466 |
From cf10a0af2c72e9972fa436aa6c2420a00ac69e46 Mon Sep 17 00:00:00 2001
|
|
|
a8a466 |
From: Suganath Prabu Subramani <suganath-prabu.subramani@broadcom.com>
|
|
|
a8a466 |
Date: Wed, 26 Oct 2016 13:34:39 +0530
|
|
|
a8a466 |
Subject: [PATCH 08/11] scsi: mpt3sas: set EEDP-escape-flags for SAS35 devices.
|
|
|
a8a466 |
|
|
|
a8a466 |
An UNMAP command on a PI formatted device will leave the Logical Block
|
|
|
a8a466 |
Application Tag and Logical Block Reference Tag as all F's (for those LBAs
|
|
|
a8a466 |
that are unmapped). To avoid IO errors if those LBAs are subsequently read
|
|
|
a8a466 |
before they are written with valid tag fields, the MPI SCSI IO requests
|
|
|
a8a466 |
need to set the EEDPFlags element EEDP Escape Mode field, Bits [7:6]
|
|
|
a8a466 |
appropriately. A value of 2 should be set to disable all PI checks if the
|
|
|
a8a466 |
Logical Block Application Tag is 0xFFFF for PI types 1 and 2. A value
|
|
|
a8a466 |
of 3 should be set to disable all PI checks if the Logical Block
|
|
|
a8a466 |
Application Tag is 0xFFFF and the Logical Block Reference Tag is
|
|
|
a8a466 |
0xFFFFFFFF for PI type 3.
|
|
|
a8a466 |
|
|
|
a8a466 |
Signed-off-by: Chaitra P B <chaitra.basappa@broadcom.com>
|
|
|
a8a466 |
Signed-off-by: Sathya Prakash <sathya.prakash@broadcom.com>
|
|
|
a8a466 |
Signed-off-by: Suganath Prabu S <suganath-prabu.subramani@broadcom.com>
|
|
|
a8a466 |
Reviewed-by: Hannes Reinecke <hare@suse.com>
|
|
|
a8a466 |
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
|
|
|
a8a466 |
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
|
|
|
a8a466 |
---
|
|
|
a8a466 |
drivers/scsi/mpt3sas/mpt3sas_scsih.c | 3 +++
|
|
|
a8a466 |
1 file changed, 3 insertions(+)
|
|
|
a8a466 |
|
|
|
a8a466 |
diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
|
|
|
a8a466 |
index 980c69d..0ff2ed3 100644
|
|
|
a8a466 |
--- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c
|
|
|
a8a466 |
+++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
|
|
|
a8a466 |
@@ -4040,6 +4040,9 @@ _scsih_setup_eedp(struct MPT3SAS_ADAPTER *ioc, struct scsi_cmnd *scmd,
|
|
|
a8a466 |
|
|
|
a8a466 |
mpi_request_3v->EEDPBlockSize =
|
|
|
a8a466 |
cpu_to_le16(scmd->device->sector_size);
|
|
|
a8a466 |
+
|
|
|
a8a466 |
+ if (ioc->is_gen35_ioc)
|
|
|
a8a466 |
+ eedp_flags |= MPI25_SCSIIO_EEDPFLAGS_APPTAG_DISABLE_MODE;
|
|
|
a8a466 |
mpi_request->EEDPFlags = cpu_to_le16(eedp_flags);
|
|
|
a8a466 |
}
|
|
|
a8a466 |
|
|
|
a8a466 |
--
|
|
|
a8a466 |
1.8.3.1
|
|
|
a8a466 |
|