brintos

brintos / linux-shallow public Read only

0
0
Text · 2.7 KiB · 3c4f820 Raw
108 lines · c
1/* SPDX-License-Identifier: GPL-2.0 */2/*3 * Copyright (C) 2021 Broadcom. All Rights Reserved. The term4 * “Broadcom” refers to Broadcom Inc. and/or its subsidiaries.5 */6 7#ifndef __EFC_ELS_H__8#define __EFC_ELS_H__9 10#define EFC_STATUS_INVALID	INT_MAX11#define EFC_ELS_IO_POOL_SZ	102412 13struct efc_els_io_req {14	struct list_head	list_entry;15	struct kref		ref;16	void			(*release)(struct kref *arg);17	struct efc_node		*node;18	void			*cb;19	u32			els_retries_remaining;20	bool			els_req_free;21	struct timer_list       delay_timer;22 23	const char		*display_name;24 25	struct efc_disc_io	io;26};27 28typedef int(*efc_hw_srrs_cb_t)(void *arg, u32 length, int status,29			       u32 ext_status);30 31void _efc_els_io_free(struct kref *arg);32struct efc_els_io_req *33efc_els_io_alloc(struct efc_node *node, u32 reqlen);34struct efc_els_io_req *35efc_els_io_alloc_size(struct efc_node *node, u32 reqlen, u32 rsplen);36void efc_els_io_free(struct efc_els_io_req *els);37 38/* ELS command send */39typedef void (*els_cb_t)(struct efc_node *node,40			 struct efc_node_cb *cbdata, void *arg);41int42efc_send_plogi(struct efc_node *node);43int44efc_send_flogi(struct efc_node *node);45int46efc_send_fdisc(struct efc_node *node);47int48efc_send_prli(struct efc_node *node);49int50efc_send_prlo(struct efc_node *node);51int52efc_send_logo(struct efc_node *node);53int54efc_send_adisc(struct efc_node *node);55int56efc_send_pdisc(struct efc_node *node);57int58efc_send_scr(struct efc_node *node);59int60efc_ns_send_rftid(struct efc_node *node);61int62efc_ns_send_rffid(struct efc_node *node);63int64efc_ns_send_gidpt(struct efc_node *node);65void66efc_els_io_cleanup(struct efc_els_io_req *els, int evt, void *arg);67 68/* ELS acc send */69int70efc_send_ls_acc(struct efc_node *node, u32 ox_id);71int72efc_send_ls_rjt(struct efc_node *node, u32 ox_id, u32 reason_cod,73		u32 reason_code_expl, u32 vendor_unique);74int75efc_send_flogi_p2p_acc(struct efc_node *node, u32 ox_id, u32 s_id);76int77efc_send_flogi_acc(struct efc_node *node, u32 ox_id, u32 is_fport);78int79efc_send_plogi_acc(struct efc_node *node, u32 ox_id);80int81efc_send_prli_acc(struct efc_node *node, u32 ox_id);82int83efc_send_logo_acc(struct efc_node *node, u32 ox_id);84int85efc_send_prlo_acc(struct efc_node *node, u32 ox_id);86int87efc_send_adisc_acc(struct efc_node *node, u32 ox_id);88 89int90efc_bls_send_acc_hdr(struct efc *efc, struct efc_node *node,91		     struct fc_frame_header *hdr);92int93efc_bls_send_rjt_hdr(struct efc_els_io_req *io, struct fc_frame_header *hdr);94 95int96efc_els_io_list_empty(struct efc_node *node, struct list_head *list);97 98/* CT */99int100efc_send_ct_rsp(struct efc *efc, struct efc_node *node, u16 ox_id,101		struct fc_ct_hdr *ct_hdr, u32 cmd_rsp_code, u32 reason_code,102		u32 reason_code_explanation);103 104int105efc_send_bls_acc(struct efc_node *node, struct fc_frame_header *hdr);106 107#endif /* __EFC_ELS_H__ */108