* [PATCH] mpt3sas: Disable DIF when prot_mask set to zero
@ 2020-04-28 9:25 Sreekanth Reddy
2020-05-08 2:54 ` Martin K. Petersen
0 siblings, 1 reply; 2+ messages in thread
From: Sreekanth Reddy @ 2020-04-28 9:25 UTC (permalink / raw)
To: martin.petersen
Cc: linux-scsi, sathya.prakash, suganath-prabu.subramani, 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_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@broadcom.com>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mpt3sas: Disable DIF when prot_mask set to zero
2020-04-28 9:25 [PATCH] mpt3sas: Disable DIF when prot_mask set to zero Sreekanth Reddy
@ 2020-05-08 2:54 ` Martin K. Petersen
0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2020-05-08 2:54 UTC (permalink / raw)
To: Sreekanth Reddy
Cc: Martin K . Petersen, suganath-prabu.subramani, linux-scsi,
sathya.prakash
On Tue, 28 Apr 2020 05:25:02 -0400, Sreekanth Reddy wrote:
> 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.
>
> [...]
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
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-05-08 2:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-28 9:25 [PATCH] mpt3sas: Disable DIF when prot_mask set to zero Sreekanth Reddy
2020-05-08 2:54 ` Martin K. Petersen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.