mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 12:52:29 -04:00
scsi: ibmvfc: add helper to check NVMe/FC support with active channels
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@linux.ibm.com> Link: https://patch.msgid.link/20260723000149.969416-14-tyreld@linux.ibm.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
committed by
Martin K. Petersen
parent
a29ee1473a
commit
8acacfa8b0
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user