1 /*******************************************************************************
3 Intel PRO/1000 Linux driver
4 Copyright(c) 1999 - 2008 Intel Corporation.
6 This program is free software; you can redistribute it and/or modify it
7 under the terms and conditions of the GNU General Public License,
8 version 2, as published by the Free Software Foundation.
10 This program is distributed in the hope it will be useful, but WITHOUT
11 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
15 You should have received a copy of the GNU General Public License along with
16 this program; if not, write to the Free Software Foundation, Inc.,
17 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
19 The full GNU General Public License is included in this distribution in
20 the file called "COPYING".
23 Linux NICS <linux.nics@intel.com>
24 e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
25 Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
27 *******************************************************************************/
30 * 82571EB Gigabit Ethernet Controller
31 * 82571EB Gigabit Ethernet Controller (Copper)
32 * 82571EB Gigabit Ethernet Controller (Fiber)
33 * 82571EB Dual Port Gigabit Mezzanine Adapter
34 * 82571EB Quad Port Gigabit Mezzanine Adapter
35 * 82571PT Gigabit PT Quad Port Server ExpressModule
36 * 82572EI Gigabit Ethernet Controller (Copper)
37 * 82572EI Gigabit Ethernet Controller (Fiber)
38 * 82572EI Gigabit Ethernet Controller
39 * 82573V Gigabit Ethernet Controller (Copper)
40 * 82573E Gigabit Ethernet Controller (Copper)
41 * 82573L Gigabit Ethernet Controller
42 * 82574L Gigabit Network Connection
45 #include <linux/netdevice.h>
46 #include <linux/delay.h>
47 #include <linux/pci.h>
51 #define ID_LED_RESERVED_F746 0xF746
52 #define ID_LED_DEFAULT_82573 ((ID_LED_DEF1_DEF2 << 12) | \
53 (ID_LED_OFF1_ON2 << 8) | \
54 (ID_LED_DEF1_DEF2 << 4) | \
57 #define E1000_GCR_L1_ACT_WITHOUT_L0S_RX 0x08000000
59 #define E1000_NVM_INIT_CTRL2_MNGM 0x6000 /* Manageability Operation Mode mask */
61 static s32 e1000_get_phy_id_82571(struct e1000_hw *hw);
62 static s32 e1000_setup_copper_link_82571(struct e1000_hw *hw);
63 static s32 e1000_setup_fiber_serdes_link_82571(struct e1000_hw *hw);
64 static s32 e1000_check_for_serdes_link_82571(struct e1000_hw *hw);
65 static s32 e1000_write_nvm_eewr_82571(struct e1000_hw *hw, u16 offset,
66 u16 words, u16 *data);
67 static s32 e1000_fix_nvm_checksum_82571(struct e1000_hw *hw);
68 static void e1000_initialize_hw_bits_82571(struct e1000_hw *hw);
69 static s32 e1000_setup_link_82571(struct e1000_hw *hw);
70 static void e1000_clear_hw_cntrs_82571(struct e1000_hw *hw);
71 static bool e1000_check_mng_mode_82574(struct e1000_hw *hw);
72 static s32 e1000_led_on_82574(struct e1000_hw *hw);
75 * e1000_init_phy_params_82571 - Init PHY func ptrs.
76 * @hw: pointer to the HW structure
78 * This is a function pointer entry point called by the api module.
80 static s32 e1000_init_phy_params_82571(struct e1000_hw *hw)
82 struct e1000_phy_info *phy = &hw->phy;
85 if (hw->phy.media_type != e1000_media_type_copper) {
86 phy->type = e1000_phy_none;
91 phy->autoneg_mask = AUTONEG_ADVERTISE_SPEED_DEFAULT;
92 phy->reset_delay_us = 100;
94 switch (hw->mac.type) {
97 phy->type = e1000_phy_igp_2;
100 phy->type = e1000_phy_m88;
103 phy->type = e1000_phy_bm;
106 return -E1000_ERR_PHY;
110 /* This can only be done after all function pointers are setup. */
111 ret_val = e1000_get_phy_id_82571(hw);
114 switch (hw->mac.type) {
117 if (phy->id != IGP01E1000_I_PHY_ID)
118 return -E1000_ERR_PHY;
121 if (phy->id != M88E1111_I_PHY_ID)
122 return -E1000_ERR_PHY;
125 if (phy->id != BME1000_E_PHY_ID_R2)
126 return -E1000_ERR_PHY;
129 return -E1000_ERR_PHY;
137 * e1000_init_nvm_params_82571 - Init NVM func ptrs.
138 * @hw: pointer to the HW structure
140 * This is a function pointer entry point called by the api module.
142 static s32 e1000_init_nvm_params_82571(struct e1000_hw *hw)
144 struct e1000_nvm_info *nvm = &hw->nvm;
145 u32 eecd = er32(EECD);
148 nvm->opcode_bits = 8;
150 switch (nvm->override) {
151 case e1000_nvm_override_spi_large:
153 nvm->address_bits = 16;
155 case e1000_nvm_override_spi_small:
157 nvm->address_bits = 8;
160 nvm->page_size = eecd & E1000_EECD_ADDR_BITS ? 32 : 8;
161 nvm->address_bits = eecd & E1000_EECD_ADDR_BITS ? 16 : 8;
165 switch (hw->mac.type) {
168 if (((eecd >> 15) & 0x3) == 0x3) {
169 nvm->type = e1000_nvm_flash_hw;
170 nvm->word_size = 2048;
172 * Autonomous Flash update bit must be cleared due
173 * to Flash update issue.
175 eecd &= ~E1000_EECD_AUPDEN;
181 nvm->type = e1000_nvm_eeprom_spi;
182 size = (u16)((eecd & E1000_EECD_SIZE_EX_MASK) >>
183 E1000_EECD_SIZE_EX_SHIFT);
185 * Added to a constant, "size" becomes the left-shift value
186 * for setting word_size.
188 size += NVM_WORD_SIZE_BASE_SHIFT;
190 /* EEPROM access above 16k is unsupported */
193 nvm->word_size = 1 << size;
201 * e1000_init_mac_params_82571 - Init MAC func ptrs.
202 * @hw: pointer to the HW structure
204 * This is a function pointer entry point called by the api module.
206 static s32 e1000_init_mac_params_82571(struct e1000_adapter *adapter)
208 struct e1000_hw *hw = &adapter->hw;
209 struct e1000_mac_info *mac = &hw->mac;
210 struct e1000_mac_operations *func = &mac->ops;
213 switch (adapter->pdev->device) {
214 case E1000_DEV_ID_82571EB_FIBER:
215 case E1000_DEV_ID_82572EI_FIBER:
216 case E1000_DEV_ID_82571EB_QUAD_FIBER:
217 hw->phy.media_type = e1000_media_type_fiber;
219 case E1000_DEV_ID_82571EB_SERDES:
220 case E1000_DEV_ID_82572EI_SERDES:
221 case E1000_DEV_ID_82571EB_SERDES_DUAL:
222 case E1000_DEV_ID_82571EB_SERDES_QUAD:
223 hw->phy.media_type = e1000_media_type_internal_serdes;
226 hw->phy.media_type = e1000_media_type_copper;
230 /* Set mta register count */
231 mac->mta_reg_count = 128;
232 /* Set rar entry count */
233 mac->rar_entry_count = E1000_RAR_ENTRIES;
234 /* Set if manageability features are enabled. */
235 mac->arc_subsystem_valid = (er32(FWSM) & E1000_FWSM_MODE_MASK) ? 1 : 0;
238 switch (hw->phy.media_type) {
239 case e1000_media_type_copper:
240 func->setup_physical_interface = e1000_setup_copper_link_82571;
241 func->check_for_link = e1000e_check_for_copper_link;
242 func->get_link_up_info = e1000e_get_speed_and_duplex_copper;
244 case e1000_media_type_fiber:
245 func->setup_physical_interface =
246 e1000_setup_fiber_serdes_link_82571;
247 func->check_for_link = e1000e_check_for_fiber_link;
248 func->get_link_up_info =
249 e1000e_get_speed_and_duplex_fiber_serdes;
251 case e1000_media_type_internal_serdes:
252 func->setup_physical_interface =
253 e1000_setup_fiber_serdes_link_82571;
254 func->check_for_link = e1000_check_for_serdes_link_82571;
255 func->get_link_up_info =
256 e1000e_get_speed_and_duplex_fiber_serdes;
259 return -E1000_ERR_CONFIG;
263 switch (hw->mac.type) {
265 func->check_mng_mode = e1000_check_mng_mode_82574;
266 func->led_on = e1000_led_on_82574;
269 func->check_mng_mode = e1000e_check_mng_mode_generic;
270 func->led_on = e1000e_led_on_generic;
277 static s32 e1000_get_variants_82571(struct e1000_adapter *adapter)
279 struct e1000_hw *hw = &adapter->hw;
280 static int global_quad_port_a; /* global port a indication */
281 struct pci_dev *pdev = adapter->pdev;
283 int is_port_b = er32(STATUS) & E1000_STATUS_FUNC_1;
286 rc = e1000_init_mac_params_82571(adapter);
290 rc = e1000_init_nvm_params_82571(hw);
294 rc = e1000_init_phy_params_82571(hw);
298 /* tag quad port adapters first, it's used below */
299 switch (pdev->device) {
300 case E1000_DEV_ID_82571EB_QUAD_COPPER:
301 case E1000_DEV_ID_82571EB_QUAD_FIBER:
302 case E1000_DEV_ID_82571EB_QUAD_COPPER_LP:
303 case E1000_DEV_ID_82571PT_QUAD_COPPER:
304 adapter->flags |= FLAG_IS_QUAD_PORT;
305 /* mark the first port */
306 if (global_quad_port_a == 0)
307 adapter->flags |= FLAG_IS_QUAD_PORT_A;
308 /* Reset for multiple quad port adapters */
309 global_quad_port_a++;
310 if (global_quad_port_a == 4)
311 global_quad_port_a = 0;
317 switch (adapter->hw.mac.type) {
319 /* these dual ports don't have WoL on port B at all */
320 if (((pdev->device == E1000_DEV_ID_82571EB_FIBER) ||
321 (pdev->device == E1000_DEV_ID_82571EB_SERDES) ||
322 (pdev->device == E1000_DEV_ID_82571EB_COPPER)) &&
324 adapter->flags &= ~FLAG_HAS_WOL;
325 /* quad ports only support WoL on port A */
326 if (adapter->flags & FLAG_IS_QUAD_PORT &&
327 (!(adapter->flags & FLAG_IS_QUAD_PORT_A)))
328 adapter->flags &= ~FLAG_HAS_WOL;
329 /* Does not support WoL on any port */
330 if (pdev->device == E1000_DEV_ID_82571EB_SERDES_QUAD)
331 adapter->flags &= ~FLAG_HAS_WOL;
335 if (pdev->device == E1000_DEV_ID_82573L) {
336 if (e1000_read_nvm(&adapter->hw, NVM_INIT_3GIO_3, 1,
339 if (eeprom_data & NVM_WORD1A_ASPM_MASK)
340 adapter->flags &= ~FLAG_HAS_JUMBO_FRAMES;
351 * e1000_get_phy_id_82571 - Retrieve the PHY ID and revision
352 * @hw: pointer to the HW structure
354 * Reads the PHY registers and stores the PHY ID and possibly the PHY
355 * revision in the hardware structure.
357 static s32 e1000_get_phy_id_82571(struct e1000_hw *hw)
359 struct e1000_phy_info *phy = &hw->phy;
363 switch (hw->mac.type) {
367 * The 82571 firmware may still be configuring the PHY.
368 * In this case, we cannot access the PHY until the
369 * configuration is done. So we explicitly set the
372 phy->id = IGP01E1000_I_PHY_ID;
375 return e1000e_get_phy_id(hw);
378 ret_val = e1e_rphy(hw, PHY_ID1, &phy_id);
382 phy->id = (u32)(phy_id << 16);
384 ret_val = e1e_rphy(hw, PHY_ID2, &phy_id);
388 phy->id |= (u32)(phy_id);
389 phy->revision = (u32)(phy_id & ~PHY_REVISION_MASK);
392 return -E1000_ERR_PHY;
400 * e1000_get_hw_semaphore_82571 - Acquire hardware semaphore
401 * @hw: pointer to the HW structure
403 * Acquire the HW semaphore to access the PHY or NVM
405 static s32 e1000_get_hw_semaphore_82571(struct e1000_hw *hw)
408 s32 timeout = hw->nvm.word_size + 1;
411 /* Get the FW semaphore. */
412 for (i = 0; i < timeout; i++) {
414 ew32(SWSM, swsm | E1000_SWSM_SWESMBI);
416 /* Semaphore acquired if bit latched */
417 if (er32(SWSM) & E1000_SWSM_SWESMBI)
424 /* Release semaphores */
425 e1000e_put_hw_semaphore(hw);
426 hw_dbg(hw, "Driver can't access the NVM\n");
427 return -E1000_ERR_NVM;
434 * e1000_put_hw_semaphore_82571 - Release hardware semaphore
435 * @hw: pointer to the HW structure
437 * Release hardware semaphore used to access the PHY or NVM
439 static void e1000_put_hw_semaphore_82571(struct e1000_hw *hw)
445 swsm &= ~E1000_SWSM_SWESMBI;
451 * e1000_acquire_nvm_82571 - Request for access to the EEPROM
452 * @hw: pointer to the HW structure
454 * To gain access to the EEPROM, first we must obtain a hardware semaphore.
455 * Then for non-82573 hardware, set the EEPROM access request bit and wait
456 * for EEPROM access grant bit. If the access grant bit is not set, release
457 * hardware semaphore.
459 static s32 e1000_acquire_nvm_82571(struct e1000_hw *hw)
463 ret_val = e1000_get_hw_semaphore_82571(hw);
467 if (hw->mac.type != e1000_82573 && hw->mac.type != e1000_82574)
468 ret_val = e1000e_acquire_nvm(hw);
471 e1000_put_hw_semaphore_82571(hw);
477 * e1000_release_nvm_82571 - Release exclusive access to EEPROM
478 * @hw: pointer to the HW structure
480 * Stop any current commands to the EEPROM and clear the EEPROM request bit.
482 static void e1000_release_nvm_82571(struct e1000_hw *hw)
484 e1000e_release_nvm(hw);
485 e1000_put_hw_semaphore_82571(hw);
489 * e1000_write_nvm_82571 - Write to EEPROM using appropriate interface
490 * @hw: pointer to the HW structure
491 * @offset: offset within the EEPROM to be written to
492 * @words: number of words to write
493 * @data: 16 bit word(s) to be written to the EEPROM
495 * For non-82573 silicon, write data to EEPROM at offset using SPI interface.
497 * If e1000e_update_nvm_checksum is not called after this function, the
498 * EEPROM will most likely contain an invalid checksum.
500 static s32 e1000_write_nvm_82571(struct e1000_hw *hw, u16 offset, u16 words,
505 switch (hw->mac.type) {
508 ret_val = e1000_write_nvm_eewr_82571(hw, offset, words, data);
512 ret_val = e1000e_write_nvm_spi(hw, offset, words, data);
515 ret_val = -E1000_ERR_NVM;
523 * e1000_update_nvm_checksum_82571 - Update EEPROM checksum
524 * @hw: pointer to the HW structure
526 * Updates the EEPROM checksum by reading/adding each word of the EEPROM
527 * up to the checksum. Then calculates the EEPROM checksum and writes the
528 * value to the EEPROM.
530 static s32 e1000_update_nvm_checksum_82571(struct e1000_hw *hw)
536 ret_val = e1000e_update_nvm_checksum_generic(hw);
541 * If our nvm is an EEPROM, then we're done
542 * otherwise, commit the checksum to the flash NVM.
544 if (hw->nvm.type != e1000_nvm_flash_hw)
547 /* Check for pending operations. */
548 for (i = 0; i < E1000_FLASH_UPDATES; i++) {
550 if ((er32(EECD) & E1000_EECD_FLUPD) == 0)
554 if (i == E1000_FLASH_UPDATES)
555 return -E1000_ERR_NVM;
557 /* Reset the firmware if using STM opcode. */
558 if ((er32(FLOP) & 0xFF00) == E1000_STM_OPCODE) {
560 * The enabling of and the actual reset must be done
561 * in two write cycles.
563 ew32(HICR, E1000_HICR_FW_RESET_ENABLE);
565 ew32(HICR, E1000_HICR_FW_RESET);
568 /* Commit the write to flash */
569 eecd = er32(EECD) | E1000_EECD_FLUPD;
572 for (i = 0; i < E1000_FLASH_UPDATES; i++) {
574 if ((er32(EECD) & E1000_EECD_FLUPD) == 0)
578 if (i == E1000_FLASH_UPDATES)
579 return -E1000_ERR_NVM;
585 * e1000_validate_nvm_checksum_82571 - Validate EEPROM checksum
586 * @hw: pointer to the HW structure
588 * Calculates the EEPROM checksum by reading/adding each word of the EEPROM
589 * and then verifies that the sum of the EEPROM is equal to 0xBABA.
591 static s32 e1000_validate_nvm_checksum_82571(struct e1000_hw *hw)
593 if (hw->nvm.type == e1000_nvm_flash_hw)
594 e1000_fix_nvm_checksum_82571(hw);
596 return e1000e_validate_nvm_checksum_generic(hw);
600 * e1000_write_nvm_eewr_82571 - Write to EEPROM for 82573 silicon
601 * @hw: pointer to the HW structure
602 * @offset: offset within the EEPROM to be written to
603 * @words: number of words to write
604 * @data: 16 bit word(s) to be written to the EEPROM
606 * After checking for invalid values, poll the EEPROM to ensure the previous
607 * command has completed before trying to write the next word. After write
608 * poll for completion.
610 * If e1000e_update_nvm_checksum is not called after this function, the
611 * EEPROM will most likely contain an invalid checksum.
613 static s32 e1000_write_nvm_eewr_82571(struct e1000_hw *hw, u16 offset,
614 u16 words, u16 *data)
616 struct e1000_nvm_info *nvm = &hw->nvm;
622 * A check for invalid values: offset too large, too many words,
623 * and not enough words.
625 if ((offset >= nvm->word_size) || (words > (nvm->word_size - offset)) ||
627 hw_dbg(hw, "nvm parameter(s) out of bounds\n");
628 return -E1000_ERR_NVM;
631 for (i = 0; i < words; i++) {
632 eewr = (data[i] << E1000_NVM_RW_REG_DATA) |
633 ((offset+i) << E1000_NVM_RW_ADDR_SHIFT) |
634 E1000_NVM_RW_REG_START;
636 ret_val = e1000e_poll_eerd_eewr_done(hw, E1000_NVM_POLL_WRITE);
642 ret_val = e1000e_poll_eerd_eewr_done(hw, E1000_NVM_POLL_WRITE);
651 * e1000_get_cfg_done_82571 - Poll for configuration done
652 * @hw: pointer to the HW structure
654 * Reads the management control register for the config done bit to be set.
656 static s32 e1000_get_cfg_done_82571(struct e1000_hw *hw)
658 s32 timeout = PHY_CFG_TIMEOUT;
662 E1000_NVM_CFG_DONE_PORT_0)
668 hw_dbg(hw, "MNG configuration cycle has not completed.\n");
669 return -E1000_ERR_RESET;
676 * e1000_set_d0_lplu_state_82571 - Set Low Power Linkup D0 state
677 * @hw: pointer to the HW structure
678 * @active: TRUE to enable LPLU, FALSE to disable
680 * Sets the LPLU D0 state according to the active flag. When activating LPLU
681 * this function also disables smart speed and vice versa. LPLU will not be
682 * activated unless the device autonegotiation advertisement meets standards
683 * of either 10 or 10/100 or 10/100/1000 at all duplexes. This is a function
684 * pointer entry point only called by PHY setup routines.
686 static s32 e1000_set_d0_lplu_state_82571(struct e1000_hw *hw, bool active)
688 struct e1000_phy_info *phy = &hw->phy;
692 ret_val = e1e_rphy(hw, IGP02E1000_PHY_POWER_MGMT, &data);
697 data |= IGP02E1000_PM_D0_LPLU;
698 ret_val = e1e_wphy(hw, IGP02E1000_PHY_POWER_MGMT, data);
702 /* When LPLU is enabled, we should disable SmartSpeed */
703 ret_val = e1e_rphy(hw, IGP01E1000_PHY_PORT_CONFIG, &data);
704 data &= ~IGP01E1000_PSCFR_SMART_SPEED;
705 ret_val = e1e_wphy(hw, IGP01E1000_PHY_PORT_CONFIG, data);
709 data &= ~IGP02E1000_PM_D0_LPLU;
710 ret_val = e1e_wphy(hw, IGP02E1000_PHY_POWER_MGMT, data);
712 * LPLU and SmartSpeed are mutually exclusive. LPLU is used
713 * during Dx states where the power conservation is most
714 * important. During driver activity we should enable
715 * SmartSpeed, so performance is maintained.
717 if (phy->smart_speed == e1000_smart_speed_on) {
718 ret_val = e1e_rphy(hw, IGP01E1000_PHY_PORT_CONFIG,
723 data |= IGP01E1000_PSCFR_SMART_SPEED;
724 ret_val = e1e_wphy(hw, IGP01E1000_PHY_PORT_CONFIG,
728 } else if (phy->smart_speed == e1000_smart_speed_off) {
729 ret_val = e1e_rphy(hw, IGP01E1000_PHY_PORT_CONFIG,
734 data &= ~IGP01E1000_PSCFR_SMART_SPEED;
735 ret_val = e1e_wphy(hw, IGP01E1000_PHY_PORT_CONFIG,
746 * e1000_reset_hw_82571 - Reset hardware
747 * @hw: pointer to the HW structure
749 * This resets the hardware into a known state. This is a
750 * function pointer entry point called by the api module.
752 static s32 e1000_reset_hw_82571(struct e1000_hw *hw)
762 * Prevent the PCI-E bus from sticking if there is no TLP connection
763 * on the last TLP read/write transaction when MAC is reset.
765 ret_val = e1000e_disable_pcie_master(hw);
767 hw_dbg(hw, "PCI-E Master disable polling has failed.\n");
769 hw_dbg(hw, "Masking off all interrupts\n");
770 ew32(IMC, 0xffffffff);
773 ew32(TCTL, E1000_TCTL_PSP);
779 * Must acquire the MDIO ownership before MAC reset.
780 * Ownership defaults to firmware after a reset.
782 if (hw->mac.type == e1000_82573 || hw->mac.type == e1000_82574) {
783 extcnf_ctrl = er32(EXTCNF_CTRL);
784 extcnf_ctrl |= E1000_EXTCNF_CTRL_MDIO_SW_OWNERSHIP;
787 ew32(EXTCNF_CTRL, extcnf_ctrl);
788 extcnf_ctrl = er32(EXTCNF_CTRL);
790 if (extcnf_ctrl & E1000_EXTCNF_CTRL_MDIO_SW_OWNERSHIP)
793 extcnf_ctrl |= E1000_EXTCNF_CTRL_MDIO_SW_OWNERSHIP;
797 } while (i < MDIO_OWNERSHIP_TIMEOUT);
802 hw_dbg(hw, "Issuing a global reset to MAC\n");
803 ew32(CTRL, ctrl | E1000_CTRL_RST);
805 if (hw->nvm.type == e1000_nvm_flash_hw) {
807 ctrl_ext = er32(CTRL_EXT);
808 ctrl_ext |= E1000_CTRL_EXT_EE_RST;
809 ew32(CTRL_EXT, ctrl_ext);
813 ret_val = e1000e_get_auto_rd_done(hw);
815 /* We don't want to continue accessing MAC registers. */
819 * Phy configuration from NVM just starts after EECD_AUTO_RD is set.
820 * Need to wait for Phy configuration completion before accessing
823 if (hw->mac.type == e1000_82573 || hw->mac.type == e1000_82574)
826 /* Clear any pending interrupt events. */
827 ew32(IMC, 0xffffffff);
830 if (hw->mac.type == e1000_82571 &&
831 hw->dev_spec.e82571.alt_mac_addr_is_present)
832 e1000e_set_laa_state_82571(hw, true);
834 /* Reinitialize the 82571 serdes link state machine */
835 if (hw->phy.media_type == e1000_media_type_internal_serdes)
836 hw->mac.serdes_link_state = e1000_serdes_link_down;
842 * e1000_init_hw_82571 - Initialize hardware
843 * @hw: pointer to the HW structure
845 * This inits the hardware readying it for operation.
847 static s32 e1000_init_hw_82571(struct e1000_hw *hw)
849 struct e1000_mac_info *mac = &hw->mac;
853 u16 rar_count = mac->rar_entry_count;
855 e1000_initialize_hw_bits_82571(hw);
857 /* Initialize identification LED */
858 ret_val = e1000e_id_led_init(hw);
860 hw_dbg(hw, "Error initializing identification LED\n");
864 /* Disabling VLAN filtering */
865 hw_dbg(hw, "Initializing the IEEE VLAN\n");
866 e1000e_clear_vfta(hw);
868 /* Setup the receive address. */
870 * If, however, a locally administered address was assigned to the
871 * 82571, we must reserve a RAR for it to work around an issue where
872 * resetting one port will reload the MAC on the other port.
874 if (e1000e_get_laa_state_82571(hw))
876 e1000e_init_rx_addrs(hw, rar_count);
878 /* Zero out the Multicast HASH table */
879 hw_dbg(hw, "Zeroing the MTA\n");
880 for (i = 0; i < mac->mta_reg_count; i++)
881 E1000_WRITE_REG_ARRAY(hw, E1000_MTA, i, 0);
883 /* Setup link and flow control */
884 ret_val = e1000_setup_link_82571(hw);
886 /* Set the transmit descriptor write-back policy */
887 reg_data = er32(TXDCTL(0));
888 reg_data = (reg_data & ~E1000_TXDCTL_WTHRESH) |
889 E1000_TXDCTL_FULL_TX_DESC_WB |
890 E1000_TXDCTL_COUNT_DESC;
891 ew32(TXDCTL(0), reg_data);
893 /* ...for both queues. */
894 if (mac->type != e1000_82573 && mac->type != e1000_82574) {
895 reg_data = er32(TXDCTL(1));
896 reg_data = (reg_data & ~E1000_TXDCTL_WTHRESH) |
897 E1000_TXDCTL_FULL_TX_DESC_WB |
898 E1000_TXDCTL_COUNT_DESC;
899 ew32(TXDCTL(1), reg_data);
901 e1000e_enable_tx_pkt_filtering(hw);
902 reg_data = er32(GCR);
903 reg_data |= E1000_GCR_L1_ACT_WITHOUT_L0S_RX;
908 * Clear all of the statistics registers (clear on read). It is
909 * important that we do this after we have tried to establish link
910 * because the symbol error count will increment wildly if there
913 e1000_clear_hw_cntrs_82571(hw);
919 * e1000_initialize_hw_bits_82571 - Initialize hardware-dependent bits
920 * @hw: pointer to the HW structure
922 * Initializes required hardware-dependent bits needed for normal operation.
924 static void e1000_initialize_hw_bits_82571(struct e1000_hw *hw)
928 /* Transmit Descriptor Control 0 */
929 reg = er32(TXDCTL(0));
931 ew32(TXDCTL(0), reg);
933 /* Transmit Descriptor Control 1 */
934 reg = er32(TXDCTL(1));
936 ew32(TXDCTL(1), reg);
938 /* Transmit Arbitration Control 0 */
940 reg &= ~(0xF << 27); /* 30:27 */
941 switch (hw->mac.type) {
944 reg |= (1 << 23) | (1 << 24) | (1 << 25) | (1 << 26);
951 /* Transmit Arbitration Control 1 */
953 switch (hw->mac.type) {
956 reg &= ~((1 << 29) | (1 << 30));
957 reg |= (1 << 22) | (1 << 24) | (1 << 25) | (1 << 26);
958 if (er32(TCTL) & E1000_TCTL_MULR)
969 if (hw->mac.type == e1000_82573 || hw->mac.type == e1000_82574) {
975 /* Extended Device Control */
976 if (hw->mac.type == e1000_82573 || hw->mac.type == e1000_82574) {
977 reg = er32(CTRL_EXT);
983 if (hw->mac.type == e1000_82571) {
985 reg |= E1000_PBA_ECC_CORR_EN;
989 * Workaround for hardware errata.
990 * Ensure that DMA Dynamic Clock gating is disabled on 82571 and 82572
993 if ((hw->mac.type == e1000_82571) ||
994 (hw->mac.type == e1000_82572)) {
995 reg = er32(CTRL_EXT);
996 reg &= ~E1000_CTRL_EXT_DMA_DYN_CLK_EN;
1001 /* PCI-Ex Control Registers */
1002 if (hw->mac.type == e1000_82574) {
1016 * e1000e_clear_vfta - Clear VLAN filter table
1017 * @hw: pointer to the HW structure
1019 * Clears the register array which contains the VLAN filter table by
1020 * setting all the values to 0.
1022 void e1000e_clear_vfta(struct e1000_hw *hw)
1026 u32 vfta_offset = 0;
1027 u32 vfta_bit_in_reg = 0;
1029 if (hw->mac.type == e1000_82573 || hw->mac.type == e1000_82574) {
1030 if (hw->mng_cookie.vlan_id != 0) {
1032 * The VFTA is a 4096b bit-field, each identifying
1033 * a single VLAN ID. The following operations
1034 * determine which 32b entry (i.e. offset) into the
1035 * array we want to set the VLAN ID (i.e. bit) of
1036 * the manageability unit.
1038 vfta_offset = (hw->mng_cookie.vlan_id >>
1039 E1000_VFTA_ENTRY_SHIFT) &
1040 E1000_VFTA_ENTRY_MASK;
1041 vfta_bit_in_reg = 1 << (hw->mng_cookie.vlan_id &
1042 E1000_VFTA_ENTRY_BIT_SHIFT_MASK);
1045 for (offset = 0; offset < E1000_VLAN_FILTER_TBL_SIZE; offset++) {
1047 * If the offset we want to clear is the same offset of the
1048 * manageability VLAN ID, then clear all bits except that of
1049 * the manageability unit.
1051 vfta_value = (offset == vfta_offset) ? vfta_bit_in_reg : 0;
1052 E1000_WRITE_REG_ARRAY(hw, E1000_VFTA, offset, vfta_value);
1058 * e1000_check_mng_mode_82574 - Check manageability is enabled
1059 * @hw: pointer to the HW structure
1061 * Reads the NVM Initialization Control Word 2 and returns true
1062 * (>0) if any manageability is enabled, else false (0).
1064 static bool e1000_check_mng_mode_82574(struct e1000_hw *hw)
1068 e1000_read_nvm(hw, NVM_INIT_CONTROL2_REG, 1, &data);
1069 return (data & E1000_NVM_INIT_CTRL2_MNGM) != 0;
1073 * e1000_led_on_82574 - Turn LED on
1074 * @hw: pointer to the HW structure
1078 static s32 e1000_led_on_82574(struct e1000_hw *hw)
1083 ctrl = hw->mac.ledctl_mode2;
1084 if (!(E1000_STATUS_LU & er32(STATUS))) {
1086 * If no link, then turn LED on by setting the invert bit
1087 * for each LED that's "on" (0x0E) in ledctl_mode2.
1089 for (i = 0; i < 4; i++)
1090 if (((hw->mac.ledctl_mode2 >> (i * 8)) & 0xFF) ==
1091 E1000_LEDCTL_MODE_LED_ON)
1092 ctrl |= (E1000_LEDCTL_LED0_IVRT << (i * 8));
1100 * e1000_update_mc_addr_list_82571 - Update Multicast addresses
1101 * @hw: pointer to the HW structure
1102 * @mc_addr_list: array of multicast addresses to program
1103 * @mc_addr_count: number of multicast addresses to program
1104 * @rar_used_count: the first RAR register free to program
1105 * @rar_count: total number of supported Receive Address Registers
1107 * Updates the Receive Address Registers and Multicast Table Array.
1108 * The caller must have a packed mc_addr_list of multicast addresses.
1109 * The parameter rar_count will usually be hw->mac.rar_entry_count
1110 * unless there are workarounds that change this.
1112 static void e1000_update_mc_addr_list_82571(struct e1000_hw *hw,
1118 if (e1000e_get_laa_state_82571(hw))
1121 e1000e_update_mc_addr_list_generic(hw, mc_addr_list, mc_addr_count,
1122 rar_used_count, rar_count);
1126 * e1000_setup_link_82571 - Setup flow control and link settings
1127 * @hw: pointer to the HW structure
1129 * Determines which flow control settings to use, then configures flow
1130 * control. Calls the appropriate media-specific link configuration
1131 * function. Assuming the adapter has a valid link partner, a valid link
1132 * should be established. Assumes the hardware has previously been reset
1133 * and the transmitter and receiver are not enabled.
1135 static s32 e1000_setup_link_82571(struct e1000_hw *hw)
1138 * 82573 does not have a word in the NVM to determine
1139 * the default flow control setting, so we explicitly
1142 if ((hw->mac.type == e1000_82573 || hw->mac.type == e1000_82574) &&
1143 hw->fc.requested_mode == e1000_fc_default)
1144 hw->fc.requested_mode = e1000_fc_full;
1146 return e1000e_setup_link(hw);
1150 * e1000_setup_copper_link_82571 - Configure copper link settings
1151 * @hw: pointer to the HW structure
1153 * Configures the link for auto-neg or forced speed and duplex. Then we check
1154 * for link, once link is established calls to configure collision distance
1155 * and flow control are called.
1157 static s32 e1000_setup_copper_link_82571(struct e1000_hw *hw)
1164 ctrl |= E1000_CTRL_SLU;
1165 ctrl &= ~(E1000_CTRL_FRCSPD | E1000_CTRL_FRCDPX);
1168 switch (hw->phy.type) {
1171 ret_val = e1000e_copper_link_setup_m88(hw);
1173 case e1000_phy_igp_2:
1174 ret_val = e1000e_copper_link_setup_igp(hw);
1175 /* Setup activity LED */
1176 led_ctrl = er32(LEDCTL);
1177 led_ctrl &= IGP_ACTIVITY_LED_MASK;
1178 led_ctrl |= (IGP_ACTIVITY_LED_ENABLE | IGP_LED3_MODE);
1179 ew32(LEDCTL, led_ctrl);
1182 return -E1000_ERR_PHY;
1189 ret_val = e1000e_setup_copper_link(hw);
1195 * e1000_setup_fiber_serdes_link_82571 - Setup link for fiber/serdes
1196 * @hw: pointer to the HW structure
1198 * Configures collision distance and flow control for fiber and serdes links.
1199 * Upon successful setup, poll for link.
1201 static s32 e1000_setup_fiber_serdes_link_82571(struct e1000_hw *hw)
1203 switch (hw->mac.type) {
1207 * If SerDes loopback mode is entered, there is no form
1208 * of reset to take the adapter out of that mode. So we
1209 * have to explicitly take the adapter out of loopback
1210 * mode. This prevents drivers from twiddling their thumbs
1211 * if another tool failed to take it out of loopback mode.
1213 ew32(SCTL, E1000_SCTL_DISABLE_SERDES_LOOPBACK);
1219 return e1000e_setup_fiber_serdes_link(hw);
1223 * e1000_check_for_serdes_link_82571 - Check for link (Serdes)
1224 * @hw: pointer to the HW structure
1226 * Checks for link up on the hardware. If link is not up and we have
1227 * a signal, then we need to force link up.
1229 s32 e1000_check_for_serdes_link_82571(struct e1000_hw *hw)
1231 struct e1000_mac_info *mac = &hw->mac;
1238 status = er32(STATUS);
1241 if ((rxcw & E1000_RXCW_SYNCH) && !(rxcw & E1000_RXCW_IV)) {
1243 /* Receiver is synchronized with no invalid bits. */
1244 switch (mac->serdes_link_state) {
1245 case e1000_serdes_link_autoneg_complete:
1246 if (!(status & E1000_STATUS_LU)) {
1248 * We have lost link, retry autoneg before
1249 * reporting link failure
1251 mac->serdes_link_state =
1252 e1000_serdes_link_autoneg_progress;
1253 hw_dbg(hw, "AN_UP -> AN_PROG\n");
1257 case e1000_serdes_link_forced_up:
1259 * If we are receiving /C/ ordered sets, re-enable
1260 * auto-negotiation in the TXCW register and disable
1261 * forced link in the Device Control register in an
1262 * attempt to auto-negotiate with our link partner.
1264 if (rxcw & E1000_RXCW_C) {
1265 /* Enable autoneg, and unforce link up */
1266 ew32(TXCW, mac->txcw);
1268 (ctrl & ~E1000_CTRL_SLU));
1269 mac->serdes_link_state =
1270 e1000_serdes_link_autoneg_progress;
1271 hw_dbg(hw, "FORCED_UP -> AN_PROG\n");
1275 case e1000_serdes_link_autoneg_progress:
1277 * If the LU bit is set in the STATUS register,
1278 * autoneg has completed sucessfully. If not,
1279 * try foring the link because the far end may be
1280 * available but not capable of autonegotiation.
1282 if (status & E1000_STATUS_LU) {
1283 mac->serdes_link_state =
1284 e1000_serdes_link_autoneg_complete;
1285 hw_dbg(hw, "AN_PROG -> AN_UP\n");
1288 * Disable autoneg, force link up and
1289 * full duplex, and change state to forced
1292 (mac->txcw & ~E1000_TXCW_ANE));
1293 ctrl |= (E1000_CTRL_SLU | E1000_CTRL_FD);
1296 /* Configure Flow Control after link up. */
1298 e1000e_config_fc_after_link_up(hw);
1300 hw_dbg(hw, "Error config flow control\n");
1303 mac->serdes_link_state =
1304 e1000_serdes_link_forced_up;
1305 hw_dbg(hw, "AN_PROG -> FORCED_UP\n");
1307 mac->serdes_has_link = true;
1310 case e1000_serdes_link_down:
1312 /* The link was down but the receiver has now gained
1313 * valid sync, so lets see if we can bring the link
1315 ew32(TXCW, mac->txcw);
1317 (ctrl & ~E1000_CTRL_SLU));
1318 mac->serdes_link_state =
1319 e1000_serdes_link_autoneg_progress;
1320 hw_dbg(hw, "DOWN -> AN_PROG\n");
1324 if (!(rxcw & E1000_RXCW_SYNCH)) {
1325 mac->serdes_has_link = false;
1326 mac->serdes_link_state = e1000_serdes_link_down;
1327 hw_dbg(hw, "ANYSTATE -> DOWN\n");
1330 * We have sync, and can tolerate one
1331 * invalid (IV) codeword before declaring
1332 * link down, so reread to look again
1336 if (rxcw & E1000_RXCW_IV) {
1337 mac->serdes_link_state = e1000_serdes_link_down;
1338 mac->serdes_has_link = false;
1339 hw_dbg(hw, "ANYSTATE -> DOWN\n");
1348 * e1000_valid_led_default_82571 - Verify a valid default LED config
1349 * @hw: pointer to the HW structure
1350 * @data: pointer to the NVM (EEPROM)
1352 * Read the EEPROM for the current default LED configuration. If the
1353 * LED configuration is not valid, set to a valid LED configuration.
1355 static s32 e1000_valid_led_default_82571(struct e1000_hw *hw, u16 *data)
1359 ret_val = e1000_read_nvm(hw, NVM_ID_LED_SETTINGS, 1, data);
1361 hw_dbg(hw, "NVM Read Error\n");
1365 if ((hw->mac.type == e1000_82573 || hw->mac.type == e1000_82574) &&
1366 *data == ID_LED_RESERVED_F746)
1367 *data = ID_LED_DEFAULT_82573;
1368 else if (*data == ID_LED_RESERVED_0000 || *data == ID_LED_RESERVED_FFFF)
1369 *data = ID_LED_DEFAULT;
1375 * e1000e_get_laa_state_82571 - Get locally administered address state
1376 * @hw: pointer to the HW structure
1378 * Retrieve and return the current locally administered address state.
1380 bool e1000e_get_laa_state_82571(struct e1000_hw *hw)
1382 if (hw->mac.type != e1000_82571)
1385 return hw->dev_spec.e82571.laa_is_present;
1389 * e1000e_set_laa_state_82571 - Set locally administered address state
1390 * @hw: pointer to the HW structure
1391 * @state: enable/disable locally administered address
1393 * Enable/Disable the current locally administers address state.
1395 void e1000e_set_laa_state_82571(struct e1000_hw *hw, bool state)
1397 if (hw->mac.type != e1000_82571)
1400 hw->dev_spec.e82571.laa_is_present = state;
1402 /* If workaround is activated... */
1405 * Hold a copy of the LAA in RAR[14] This is done so that
1406 * between the time RAR[0] gets clobbered and the time it
1407 * gets fixed, the actual LAA is in one of the RARs and no
1408 * incoming packets directed to this port are dropped.
1409 * Eventually the LAA will be in RAR[0] and RAR[14].
1411 e1000e_rar_set(hw, hw->mac.addr, hw->mac.rar_entry_count - 1);
1415 * e1000_fix_nvm_checksum_82571 - Fix EEPROM checksum
1416 * @hw: pointer to the HW structure
1418 * Verifies that the EEPROM has completed the update. After updating the
1419 * EEPROM, we need to check bit 15 in work 0x23 for the checksum fix. If
1420 * the checksum fix is not implemented, we need to set the bit and update
1421 * the checksum. Otherwise, if bit 15 is set and the checksum is incorrect,
1422 * we need to return bad checksum.
1424 static s32 e1000_fix_nvm_checksum_82571(struct e1000_hw *hw)
1426 struct e1000_nvm_info *nvm = &hw->nvm;
1430 if (nvm->type != e1000_nvm_flash_hw)
1434 * Check bit 4 of word 10h. If it is 0, firmware is done updating
1435 * 10h-12h. Checksum may need to be fixed.
1437 ret_val = e1000_read_nvm(hw, 0x10, 1, &data);
1441 if (!(data & 0x10)) {
1443 * Read 0x23 and check bit 15. This bit is a 1
1444 * when the checksum has already been fixed. If
1445 * the checksum is still wrong and this bit is a
1446 * 1, we need to return bad checksum. Otherwise,
1447 * we need to set this bit to a 1 and update the
1450 ret_val = e1000_read_nvm(hw, 0x23, 1, &data);
1454 if (!(data & 0x8000)) {
1456 ret_val = e1000_write_nvm(hw, 0x23, 1, &data);
1459 ret_val = e1000e_update_nvm_checksum(hw);
1467 * e1000_clear_hw_cntrs_82571 - Clear device specific hardware counters
1468 * @hw: pointer to the HW structure
1470 * Clears the hardware counters by reading the counter registers.
1472 static void e1000_clear_hw_cntrs_82571(struct e1000_hw *hw)
1476 e1000e_clear_hw_cntrs_base(hw);
1479 temp = er32(PRC127);
1480 temp = er32(PRC255);
1481 temp = er32(PRC511);
1482 temp = er32(PRC1023);
1483 temp = er32(PRC1522);
1485 temp = er32(PTC127);
1486 temp = er32(PTC255);
1487 temp = er32(PTC511);
1488 temp = er32(PTC1023);
1489 temp = er32(PTC1522);
1491 temp = er32(ALGNERRC);
1492 temp = er32(RXERRC);
1494 temp = er32(CEXTERR);
1496 temp = er32(TSCTFC);
1498 temp = er32(MGTPRC);
1499 temp = er32(MGTPDC);
1500 temp = er32(MGTPTC);
1503 temp = er32(ICRXOC);
1505 temp = er32(ICRXPTC);
1506 temp = er32(ICRXATC);
1507 temp = er32(ICTXPTC);
1508 temp = er32(ICTXATC);
1509 temp = er32(ICTXQEC);
1510 temp = er32(ICTXQMTC);
1511 temp = er32(ICRXDMTC);
1514 static struct e1000_mac_operations e82571_mac_ops = {
1515 /* .check_mng_mode: mac type dependent */
1516 /* .check_for_link: media type dependent */
1517 .cleanup_led = e1000e_cleanup_led_generic,
1518 .clear_hw_cntrs = e1000_clear_hw_cntrs_82571,
1519 .get_bus_info = e1000e_get_bus_info_pcie,
1520 /* .get_link_up_info: media type dependent */
1521 /* .led_on: mac type dependent */
1522 .led_off = e1000e_led_off_generic,
1523 .update_mc_addr_list = e1000_update_mc_addr_list_82571,
1524 .reset_hw = e1000_reset_hw_82571,
1525 .init_hw = e1000_init_hw_82571,
1526 .setup_link = e1000_setup_link_82571,
1527 /* .setup_physical_interface: media type dependent */
1530 static struct e1000_phy_operations e82_phy_ops_igp = {
1531 .acquire_phy = e1000_get_hw_semaphore_82571,
1532 .check_reset_block = e1000e_check_reset_block_generic,
1534 .force_speed_duplex = e1000e_phy_force_speed_duplex_igp,
1535 .get_cfg_done = e1000_get_cfg_done_82571,
1536 .get_cable_length = e1000e_get_cable_length_igp_2,
1537 .get_phy_info = e1000e_get_phy_info_igp,
1538 .read_phy_reg = e1000e_read_phy_reg_igp,
1539 .release_phy = e1000_put_hw_semaphore_82571,
1540 .reset_phy = e1000e_phy_hw_reset_generic,
1541 .set_d0_lplu_state = e1000_set_d0_lplu_state_82571,
1542 .set_d3_lplu_state = e1000e_set_d3_lplu_state,
1543 .write_phy_reg = e1000e_write_phy_reg_igp,
1544 .cfg_on_link_up = NULL,
1547 static struct e1000_phy_operations e82_phy_ops_m88 = {
1548 .acquire_phy = e1000_get_hw_semaphore_82571,
1549 .check_reset_block = e1000e_check_reset_block_generic,
1550 .commit_phy = e1000e_phy_sw_reset,
1551 .force_speed_duplex = e1000e_phy_force_speed_duplex_m88,
1552 .get_cfg_done = e1000e_get_cfg_done,
1553 .get_cable_length = e1000e_get_cable_length_m88,
1554 .get_phy_info = e1000e_get_phy_info_m88,
1555 .read_phy_reg = e1000e_read_phy_reg_m88,
1556 .release_phy = e1000_put_hw_semaphore_82571,
1557 .reset_phy = e1000e_phy_hw_reset_generic,
1558 .set_d0_lplu_state = e1000_set_d0_lplu_state_82571,
1559 .set_d3_lplu_state = e1000e_set_d3_lplu_state,
1560 .write_phy_reg = e1000e_write_phy_reg_m88,
1561 .cfg_on_link_up = NULL,
1564 static struct e1000_phy_operations e82_phy_ops_bm = {
1565 .acquire_phy = e1000_get_hw_semaphore_82571,
1566 .check_reset_block = e1000e_check_reset_block_generic,
1567 .commit_phy = e1000e_phy_sw_reset,
1568 .force_speed_duplex = e1000e_phy_force_speed_duplex_m88,
1569 .get_cfg_done = e1000e_get_cfg_done,
1570 .get_cable_length = e1000e_get_cable_length_m88,
1571 .get_phy_info = e1000e_get_phy_info_m88,
1572 .read_phy_reg = e1000e_read_phy_reg_bm2,
1573 .release_phy = e1000_put_hw_semaphore_82571,
1574 .reset_phy = e1000e_phy_hw_reset_generic,
1575 .set_d0_lplu_state = e1000_set_d0_lplu_state_82571,
1576 .set_d3_lplu_state = e1000e_set_d3_lplu_state,
1577 .write_phy_reg = e1000e_write_phy_reg_bm2,
1578 .cfg_on_link_up = NULL,
1581 static struct e1000_nvm_operations e82571_nvm_ops = {
1582 .acquire_nvm = e1000_acquire_nvm_82571,
1583 .read_nvm = e1000e_read_nvm_eerd,
1584 .release_nvm = e1000_release_nvm_82571,
1585 .update_nvm = e1000_update_nvm_checksum_82571,
1586 .valid_led_default = e1000_valid_led_default_82571,
1587 .validate_nvm = e1000_validate_nvm_checksum_82571,
1588 .write_nvm = e1000_write_nvm_82571,
1591 struct e1000_info e1000_82571_info = {
1593 .flags = FLAG_HAS_HW_VLAN_FILTER
1594 | FLAG_HAS_JUMBO_FRAMES
1596 | FLAG_APME_IN_CTRL3
1597 | FLAG_RX_CSUM_ENABLED
1598 | FLAG_HAS_CTRLEXT_ON_LOAD
1599 | FLAG_HAS_SMART_POWER_DOWN
1600 | FLAG_RESET_OVERWRITES_LAA /* errata */
1601 | FLAG_TARC_SPEED_MODE_BIT /* errata */
1602 | FLAG_APME_CHECK_PORT_B,
1604 .get_variants = e1000_get_variants_82571,
1605 .mac_ops = &e82571_mac_ops,
1606 .phy_ops = &e82_phy_ops_igp,
1607 .nvm_ops = &e82571_nvm_ops,
1610 struct e1000_info e1000_82572_info = {
1612 .flags = FLAG_HAS_HW_VLAN_FILTER
1613 | FLAG_HAS_JUMBO_FRAMES
1615 | FLAG_APME_IN_CTRL3
1616 | FLAG_RX_CSUM_ENABLED
1617 | FLAG_HAS_CTRLEXT_ON_LOAD
1618 | FLAG_TARC_SPEED_MODE_BIT, /* errata */
1620 .get_variants = e1000_get_variants_82571,
1621 .mac_ops = &e82571_mac_ops,
1622 .phy_ops = &e82_phy_ops_igp,
1623 .nvm_ops = &e82571_nvm_ops,
1626 struct e1000_info e1000_82573_info = {
1628 .flags = FLAG_HAS_HW_VLAN_FILTER
1629 | FLAG_HAS_JUMBO_FRAMES
1631 | FLAG_APME_IN_CTRL3
1632 | FLAG_RX_CSUM_ENABLED
1633 | FLAG_HAS_SMART_POWER_DOWN
1636 | FLAG_HAS_SWSM_ON_LOAD,
1638 .get_variants = e1000_get_variants_82571,
1639 .mac_ops = &e82571_mac_ops,
1640 .phy_ops = &e82_phy_ops_m88,
1641 .nvm_ops = &e82571_nvm_ops,
1644 struct e1000_info e1000_82574_info = {
1646 .flags = FLAG_HAS_HW_VLAN_FILTER
1648 | FLAG_HAS_JUMBO_FRAMES
1650 | FLAG_APME_IN_CTRL3
1651 | FLAG_RX_CSUM_ENABLED
1652 | FLAG_HAS_SMART_POWER_DOWN
1654 | FLAG_HAS_CTRLEXT_ON_LOAD,
1656 .get_variants = e1000_get_variants_82571,
1657 .mac_ops = &e82571_mac_ops,
1658 .phy_ops = &e82_phy_ops_bm,
1659 .nvm_ops = &e82571_nvm_ops,