scsi: lpfc: do not set queue->page_count to 0 if pc_sli4_params.wqpcnt is invalid
authorEwan D. Milne <emilne@redhat.com>
Thu, 13 Dec 2018 20:25:16 +0000 (15:25 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 13 Jan 2019 09:01:01 +0000 (10:01 +0100)
commit0840feb396aa78cdcac7f9b30f7678b68e22fddb
tree9d7cd1400fdb6900e35e5b6c3751cfa995aa9107
parent8eb9f245dc977335fbff8ad5f428447a55f24484
scsi: lpfc: do not set queue->page_count to 0 if pc_sli4_params.wqpcnt is invalid

commit 4e87eb2f46ea547d12a276b2e696ab934d16cfb6 upstream.

Certain older adapters such as the OneConnect OCe10100 may not have a valid
wqpcnt value.  In this case, do not set queue->page_count to 0 in
lpfc_sli4_queue_alloc() as this will prevent the driver from initializing.

Fixes: 895427bd01 ("scsi: lpfc: NVME Initiator: Base modifications")
Cc: stable@vger.kernel.org # 4.11+
Signed-off-by: Ewan D. Milne <emilne@redhat.com>
Reviewed-by: Laurence Oberman <loberman@redhat.com>
Tested-by: Laurence Oberman <loberman@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/lpfc/lpfc_sli.c