[PATCH 09/29] ibmvfc: add helper to check NVMe/FC support with active channels
From: Tyrel Datwyler
Date: Mon Jun 22 2026 - 21:33:39 EST
It can be the case that NVMeoF is enabled on both the client and VIOS,
but no queues are configured making the need to do NVMe target discovery
pointless. Add a helper to short hand the capabilities check and active
NVMe queue check.
Signed-off-by: Tyrel Datwyler <tyreld@xxxxxxxxxxxxx>
---
drivers/scsi/ibmvscsi/ibmvfc-core.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/scsi/ibmvscsi/ibmvfc-core.c b/drivers/scsi/ibmvscsi/ibmvfc-core.c
index 8186e9321af5..9cd688762150 100644
--- a/drivers/scsi/ibmvscsi/ibmvfc-core.c
+++ b/drivers/scsi/ibmvscsi/ibmvfc-core.c
@@ -207,6 +207,12 @@ static int ibmvfc_check_caps(struct ibmvfc_host *vhost, unsigned long cap_flags)
return (host_caps & cap_flags) ? 1 : 0;
}
+static int ibmvfc_nvme_active(struct ibmvfc_host *vhost)
+{
+ return (ibmvfc_check_caps(vhost, IBMVFC_SUPPORT_NVMEOF) &&
+ vhost->nvme_scrqs.active_queues);
+}
+
static struct ibmvfc_fcp_cmd_iu *ibmvfc_get_fcp_iu(struct ibmvfc_host *vhost,
struct ibmvfc_cmd *vfc_cmd)
{
--
2.54.0