xref: /f-stack/dpdk/drivers/net/ixgbe/ixgbe_bypass.h (revision d30ea906)
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2010-2014 Intel Corporation
3  */
4 
5 #ifndef _IXGBE_BYPASS_H_
6 #define _IXGBE_BYPASS_H_
7 
8 #ifdef RTE_LIBRTE_IXGBE_BYPASS
9 
10 struct ixgbe_bypass_mac_ops {
11 	s32 (*bypass_rw)(struct ixgbe_hw *hw, u32 cmd, u32 *status);
12 	bool (*bypass_valid_rd)(u32 in_reg, u32 out_reg);
13 	s32 (*bypass_set)(struct ixgbe_hw *hw, u32 cmd, u32 event, u32 action);
14 	s32 (*bypass_rd_eep)(struct ixgbe_hw *hw, u32 addr, u8 *value);
15 };
16 
17 struct ixgbe_bypass_info {
18 	uint64_t reset_tm;
19 	struct ixgbe_bypass_mac_ops ops;
20 };
21 
22 struct rte_eth_dev;
23 
24 void ixgbe_bypass_init(struct rte_eth_dev *dev);
25 s32 ixgbe_bypass_state_show(struct rte_eth_dev *dev, u32 *state);
26 s32 ixgbe_bypass_state_store(struct rte_eth_dev *dev, u32 *new_state);
27 s32 ixgbe_bypass_event_show(struct rte_eth_dev *dev, u32 event, u32 *state);
28 s32 ixgbe_bypass_event_store(struct rte_eth_dev *dev, u32 event, u32 state);
29 s32 ixgbe_bypass_wd_timeout_store(struct rte_eth_dev *dev, u32 timeout);
30 s32 ixgbe_bypass_ver_show(struct rte_eth_dev *dev, u32 *ver);
31 s32 ixgbe_bypass_wd_timeout_show(struct rte_eth_dev *dev, u32 *wd_timeout);
32 s32 ixgbe_bypass_wd_reset(struct rte_eth_dev *dev);
33 
34 s32 ixgbe_bypass_init_shared_code(struct ixgbe_hw *hw);
35 s32 ixgbe_bypass_init_hw(struct ixgbe_hw *hw);
36 
37 #endif /* RTE_LIBRTE_IXGBE_BYPASS */
38 
39 #endif /*  _IXGBE_BYPASS_H_ */
40