By default DIF Type1, DIF Type2 & DIF Type3 will be enabled. Also users can enable either DIF Type 1 or DIF Type2 or DIF Type3 or in any combination using the prot_mask module parameter. But when the user provides the prot_mask module parameter value as zero then the driver is not disabling the DIF, instead it enables all three typesof DIF's. So modified the driver to disable the DIF support if the user provides the prot_mask module parameter value as zero. Signed-off-by: Sreekanth Reddy <sreekanth.reddy@xxxxxxxxxxxx> --- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c index 04a40af..2757bdb 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c +++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c @@ -10763,8 +10763,8 @@ static void pcie_device_make_active(struct MPT3SAS_ADAPTER *ioc, } } /* register EEDP capabilities with SCSI layer */ - if (prot_mask > 0) - scsi_host_set_prot(shost, prot_mask); + if (prot_mask >= 0) + scsi_host_set_prot(shost, (prot_mask & 0x07)); else scsi_host_set_prot(shost, SHOST_DIF_TYPE1_PROTECTION | SHOST_DIF_TYPE2_PROTECTION -- 1.8.3.1