scsi: lpfc: Fix WQ|CQ|EQ resource check
authorJustin Tee <justin.tee@broadcom.com>
Wed, 16 Nov 2022 01:19:16 +0000 (17:19 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 17 Nov 2022 18:18:42 +0000 (18:18 +0000)
commit2c1a0a7584f5084f3ec79f86c9a54ee4c55307c4
treef914254dfa46ba1f916870ce8490780eda4eaa8c
parentc4c5fa35563a47957fa4f9c299ca1c6aadc27d50
scsi: lpfc: Fix WQ|CQ|EQ resource check

Adapter configurations with limited EQ resources may fail to initialize.

Firmware resources are queried in lpfc_sli4_read_config().  The driver
parameters cfg_irq_chann and cfg_hdw_queue are adjusted from defaults if
constrained by firmware resources.

The minimum resource check includes a special allocation for queues such as
ELS, MBOX, NVME LS. However the additional reservation was also incorrectly
applied to EQ resources.

Reordered WQ|CQ|EQ resource checks to apply the special allocation
adjustment to WQ and CQ resources only.

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