]> git.ipfire.org Git - thirdparty/linux.git/commit
scsi: lpfc: Update construction of SGL when XPSGL is enabled
authorJustin Tee <justin.tee@broadcom.com>
Tue, 31 Mar 2026 20:59:24 +0000 (13:59 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 3 Apr 2026 01:34:02 +0000 (21:34 -0400)
commitba6dec7e703e84152f049a7a1b4d33f3c1051226
tree8ab856e779f03d3a268d09b347770418a9f7a2c5
parent384075eb19b2218cbece4a1a758577f1ee0a5e40
scsi: lpfc: Update construction of SGL when XPSGL is enabled

The construction of SGLs is updated to safeguard ASIC boundary requirements
when using XPSGL.

The LSP type SGE is used to notify where a continuing SGL resides.
Typically, this means that the LSP is the last SGE in an SGL because the
current SGL has reached its maximum size and the LSP is used to refer to
the next follow up SGL.  Due to ASIC boundary requirements, there is a need
to ensure a 4 KB boundary is not crossed.  Thus, for a maximum size of 256
byte SGLs or 16 SGEs, this means restricting the LSP to being the 12th SGE
for the very first SGL that is used for pre-registration.  If additional
SGEs are needed, the LSP will be the last SGE position within that follow
up SGL as was previously implemented.

Signed-off-by: Justin Tee <justin.tee@broadcom.com>
Link: https://patch.msgid.link/20260331205928.119833-7-justintee8345@gmail.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_nvme.c
drivers/scsi/lpfc/lpfc_scsi.c