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
43 * 82583V Gigabit Network Connection
46 #include <linux/netdevice.h>
47 #include <linux/delay.h>
48 #include <linux/pci.h>
52 #define ID_LED_RESERVED_F746 0xF746
53 #define ID_LED_DEFAULT_82573 ((ID_LED_DEF1_DEF2 << 12) | \
54 (ID_LED_OFF1_ON2 << 8) | \
55 (ID_LED_DEF1_DEF2 << 4) | \
58 #define E1000_GCR_L1_ACT_WITHOUT_L0S_RX 0x08000000
60 #define E1000_NVM_INIT_CTRL2_MNGM 0x6000 /* Manageability Operation Mode mask */
62 static s32 e1000_get_phy_id_82571(struct e1000_hw *hw);
63 static s32 e1000_setup_copper_link_82571(struct e1000_hw *hw);
64 static s32 e1000_setup_fiber_serdes_link_82571(struct e1000_hw *hw);
65 static s32 e1000_check_for_serdes_link_82571(struct e1000_hw *hw);
66 static s32 e1000_write_nvm_eewr_82571(struct e1000_hw *hw, u16 offset,
67 u16 words, u16 *data);
68 static s32 e1000_fix_nvm_checksum_82571(struct e1000_hw *hw);
69 static void e1000_initialize_hw_bits_82571(struct e1000_hw *hw);
70 static s32 e1000_setup_link_82571(struct e1000_hw *hw);
71 static void e1000_clear_hw_cntrs_82571(struct e1000_hw *hw);
72 static bool e1000_check_mng_mode_82574(struct e1000_hw *hw);
73 static s32 e1000_led_on_82574(struct e1000_hw *hw);
76 * e1000_init_phy_params_82571 - Init PHY func ptrs.
77 * @hw: pointer to the HW structure
79 * This is a function pointer entry point called by the api module.
81 static s32 e1000_init_phy_params_82571(struct e1000_hw *hw)
83 struct e1000_phy_info *phy = &hw->phy;
86 if (hw->phy.media_type != e1000_media_type_copper) {
87 phy->type = e1000_phy_none;
92 phy->autoneg_mask = AUTONEG_ADVERTISE_SPEED_DEFAULT;
93 phy->reset_delay_us = 100;
95 switch (hw->mac.type) {
98 phy->type = e1000_phy_igp_2;
101 phy->type = e1000_phy_m88;
105 phy->type = e1000_phy_bm;
108 return -E1000_ERR_PHY;
112 /* This can only be done after all function pointers are setup. */
113 ret_val = e1000_get_phy_id_82571(hw);
116 switch (hw->mac.type) {
119 if (phy->id != IGP01E1000_I_PHY_ID)
120 return -E1000_ERR_PHY;
123 if (phy->id != M88E1111_I_PHY_ID)
124 return -E1000_ERR_PHY;
128 if (phy->id != BME1000_E_PHY_ID_R2)
129 return -E1000_ERR_PHY;
132 return -E1000_ERR_PHY;
140 * e1000_init_nvm_params_82571 - Init NVM func ptrs.
141 * @hw: pointer to the HW structure
143 * This is a function pointer entry point called by the api module.
145 static s32 e1000_init_nvm_params_82571(struct e1000_hw *hw)
147 struct e1000_nvm_info *nvm = &hw->nvm;
148 u32 eecd = er32(EECD);
151 nvm->opcode_bits = 8;
153 switch (nvm->override) {
154 case e1000_nvm_override_spi_large:
156 nvm->address_bits = 16;
158 case e1000_nvm_override_spi_small:
160 nvm->address_bits = 8;
163 nvm->page_size = eecd & E1000_EECD_ADDR_BITS ? 32 : 8;
164 nvm->address_bits = eecd & E1000_EECD_ADDR_BITS ? 16 : 8;
168 switch (hw->mac.type) {
172 if (((eecd >> 15) & 0x3) == 0x3) {
173 nvm->type = e1000_nvm_flash_hw;
174 nvm->word_size = 2048;
176 * Autonomous Flash update bit must be cleared due
177 * to Flash update issue.
179 eecd &= ~E1000_EECD_AUPDEN;
185 nvm->type = e1000_nvm_eeprom_spi;
186 size = (u16)((eecd & E1000_EECD_SIZE_EX_MASK) >>
187 E1000_EECD_SIZE_EX_SHIFT);
189 * Added to a constant, "size" becomes the left-shift value
190 * for setting word_size.
192 size += NVM_WORD_SIZE_BASE_SHIFT;
194 /* EEPROM access above 16k is unsupported */
197 nvm->word_size = 1 << size;
205 * e1000_init_mac_params_82571 - Init MAC func ptrs.
206 * @hw: pointer to the HW structure
208 * This is a function pointer entry point called by the api module.
210 static s32 e1000_init_mac_params_82571(struct e1000_adapter *adapter)
212 struct e1000_hw *hw = &adapter->hw;
213 struct e1000_mac_info *mac = &hw->mac;
214 struct e1000_mac_operations *func = &mac->ops;
217 switch (adapter->pdev->device) {
218 case E1000_DEV_ID_82571EB_FIBER:
219 case E1000_DEV_ID_82572EI_FIBER:
220 case E1000_DEV_ID_82571EB_QUAD_FIBER:
221 hw->phy.media_type = e1000_media_type_fiber;
223 case E1000_DEV_ID_82571EB_SERDES:
224 case E1000_DEV_ID_82572EI_SERDES:
225 case E1000_DEV_ID_82571EB_SERDES_DUAL:
226 case E1000_DEV_ID_82571EB_SERDES_QUAD:
227 hw->phy.media_type = e1000_media_type_internal_serdes;
230 hw->phy.media_type = e1000_media_type_copper;
234 /* Set mta register count */
235 mac->mta_reg_count = 128;
236 /* Set rar entry count */
237 mac->rar_entry_count = E1000_RAR_ENTRIES;
238 /* Set if manageability features are enabled. */
239 mac->arc_subsystem_valid = (er32(FWSM) & E1000_FWSM_MODE_MASK) ? 1 : 0;
242 switch (hw->phy.media_type) {
243 case e1000_media_type_copper:
244 func->setup_physical_interface = e1000_setup_copper_link_82571;
245 func->check_for_link = e1000e_check_for_copper_link;
246 func->get_link_up_info = e1000e_get_speed_and_duplex_copper;
248 case e1000_media_type_fiber:
249 func->setup_physical_interface =
250 e1000_setup_fiber_serdes_link_82571;
251 func->check_for_link = e1000e_check_for_fiber_link;
252 func->get_link_up_info =
253 e1000e_get_speed_and_duplex_fiber_serdes;
255 case e1000_media_type_internal_serdes:
256 func->setup_physical_interface =
257 e1000_setup_fiber_serdes_link_82571;
258 func->check_for_link = e1000_check_for_serdes_link_82571;
259 func->get_link_up_info =
260 e1000e_get_speed_and_duplex_fiber_serdes;
263 return -E1000_ERR_CONFIG;
267 switch (hw->mac.type) {
270 func->check_mng_mode = e1000_check_mng_mode_82574;
271 func->led_on = e1000_led_on_82574;
274 func->check_mng_mode = e1000e_check_mng_mode_generic;
275 func->led_on = e1000e_led_on_generic;
282 static s32 e1000_get_variants_82571(struct e1000_adapter *adapter)
284 struct e1000_hw *hw = &adapter->hw;
285 static int global_quad_port_a; /* global port a indication */
286 struct pci_dev *pdev = adapter->pdev;
288 int is_port_b = er32(STATUS) & E1000_STATUS_FUNC_1;
291 rc = e1000_init_mac_params_82571(adapter);
295 rc = e1000_init_nvm_params_82571(hw);
299 rc = e1000_init_phy_params_82571(hw);
303 /* tag quad port adapters first, it's used below */
304 switch (pdev->device) {
305 case E1000_DEV_ID_82571EB_QUAD_COPPER:
306 case E1000_DEV_ID_82571EB_QUAD_FIBER:
307 case E1000_DEV_ID_82571EB_QUAD_COPPER_LP:
308 case E1000_DEV_ID_82571PT_QUAD_COPPER:
309 adapter->flags |= FLAG_IS_QUAD_PORT;
310 /* mark the first port */
311 if (global_quad_port_a == 0)
312 adapter->flags |= FLAG_IS_QUAD_PORT_A;
313 /* Reset for multiple quad port adapters */
314 global_quad_port_a++;
315 if (global_quad_port_a == 4)
316 global_quad_port_a = 0;
322 switch (adapter->hw.mac.type) {
324 /* these dual ports don't have WoL on port B at all */
325 if (((pdev->device == E1000_DEV_ID_82571EB_FIBER) ||
326 (pdev->device == E1000_DEV_ID_82571EB_SERDES) ||
327 (pdev->device == E1000_DEV_ID_82571EB_COPPER)) &&
329 adapter->flags &= ~FLAG_HAS_WOL;
330 /* quad ports only support WoL on port A */
331 if (adapter->flags & FLAG_IS_QUAD_PORT &&
332 (!(adapter->flags & FLAG_IS_QUAD_PORT_A)))
333 adapter->flags &= ~FLAG_HAS_WOL;
334 /* Does not support WoL on any port */
335 if (pdev->device == E1000_DEV_ID_82571EB_SERDES_QUAD)
336 adapter->flags &= ~FLAG_HAS_WOL;
340 if (pdev->device == E1000_DEV_ID_82573L) {
341 if (e1000_read_nvm(&adapter->hw, NVM_INIT_3GIO_3, 1,
344 if (eeprom_data & NVM_WORD1A_ASPM_MASK)
345 adapter->flags &= ~FLAG_HAS_JUMBO_FRAMES;
356 * e1000_get_phy_id_82571 - Retrieve the PHY ID and revision
357 * @hw: pointer to the HW structure
359 * Reads the PHY registers and stores the PHY ID and possibly the PHY
360 * revision in the hardware structure.
362 static s32 e1000_get_phy_id_82571(struct e1000_hw *hw)
364 struct e1000_phy_info *phy = &hw->phy;
368 switch (hw->mac.type) {
372 * The 82571 firmware may still be configuring the PHY.
373 * In this case, we cannot access the PHY until the
374 * configuration is done. So we explicitly set the
377 phy->id = IGP01E1000_I_PHY_ID;
380 return e1000e_get_phy_id(hw);
384 ret_val = e1e_rphy(hw, PHY_ID1, &phy_id);
388 phy->id = (u32)(phy_id << 16);
390 ret_val = e1e_rphy(hw, PHY_ID2, &phy_id);
394 phy->id |= (u32)(phy_id);
395 phy->revision = (u32)(phy_id & ~PHY_REVISION_MASK);
398 return -E1000_ERR_PHY;
406 * e1000_get_hw_semaphore_82571 - Acquire hardware semaphore
407 * @hw: pointer to the HW structure
409 * Acquire the HW semaphore to access the PHY or NVM
411 static s32 e1000_get_hw_semaphore_82571(struct e1000_hw *hw)
414 s32 timeout = hw->nvm.word_size + 1;
417 /* Get the FW semaphore. */
418 for (i = 0; i < timeout; i++) {
420 ew32(SWSM, swsm | E1000_SWSM_SWESMBI);
422 /* Semaphore acquired if bit latched */
423 if (er32(SWSM) & E1000_SWSM_SWESMBI)
430 /* Release semaphores */
431 e1000e_put_hw_semaphore(hw);
432 hw_dbg(hw, "Driver can't access the NVM\n");
433 return -E1000_ERR_NVM;
440 * e1000_put_hw_semaphore_82571 - Release hardware semaphore
441 * @hw: pointer to the HW structure
443 * Release hardware semaphore used to access the PHY or NVM
445 static void e1000_put_hw_semaphore_82571(struct e1000_hw *hw)
451 swsm &= ~E1000_SWSM_SWESMBI;
457 * e1000_acquire_nvm_82571 - Request for access to the EEPROM
458 * @hw: pointer to the HW structure
460 * To gain access to the EEPROM, first we must obtain a hardware semaphore.
461 * Then for non-82573 hardware, set the EEPROM access request bit and wait
462 * for EEPROM access grant bit. If the access grant bit is not set, release
463 * hardware semaphore.
465 static s32 e1000_acquire_nvm_82571(struct e1000_hw *hw)
469 ret_val = e1000_get_hw_semaphore_82571(hw);
473 switch (hw->mac.type) {
479 ret_val = e1000e_acquire_nvm(hw);
484 e1000_put_hw_semaphore_82571(hw);
490 * e1000_release_nvm_82571 - Release exclusive access to EEPROM
491 * @hw: pointer to the HW structure
493 * Stop any current commands to the EEPROM and clear the EEPROM request bit.
495 static void e1000_release_nvm_82571(struct e1000_hw *hw)
497 e1000e_release_nvm(hw);
498 e1000_put_hw_semaphore_82571(hw);
502 * e1000_write_nvm_82571 - Write to EEPROM using appropriate interface
503 * @hw: pointer to the HW structure
504 * @offset: offset within the EEPROM to be written to
505 * @words: number of words to write
506 * @data: 16 bit word(s) to be written to the EEPROM
508 * For non-82573 silicon, write data to EEPROM at offset using SPI interface.
510 * If e1000e_update_nvm_checksum is not called after this function, the
511 * EEPROM will most likely contain an invalid checksum.
513 static s32 e1000_write_nvm_82571(struct e1000_hw *hw, u16 offset, u16 words,
518 switch (hw->mac.type) {
522 ret_val = e1000_write_nvm_eewr_82571(hw, offset, words, data);
526 ret_val = e1000e_write_nvm_spi(hw, offset, words, data);
529 ret_val = -E1000_ERR_NVM;
537 * e1000_update_nvm_checksum_82571 - Update EEPROM checksum
538 * @hw: pointer to the HW structure
540 * Updates the EEPROM checksum by reading/adding each word of the EEPROM
541 * up to the checksum. Then calculates the EEPROM checksum and writes the
542 * value to the EEPROM.
544 static s32 e1000_update_nvm_checksum_82571(struct e1000_hw *hw)
550 ret_val = e1000e_update_nvm_checksum_generic(hw);
555 * If our nvm is an EEPROM, then we're done
556 * otherwise, commit the checksum to the flash NVM.
558 if (hw->nvm.type != e1000_nvm_flash_hw)
561 /* Check for pending operations. */
562 for (i = 0; i < E1000_FLASH_UPDATES; i++) {
564 if ((er32(EECD) & E1000_EECD_FLUPD) == 0)
568 if (i == E1000_FLASH_UPDATES)
569 return -E1000_ERR_NVM;
571 /* Reset the firmware if using STM opcode. */
572 if ((er32(FLOP) & 0xFF00) == E1000_STM_OPCODE) {
574 * The enabling of and the actual reset must be done
575 * in two write cycles.
577 ew32(HICR, E1000_HICR_FW_RESET_ENABLE);
579 ew32(HICR, E1000_HICR_FW_RESET);
582 /* Commit the write to flash */
583 eecd = er32(EECD) | E1000_EECD_FLUPD;
586 for (i = 0; i < E1000_FLASH_UPDATES; i++) {
588 if ((er32(EECD) & E1000_EECD_FLUPD) == 0)
592 if (i == E1000_FLASH_UPDATES)
593 return -E1000_ERR_NVM;
599 * e1000_validate_nvm_checksum_82571 - Validate EEPROM checksum
600 * @hw: pointer to the HW structure
602 * Calculates the EEPROM checksum by reading/adding each word of the EEPROM
603 * and then verifies that the sum of the EEPROM is equal to 0xBABA.
605 static s32 e1000_validate_nvm_checksum_82571(struct e1000_hw *hw)
607 if (hw->nvm.type == e1000_nvm_flash_hw)
608 e1000_fix_nvm_checksum_82571(hw);
610 return e1000e_validate_nvm_checksum_generic(hw);
614 * e1000_write_nvm_eewr_82571 - Write to EEPROM for 82573 silicon
615 * @hw: pointer to the HW structure
616 * @offset: offset within the EEPROM to be written to
617 * @words: number of words to write
618 * @data: 16 bit word(s) to be written to the EEPROM
620 * After checking for invalid values, poll the EEPROM to ensure the previous
621 * command has completed before trying to write the next word. After write
622 * poll for completion.
624 * If e1000e_update_nvm_checksum is not called after this function, the
625 * EEPROM will most likely contain an invalid checksum.
627 static s32 e1000_write_nvm_eewr_82571(struct e1000_hw *hw, u16 offset,
628 u16 words, u16 *data)
630 struct e1000_nvm_info *nvm = &hw->nvm;
636 * A check for invalid values: offset too large, too many words,
637 * and not enough words.
639 if ((offset >= nvm->word_size) || (words > (nvm->word_size - offset)) ||
641 hw_dbg(hw, "nvm parameter(s) out of bounds\n");
642 return -E1000_ERR_NVM;
645 for (i = 0; i < words; i++) {
646 eewr = (data[i] << E1000_NVM_RW_REG_DATA) |
647 ((offset+i) << E1000_NVM_RW_ADDR_SHIFT) |
648 E1000_NVM_RW_REG_START;
650 ret_val = e1000e_poll_eerd_eewr_done(hw, E1000_NVM_POLL_WRITE);
656 ret_val = e1000e_poll_eerd_eewr_done(hw, E1000_NVM_POLL_WRITE);
665 * e1000_get_cfg_done_82571 - Poll for configuration done
666 * @hw: pointer to the HW structure
668 * Reads the management control register for the config done bit to be set.
670 static s32 e1000_get_cfg_done_82571(struct e1000_hw *hw)
672 s32 timeout = PHY_CFG_TIMEOUT;
676 E1000_NVM_CFG_DONE_PORT_0)
682 hw_dbg(hw, "MNG configuration cycle has not completed.\n");
683 return -E1000_ERR_RESET;
690 * e1000_set_d0_lplu_state_82571 - Set Low Power Linkup D0 state
691 * @hw: pointer to the HW structure
692 * @active: TRUE to enable LPLU, FALSE to disable
694 * Sets the LPLU D0 state according to the active flag. When activating LPLU
695 * this function also disables smart speed and vice versa. LPLU will not be
696 * activated unless the device autonegotiation advertisement meets standards
697 * of either 10 or 10/100 or 10/100/1000 at all duplexes. This is a function
698 * pointer entry point only called by PHY setup routines.
700 static s32 e1000_set_d0_lplu_state_82571(struct e1000_hw *hw, bool active)
702 struct e1000_phy_info *phy = &hw->phy;
706 ret_val = e1e_rphy(hw, IGP02E1000_PHY_POWER_MGMT, &data);
711 data |= IGP02E1000_PM_D0_LPLU;
712 ret_val = e1e_wphy(hw, IGP02E1000_PHY_POWER_MGMT, data);
716 /* When LPLU is enabled, we should disable SmartSpeed */
717 ret_val = e1e_rphy(hw, IGP01E1000_PHY_PORT_CONFIG, &data);
718 data &= ~IGP01E1000_PSCFR_SMART_SPEED;
719 ret_val = e1e_wphy(hw, IGP01E1000_PHY_PORT_CONFIG, data);
723 data &= ~IGP02E1000_PM_D0_LPLU;
724 ret_val = e1e_wphy(hw, IGP02E1000_PHY_POWER_MGMT, data);
726 * LPLU and SmartSpeed are mutually exclusive. LPLU is used
727 * during Dx states where the power conservation is most
728 * important. During driver activity we should enable
729 * SmartSpeed, so performance is maintained.
731 if (phy->smart_speed == e1000_smart_speed_on) {
732 ret_val = e1e_rphy(hw, IGP01E1000_PHY_PORT_CONFIG,
737 data |= IGP01E1000_PSCFR_SMART_SPEED;
738 ret_val = e1e_wphy(hw, IGP01E1000_PHY_PORT_CONFIG,
742 } else if (phy->smart_speed == e1000_smart_speed_off) {
743 ret_val = e1e_rphy(hw, IGP01E1000_PHY_PORT_CONFIG,
748 data &= ~IGP01E1000_PSCFR_SMART_SPEED;
749 ret_val = e1e_wphy(hw, IGP01E1000_PHY_PORT_CONFIG,
760 * e1000_reset_hw_82571 - Reset hardware
761 * @hw: pointer to the HW structure
763 * This resets the hardware into a known state. This is a
764 * function pointer entry point called by the api module.
766 static s32 e1000_reset_hw_82571(struct e1000_hw *hw)
776 * Prevent the PCI-E bus from sticking if there is no TLP connection
777 * on the last TLP read/write transaction when MAC is reset.
779 ret_val = e1000e_disable_pcie_master(hw);
781 hw_dbg(hw, "PCI-E Master disable polling has failed.\n");
783 hw_dbg(hw, "Masking off all interrupts\n");
784 ew32(IMC, 0xffffffff);
787 ew32(TCTL, E1000_TCTL_PSP);
793 * Must acquire the MDIO ownership before MAC reset.
794 * Ownership defaults to firmware after a reset.
796 switch (hw->mac.type) {
800 extcnf_ctrl = er32(EXTCNF_CTRL);
801 extcnf_ctrl |= E1000_EXTCNF_CTRL_MDIO_SW_OWNERSHIP;
804 ew32(EXTCNF_CTRL, extcnf_ctrl);
805 extcnf_ctrl = er32(EXTCNF_CTRL);
807 if (extcnf_ctrl & E1000_EXTCNF_CTRL_MDIO_SW_OWNERSHIP)
810 extcnf_ctrl |= E1000_EXTCNF_CTRL_MDIO_SW_OWNERSHIP;
814 } while (i < MDIO_OWNERSHIP_TIMEOUT);
822 hw_dbg(hw, "Issuing a global reset to MAC\n");
823 ew32(CTRL, ctrl | E1000_CTRL_RST);
825 if (hw->nvm.type == e1000_nvm_flash_hw) {
827 ctrl_ext = er32(CTRL_EXT);
828 ctrl_ext |= E1000_CTRL_EXT_EE_RST;
829 ew32(CTRL_EXT, ctrl_ext);
833 ret_val = e1000e_get_auto_rd_done(hw);
835 /* We don't want to continue accessing MAC registers. */
839 * Phy configuration from NVM just starts after EECD_AUTO_RD is set.
840 * Need to wait for Phy configuration completion before accessing
844 switch (hw->mac.type) {
854 /* Clear any pending interrupt events. */
855 ew32(IMC, 0xffffffff);
858 if (hw->mac.type == e1000_82571 &&
859 hw->dev_spec.e82571.alt_mac_addr_is_present)
860 e1000e_set_laa_state_82571(hw, true);
862 /* Reinitialize the 82571 serdes link state machine */
863 if (hw->phy.media_type == e1000_media_type_internal_serdes)
864 hw->mac.serdes_link_state = e1000_serdes_link_down;
870 * e1000_init_hw_82571 - Initialize hardware
871 * @hw: pointer to the HW structure
873 * This inits the hardware readying it for operation.
875 static s32 e1000_init_hw_82571(struct e1000_hw *hw)
877 struct e1000_mac_info *mac = &hw->mac;
881 u16 rar_count = mac->rar_entry_count;
883 e1000_initialize_hw_bits_82571(hw);
885 /* Initialize identification LED */
886 ret_val = e1000e_id_led_init(hw);
888 hw_dbg(hw, "Error initializing identification LED\n");
892 /* Disabling VLAN filtering */
893 hw_dbg(hw, "Initializing the IEEE VLAN\n");
894 e1000e_clear_vfta(hw);
896 /* Setup the receive address. */
898 * If, however, a locally administered address was assigned to the
899 * 82571, we must reserve a RAR for it to work around an issue where
900 * resetting one port will reload the MAC on the other port.
902 if (e1000e_get_laa_state_82571(hw))
904 e1000e_init_rx_addrs(hw, rar_count);
906 /* Zero out the Multicast HASH table */
907 hw_dbg(hw, "Zeroing the MTA\n");
908 for (i = 0; i < mac->mta_reg_count; i++)
909 E1000_WRITE_REG_ARRAY(hw, E1000_MTA, i, 0);
911 /* Setup link and flow control */
912 ret_val = e1000_setup_link_82571(hw);
914 /* Set the transmit descriptor write-back policy */
915 reg_data = er32(TXDCTL(0));
916 reg_data = (reg_data & ~E1000_TXDCTL_WTHRESH) |
917 E1000_TXDCTL_FULL_TX_DESC_WB |
918 E1000_TXDCTL_COUNT_DESC;
919 ew32(TXDCTL(0), reg_data);
921 /* ...for both queues. */
926 e1000e_enable_tx_pkt_filtering(hw);
927 reg_data = er32(GCR);
928 reg_data |= E1000_GCR_L1_ACT_WITHOUT_L0S_RX;
932 reg_data = er32(TXDCTL(1));
933 reg_data = (reg_data & ~E1000_TXDCTL_WTHRESH) |
934 E1000_TXDCTL_FULL_TX_DESC_WB |
935 E1000_TXDCTL_COUNT_DESC;
936 ew32(TXDCTL(1), reg_data);
941 * Clear all of the statistics registers (clear on read). It is
942 * important that we do this after we have tried to establish link
943 * because the symbol error count will increment wildly if there
946 e1000_clear_hw_cntrs_82571(hw);
952 * e1000_initialize_hw_bits_82571 - Initialize hardware-dependent bits
953 * @hw: pointer to the HW structure
955 * Initializes required hardware-dependent bits needed for normal operation.
957 static void e1000_initialize_hw_bits_82571(struct e1000_hw *hw)
961 /* Transmit Descriptor Control 0 */
962 reg = er32(TXDCTL(0));
964 ew32(TXDCTL(0), reg);
966 /* Transmit Descriptor Control 1 */
967 reg = er32(TXDCTL(1));
969 ew32(TXDCTL(1), reg);
971 /* Transmit Arbitration Control 0 */
973 reg &= ~(0xF << 27); /* 30:27 */
974 switch (hw->mac.type) {
977 reg |= (1 << 23) | (1 << 24) | (1 << 25) | (1 << 26);
984 /* Transmit Arbitration Control 1 */
986 switch (hw->mac.type) {
989 reg &= ~((1 << 29) | (1 << 30));
990 reg |= (1 << 22) | (1 << 24) | (1 << 25) | (1 << 26);
991 if (er32(TCTL) & E1000_TCTL_MULR)
1001 /* Device Control */
1002 switch (hw->mac.type) {
1014 /* Extended Device Control */
1015 switch (hw->mac.type) {
1019 reg = er32(CTRL_EXT);
1022 ew32(CTRL_EXT, reg);
1028 if (hw->mac.type == e1000_82571) {
1029 reg = er32(PBA_ECC);
1030 reg |= E1000_PBA_ECC_CORR_EN;
1034 * Workaround for hardware errata.
1035 * Ensure that DMA Dynamic Clock gating is disabled on 82571 and 82572
1038 if ((hw->mac.type == e1000_82571) ||
1039 (hw->mac.type == e1000_82572)) {
1040 reg = er32(CTRL_EXT);
1041 reg &= ~E1000_CTRL_EXT_DMA_DYN_CLK_EN;
1042 ew32(CTRL_EXT, reg);
1046 /* PCI-Ex Control Registers */
1047 switch (hw->mac.type) {
1066 * e1000e_clear_vfta - Clear VLAN filter table
1067 * @hw: pointer to the HW structure
1069 * Clears the register array which contains the VLAN filter table by
1070 * setting all the values to 0.
1072 void e1000e_clear_vfta(struct e1000_hw *hw)
1076 u32 vfta_offset = 0;
1077 u32 vfta_bit_in_reg = 0;
1079 switch (hw->mac.type) {
1083 if (hw->mng_cookie.vlan_id != 0) {
1085 * The VFTA is a 4096b bit-field, each identifying
1086 * a single VLAN ID. The following operations
1087 * determine which 32b entry (i.e. offset) into the
1088 * array we want to set the VLAN ID (i.e. bit) of
1089 * the manageability unit.
1091 vfta_offset = (hw->mng_cookie.vlan_id >>
1092 E1000_VFTA_ENTRY_SHIFT) &
1093 E1000_VFTA_ENTRY_MASK;
1094 vfta_bit_in_reg = 1 << (hw->mng_cookie.vlan_id &
1095 E1000_VFTA_ENTRY_BIT_SHIFT_MASK);
1101 for (offset = 0; offset < E1000_VLAN_FILTER_TBL_SIZE; offset++) {
1103 * If the offset we want to clear is the same offset of the
1104 * manageability VLAN ID, then clear all bits except that of
1105 * the manageability unit.
1107 vfta_value = (offset == vfta_offset) ? vfta_bit_in_reg : 0;
1108 E1000_WRITE_REG_ARRAY(hw, E1000_VFTA, offset, vfta_value);
1114 * e1000_check_mng_mode_82574 - Check manageability is enabled
1115 * @hw: pointer to the HW structure
1117 * Reads the NVM Initialization Control Word 2 and returns true
1118 * (>0) if any manageability is enabled, else false (0).
1120 static bool e1000_check_mng_mode_82574(struct e1000_hw *hw)
1124 e1000_read_nvm(hw, NVM_INIT_CONTROL2_REG, 1, &data);
1125 return (data & E1000_NVM_INIT_CTRL2_MNGM) != 0;
1129 * e1000_led_on_82574 - Turn LED on
1130 * @hw: pointer to the HW structure
1134 static s32 e1000_led_on_82574(struct e1000_hw *hw)
1139 ctrl = hw->mac.ledctl_mode2;
1140 if (!(E1000_STATUS_LU & er32(STATUS))) {
1142 * If no link, then turn LED on by setting the invert bit
1143 * for each LED that's "on" (0x0E) in ledctl_mode2.
1145 for (i = 0; i < 4; i++)
1146 if (((hw->mac.ledctl_mode2 >> (i * 8)) & 0xFF) ==
1147 E1000_LEDCTL_MODE_LED_ON)
1148 ctrl |= (E1000_LEDCTL_LED0_IVRT << (i * 8));
1156 * e1000_update_mc_addr_list_82571 - Update Multicast addresses
1157 * @hw: pointer to the HW structure
1158 * @mc_addr_list: array of multicast addresses to program
1159 * @mc_addr_count: number of multicast addresses to program
1160 * @rar_used_count: the first RAR register free to program
1161 * @rar_count: total number of supported Receive Address Registers
1163 * Updates the Receive Address Registers and Multicast Table Array.
1164 * The caller must have a packed mc_addr_list of multicast addresses.
1165 * The parameter rar_count will usually be hw->mac.rar_entry_count
1166 * unless there are workarounds that change this.
1168 static void e1000_update_mc_addr_list_82571(struct e1000_hw *hw,
1174 if (e1000e_get_laa_state_82571(hw))
1177 e1000e_update_mc_addr_list_generic(hw, mc_addr_list, mc_addr_count,
1178 rar_used_count, rar_count);
1182 * e1000_setup_link_82571 - Setup flow control and link settings
1183 * @hw: pointer to the HW structure
1185 * Determines which flow control settings to use, then configures flow
1186 * control. Calls the appropriate media-specific link configuration
1187 * function. Assuming the adapter has a valid link partner, a valid link
1188 * should be established. Assumes the hardware has previously been reset
1189 * and the transmitter and receiver are not enabled.
1191 static s32 e1000_setup_link_82571(struct e1000_hw *hw)
1194 * 82573 does not have a word in the NVM to determine
1195 * the default flow control setting, so we explicitly
1198 switch (hw->mac.type) {
1202 if (hw->fc.requested_mode == e1000_fc_default)
1203 hw->fc.requested_mode = e1000_fc_full;
1209 return e1000e_setup_link(hw);
1213 * e1000_setup_copper_link_82571 - Configure copper link settings
1214 * @hw: pointer to the HW structure
1216 * Configures the link for auto-neg or forced speed and duplex. Then we check
1217 * for link, once link is established calls to configure collision distance
1218 * and flow control are called.
1220 static s32 e1000_setup_copper_link_82571(struct e1000_hw *hw)
1227 ctrl |= E1000_CTRL_SLU;
1228 ctrl &= ~(E1000_CTRL_FRCSPD | E1000_CTRL_FRCDPX);
1231 switch (hw->phy.type) {
1234 ret_val = e1000e_copper_link_setup_m88(hw);
1236 case e1000_phy_igp_2:
1237 ret_val = e1000e_copper_link_setup_igp(hw);
1238 /* Setup activity LED */
1239 led_ctrl = er32(LEDCTL);
1240 led_ctrl &= IGP_ACTIVITY_LED_MASK;
1241 led_ctrl |= (IGP_ACTIVITY_LED_ENABLE | IGP_LED3_MODE);
1242 ew32(LEDCTL, led_ctrl);
1245 return -E1000_ERR_PHY;
1252 ret_val = e1000e_setup_copper_link(hw);
1258 * e1000_setup_fiber_serdes_link_82571 - Setup link for fiber/serdes
1259 * @hw: pointer to the HW structure
1261 * Configures collision distance and flow control for fiber and serdes links.
1262 * Upon successful setup, poll for link.
1264 static s32 e1000_setup_fiber_serdes_link_82571(struct e1000_hw *hw)
1266 switch (hw->mac.type) {
1270 * If SerDes loopback mode is entered, there is no form
1271 * of reset to take the adapter out of that mode. So we
1272 * have to explicitly take the adapter out of loopback
1273 * mode. This prevents drivers from twiddling their thumbs
1274 * if another tool failed to take it out of loopback mode.
1276 ew32(SCTL, E1000_SCTL_DISABLE_SERDES_LOOPBACK);
1282 return e1000e_setup_fiber_serdes_link(hw);
1286 * e1000_check_for_serdes_link_82571 - Check for link (Serdes)
1287 * @hw: pointer to the HW structure
1289 * Checks for link up on the hardware. If link is not up and we have
1290 * a signal, then we need to force link up.
1292 static s32 e1000_check_for_serdes_link_82571(struct e1000_hw *hw)
1294 struct e1000_mac_info *mac = &hw->mac;
1301 status = er32(STATUS);
1304 if ((rxcw & E1000_RXCW_SYNCH) && !(rxcw & E1000_RXCW_IV)) {
1306 /* Receiver is synchronized with no invalid bits. */
1307 switch (mac->serdes_link_state) {
1308 case e1000_serdes_link_autoneg_complete:
1309 if (!(status & E1000_STATUS_LU)) {
1311 * We have lost link, retry autoneg before
1312 * reporting link failure
1314 mac->serdes_link_state =
1315 e1000_serdes_link_autoneg_progress;
1316 hw_dbg(hw, "AN_UP -> AN_PROG\n");
1320 case e1000_serdes_link_forced_up:
1322 * If we are receiving /C/ ordered sets, re-enable
1323 * auto-negotiation in the TXCW register and disable
1324 * forced link in the Device Control register in an
1325 * attempt to auto-negotiate with our link partner.
1327 if (rxcw & E1000_RXCW_C) {
1328 /* Enable autoneg, and unforce link up */
1329 ew32(TXCW, mac->txcw);
1331 (ctrl & ~E1000_CTRL_SLU));
1332 mac->serdes_link_state =
1333 e1000_serdes_link_autoneg_progress;
1334 hw_dbg(hw, "FORCED_UP -> AN_PROG\n");
1338 case e1000_serdes_link_autoneg_progress:
1340 * If the LU bit is set in the STATUS register,
1341 * autoneg has completed sucessfully. If not,
1342 * try foring the link because the far end may be
1343 * available but not capable of autonegotiation.
1345 if (status & E1000_STATUS_LU) {
1346 mac->serdes_link_state =
1347 e1000_serdes_link_autoneg_complete;
1348 hw_dbg(hw, "AN_PROG -> AN_UP\n");
1351 * Disable autoneg, force link up and
1352 * full duplex, and change state to forced
1355 (mac->txcw & ~E1000_TXCW_ANE));
1356 ctrl |= (E1000_CTRL_SLU | E1000_CTRL_FD);
1359 /* Configure Flow Control after link up. */
1361 e1000e_config_fc_after_link_up(hw);
1363 hw_dbg(hw, "Error config flow control\n");
1366 mac->serdes_link_state =
1367 e1000_serdes_link_forced_up;
1368 hw_dbg(hw, "AN_PROG -> FORCED_UP\n");
1370 mac->serdes_has_link = true;
1373 case e1000_serdes_link_down:
1375 /* The link was down but the receiver has now gained
1376 * valid sync, so lets see if we can bring the link
1378 ew32(TXCW, mac->txcw);
1380 (ctrl & ~E1000_CTRL_SLU));
1381 mac->serdes_link_state =
1382 e1000_serdes_link_autoneg_progress;
1383 hw_dbg(hw, "DOWN -> AN_PROG\n");
1387 if (!(rxcw & E1000_RXCW_SYNCH)) {
1388 mac->serdes_has_link = false;
1389 mac->serdes_link_state = e1000_serdes_link_down;
1390 hw_dbg(hw, "ANYSTATE -> DOWN\n");
1393 * We have sync, and can tolerate one
1394 * invalid (IV) codeword before declaring
1395 * link down, so reread to look again
1399 if (rxcw & E1000_RXCW_IV) {
1400 mac->serdes_link_state = e1000_serdes_link_down;
1401 mac->serdes_has_link = false;
1402 hw_dbg(hw, "ANYSTATE -> DOWN\n");
1411 * e1000_valid_led_default_82571 - Verify a valid default LED config
1412 * @hw: pointer to the HW structure
1413 * @data: pointer to the NVM (EEPROM)
1415 * Read the EEPROM for the current default LED configuration. If the
1416 * LED configuration is not valid, set to a valid LED configuration.
1418 static s32 e1000_valid_led_default_82571(struct e1000_hw *hw, u16 *data)
1422 ret_val = e1000_read_nvm(hw, NVM_ID_LED_SETTINGS, 1, data);
1424 hw_dbg(hw, "NVM Read Error\n");
1428 switch (hw->mac.type) {
1432 if (*data == ID_LED_RESERVED_F746)
1433 *data = ID_LED_DEFAULT_82573;
1436 if (*data == ID_LED_RESERVED_0000 ||
1437 *data == ID_LED_RESERVED_FFFF)
1438 *data = ID_LED_DEFAULT;
1446 * e1000e_get_laa_state_82571 - Get locally administered address state
1447 * @hw: pointer to the HW structure
1449 * Retrieve and return the current locally administered address state.
1451 bool e1000e_get_laa_state_82571(struct e1000_hw *hw)
1453 if (hw->mac.type != e1000_82571)
1456 return hw->dev_spec.e82571.laa_is_present;
1460 * e1000e_set_laa_state_82571 - Set locally administered address state
1461 * @hw: pointer to the HW structure
1462 * @state: enable/disable locally administered address
1464 * Enable/Disable the current locally administers address state.
1466 void e1000e_set_laa_state_82571(struct e1000_hw *hw, bool state)
1468 if (hw->mac.type != e1000_82571)
1471 hw->dev_spec.e82571.laa_is_present = state;
1473 /* If workaround is activated... */
1476 * Hold a copy of the LAA in RAR[14] This is done so that
1477 * between the time RAR[0] gets clobbered and the time it
1478 * gets fixed, the actual LAA is in one of the RARs and no
1479 * incoming packets directed to this port are dropped.
1480 * Eventually the LAA will be in RAR[0] and RAR[14].
1482 e1000e_rar_set(hw, hw->mac.addr, hw->mac.rar_entry_count - 1);
1486 * e1000_fix_nvm_checksum_82571 - Fix EEPROM checksum
1487 * @hw: pointer to the HW structure
1489 * Verifies that the EEPROM has completed the update. After updating the
1490 * EEPROM, we need to check bit 15 in work 0x23 for the checksum fix. If
1491 * the checksum fix is not implemented, we need to set the bit and update
1492 * the checksum. Otherwise, if bit 15 is set and the checksum is incorrect,
1493 * we need to return bad checksum.
1495 static s32 e1000_fix_nvm_checksum_82571(struct e1000_hw *hw)
1497 struct e1000_nvm_info *nvm = &hw->nvm;
1501 if (nvm->type != e1000_nvm_flash_hw)
1505 * Check bit 4 of word 10h. If it is 0, firmware is done updating
1506 * 10h-12h. Checksum may need to be fixed.
1508 ret_val = e1000_read_nvm(hw, 0x10, 1, &data);
1512 if (!(data & 0x10)) {
1514 * Read 0x23 and check bit 15. This bit is a 1
1515 * when the checksum has already been fixed. If
1516 * the checksum is still wrong and this bit is a
1517 * 1, we need to return bad checksum. Otherwise,
1518 * we need to set this bit to a 1 and update the
1521 ret_val = e1000_read_nvm(hw, 0x23, 1, &data);
1525 if (!(data & 0x8000)) {
1527 ret_val = e1000_write_nvm(hw, 0x23, 1, &data);
1530 ret_val = e1000e_update_nvm_checksum(hw);
1538 * e1000_clear_hw_cntrs_82571 - Clear device specific hardware counters
1539 * @hw: pointer to the HW structure
1541 * Clears the hardware counters by reading the counter registers.
1543 static void e1000_clear_hw_cntrs_82571(struct e1000_hw *hw)
1547 e1000e_clear_hw_cntrs_base(hw);
1550 temp = er32(PRC127);
1551 temp = er32(PRC255);
1552 temp = er32(PRC511);
1553 temp = er32(PRC1023);
1554 temp = er32(PRC1522);
1556 temp = er32(PTC127);
1557 temp = er32(PTC255);
1558 temp = er32(PTC511);
1559 temp = er32(PTC1023);
1560 temp = er32(PTC1522);
1562 temp = er32(ALGNERRC);
1563 temp = er32(RXERRC);
1565 temp = er32(CEXTERR);
1567 temp = er32(TSCTFC);
1569 temp = er32(MGTPRC);
1570 temp = er32(MGTPDC);
1571 temp = er32(MGTPTC);
1574 temp = er32(ICRXOC);
1576 temp = er32(ICRXPTC);
1577 temp = er32(ICRXATC);
1578 temp = er32(ICTXPTC);
1579 temp = er32(ICTXATC);
1580 temp = er32(ICTXQEC);
1581 temp = er32(ICTXQMTC);
1582 temp = er32(ICRXDMTC);
1585 static struct e1000_mac_operations e82571_mac_ops = {
1586 /* .check_mng_mode: mac type dependent */
1587 /* .check_for_link: media type dependent */
1588 .cleanup_led = e1000e_cleanup_led_generic,
1589 .clear_hw_cntrs = e1000_clear_hw_cntrs_82571,
1590 .get_bus_info = e1000e_get_bus_info_pcie,
1591 /* .get_link_up_info: media type dependent */
1592 /* .led_on: mac type dependent */
1593 .led_off = e1000e_led_off_generic,
1594 .update_mc_addr_list = e1000_update_mc_addr_list_82571,
1595 .reset_hw = e1000_reset_hw_82571,
1596 .init_hw = e1000_init_hw_82571,
1597 .setup_link = e1000_setup_link_82571,
1598 /* .setup_physical_interface: media type dependent */
1601 static struct e1000_phy_operations e82_phy_ops_igp = {
1602 .acquire_phy = e1000_get_hw_semaphore_82571,
1603 .check_reset_block = e1000e_check_reset_block_generic,
1605 .force_speed_duplex = e1000e_phy_force_speed_duplex_igp,
1606 .get_cfg_done = e1000_get_cfg_done_82571,
1607 .get_cable_length = e1000e_get_cable_length_igp_2,
1608 .get_phy_info = e1000e_get_phy_info_igp,
1609 .read_phy_reg = e1000e_read_phy_reg_igp,
1610 .release_phy = e1000_put_hw_semaphore_82571,
1611 .reset_phy = e1000e_phy_hw_reset_generic,
1612 .set_d0_lplu_state = e1000_set_d0_lplu_state_82571,
1613 .set_d3_lplu_state = e1000e_set_d3_lplu_state,
1614 .write_phy_reg = e1000e_write_phy_reg_igp,
1615 .cfg_on_link_up = NULL,
1618 static struct e1000_phy_operations e82_phy_ops_m88 = {
1619 .acquire_phy = e1000_get_hw_semaphore_82571,
1620 .check_reset_block = e1000e_check_reset_block_generic,
1621 .commit_phy = e1000e_phy_sw_reset,
1622 .force_speed_duplex = e1000e_phy_force_speed_duplex_m88,
1623 .get_cfg_done = e1000e_get_cfg_done,
1624 .get_cable_length = e1000e_get_cable_length_m88,
1625 .get_phy_info = e1000e_get_phy_info_m88,
1626 .read_phy_reg = e1000e_read_phy_reg_m88,
1627 .release_phy = e1000_put_hw_semaphore_82571,
1628 .reset_phy = e1000e_phy_hw_reset_generic,
1629 .set_d0_lplu_state = e1000_set_d0_lplu_state_82571,
1630 .set_d3_lplu_state = e1000e_set_d3_lplu_state,
1631 .write_phy_reg = e1000e_write_phy_reg_m88,
1632 .cfg_on_link_up = NULL,
1635 static struct e1000_phy_operations e82_phy_ops_bm = {
1636 .acquire_phy = e1000_get_hw_semaphore_82571,
1637 .check_reset_block = e1000e_check_reset_block_generic,
1638 .commit_phy = e1000e_phy_sw_reset,
1639 .force_speed_duplex = e1000e_phy_force_speed_duplex_m88,
1640 .get_cfg_done = e1000e_get_cfg_done,
1641 .get_cable_length = e1000e_get_cable_length_m88,
1642 .get_phy_info = e1000e_get_phy_info_m88,
1643 .read_phy_reg = e1000e_read_phy_reg_bm2,
1644 .release_phy = e1000_put_hw_semaphore_82571,
1645 .reset_phy = e1000e_phy_hw_reset_generic,
1646 .set_d0_lplu_state = e1000_set_d0_lplu_state_82571,
1647 .set_d3_lplu_state = e1000e_set_d3_lplu_state,
1648 .write_phy_reg = e1000e_write_phy_reg_bm2,
1649 .cfg_on_link_up = NULL,
1652 static struct e1000_nvm_operations e82571_nvm_ops = {
1653 .acquire_nvm = e1000_acquire_nvm_82571,
1654 .read_nvm = e1000e_read_nvm_eerd,
1655 .release_nvm = e1000_release_nvm_82571,
1656 .update_nvm = e1000_update_nvm_checksum_82571,
1657 .valid_led_default = e1000_valid_led_default_82571,
1658 .validate_nvm = e1000_validate_nvm_checksum_82571,
1659 .write_nvm = e1000_write_nvm_82571,
1662 struct e1000_info e1000_82571_info = {
1664 .flags = FLAG_HAS_HW_VLAN_FILTER
1665 | FLAG_HAS_JUMBO_FRAMES
1667 | FLAG_APME_IN_CTRL3
1668 | FLAG_RX_CSUM_ENABLED
1669 | FLAG_HAS_CTRLEXT_ON_LOAD
1670 | FLAG_HAS_SMART_POWER_DOWN
1671 | FLAG_RESET_OVERWRITES_LAA /* errata */
1672 | FLAG_TARC_SPEED_MODE_BIT /* errata */
1673 | FLAG_APME_CHECK_PORT_B,
1675 .get_variants = e1000_get_variants_82571,
1676 .mac_ops = &e82571_mac_ops,
1677 .phy_ops = &e82_phy_ops_igp,
1678 .nvm_ops = &e82571_nvm_ops,
1681 struct e1000_info e1000_82572_info = {
1683 .flags = FLAG_HAS_HW_VLAN_FILTER
1684 | FLAG_HAS_JUMBO_FRAMES
1686 | FLAG_APME_IN_CTRL3
1687 | FLAG_RX_CSUM_ENABLED
1688 | FLAG_HAS_CTRLEXT_ON_LOAD
1689 | FLAG_TARC_SPEED_MODE_BIT, /* errata */
1691 .get_variants = e1000_get_variants_82571,
1692 .mac_ops = &e82571_mac_ops,
1693 .phy_ops = &e82_phy_ops_igp,
1694 .nvm_ops = &e82571_nvm_ops,
1697 struct e1000_info e1000_82573_info = {
1699 .flags = FLAG_HAS_HW_VLAN_FILTER
1700 | FLAG_HAS_JUMBO_FRAMES
1702 | FLAG_APME_IN_CTRL3
1703 | FLAG_RX_CSUM_ENABLED
1704 | FLAG_HAS_SMART_POWER_DOWN
1707 | FLAG_HAS_SWSM_ON_LOAD,
1709 .get_variants = e1000_get_variants_82571,
1710 .mac_ops = &e82571_mac_ops,
1711 .phy_ops = &e82_phy_ops_m88,
1712 .nvm_ops = &e82571_nvm_ops,
1715 struct e1000_info e1000_82574_info = {
1717 .flags = FLAG_HAS_HW_VLAN_FILTER
1719 | FLAG_HAS_JUMBO_FRAMES
1721 | FLAG_APME_IN_CTRL3
1722 | FLAG_RX_CSUM_ENABLED
1723 | FLAG_HAS_SMART_POWER_DOWN
1725 | FLAG_HAS_CTRLEXT_ON_LOAD,
1727 .get_variants = e1000_get_variants_82571,
1728 .mac_ops = &e82571_mac_ops,
1729 .phy_ops = &e82_phy_ops_bm,
1730 .nvm_ops = &e82571_nvm_ops,
1733 struct e1000_info e1000_82583_info = {
1735 .flags = FLAG_HAS_HW_VLAN_FILTER
1737 | FLAG_APME_IN_CTRL3
1738 | FLAG_RX_CSUM_ENABLED
1739 | FLAG_HAS_SMART_POWER_DOWN
1741 | FLAG_HAS_CTRLEXT_ON_LOAD,
1743 .get_variants = e1000_get_variants_82571,
1744 .mac_ops = &e82571_mac_ops,
1745 .phy_ops = &e82_phy_ops_bm,
1746 .nvm_ops = &e82571_nvm_ops,