From: Justin Tee justin.tee@broadcom.com
[ Upstream commit 5de09770b1c0e229d2cec93e7f634fcdc87c9bc8 ]
To assist in debugging lpfc_xri_rebalancing driver parameter, a debugfs entry is used. The debugfs file operations for xri rebalancing have been previously implemented, but lack definition for its information buffer size. Similar to other pre-existing debugfs entry buffers, define LPFC_HDWQINFO_SIZE as 8192 bytes.
Signed-off-by: Justin Tee justin.tee@broadcom.com Message-ID: 20250915180811.137530-9-justintee8345@gmail.com Signed-off-by: Martin K. Petersen martin.petersen@oracle.com Signed-off-by: Sasha Levin sashal@kernel.org ---
LLM Generated explanations, may be completely bogus:
YES – this one-liner unblocks an existing debugfs feature and is safe to carry into stable.
- `drivers/scsi/lpfc/lpfc_debugfs.c:607` and `drivers/scsi/lpfc/lpfc_debugfs.c:2134` consume `LPFC_HDWQINFO_SIZE` to cap output and size the kmalloc buffer when the optional `LPFC_HDWQ_LOCK_STAT` instrumentation is enabled; without a definition the driver fails to build as soon as that knob is turned on. - The new define in `drivers/scsi/lpfc/lpfc_debugfs.h:47` mirrors the other debugfs buffer constants, restoring buildability for the lockstat/xri-rebalancing debugfs file that has existed since commit 6a828b0f6192 but was unusable. - Scope is tight (single macro), runtime behavior is unchanged, and the only effect is eliminating a straightforward compile-time break, so regression risk is effectively nil.
Suggested follow-up: rebuild the lpfc driver with `-DLPFC_HDWQ_LOCK_STAT` (and `CONFIG_SCSI_LPFC_DEBUG_FS`) to confirm the debugfs entry now compiles and opens as expected.
drivers/scsi/lpfc/lpfc_debugfs.h | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/drivers/scsi/lpfc/lpfc_debugfs.h b/drivers/scsi/lpfc/lpfc_debugfs.h index f319f3af04009..566dd84e0677a 100644 --- a/drivers/scsi/lpfc/lpfc_debugfs.h +++ b/drivers/scsi/lpfc/lpfc_debugfs.h @@ -44,6 +44,9 @@ /* hbqinfo output buffer size */ #define LPFC_HBQINFO_SIZE 8192
+/* hdwqinfo output buffer size */ +#define LPFC_HDWQINFO_SIZE 8192 + /* nvmestat output buffer size */ #define LPFC_NVMESTAT_SIZE 8192 #define LPFC_IOKTIME_SIZE 8192