xref: /linux/drivers/scsi/elx/libefc/efc.h (revision 03ab8e6297acd1bc0eedaa050e2a1635c576fd11)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * Copyright (C) 2021 Broadcom. All Rights Reserved. The term
4  * “Broadcom” refers to Broadcom Inc. and/or its subsidiaries.
5  */
6 
7 #ifndef __EFC_H__
8 #define __EFC_H__
9 
10 #include "../include/efc_common.h"
11 #include "efclib.h"
12 #include "efc_sm.h"
13 #include "efc_cmds.h"
14 #include "efc_domain.h"
15 #include "efc_nport.h"
16 #include "efc_node.h"
17 #include "efc_fabric.h"
18 #include "efc_device.h"
19 #include "efc_els.h"
20 
21 #define EFC_MAX_REMOTE_NODES			2048
22 #define NODE_SPARAMS_SIZE			256
23 
24 enum efc_scsi_del_initiator_reason {
25 	EFC_SCSI_INITIATOR_DELETED,
26 	EFC_SCSI_INITIATOR_MISSING,
27 };
28 
29 enum efc_scsi_del_target_reason {
30 	EFC_SCSI_TARGET_DELETED,
31 	EFC_SCSI_TARGET_MISSING,
32 };
33 
34 #define EFC_FC_ELS_DEFAULT_RETRIES		3
35 
36 #define domain_sm_trace(domain) \
37 	efc_log_debug(domain->efc, "[domain:%s] %-20s %-20s\n", \
38 		      domain->display_name, __func__, efc_sm_event_name(evt)) \
39 
40 #define domain_trace(domain, fmt, ...) \
41 	efc_log_debug(domain->efc, \
42 		      "[%s]" fmt, domain->display_name, ##__VA_ARGS__) \
43 
44 #define node_sm_trace() \
45 	efc_log_debug(node->efc, "[%s] %-20s %-20s\n", \
46 		      node->display_name, __func__, efc_sm_event_name(evt)) \
47 
48 #define nport_sm_trace(nport) \
49 	efc_log_debug(nport->efc, \
50 		"[%s]  %-20s %-20s\n", nport->display_name, __func__, efc_sm_event_name(evt)) \
51 
52 #endif /* __EFC_H__ */
53