]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: mpt3sas: Fix reference tag handling for WRITE_INSERT
authorMartin K. Petersen <martin.petersen@oracle.com>
Thu, 28 Oct 2021 03:42:02 +0000 (23:42 -0400)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 29 Oct 2021 18:03:58 +0000 (14:03 -0400)
commit8f5b6eab447fffe4052ab3aca556328e243c3a72
tree8442f475e190d9bfb13abccadd2e582a3d4f5ebd
parent16353bb887072004cd4f19168644b7915627d196
scsi: mpt3sas: Fix reference tag handling for WRITE_INSERT

Testing revealed a problem with how the reference tag was handled for
a WRITE_INSERT operation. The SCSI_PROT_REF_CHECK flag is not set when
the controller is asked to generate the protection information
(i.e. not DIX). And as a result the initial reference tag would not be
set in the WRITE_INSERT case.

Separate handling of the REF_CHECK and REF_INCREMENT flags to align
with both the DIX spec and the MPI implementation.

Link: https://lore.kernel.org/r/20211028034202.24225-1-martin.petersen@oracle.com
Fixes: 4a5ab2a59a5e ("scsi: mpt3sas: Use the proper SCSI midlayer interfaces for PI")
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/mpt3sas/mpt3sas_scsih.c