Deleted Added
full compact
e1000_api.c (203049) e1000_api.c (209616)
1/******************************************************************************
2
3 Copyright (c) 2001-2010, Intel Corporation
4 All rights reserved.
5
6 Redistribution and use in source and binary forms, with or without
7 modification, are permitted provided that the following conditions are met:
8

--- 16 unchanged lines hidden (view full) ---

25 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30 POSSIBILITY OF SUCH DAMAGE.
31
32******************************************************************************/
1/******************************************************************************
2
3 Copyright (c) 2001-2010, Intel Corporation
4 All rights reserved.
5
6 Redistribution and use in source and binary forms, with or without
7 modification, are permitted provided that the following conditions are met:
8

--- 16 unchanged lines hidden (view full) ---

25 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30 POSSIBILITY OF SUCH DAMAGE.
31
32******************************************************************************/
33/*$FreeBSD: head/sys/dev/e1000/e1000_api.c 203049 2010-01-26 22:32:22Z jfv $*/
33/*$FreeBSD: head/sys/dev/e1000/e1000_api.c 209616 2010-06-30 21:05:51Z jfv $*/
34
35#include "e1000_api.h"
36
37/**
38 * e1000_init_mac_params - Initialize MAC function pointers
39 * @hw: pointer to the HW structure
40 *
41 * This function initializes the function pointers for the MAC

--- 65 unchanged lines hidden (view full) ---

107 DEBUGOUT("phy.init_phy_params was NULL\n");
108 ret_val = -E1000_ERR_CONFIG;
109 }
110
111out:
112 return ret_val;
113}
114
34
35#include "e1000_api.h"
36
37/**
38 * e1000_init_mac_params - Initialize MAC function pointers
39 * @hw: pointer to the HW structure
40 *
41 * This function initializes the function pointers for the MAC

--- 65 unchanged lines hidden (view full) ---

107 DEBUGOUT("phy.init_phy_params was NULL\n");
108 ret_val = -E1000_ERR_CONFIG;
109 }
110
111out:
112 return ret_val;
113}
114
115/**
116 * e1000_init_mbx_params - Initialize mailbox function pointers
117 * @hw: pointer to the HW structure
118 *
119 * This function initializes the function pointers for the PHY
120 * set of functions. Called by drivers or by e1000_setup_init_funcs.
121 **/
122s32 e1000_init_mbx_params(struct e1000_hw *hw)
123{
124 s32 ret_val = E1000_SUCCESS;
115
125
126 if (hw->mbx.ops.init_params) {
127 ret_val = hw->mbx.ops.init_params(hw);
128 if (ret_val) {
129 DEBUGOUT("Mailbox Initialization Error\n");
130 goto out;
131 }
132 } else {
133 DEBUGOUT("mbx.init_mbx_params was NULL\n");
134 ret_val = -E1000_ERR_CONFIG;
135 }
136
137out:
138 return ret_val;
139}
140
116/**
117 * e1000_set_mac_type - Sets MAC type
118 * @hw: pointer to the HW structure
119 *
120 * This function sets the mac type of the adapter based on the
121 * device ID stored in the hw structure.
122 * MUST BE FIRST FUNCTION CALLED (explicitly or through
123 * e1000_setup_init_funcs()).

--- 152 unchanged lines hidden (view full) ---

276 break;
277 case E1000_DEV_ID_82580_COPPER:
278 case E1000_DEV_ID_82580_FIBER:
279 case E1000_DEV_ID_82580_SERDES:
280 case E1000_DEV_ID_82580_SGMII:
281 case E1000_DEV_ID_82580_COPPER_DUAL:
282 mac->type = e1000_82580;
283 break;
141/**
142 * e1000_set_mac_type - Sets MAC type
143 * @hw: pointer to the HW structure
144 *
145 * This function sets the mac type of the adapter based on the
146 * device ID stored in the hw structure.
147 * MUST BE FIRST FUNCTION CALLED (explicitly or through
148 * e1000_setup_init_funcs()).

--- 152 unchanged lines hidden (view full) ---

301 break;
302 case E1000_DEV_ID_82580_COPPER:
303 case E1000_DEV_ID_82580_FIBER:
304 case E1000_DEV_ID_82580_SERDES:
305 case E1000_DEV_ID_82580_SGMII:
306 case E1000_DEV_ID_82580_COPPER_DUAL:
307 mac->type = e1000_82580;
308 break;
309 case E1000_DEV_ID_82576_VF:
310 mac->type = e1000_vfadapt;
311 break;
284 default:
285 /* Should never have loaded on this device */
286 ret_val = -E1000_ERR_MAC_INIT;
287 break;
288 }
289
290 return ret_val;
291}

--- 29 unchanged lines hidden (view full) ---

321
322 /*
323 * Init function pointers to generic implementations. We do this first
324 * allowing a driver module to override it afterward.
325 */
326 e1000_init_mac_ops_generic(hw);
327 e1000_init_phy_ops_generic(hw);
328 e1000_init_nvm_ops_generic(hw);
312 default:
313 /* Should never have loaded on this device */
314 ret_val = -E1000_ERR_MAC_INIT;
315 break;
316 }
317
318 return ret_val;
319}

--- 29 unchanged lines hidden (view full) ---

349
350 /*
351 * Init function pointers to generic implementations. We do this first
352 * allowing a driver module to override it afterward.
353 */
354 e1000_init_mac_ops_generic(hw);
355 e1000_init_phy_ops_generic(hw);
356 e1000_init_nvm_ops_generic(hw);
357 e1000_init_mbx_ops_generic(hw);
329
330 /*
331 * Set up the init function pointers. These are functions within the
332 * adapter family file that sets up function pointers for the rest of
333 * the functions in that family.
334 */
335 switch (hw->mac.type) {
336 case e1000_82542:

--- 32 unchanged lines hidden (view full) ---

369 case e1000_pchlan:
370 e1000_init_function_pointers_ich8lan(hw);
371 break;
372 case e1000_82575:
373 case e1000_82576:
374 case e1000_82580:
375 e1000_init_function_pointers_82575(hw);
376 break;
358
359 /*
360 * Set up the init function pointers. These are functions within the
361 * adapter family file that sets up function pointers for the rest of
362 * the functions in that family.
363 */
364 switch (hw->mac.type) {
365 case e1000_82542:

--- 32 unchanged lines hidden (view full) ---

398 case e1000_pchlan:
399 e1000_init_function_pointers_ich8lan(hw);
400 break;
401 case e1000_82575:
402 case e1000_82576:
403 case e1000_82580:
404 e1000_init_function_pointers_82575(hw);
405 break;
406 case e1000_vfadapt:
407 e1000_init_function_pointers_vf(hw);
408 break;
377 default:
378 DEBUGOUT("Hardware not supported\n");
379 ret_val = -E1000_ERR_CONFIG;
380 break;
381 }
382
383 /*
384 * Initialize the rest of the function pointers. These require some

--- 6 unchanged lines hidden (view full) ---

391
392 ret_val = e1000_init_nvm_params(hw);
393 if (ret_val)
394 goto out;
395
396 ret_val = e1000_init_phy_params(hw);
397 if (ret_val)
398 goto out;
409 default:
410 DEBUGOUT("Hardware not supported\n");
411 ret_val = -E1000_ERR_CONFIG;
412 break;
413 }
414
415 /*
416 * Initialize the rest of the function pointers. These require some

--- 6 unchanged lines hidden (view full) ---

423
424 ret_val = e1000_init_nvm_params(hw);
425 if (ret_val)
426 goto out;
427
428 ret_val = e1000_init_phy_params(hw);
429 if (ret_val)
430 goto out;
431
432 ret_val = e1000_init_mbx_params(hw);
433 if (ret_val)
434 goto out;
399 }
400
401out:
402 return ret_val;
403}
404
405/**
406 * e1000_get_bus_info - Obtain bus information for adapter

--- 852 unchanged lines hidden ---
435 }
436
437out:
438 return ret_val;
439}
440
441/**
442 * e1000_get_bus_info - Obtain bus information for adapter

--- 852 unchanged lines hidden ---