mpt3sas: Disable DIF when prot_mask set to zero
Subsystems (2)
Sreekanth Reddy
maintainerPATCH 1/1 mpt3sas: Disable DIF when prot_mask set to zero
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.
--- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/mpt3sas/mpt3sas_scsih.c +2 -2
@@ -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
Signature · 1 line
1.8.3.1
Martin K. Petersen
AppliedQuoted 9 lines · Sreekanth Reddy
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_maskmodule parameter.But when the user provides the
prot_maskmodule parameter value as zero then the driver is not disabling the DIF, instead it enables all three typesof DIF's.[...]
Applied to 5.8/scsi-queue, thanks!
[1/1] scsi: mpt3sas: Disable DIF when prot_mask set to zero
https://git.kernel.org/mkp/scsi/c/e869f8ea6a64
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering