xref: /linux/drivers/scsi/ibmvscsi/ibmvfc-nvme.h (revision 35748ddd3b2c91555bd86b8cf88edc90e7317e57)
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 /*
4  * ibmvfc-nvme.h -- IBM Power Virtual Fibre Channel NVMeoF HBA driver
5  *
6  * Written By: Tyrel Datwyler <tyreld@linux.ibm.com>, IBM Corporation
7  *
8  * Copyright (C) IBM Corporation, 2026
9  */
10 
11 #ifndef _IBMVFC_NVME_H
12 #define _IBMVFC_NVME_H
13 
14 #include <scsi/fc/fc_fs.h>
15 #include <scsi/fc/fc_els.h>
16 #include <linux/nvme-fc-driver.h>
17 #include <linux/nvme.h>
18 #include <linux/nvme-fc.h>
19 
20 #include "ibmvfc.h"
21 
22 #define IBMVFC_NVME		0
23 #define IBMVFC_NVME_HW_QUEUES	8
24 #define IBMVFC_MAX_NVME_QUEUES	16
25 #define IBMVFC_NVME_CHANNELS	8
26 
27 #define IBMVFC_FC4_LS_TIMEOUT	15
28 #define IBMVFC_FC4_LS_CANCEL_TIMEOUT	45
29 #define IBMVFC_FC4_LS_PLUS_CANCEL_TIMEOUT	\
30 	(IBMVFC_FC4_LS_TIMEOUT + IBMVFC_FC4_LS_CANCEL_TIMEOUT)
31 
32 extern unsigned int ibmvfc_debug;
33 
34 struct ibmvfc_host;
35 struct ibmvfc_target;
36 struct ibmvfc_queue;
37 
38 struct ibmvfc_nvme_qhandle {
39 	unsigned int qidx;
40 	u16 cpu_id;
41 	unsigned long index;
42 	struct ibmvfc_queue *queue;
43 };
44 
45 int ibmvfc_nvme_register_remoteport(struct ibmvfc_target *tgt);
46 void ibmvfc_nvme_unregister_remoteport(struct ibmvfc_target *tgt);
47 int ibmvfc_nvme_register(struct ibmvfc_host *vhost);
48 void ibmvfc_nvme_unregister(struct ibmvfc_host *vhost);
49 #endif
50