diff options
author | James Smart <jsmart2021@gmail.com> | 2019-11-11 15:04:00 -0800 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2019-11-12 22:21:33 -0500 |
commit | 542ddc9b346984cb5bbc2a923d3f3f27ae961ffa (patch) | |
tree | 1e6b47180a4023df5cf72fec258eb480d06339bf /drivers/scsi/lpfc/lpfc_nvme.c | |
parent | bc227dde0d8b687aa525d01b0df5556d4d37eca3 (diff) | |
download | lwn-542ddc9b346984cb5bbc2a923d3f3f27ae961ffa.tar.gz lwn-542ddc9b346984cb5bbc2a923d3f3f27ae961ffa.zip |
scsi: lpfc: revise nvme max queues to be hdwq count
Driver is setting the initiator nvme template with a max hw queues value of
the present cpu count which is odd. It should be registering the number of
hdwq queues (queues created on the adapter).
Change to set nvme tempate, in all cases, to the number of hardware queues.
Link: https://lore.kernel.org/r/20191111230401.12958-6-jsmart2021@gmail.com
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_nvme.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_nvme.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/scsi/lpfc/lpfc_nvme.c b/drivers/scsi/lpfc/lpfc_nvme.c index 328ddce87f12..db4a04a207ec 100644 --- a/drivers/scsi/lpfc/lpfc_nvme.c +++ b/drivers/scsi/lpfc/lpfc_nvme.c @@ -2148,12 +2148,10 @@ lpfc_nvme_create_localport(struct lpfc_vport *vport) */ lpfc_nvme_template.max_sgl_segments = phba->cfg_nvme_seg_cnt + 1; - /* Advertise how many hw queues we support based on fcp_io_sched */ - if (phba->cfg_fcp_io_sched == LPFC_FCP_SCHED_BY_HDWQ) - lpfc_nvme_template.max_hw_queues = phba->cfg_hdw_queue; - else - lpfc_nvme_template.max_hw_queues = - phba->sli4_hba.num_present_cpu; + /* Advertise how many hw queues we support based on cfg_hdw_queue, + * which will not exceed cpu count. + */ + lpfc_nvme_template.max_hw_queues = phba->cfg_hdw_queue; if (!IS_ENABLED(CONFIG_NVME_FC)) return ret; |