xref: /linux/drivers/scsi/elx/libefc/efc_fabric.h (revision 887069f424550ebdcb411166733e1d05002b58e4)
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 /*
8  * Declarations for the interface exported by efc_fabric
9  */
10 
11 #ifndef __EFCT_FABRIC_H__
12 #define __EFCT_FABRIC_H__
13 #include "scsi/fc/fc_els.h"
14 #include "scsi/fc/fc_fs.h"
15 #include "scsi/fc/fc_ns.h"
16 
17 void
18 __efc_fabric_init(struct efc_sm_ctx *ctx,
19 		  enum efc_sm_event evt, void *arg);
20 void
21 __efc_fabric_flogi_wait_rsp(struct efc_sm_ctx *ctx,
22 			    enum efc_sm_event evt, void *arg);
23 void
24 __efc_fabric_domain_attach_wait(struct efc_sm_ctx *ctx,
25 				enum efc_sm_event evt, void *arg);
26 void
27 __efc_fabric_wait_domain_attach(struct efc_sm_ctx *ctx,
28 				enum efc_sm_event evt, void *arg);
29 
30 void
31 __efc_vport_fabric_init(struct efc_sm_ctx *ctx,
32 			enum efc_sm_event evt, void *arg);
33 void
34 __efc_fabric_fdisc_wait_rsp(struct efc_sm_ctx *ctx,
35 			    enum efc_sm_event evt, void *arg);
36 void
37 __efc_fabric_wait_nport_attach(struct efc_sm_ctx *ctx,
38 			       enum efc_sm_event evt, void *arg);
39 
40 void
41 __efc_ns_init(struct efc_sm_ctx *ctx, enum efc_sm_event evt, void *arg);
42 void
43 __efc_ns_plogi_wait_rsp(struct efc_sm_ctx *ctx,
44 			enum efc_sm_event evt, void *arg);
45 void
46 __efc_ns_rftid_wait_rsp(struct efc_sm_ctx *ctx,
47 			enum efc_sm_event evt, void *arg);
48 void
49 __efc_ns_rffid_wait_rsp(struct efc_sm_ctx *ctx,
50 			enum efc_sm_event evt, void *arg);
51 void
52 __efc_ns_wait_node_attach(struct efc_sm_ctx *ctx,
53 			  enum efc_sm_event evt, void *arg);
54 void
55 __efc_fabric_wait_attach_evt_shutdown(struct efc_sm_ctx *ctx,
56 				      enum efc_sm_event evt, void *arg);
57 void
58 __efc_ns_logo_wait_rsp(struct efc_sm_ctx *ctx,
59 		       enum efc_sm_event, void *arg);
60 void
61 __efc_ns_gidpt_wait_rsp(struct efc_sm_ctx *ctx,
62 			enum efc_sm_event evt, void *arg);
63 void
64 __efc_ns_idle(struct efc_sm_ctx *ctx, enum efc_sm_event evt, void *arg);
65 void
66 __efc_ns_gidpt_delay(struct efc_sm_ctx *ctx,
67 		     enum efc_sm_event evt, void *arg);
68 void
69 __efc_fabctl_init(struct efc_sm_ctx *ctx,
70 		  enum efc_sm_event evt, void *arg);
71 void
72 __efc_fabctl_wait_node_attach(struct efc_sm_ctx *ctx,
73 			      enum efc_sm_event evt, void *arg);
74 void
75 __efc_fabctl_wait_scr_rsp(struct efc_sm_ctx *ctx,
76 			  enum efc_sm_event evt, void *arg);
77 void
78 __efc_fabctl_ready(struct efc_sm_ctx *ctx,
79 		   enum efc_sm_event evt, void *arg);
80 void
81 __efc_fabctl_wait_ls_acc_cmpl(struct efc_sm_ctx *ctx,
82 			      enum efc_sm_event evt, void *arg);
83 void
84 __efc_fabric_idle(struct efc_sm_ctx *ctx,
85 		  enum efc_sm_event evt, void *arg);
86 
87 void
88 __efc_p2p_rnode_init(struct efc_sm_ctx *ctx,
89 		     enum efc_sm_event evt, void *arg);
90 void
91 __efc_p2p_domain_attach_wait(struct efc_sm_ctx *ctx,
92 			     enum efc_sm_event evt, void *arg);
93 void
94 __efc_p2p_wait_flogi_acc_cmpl(struct efc_sm_ctx *ctx,
95 			      enum efc_sm_event evt, void *arg);
96 void
97 __efc_p2p_wait_plogi_rsp(struct efc_sm_ctx *ctx,
98 			 enum efc_sm_event evt, void *arg);
99 void
100 __efc_p2p_wait_plogi_rsp_recvd_prli(struct efc_sm_ctx *ctx,
101 				    enum efc_sm_event evt, void *arg);
102 void
103 __efc_p2p_wait_domain_attach(struct efc_sm_ctx *ctx,
104 			     enum efc_sm_event evt, void *arg);
105 void
106 __efc_p2p_wait_node_attach(struct efc_sm_ctx *ctx,
107 			   enum efc_sm_event evt, void *arg);
108 
109 int
110 efc_p2p_setup(struct efc_nport *nport);
111 void
112 efc_fabric_set_topology(struct efc_node *node,
113 			enum efc_nport_topology topology);
114 void efc_fabric_notify_topology(struct efc_node *node);
115 
116 #endif /* __EFCT_FABRIC_H__ */
117