OSDN Git Service

scsi: lpfc: Zero SLI4 fcp_cmnd buffer's fcpCntl0 field
authorJames Smart <jsmart2021@gmail.com>
Tue, 12 Apr 2022 22:19:46 +0000 (15:19 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 19 Apr 2022 02:48:44 +0000 (22:48 -0400)
commit787d0580ca181d254f4dfd8b281cbea31120bde3
tree24b7da741bad65968a9c3161b012091becbb19ca
parenta6de9a2fa0d67ac33ce398333e7398ae24c7af2a
scsi: lpfc: Zero SLI4 fcp_cmnd buffer's fcpCntl0 field

It's possible that the fcpCntl0 reserved field is allocated non-zero.

For certain target storage arrays this could cause problems expecting
reserved fields to be all zero.

SLI3 path already allocates fcp_cmnd buffer with dma_pool_zalloc() in
lpfc_new_scsi_buf_s3.  The fcpCntl0 field itself is never proactively set
throughout the SCSI I/O path.  Thus, we only change the SLI4 fcp_cmnd
buffer allocation to dma_pool_zalloc.

Link: https://lore.kernel.org/r/20220412222008.126521-5-jsmart2021@gmail.com
Co-developed-by: Justin Tee <justin.tee@broadcom.com>
Signed-off-by: Justin Tee <justin.tee@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_sli.c