Deleted Added
full compact
ixgbe_x540.c (245952) ixgbe_x540.c (247822)
1/******************************************************************************
2
1/******************************************************************************
2
3 Copyright (c) 2001-2012, Intel Corporation
3 Copyright (c) 2001-2013, 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
9 1. Redistributions of source code must retain the above copyright notice,
10 this list of conditions and the following disclaimer.
11

--- 13 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******************************************************************************/
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
9 1. Redistributions of source code must retain the above copyright notice,
10 this list of conditions and the following disclaimer.
11

--- 13 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/ixgbe/ixgbe_x540.c 245952 2013-01-26 22:08:21Z pfg $*/
33/*$FreeBSD: head/sys/dev/ixgbe/ixgbe_x540.c 247822 2013-03-04 23:07:40Z jfv $*/
34
35#include "ixgbe_x540.h"
36#include "ixgbe_type.h"
37#include "ixgbe_api.h"
38#include "ixgbe_common.h"
39#include "ixgbe_phy.h"
40
41static s32 ixgbe_update_flash_X540(struct ixgbe_hw *hw);

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

111
112 /* Link */
113 mac->ops.get_link_capabilities =
114 &ixgbe_get_copper_link_capabilities_generic;
115 mac->ops.setup_link = &ixgbe_setup_mac_link_X540;
116 mac->ops.setup_rxpba = &ixgbe_set_rxpba_generic;
117 mac->ops.check_link = &ixgbe_check_mac_link_generic;
118
34
35#include "ixgbe_x540.h"
36#include "ixgbe_type.h"
37#include "ixgbe_api.h"
38#include "ixgbe_common.h"
39#include "ixgbe_phy.h"
40
41static s32 ixgbe_update_flash_X540(struct ixgbe_hw *hw);

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

111
112 /* Link */
113 mac->ops.get_link_capabilities =
114 &ixgbe_get_copper_link_capabilities_generic;
115 mac->ops.setup_link = &ixgbe_setup_mac_link_X540;
116 mac->ops.setup_rxpba = &ixgbe_set_rxpba_generic;
117 mac->ops.check_link = &ixgbe_check_mac_link_generic;
118
119
119 mac->mcft_size = 128;
120 mac->vft_size = 128;
121 mac->num_rar_entries = 128;
122 mac->rx_pb_size = 384;
123 mac->max_tx_queues = 128;
124 mac->max_rx_queues = 128;
125 mac->max_msix_vectors = ixgbe_get_pcie_msix_count_generic(hw);
126

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

172 UNREFERENCED_1PARAMETER(hw);
173 return ixgbe_media_type_copper;
174}
175
176/**
177 * ixgbe_setup_mac_link_X540 - Sets the auto advertised capabilities
178 * @hw: pointer to hardware structure
179 * @speed: new link speed
120 mac->mcft_size = 128;
121 mac->vft_size = 128;
122 mac->num_rar_entries = 128;
123 mac->rx_pb_size = 384;
124 mac->max_tx_queues = 128;
125 mac->max_rx_queues = 128;
126 mac->max_msix_vectors = ixgbe_get_pcie_msix_count_generic(hw);
127

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

173 UNREFERENCED_1PARAMETER(hw);
174 return ixgbe_media_type_copper;
175}
176
177/**
178 * ixgbe_setup_mac_link_X540 - Sets the auto advertised capabilities
179 * @hw: pointer to hardware structure
180 * @speed: new link speed
180 * @autoneg: TRUE if autonegotiation enabled
181 * @autoneg_wait_to_complete: TRUE when waiting for completion is needed
182 **/
183s32 ixgbe_setup_mac_link_X540(struct ixgbe_hw *hw,
181 * @autoneg_wait_to_complete: TRUE when waiting for completion is needed
182 **/
183s32 ixgbe_setup_mac_link_X540(struct ixgbe_hw *hw,
184 ixgbe_link_speed speed, bool autoneg,
184 ixgbe_link_speed speed,
185 bool autoneg_wait_to_complete)
186{
187 DEBUGFUNC("ixgbe_setup_mac_link_X540");
185 bool autoneg_wait_to_complete)
186{
187 DEBUGFUNC("ixgbe_setup_mac_link_X540");
188 return hw->phy.ops.setup_link_speed(hw, speed, autoneg,
189 autoneg_wait_to_complete);
188 return hw->phy.ops.setup_link_speed(hw, speed, autoneg_wait_to_complete);
190}
191
192/**
193 * ixgbe_reset_hw_X540 - Perform hardware reset
194 * @hw: pointer to hardware structure
195 *
196 * Resets the hardware by resetting the transmit and receive units, masks
197 * and clears all interrupts, and perform a reset.

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

968 macc_reg = IXGBE_READ_REG(hw, IXGBE_MACC);
969 macc_reg &= ~(IXGBE_MACC_FLU | IXGBE_MACC_FSV_10G | IXGBE_MACC_FS);
970 IXGBE_WRITE_REG(hw, IXGBE_MACC, macc_reg);
971 IXGBE_WRITE_FLUSH(hw);
972
973 return IXGBE_SUCCESS;
974}
975
189}
190
191/**
192 * ixgbe_reset_hw_X540 - Perform hardware reset
193 * @hw: pointer to hardware structure
194 *
195 * Resets the hardware by resetting the transmit and receive units, masks
196 * and clears all interrupts, and perform a reset.

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

967 macc_reg = IXGBE_READ_REG(hw, IXGBE_MACC);
968 macc_reg &= ~(IXGBE_MACC_FLU | IXGBE_MACC_FSV_10G | IXGBE_MACC_FS);
969 IXGBE_WRITE_REG(hw, IXGBE_MACC, macc_reg);
970 IXGBE_WRITE_FLUSH(hw);
971
972 return IXGBE_SUCCESS;
973}
974
975