[PATCH] mpt3sas: Disable DIF when prot_mask set to zero

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux