scsi: lpfc: Clean up SLI-4 sysfs resource reporting
authorJustin Tee <justin.tee@broadcom.com>
Wed, 12 Jul 2023 18:05:20 +0000 (11:05 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Sun, 23 Jul 2023 20:17:08 +0000 (16:17 -0400)
commit81907422cac08161cf1a351c416c1f891ff4af57
treeb2dd8ce512dd8e973d483fb7435ce7c6c514fa04
parentd668b368efc2fca15bf785c44b449d38d6b50553
scsi: lpfc: Clean up SLI-4 sysfs resource reporting

Currently, we have dated logic to work around the differences between SLI-4
and SLI-3 resource reporting through sysfs.

Leave the SLI-3 path untouched, but for SLI4 path, retrieve resource values
from the phba->sli4_hba->max_cfg_param structure.  Max values are populated
during ACQE events right after READ_CONFIG mbox cmd is sent.  Instead of
the dated subtraction logic, used resource calculation is directly fed into
sysfs for display.

Signed-off-by: Justin Tee <justin.tee@broadcom.com>
Link: https://lore.kernel.org/r/20230712180522.112722-11-justintee8345@gmail.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_attr.c