2 * Copyright (c) 2016 QLogic Corporation.
6 * See LICENSE.qede_pmd for copyright and licensing details.
12 #include "qede_ethdev.h"
22 uint8_t hw_mac[ETHER_ADDR_LEN];
50 struct qed_link_params {
53 #define QED_LINK_OVERRIDE_SPEED_AUTONEG (1 << 0)
54 #define QED_LINK_OVERRIDE_SPEED_ADV_SPEEDS (1 << 1)
55 #define QED_LINK_OVERRIDE_SPEED_FORCED_SPEED (1 << 2)
56 #define QED_LINK_OVERRIDE_PAUSE_CONFIG (1 << 3)
57 uint32_t override_flags;
60 uint32_t forced_speed;
61 #define QED_LINK_PAUSE_AUTONEG_ENABLE (1 << 0)
62 #define QED_LINK_PAUSE_RX_ENABLE (1 << 1)
63 #define QED_LINK_PAUSE_TX_ENABLE (1 << 2)
64 uint32_t pause_config;
67 struct qed_link_output {
69 uint32_t supported_caps; /* In SUPPORTED defs */
70 uint32_t advertised_caps; /* In ADVERTISED defs */
71 uint32_t lp_caps; /* In ADVERTISED defs */
72 uint32_t speed; /* In Mb/s */
73 uint8_t duplex; /* In DUPLEX defs */
74 uint8_t port; /* In PORT defs */
76 uint32_t pause_config;
79 struct qed_slowpath_params {
85 uint8_t name[NAME_SIZE];
88 #define ILT_PAGE_SIZE_TCFC 0x8000 /* 32KB */
90 struct qed_common_cb_ops {
91 void (*link_update)(void *dev, struct qed_link_output *link);
94 struct qed_selftest_ops {
96 * @brief registers - Perform register tests
100 * @return 0 on success, error otherwise.
102 int (*registers)(struct ecore_dev *edev);
105 struct qed_common_ops {
106 int (*probe)(struct ecore_dev *edev,
107 struct rte_pci_device *pci_dev,
108 enum qed_protocol protocol,
109 uint32_t dp_module, uint8_t dp_level, bool is_vf);
110 void (*set_id)(struct ecore_dev *edev,
111 char name[], const char ver_str[]);
112 enum _ecore_status_t (*chain_alloc)(struct ecore_dev *edev,
113 enum ecore_chain_use_mode
115 enum ecore_chain_mode mode,
116 enum ecore_chain_cnt_type cnt_type,
118 osal_size_t elem_size,
119 struct ecore_chain *p_chain);
121 void (*chain_free)(struct ecore_dev *edev,
122 struct ecore_chain *p_chain);
124 void (*get_link)(struct ecore_dev *edev,
125 struct qed_link_output *if_link);
126 int (*set_link)(struct ecore_dev *edev,
127 struct qed_link_params *params);
129 int (*drain)(struct ecore_dev *edev);
131 void (*remove)(struct ecore_dev *edev);
133 int (*slowpath_stop)(struct ecore_dev *edev);
135 void (*update_pf_params)(struct ecore_dev *edev,
136 struct ecore_pf_params *params);
138 int (*slowpath_start)(struct ecore_dev *edev,
139 struct qed_slowpath_params *params);
141 int (*set_fp_int)(struct ecore_dev *edev, uint16_t cnt);
143 uint32_t (*sb_init)(struct ecore_dev *edev,
144 struct ecore_sb_info *sb_info,
146 dma_addr_t sb_phy_addr,
147 uint16_t sb_id, enum qed_sb_type type);
149 bool (*can_link_change)(struct ecore_dev *edev);
150 void (*update_msglvl)(struct ecore_dev *edev,
151 uint32_t dp_module, uint8_t dp_level);
154 #endif /* _QEDE_IF_H */