8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22 /*
23 * Copyright (c) 2007-2012 Intel Corporation. All rights reserved.
24 */
25
26 /*
27 * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
28 */
29
30 /* IntelVersion: 1.146.2.2 v3_3_14_3_BHSW1 */
31
32 /*
33 * 82575EB Gigabit Network Connection
34 * 82575EB Gigabit Backplane Connection
35 * 82575GB Gigabit Network Connection
36 * 82576 Gigabit Network Connection
37 * 82576 Quad Port Gigabit Mezzanine Adapter
38 */
39
40 #include "igb_api.h"
41
42 static s32 e1000_init_phy_params_82575(struct e1000_hw *hw);
43 static s32 e1000_init_nvm_params_82575(struct e1000_hw *hw);
44 static s32 e1000_init_mac_params_82575(struct e1000_hw *hw);
45 static s32 e1000_acquire_phy_82575(struct e1000_hw *hw);
46 static void e1000_release_phy_82575(struct e1000_hw *hw);
47 static s32 e1000_acquire_nvm_82575(struct e1000_hw *hw);
290
291 /*
292 * if using i2c make certain the MDICNFG register is cleared to prevent
293 * communications from being misrouted to the mdic registers
294 */
295 if ((ctrl_ext & E1000_CTRL_I2C_ENA) && (hw->mac.type == e1000_82580))
296 E1000_WRITE_REG(hw, E1000_MDICNFG, 0);
297
298 /* Set mta register count */
299 mac->mta_reg_count = 128;
300 /* Set uta register count */
301 mac->uta_reg_count = (hw->mac.type == e1000_82575) ? 0 : 128;
302 /* Set rar entry count */
303 mac->rar_entry_count = E1000_RAR_ENTRIES_82575;
304 if (mac->type == e1000_82576)
305 mac->rar_entry_count = E1000_RAR_ENTRIES_82576;
306 if (mac->type == e1000_82580)
307 mac->rar_entry_count = E1000_RAR_ENTRIES_82580;
308 if (mac->type == e1000_i350) {
309 mac->rar_entry_count = E1000_RAR_ENTRIES_I350;
310 /* Enable EEE default settings for i350 */
311 dev_spec->eee_disable = B_FALSE;
312 }
313 /* Set if part includes ASF firmware */
314 mac->asf_firmware_present = true;
315 /* Set if manageability features are enabled. */
316 mac->arc_subsystem_valid =
317 (E1000_READ_REG(hw, E1000_FWSM) & E1000_FWSM_MODE_MASK)
318 ? true : false;
319
320 /* Function pointers */
321
322 /* bus type/speed/width */
323 mac->ops.get_bus_info = e1000_get_bus_info_pcie_generic;
324 /* reset */
325 if (mac->type == e1000_82580)
326 mac->ops.reset_hw = e1000_reset_hw_82580;
327 else
328 mac->ops.reset_hw = e1000_reset_hw_82575;
329 /* hw initialization */
330 mac->ops.init_hw = e1000_init_hw_82575;
331 /* link setup */
|
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22 /*
23 * Copyright (c) 2007-2012 Intel Corporation. All rights reserved.
24 */
25
26 /*
27 * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
28 * Copyright 2013, Nexenta Systems, Inc. All rights reserved.
29 */
30
31 /* IntelVersion: 1.146.2.2 v3_3_14_3_BHSW1 */
32
33 /*
34 * 82575EB Gigabit Network Connection
35 * 82575EB Gigabit Backplane Connection
36 * 82575GB Gigabit Network Connection
37 * 82576 Gigabit Network Connection
38 * 82576 Quad Port Gigabit Mezzanine Adapter
39 */
40
41 #include "igb_api.h"
42
43 static s32 e1000_init_phy_params_82575(struct e1000_hw *hw);
44 static s32 e1000_init_nvm_params_82575(struct e1000_hw *hw);
45 static s32 e1000_init_mac_params_82575(struct e1000_hw *hw);
46 static s32 e1000_acquire_phy_82575(struct e1000_hw *hw);
47 static void e1000_release_phy_82575(struct e1000_hw *hw);
48 static s32 e1000_acquire_nvm_82575(struct e1000_hw *hw);
291
292 /*
293 * if using i2c make certain the MDICNFG register is cleared to prevent
294 * communications from being misrouted to the mdic registers
295 */
296 if ((ctrl_ext & E1000_CTRL_I2C_ENA) && (hw->mac.type == e1000_82580))
297 E1000_WRITE_REG(hw, E1000_MDICNFG, 0);
298
299 /* Set mta register count */
300 mac->mta_reg_count = 128;
301 /* Set uta register count */
302 mac->uta_reg_count = (hw->mac.type == e1000_82575) ? 0 : 128;
303 /* Set rar entry count */
304 mac->rar_entry_count = E1000_RAR_ENTRIES_82575;
305 if (mac->type == e1000_82576)
306 mac->rar_entry_count = E1000_RAR_ENTRIES_82576;
307 if (mac->type == e1000_82580)
308 mac->rar_entry_count = E1000_RAR_ENTRIES_82580;
309 if (mac->type == e1000_i350) {
310 mac->rar_entry_count = E1000_RAR_ENTRIES_I350;
311 /* Disable EEE default settings for i350 */
312 dev_spec->eee_disable = B_TRUE;
313 }
314 /* Set if part includes ASF firmware */
315 mac->asf_firmware_present = true;
316 /* Set if manageability features are enabled. */
317 mac->arc_subsystem_valid =
318 (E1000_READ_REG(hw, E1000_FWSM) & E1000_FWSM_MODE_MASK)
319 ? true : false;
320
321 /* Function pointers */
322
323 /* bus type/speed/width */
324 mac->ops.get_bus_info = e1000_get_bus_info_pcie_generic;
325 /* reset */
326 if (mac->type == e1000_82580)
327 mac->ops.reset_hw = e1000_reset_hw_82580;
328 else
329 mac->ops.reset_hw = e1000_reset_hw_82575;
330 /* hw initialization */
331 mac->ops.init_hw = e1000_init_hw_82575;
332 /* link setup */
|