xref: /linux/drivers/scsi/elx/libefc/efc_device.h (revision 906fd46a65383cd639e5eec72a047efc33045d86)
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  * Node state machine functions for remote device node sm
9  */
10 
11 #ifndef __EFCT_DEVICE_H__
12 #define __EFCT_DEVICE_H__
13 void
14 efc_node_init_device(struct efc_node *node, bool send_plogi);
15 void
16 efc_process_prli_payload(struct efc_node *node,
17 			 void *prli);
18 void
19 efc_d_send_prli_rsp(struct efc_node *node, uint16_t ox_id);
20 void
21 efc_send_ls_acc_after_attach(struct efc_node *node,
22 			     struct fc_frame_header *hdr,
23 			     enum efc_node_send_ls_acc ls);
24 void
25 __efc_d_wait_loop(struct efc_sm_ctx *ctx,
26 		  enum efc_sm_event evt, void *arg);
27 void
28 __efc_d_wait_plogi_acc_cmpl(struct efc_sm_ctx *ctx,
29 			    enum efc_sm_event evt, void *arg);
30 void
31 __efc_d_init(struct efc_sm_ctx *ctx, enum efc_sm_event evt, void *arg);
32 void
33 __efc_d_wait_plogi_rsp(struct efc_sm_ctx *ctx,
34 		       enum efc_sm_event evt, void *arg);
35 void
36 __efc_d_wait_plogi_rsp_recvd_prli(struct efc_sm_ctx *ctx,
37 				  enum efc_sm_event evt, void *arg);
38 void
39 __efc_d_wait_domain_attach(struct efc_sm_ctx *ctx,
40 			   enum efc_sm_event evt, void *arg);
41 void
42 __efc_d_wait_topology_notify(struct efc_sm_ctx *ctx,
43 			     enum efc_sm_event evt, void *arg);
44 void
45 __efc_d_wait_node_attach(struct efc_sm_ctx *ctx,
46 			 enum efc_sm_event evt, void *arg);
47 void
48 __efc_d_wait_attach_evt_shutdown(struct efc_sm_ctx *ctx,
49 				 enum efc_sm_event evt, void *arg);
50 void
51 __efc_d_initiate_shutdown(struct efc_sm_ctx *ctx,
52 			  enum efc_sm_event evt, void *arg);
53 void
54 __efc_d_port_logged_in(struct efc_sm_ctx *ctx,
55 		       enum efc_sm_event evt, void *arg);
56 void
57 __efc_d_wait_logo_acc_cmpl(struct efc_sm_ctx *ctx,
58 			   enum efc_sm_event evt, void *arg);
59 void
60 __efc_d_device_ready(struct efc_sm_ctx *ctx,
61 		     enum efc_sm_event evt, void *arg);
62 void
63 __efc_d_device_gone(struct efc_sm_ctx *ctx,
64 		    enum efc_sm_event evt, void *arg);
65 void
66 __efc_d_wait_adisc_rsp(struct efc_sm_ctx *ctx,
67 		       enum efc_sm_event evt, void *arg);
68 void
69 __efc_d_wait_logo_rsp(struct efc_sm_ctx *ctx,
70 		      enum efc_sm_event evt, void *arg);
71 
72 #endif /* __EFCT_DEVICE_H__ */
73