Deleted Added
full compact
e1000_82543.c (235527) e1000_82543.c (238262)
1/******************************************************************************
2
3 Copyright (c) 2001-2011, 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-2011, 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: stable/9/sys/dev/e1000/e1000_82543.c 235527 2012-05-16 22:22:52Z jfv $*/
33/*$FreeBSD: stable/9/sys/dev/e1000/e1000_82543.c 238262 2012-07-08 20:35:56Z jfv $*/
34
35/*
36 * 82543GC Gigabit Ethernet Controller (Fiber)
37 * 82543GC Gigabit Ethernet Controller (Copper)
38 * 82544EI Gigabit Ethernet Controller (Copper)
39 * 82544EI Gigabit Ethernet Controller (Fiber)
40 * 82544GC Gigabit Ethernet Controller (Copper)
41 * 82544GC Gigabit Ethernet Controller (LOM)

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

1121 if (ret_val)
1122 goto out;
1123
1124
1125 if (link) {
1126 DEBUGOUT("Valid link established!!!\n");
1127 /* Config the MAC and PHY after link is up */
1128 if (hw->mac.type == e1000_82544) {
34
35/*
36 * 82543GC Gigabit Ethernet Controller (Fiber)
37 * 82543GC Gigabit Ethernet Controller (Copper)
38 * 82544EI Gigabit Ethernet Controller (Copper)
39 * 82544EI Gigabit Ethernet Controller (Fiber)
40 * 82544GC Gigabit Ethernet Controller (Copper)
41 * 82544GC Gigabit Ethernet Controller (LOM)

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

1121 if (ret_val)
1122 goto out;
1123
1124
1125 if (link) {
1126 DEBUGOUT("Valid link established!!!\n");
1127 /* Config the MAC and PHY after link is up */
1128 if (hw->mac.type == e1000_82544) {
1129 e1000_config_collision_dist_generic(hw);
1129 hw->mac.ops.config_collision_dist(hw);
1130 } else {
1131 ret_val = e1000_config_mac_to_phy_82543(hw);
1132 if (ret_val)
1133 goto out;
1134 }
1135 ret_val = e1000_config_fc_after_link_up_generic(hw);
1136 } else {
1137 DEBUGOUT("Unable to establish link!!!\n");

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

1155
1156 DEBUGFUNC("e1000_setup_fiber_link_82543");
1157
1158 ctrl = E1000_READ_REG(hw, E1000_CTRL);
1159
1160 /* Take the link out of reset */
1161 ctrl &= ~E1000_CTRL_LRST;
1162
1130 } else {
1131 ret_val = e1000_config_mac_to_phy_82543(hw);
1132 if (ret_val)
1133 goto out;
1134 }
1135 ret_val = e1000_config_fc_after_link_up_generic(hw);
1136 } else {
1137 DEBUGOUT("Unable to establish link!!!\n");

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

1155
1156 DEBUGFUNC("e1000_setup_fiber_link_82543");
1157
1158 ctrl = E1000_READ_REG(hw, E1000_CTRL);
1159
1160 /* Take the link out of reset */
1161 ctrl &= ~E1000_CTRL_LRST;
1162
1163 e1000_config_collision_dist_generic(hw);
1163 hw->mac.ops.config_collision_dist(hw);
1164
1165 ret_val = e1000_commit_fc_settings_generic(hw);
1166 if (ret_val)
1167 goto out;
1168
1169 DEBUGOUT("Auto-negotiation enabled\n");
1170
1171 E1000_WRITE_REG(hw, E1000_CTRL, ctrl);

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

1254 * have Si on board that is 82544 or newer, Auto
1255 * Speed Detection takes care of MAC speed/duplex
1256 * configuration. So we only need to configure Collision
1257 * Distance in the MAC. Otherwise, we need to force
1258 * speed/duplex on the MAC to the current PHY speed/duplex
1259 * settings.
1260 */
1261 if (mac->type == e1000_82544)
1164
1165 ret_val = e1000_commit_fc_settings_generic(hw);
1166 if (ret_val)
1167 goto out;
1168
1169 DEBUGOUT("Auto-negotiation enabled\n");
1170
1171 E1000_WRITE_REG(hw, E1000_CTRL, ctrl);

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

1254 * have Si on board that is 82544 or newer, Auto
1255 * Speed Detection takes care of MAC speed/duplex
1256 * configuration. So we only need to configure Collision
1257 * Distance in the MAC. Otherwise, we need to force
1258 * speed/duplex on the MAC to the current PHY speed/duplex
1259 * settings.
1260 */
1261 if (mac->type == e1000_82544)
1262 e1000_config_collision_dist_generic(hw);
1262 hw->mac.ops.config_collision_dist(hw);
1263 else {
1264 ret_val = e1000_config_mac_to_phy_82543(hw);
1265 if (ret_val) {
1266 DEBUGOUT("Error configuring MAC to PHY settings\n");
1267 goto out;
1268 }
1269 }
1270

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

1428 ret_val = hw->phy.ops.read_reg(hw, M88E1000_PHY_SPEC_STATUS, &phy_data);
1429 if (ret_val)
1430 goto out;
1431
1432 ctrl &= ~E1000_CTRL_FD;
1433 if (phy_data & M88E1000_PSSR_DPLX)
1434 ctrl |= E1000_CTRL_FD;
1435
1263 else {
1264 ret_val = e1000_config_mac_to_phy_82543(hw);
1265 if (ret_val) {
1266 DEBUGOUT("Error configuring MAC to PHY settings\n");
1267 goto out;
1268 }
1269 }
1270

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

1428 ret_val = hw->phy.ops.read_reg(hw, M88E1000_PHY_SPEC_STATUS, &phy_data);
1429 if (ret_val)
1430 goto out;
1431
1432 ctrl &= ~E1000_CTRL_FD;
1433 if (phy_data & M88E1000_PSSR_DPLX)
1434 ctrl |= E1000_CTRL_FD;
1435
1436 e1000_config_collision_dist_generic(hw);
1436 hw->mac.ops.config_collision_dist(hw);
1437
1438 /*
1439 * Set up speed in the Device Control register depending on
1440 * negotiated values.
1441 */
1442 if ((phy_data & M88E1000_PSSR_SPEED) == M88E1000_PSSR_1000MBS)
1443 ctrl |= E1000_CTRL_SPD_1000;
1444 else if ((phy_data & M88E1000_PSSR_SPEED) == M88E1000_PSSR_100MBS)

--- 157 unchanged lines hidden ---
1437
1438 /*
1439 * Set up speed in the Device Control register depending on
1440 * negotiated values.
1441 */
1442 if ((phy_data & M88E1000_PSSR_SPEED) == M88E1000_PSSR_1000MBS)
1443 ctrl |= E1000_CTRL_SPD_1000;
1444 else if ((phy_data & M88E1000_PSSR_SPEED) == M88E1000_PSSR_100MBS)

--- 157 unchanged lines hidden ---