Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

scsi: lpfc: Fix cq_id truncation in rq create

On the newer hardware, CQ_ID values can be larger than seen on previous
generations. This exposed an issue in the driver where its definition of
cq_id in the RQ Create mailbox cmd was too small, thus the cq_id was
truncated, causing the command to fail.

Revise the RQ_CREATE CQ_ID field to its proper size (16 bits).

Link: https://lore.kernel.org/r/20210722221721.74388-3-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>

authored by

James Smart and committed by
Martin K. Petersen
df3d78c3 f449a3d7

+1 -1
+1 -1
drivers/scsi/lpfc/lpfc_hw4.h
··· 1561 1561 #define lpfc_rq_context_hdr_size_WORD word1 1562 1562 uint32_t word2; 1563 1563 #define lpfc_rq_context_cq_id_SHIFT 16 1564 - #define lpfc_rq_context_cq_id_MASK 0x000003FF 1564 + #define lpfc_rq_context_cq_id_MASK 0x0000FFFF 1565 1565 #define lpfc_rq_context_cq_id_WORD word2 1566 1566 #define lpfc_rq_context_buf_size_SHIFT 0 1567 1567 #define lpfc_rq_context_buf_size_MASK 0x0000FFFF