scsi: ibmvfc: Simplify handling of sub-CRQ initialization
authorTyrel Datwyler <tyreld@linux.ibm.com>
Tue, 2 Mar 2021 23:05:39 +0000 (17:05 -0600)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 4 Mar 2021 22:20:04 +0000 (17:20 -0500)
commit443cc4b45c1be0b25313c9a507b033074334b490
treea6225cc5b9885f2d926574b1cdce0913667d362c
parentf69d02e37a85645aa90d18cacfff36dba370f797
scsi: ibmvfc: Simplify handling of sub-CRQ initialization

If ibmvfc_init_sub_crqs() fails ibmvfc_probe() simply parrots registration
failure reported elsewhere, and futher vhost->scsi_scrq.scrq == NULL is
indication enough to the driver that it has no sub-CRQs available. The
mq_enabled check can also be moved into ibmvfc_init_sub_crqs() such that
each caller doesn't have to gate the call with a mq_enabled check. Finally,
in the case of sub-CRQ setup failure setting do_enquiry can be turned off
to putting the driver into single queue fallback mode.

The aforementioned changes also simplify the next patch in the series that
fixes a hard reset issue, by tying a sub-CRQ setup failure and do_enquiry
logic into ibmvfc_init_sub_crqs().

Link: https://lore.kernel.org/r/20210302230543.9905-2-tyreld@linux.ibm.com
Reviewed-by: Brian King <brking@linux.ibm.com>
Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/ibmvscsi/ibmvfc.c