Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1504832 > unrolled thread

[PATCH 08/10] mpt3sas: set EEDP-escape-flags for SAS35 devices.

Started bySuganath Prabu S <suganath-prabu.subramani@broadcom.com>
First post2016-10-20 14:30 +0200
Last post2016-10-24 17:00 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 08/10] mpt3sas: set EEDP-escape-flags for SAS35 devices. Suganath Prabu S <suganath-prabu.subramani@broadcom.com> - 2016-10-20 14:30 +0200
    Re: [PATCH 08/10] mpt3sas: set EEDP-escape-flags for SAS35 devices. Hannes Reinecke <hare@suse.de> - 2016-10-24 17:00 +0200

#1504832 — [PATCH 08/10] mpt3sas: set EEDP-escape-flags for SAS35 devices.

FromSuganath Prabu S <suganath-prabu.subramani@broadcom.com>
Date2016-10-20 14:30 +0200
Subject[PATCH 08/10] mpt3sas: set EEDP-escape-flags for SAS35 devices.
Message-ID<sukDU-7vO-13@gated-at.bofh.it>
An UNMAP command on a PI formatted device will leave the Logical Block
Application Tag and Logical Block Reference Tag as all F's (for those LBAs
that are unmapped). To avoid IO errors if those LBAs are subsequently read
before they are written with valid tag fields, the MPI SCSI IO requests
need to set the EEDPFlags element EEDP Escape Mode field, Bits [7:6]
appropriately. A value of 2 should be set to disable all PI checks if the
Logical Block Application Tag is 0xFFFF for PI types 1 and 2.  A value
of 3 should be set to disable all PI checks if the Logical Block
Application Tag is 0xFFFF and the Logical Block Reference Tag is
0xFFFFFFFF for PI type 3.

Signed-off-by: Chaitra P B <chaitra.basappa@broadcom.com>
Signed-off-by: Sathya Prakash <sathya.prakash@broadcom.com>
Signed-off-by: Suganath Prabu S <suganath-prabu.subramani@broadcom.com>
---
 drivers/scsi/mpt3sas/mpt3sas_scsih.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
index a1c541d..c58f326 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
@@ -3989,6 +3989,9 @@ _scsih_setup_eedp(struct MPT3SAS_ADAPTER *ioc, struct scsi_cmnd *scmd,
 
 	mpi_request_3v->EEDPBlockSize =
 	    cpu_to_le16(scmd->device->sector_size);
+
+	if (ioc->is_gen35_ioc)
+		eedp_flags |= MPI25_SCSIIO_EEDPFLAGS_APPTAG_DISABLE_MODE;
 	mpi_request->EEDPFlags = cpu_to_le16(eedp_flags);
 }
 
-- 
1.8.3.1

[toc] | [next] | [standalone]


#1507270

FromHannes Reinecke <hare@suse.de>
Date2016-10-24 17:00 +0200
Message-ID<svOTf-vq-21@gated-at.bofh.it>
In reply to#1504832
On 10/20/2016 02:20 PM, Suganath Prabu S wrote:
> An UNMAP command on a PI formatted device will leave the Logical Block
> Application Tag and Logical Block Reference Tag as all F's (for those LBAs
> that are unmapped). To avoid IO errors if those LBAs are subsequently read
> before they are written with valid tag fields, the MPI SCSI IO requests
> need to set the EEDPFlags element EEDP Escape Mode field, Bits [7:6]
> appropriately. A value of 2 should be set to disable all PI checks if the
> Logical Block Application Tag is 0xFFFF for PI types 1 and 2.  A value
> of 3 should be set to disable all PI checks if the Logical Block
> Application Tag is 0xFFFF and the Logical Block Reference Tag is
> 0xFFFFFFFF for PI type 3.
>
> Signed-off-by: Chaitra P B <chaitra.basappa@broadcom.com>
> Signed-off-by: Sathya Prakash <sathya.prakash@broadcom.com>
> Signed-off-by: Suganath Prabu S <suganath-prabu.subramani@broadcom.com>
> ---
>  drivers/scsi/mpt3sas/mpt3sas_scsih.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
> index a1c541d..c58f326 100644
> --- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c
> +++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
> @@ -3989,6 +3989,9 @@ _scsih_setup_eedp(struct MPT3SAS_ADAPTER *ioc, struct scsi_cmnd *scmd,
>
>  	mpi_request_3v->EEDPBlockSize =
>  	    cpu_to_le16(scmd->device->sector_size);
> +
> +	if (ioc->is_gen35_ioc)
> +		eedp_flags |= MPI25_SCSIIO_EEDPFLAGS_APPTAG_DISABLE_MODE;
>  	mpi_request->EEDPFlags = cpu_to_le16(eedp_flags);
>  }
>
>
Reviewed-by: Hannes Reinecke <hare@suse.com>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		   Teamlead Storage & Networking
hare@suse.de			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web