11/*******************************************************************************
22 *
33 * Intel Ethernet Controller XL710 Family Linux Virtual Function Driver
4- * Copyright(c) 2013 Intel Corporation.
4+ * Copyright(c) 2013 - 2014 Intel Corporation.
55 *
66 * This program is free software; you can redistribute it and/or modify it
77 * under the terms and conditions of the GNU General Public License,
@@ -164,15 +164,14 @@ struct i40evf_vlan_filter {
164164/* Driver state. The order of these is important! */
165165enum i40evf_state_t {
166166 __I40EVF_STARTUP , /* driver loaded, probe complete */
167- __I40EVF_FAILED , /* PF communication failed. Fatal. */
168167 __I40EVF_REMOVE , /* driver is being unloaded */
169168 __I40EVF_INIT_VERSION_CHECK , /* aq msg sent, awaiting reply */
170169 __I40EVF_INIT_GET_RESOURCES , /* aq msg sent, awaiting reply */
171170 __I40EVF_INIT_SW , /* got resources, setting up structs */
171+ __I40EVF_RESETTING , /* in reset */
172172 /* Below here, watchdog is running */
173173 __I40EVF_DOWN , /* ready, can be opened */
174174 __I40EVF_TESTING , /* in ethtool self-test */
175- __I40EVF_RESETTING , /* in reset */
176175 __I40EVF_RUNNING , /* opened, working */
177176};
178177
@@ -185,47 +184,27 @@ enum i40evf_critical_section_t {
185184/* board specific private data structure */
186185struct i40evf_adapter {
187186 struct timer_list watchdog_timer ;
188- struct vlan_group * vlgrp ;
189187 struct work_struct reset_task ;
190188 struct work_struct adminq_task ;
191189 struct delayed_work init_task ;
192190 struct i40e_q_vector * q_vector [MAX_MSIX_Q_VECTORS ];
193191 struct list_head vlan_filter_list ;
194- char name [MAX_MSIX_COUNT ][IFNAMSIZ + 9 ];
195-
196- /* Interrupt Throttle Rate */
197- u32 itr_setting ;
198- u16 eitr_low ;
199- u16 eitr_high ;
192+ char misc_vector_name [IFNAMSIZ + 9 ];
200193
201194 /* TX */
202195 struct i40e_ring * tx_rings [I40E_MAX_VSI_QP ];
203- u64 restart_queue ;
204- u64 hw_csum_tx_good ;
205- u64 lsc_int ;
206- u64 hw_tso_ctxt ;
207- u64 hw_tso6_ctxt ;
208196 u32 tx_timeout_count ;
209197 struct list_head mac_filter_list ;
210- #ifdef DEBUG
211- bool detect_tx_hung ;
212- #endif /* DEBUG */
213198
214199 /* RX */
215200 struct i40e_ring * rx_rings [I40E_MAX_VSI_QP ];
216201 int txd_count ;
217202 int rxd_count ;
218203 u64 hw_csum_rx_error ;
219- u64 hw_rx_no_dma_resources ;
220- u64 hw_csum_rx_good ;
221- u64 non_eop_descs ;
222204 int num_msix_vectors ;
223205 struct msix_entry * msix_entries ;
224206
225- u64 rx_hdr_split ;
226-
227- u32 init_state ;
228- volatile unsigned long flags ;
207+ u32 flags ;
229208#define I40EVF_FLAG_RX_CSUM_ENABLED (u32)(1)
230209#define I40EVF_FLAG_RX_1BUF_CAPABLE (u32)(1 << 1)
231210#define I40EVF_FLAG_RX_PS_CAPABLE (u32)(1 << 2)
@@ -234,6 +213,8 @@ struct i40evf_adapter {
234213#define I40EVF_FLAG_IMIR_ENABLED (u32)(1 << 5)
235214#define I40EVF_FLAG_MQ_CAPABLE (u32)(1 << 6)
236215#define I40EVF_FLAG_NEED_LINK_UPDATE (u32)(1 << 7)
216+ #define I40EVF_FLAG_PF_COMMS_FAILED (u32)(1 << 8)
217+ #define I40EVF_FLAG_RESET_PENDING (u32)(1 << 9)
237218/* duplcates for common code */
238219#define I40E_FLAG_FDIR_ATR_ENABLED 0
239220#define I40E_FLAG_DCB_ENABLED 0
@@ -251,21 +232,19 @@ struct i40evf_adapter {
251232#define I40EVF_FLAG_AQ_CONFIGURE_QUEUES (u32)(1 << 6)
252233#define I40EVF_FLAG_AQ_MAP_VECTORS (u32)(1 << 7)
253234#define I40EVF_FLAG_AQ_HANDLE_RESET (u32)(1 << 8)
235+
254236 /* OS defined structs */
255237 struct net_device * netdev ;
256238 struct pci_dev * pdev ;
257239 struct net_device_stats net_stats ;
258240
259- /* structs defined in i40e_vf.h */
260- struct i40e_hw hw ;
241+ struct i40e_hw hw ; /* defined in i40e_type.h */
261242
262243 enum i40evf_state_t state ;
263244 volatile unsigned long crit_section ;
264- u64 tx_busy ;
265245
266246 struct work_struct watchdog_task ;
267247 bool netdev_registered ;
268- bool dev_closed ;
269248 bool link_up ;
270249 enum i40e_virtchnl_ops current_op ;
271250 struct i40e_virtchnl_vf_resource * vf_res ; /* incl. all VSIs */
@@ -276,11 +255,6 @@ struct i40evf_adapter {
276255 u32 aq_wait_count ;
277256};
278257
279- struct i40evf_info {
280- enum i40e_mac_type mac ;
281- unsigned int flags ;
282- };
283-
284258
285259/* needed by i40evf_ethtool.c */
286260extern char i40evf_driver_name [];
0 commit comments