From: Chaitra P B Date: Fri, 6 May 2016 08:59:28 +0000 (+0530) Subject: mpt3sas: Fix initial Reference tag field for 4K PI drives. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=648512ccd7d42ccf761f515b7c0cb456a48c477a;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git mpt3sas: Fix initial Reference tag field for 4K PI drives. Modified driver code to use scsi_prot_ref_tag() API instead of scsi_get_lba(), while initializing reference tag field in the CDB. Signed-off-by: Chaitra P B Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen --- diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c index 4f2500b24c59..d256fc0fcc98 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c +++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c @@ -3959,7 +3959,7 @@ _scsih_setup_eedp(struct MPT3SAS_ADAPTER *ioc, struct scsi_cmnd *scmd, MPI2_SCSIIO_EEDPFLAGS_CHECK_REFTAG | MPI2_SCSIIO_EEDPFLAGS_CHECK_GUARD; mpi_request->CDB.EEDP32.PrimaryReferenceTag = - cpu_to_be32(scsi_get_lba(scmd)); + cpu_to_be32(scsi_prot_ref_tag(scmd)); break; case SCSI_PROT_DIF_TYPE3: