Lines Matching +full:mac +full:- +full:base

1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright(c) 1999 - 2018 Intel Corporation. */
28 "s0ix-enabled",
36 .sizeof_stat = sizeof(((struct e1000_adapter *)0)->m), \
41 .sizeof_stat = sizeof(((struct rtnl_link_stats64 *)0)->m), \
115 struct e1000_hw *hw = &adapter->hw; in e1000_get_link_ksettings()
117 if (hw->phy.media_type == e1000_media_type_copper) { in e1000_get_link_ksettings()
127 if (hw->phy.type == e1000_phy_ife) in e1000_get_link_ksettings()
131 if (hw->mac.autoneg == 1) { in e1000_get_link_ksettings()
134 advertising |= hw->phy.autoneg_advertised; in e1000_get_link_ksettings()
137 cmd->base.port = PORT_TP; in e1000_get_link_ksettings()
138 cmd->base.phy_address = hw->phy.addr; in e1000_get_link_ksettings()
148 cmd->base.port = PORT_FIBRE; in e1000_get_link_ksettings()
152 cmd->base.duplex = DUPLEX_UNKNOWN; in e1000_get_link_ksettings()
156 speed = adapter->link_speed; in e1000_get_link_ksettings()
157 cmd->base.duplex = adapter->link_duplex - 1; in e1000_get_link_ksettings()
171 cmd->base.duplex = DUPLEX_FULL; in e1000_get_link_ksettings()
173 cmd->base.duplex = DUPLEX_HALF; in e1000_get_link_ksettings()
177 cmd->base.speed = speed; in e1000_get_link_ksettings()
178 cmd->base.autoneg = ((hw->phy.media_type == e1000_media_type_fiber) || in e1000_get_link_ksettings()
179 hw->mac.autoneg) ? AUTONEG_ENABLE : AUTONEG_DISABLE; in e1000_get_link_ksettings()
181 /* MDI-X => 2; MDI =>1; Invalid =>0 */ in e1000_get_link_ksettings()
182 if ((hw->phy.media_type == e1000_media_type_copper) && in e1000_get_link_ksettings()
184 cmd->base.eth_tp_mdix = hw->phy.is_mdix ? in e1000_get_link_ksettings()
187 cmd->base.eth_tp_mdix = ETH_TP_MDI_INVALID; in e1000_get_link_ksettings()
189 if (hw->phy.mdix == AUTO_ALL_MODES) in e1000_get_link_ksettings()
190 cmd->base.eth_tp_mdix_ctrl = ETH_TP_MDI_AUTO; in e1000_get_link_ksettings()
192 cmd->base.eth_tp_mdix_ctrl = hw->phy.mdix; in e1000_get_link_ksettings()
194 if (hw->phy.media_type != e1000_media_type_copper) in e1000_get_link_ksettings()
195 cmd->base.eth_tp_mdix_ctrl = ETH_TP_MDI_INVALID; in e1000_get_link_ksettings()
197 lpa_t = mii_stat1000_to_ethtool_lpa_t(adapter->phy_regs.stat1000); in e1000_get_link_ksettings()
199 mii_lpa_to_ethtool_lpa_t(adapter->phy_regs.lpa); in e1000_get_link_ksettings()
201 ethtool_convert_legacy_u32_to_link_mode(cmd->link_modes.supported, in e1000_get_link_ksettings()
203 ethtool_convert_legacy_u32_to_link_mode(cmd->link_modes.advertising, in e1000_get_link_ksettings()
205 ethtool_convert_legacy_u32_to_link_mode(cmd->link_modes.lp_advertising, in e1000_get_link_ksettings()
213 struct e1000_mac_info *mac = &adapter->hw.mac; in e1000_set_spd_dplx() local
215 mac->autoneg = 0; in e1000_set_spd_dplx()
224 if ((adapter->hw.phy.media_type == e1000_media_type_fiber) && in e1000_set_spd_dplx()
231 mac->forced_speed_duplex = ADVERTISE_10_HALF; in e1000_set_spd_dplx()
234 mac->forced_speed_duplex = ADVERTISE_10_FULL; in e1000_set_spd_dplx()
237 mac->forced_speed_duplex = ADVERTISE_100_HALF; in e1000_set_spd_dplx()
240 mac->forced_speed_duplex = ADVERTISE_100_FULL; in e1000_set_spd_dplx()
243 if (adapter->hw.phy.media_type == e1000_media_type_copper) { in e1000_set_spd_dplx()
244 mac->autoneg = 1; in e1000_set_spd_dplx()
245 adapter->hw.phy.autoneg_advertised = in e1000_set_spd_dplx()
248 mac->forced_speed_duplex = ADVERTISE_1000_FULL; in e1000_set_spd_dplx()
256 /* clear MDI, MDI(-X) override is only allowed when autoneg enabled */ in e1000_set_spd_dplx()
257 adapter->hw.phy.mdix = AUTO_ALL_MODES; in e1000_set_spd_dplx()
263 return -EINVAL; in e1000_set_spd_dplx()
270 struct e1000_hw *hw = &adapter->hw; in e1000_set_link_ksettings()
275 cmd->link_modes.advertising); in e1000_set_link_ksettings()
280 if (hw->phy.ops.check_reset_block && in e1000_set_link_ksettings()
281 hw->phy.ops.check_reset_block(hw)) { in e1000_set_link_ksettings()
283 return -EINVAL; in e1000_set_link_ksettings()
290 if (cmd->base.eth_tp_mdix_ctrl) { in e1000_set_link_ksettings()
291 if (hw->phy.media_type != e1000_media_type_copper) in e1000_set_link_ksettings()
292 return -EOPNOTSUPP; in e1000_set_link_ksettings()
294 if ((cmd->base.eth_tp_mdix_ctrl != ETH_TP_MDI_AUTO) && in e1000_set_link_ksettings()
295 (cmd->base.autoneg != AUTONEG_ENABLE)) { in e1000_set_link_ksettings()
296 e_err("forcing MDI/MDI-X state is not supported when link speed and/or duplex are forced\n"); in e1000_set_link_ksettings()
297 return -EINVAL; in e1000_set_link_ksettings()
301 while (test_and_set_bit(__E1000_RESETTING, &adapter->state)) in e1000_set_link_ksettings()
304 if (cmd->base.autoneg == AUTONEG_ENABLE) { in e1000_set_link_ksettings()
305 hw->mac.autoneg = 1; in e1000_set_link_ksettings()
306 if (hw->phy.media_type == e1000_media_type_fiber) in e1000_set_link_ksettings()
307 hw->phy.autoneg_advertised = ADVERTISED_1000baseT_Full | in e1000_set_link_ksettings()
310 hw->phy.autoneg_advertised = advertising | in e1000_set_link_ksettings()
312 advertising = hw->phy.autoneg_advertised; in e1000_set_link_ksettings()
313 if (adapter->fc_autoneg) in e1000_set_link_ksettings()
314 hw->fc.requested_mode = e1000_fc_default; in e1000_set_link_ksettings()
316 u32 speed = cmd->base.speed; in e1000_set_link_ksettings()
318 if (e1000_set_spd_dplx(adapter, speed, cmd->base.duplex)) { in e1000_set_link_ksettings()
319 ret_val = -EINVAL; in e1000_set_link_ksettings()
324 /* MDI-X => 2; MDI => 1; Auto => 3 */ in e1000_set_link_ksettings()
325 if (cmd->base.eth_tp_mdix_ctrl) { in e1000_set_link_ksettings()
329 if (cmd->base.eth_tp_mdix_ctrl == ETH_TP_MDI_AUTO) in e1000_set_link_ksettings()
330 hw->phy.mdix = AUTO_ALL_MODES; in e1000_set_link_ksettings()
332 hw->phy.mdix = cmd->base.eth_tp_mdix_ctrl; in e1000_set_link_ksettings()
336 if (netif_running(adapter->netdev)) { in e1000_set_link_ksettings()
344 clear_bit(__E1000_RESETTING, &adapter->state); in e1000_set_link_ksettings()
352 struct e1000_hw *hw = &adapter->hw; in e1000_get_pauseparam()
354 pause->autoneg = in e1000_get_pauseparam()
355 (adapter->fc_autoneg ? AUTONEG_ENABLE : AUTONEG_DISABLE); in e1000_get_pauseparam()
357 if (hw->fc.current_mode == e1000_fc_rx_pause) { in e1000_get_pauseparam()
358 pause->rx_pause = 1; in e1000_get_pauseparam()
359 } else if (hw->fc.current_mode == e1000_fc_tx_pause) { in e1000_get_pauseparam()
360 pause->tx_pause = 1; in e1000_get_pauseparam()
361 } else if (hw->fc.current_mode == e1000_fc_full) { in e1000_get_pauseparam()
362 pause->rx_pause = 1; in e1000_get_pauseparam()
363 pause->tx_pause = 1; in e1000_get_pauseparam()
371 struct e1000_hw *hw = &adapter->hw; in e1000_set_pauseparam()
374 adapter->fc_autoneg = pause->autoneg; in e1000_set_pauseparam()
376 while (test_and_set_bit(__E1000_RESETTING, &adapter->state)) in e1000_set_pauseparam()
379 if (adapter->fc_autoneg == AUTONEG_ENABLE) { in e1000_set_pauseparam()
380 hw->fc.requested_mode = e1000_fc_default; in e1000_set_pauseparam()
381 if (netif_running(adapter->netdev)) { in e1000_set_pauseparam()
388 if (pause->rx_pause && pause->tx_pause) in e1000_set_pauseparam()
389 hw->fc.requested_mode = e1000_fc_full; in e1000_set_pauseparam()
390 else if (pause->rx_pause && !pause->tx_pause) in e1000_set_pauseparam()
391 hw->fc.requested_mode = e1000_fc_rx_pause; in e1000_set_pauseparam()
392 else if (!pause->rx_pause && pause->tx_pause) in e1000_set_pauseparam()
393 hw->fc.requested_mode = e1000_fc_tx_pause; in e1000_set_pauseparam()
394 else if (!pause->rx_pause && !pause->tx_pause) in e1000_set_pauseparam()
395 hw->fc.requested_mode = e1000_fc_none; in e1000_set_pauseparam()
397 hw->fc.current_mode = hw->fc.requested_mode; in e1000_set_pauseparam()
399 if (hw->phy.media_type == e1000_media_type_fiber) { in e1000_set_pauseparam()
400 retval = hw->mac.ops.setup_link(hw); in e1000_set_pauseparam()
411 clear_bit(__E1000_RESETTING, &adapter->state); in e1000_set_pauseparam()
418 return adapter->msg_enable; in e1000_get_msglevel()
424 adapter->msg_enable = data; in e1000_set_msglevel()
437 struct e1000_hw *hw = &adapter->hw; in e1000_get_regs()
443 regs->version = (1u << 24) | in e1000_get_regs()
444 (adapter->pdev->revision << 16) | in e1000_get_regs()
445 adapter->pdev->device; in e1000_get_regs()
462 regs_buff[12] = adapter->hw.phy.type; /* PHY type (IGP=1, M88=0) */ in e1000_get_regs()
467 if (hw->phy.type == e1000_phy_m88) { in e1000_get_regs()
479 regs_buff[22] = adapter->phy_stats.receive_errors; in e1000_get_regs()
491 return adapter->hw.nvm.word_size * 2; in e1000_get_eeprom_len()
498 struct e1000_hw *hw = &adapter->hw; in e1000_get_eeprom()
505 if (eeprom->len == 0) in e1000_get_eeprom()
506 return -EINVAL; in e1000_get_eeprom()
508 eeprom->magic = adapter->pdev->vendor | (adapter->pdev->device << 16); in e1000_get_eeprom()
510 first_word = eeprom->offset >> 1; in e1000_get_eeprom()
511 last_word = (eeprom->offset + eeprom->len - 1) >> 1; in e1000_get_eeprom()
513 eeprom_buff = kmalloc_array(last_word - first_word + 1, sizeof(u16), in e1000_get_eeprom()
516 return -ENOMEM; in e1000_get_eeprom()
518 if (hw->nvm.type == e1000_nvm_eeprom_spi) { in e1000_get_eeprom()
520 last_word - first_word + 1, in e1000_get_eeprom()
523 for (i = 0; i < last_word - first_word + 1; i++) { in e1000_get_eeprom()
534 (last_word - first_word + 1)); in e1000_get_eeprom()
536 /* Device's eeprom is always little-endian, word addressable */ in e1000_get_eeprom()
537 for (i = 0; i < last_word - first_word + 1; i++) in e1000_get_eeprom()
541 memcpy(bytes, (u8 *)eeprom_buff + (eeprom->offset & 1), eeprom->len); in e1000_get_eeprom()
551 struct e1000_hw *hw = &adapter->hw; in e1000_set_eeprom()
560 if (eeprom->len == 0) in e1000_set_eeprom()
561 return -EOPNOTSUPP; in e1000_set_eeprom()
563 if (eeprom->magic != in e1000_set_eeprom()
564 (adapter->pdev->vendor | (adapter->pdev->device << 16))) in e1000_set_eeprom()
565 return -EFAULT; in e1000_set_eeprom()
567 if (adapter->flags & FLAG_READ_ONLY_NVM) in e1000_set_eeprom()
568 return -EINVAL; in e1000_set_eeprom()
570 max_len = hw->nvm.word_size * 2; in e1000_set_eeprom()
572 first_word = eeprom->offset >> 1; in e1000_set_eeprom()
573 last_word = (eeprom->offset + eeprom->len - 1) >> 1; in e1000_set_eeprom()
576 return -ENOMEM; in e1000_set_eeprom()
580 if (eeprom->offset & 1) { in e1000_set_eeprom()
586 if (((eeprom->offset + eeprom->len) & 1) && (!ret_val)) in e1000_set_eeprom()
590 &eeprom_buff[last_word - first_word]); in e1000_set_eeprom()
595 /* Device's eeprom is always little-endian, word addressable */ in e1000_set_eeprom()
596 for (i = 0; i < last_word - first_word + 1; i++) in e1000_set_eeprom()
599 memcpy(ptr, bytes, eeprom->len); in e1000_set_eeprom()
601 for (i = 0; i < last_word - first_word + 1; i++) in e1000_set_eeprom()
605 last_word - first_word + 1, eeprom_buff); in e1000_set_eeprom()
614 (hw->mac.type == e1000_82583) || in e1000_set_eeprom()
615 (hw->mac.type == e1000_82574) || in e1000_set_eeprom()
616 (hw->mac.type == e1000_82573)) in e1000_set_eeprom()
629 strscpy(drvinfo->driver, e1000e_driver_name, sizeof(drvinfo->driver)); in e1000_get_drvinfo()
632 * PCI-E controllers in e1000_get_drvinfo()
634 snprintf(drvinfo->fw_version, sizeof(drvinfo->fw_version), in e1000_get_drvinfo()
635 "%d.%d-%d", in e1000_get_drvinfo()
636 FIELD_GET(0xF000, adapter->eeprom_vers), in e1000_get_drvinfo()
637 FIELD_GET(0x0FF0, adapter->eeprom_vers), in e1000_get_drvinfo()
638 (adapter->eeprom_vers & 0x000F)); in e1000_get_drvinfo()
640 strscpy(drvinfo->bus_info, pci_name(adapter->pdev), in e1000_get_drvinfo()
641 sizeof(drvinfo->bus_info)); in e1000_get_drvinfo()
651 ring->rx_max_pending = E1000_MAX_RXD; in e1000_get_ringparam()
652 ring->tx_max_pending = E1000_MAX_TXD; in e1000_get_ringparam()
653 ring->rx_pending = adapter->rx_ring_count; in e1000_get_ringparam()
654 ring->tx_pending = adapter->tx_ring_count; in e1000_get_ringparam()
668 if ((ring->rx_mini_pending) || (ring->rx_jumbo_pending)) in e1000_set_ringparam()
669 return -EINVAL; in e1000_set_ringparam()
671 new_rx_count = clamp_t(u32, ring->rx_pending, E1000_MIN_RXD, in e1000_set_ringparam()
675 new_tx_count = clamp_t(u32, ring->tx_pending, E1000_MIN_TXD, in e1000_set_ringparam()
679 if ((new_tx_count == adapter->tx_ring_count) && in e1000_set_ringparam()
680 (new_rx_count == adapter->rx_ring_count)) in e1000_set_ringparam()
684 while (test_and_set_bit(__E1000_RESETTING, &adapter->state)) in e1000_set_ringparam()
687 if (!netif_running(adapter->netdev)) { in e1000_set_ringparam()
689 adapter->tx_ring->count = new_tx_count; in e1000_set_ringparam()
690 adapter->rx_ring->count = new_rx_count; in e1000_set_ringparam()
691 adapter->tx_ring_count = new_tx_count; in e1000_set_ringparam()
692 adapter->rx_ring_count = new_rx_count; in e1000_set_ringparam()
696 set_tx = (new_tx_count != adapter->tx_ring_count); in e1000_set_ringparam()
697 set_rx = (new_rx_count != adapter->rx_ring_count); in e1000_set_ringparam()
703 err = -ENOMEM; in e1000_set_ringparam()
710 err = -ENOMEM; in e1000_set_ringparam()
718 * ISRs in MSI-X mode get passed pointers to the Tx and Rx ring in e1000_set_ringparam()
722 memcpy(temp_tx, adapter->tx_ring, size); in e1000_set_ringparam()
723 temp_tx->count = new_tx_count; in e1000_set_ringparam()
729 memcpy(temp_rx, adapter->rx_ring, size); in e1000_set_ringparam()
730 temp_rx->count = new_rx_count; in e1000_set_ringparam()
738 e1000e_free_tx_resources(adapter->tx_ring); in e1000_set_ringparam()
739 memcpy(adapter->tx_ring, temp_tx, size); in e1000_set_ringparam()
740 adapter->tx_ring_count = new_tx_count; in e1000_set_ringparam()
743 e1000e_free_rx_resources(adapter->rx_ring); in e1000_set_ringparam()
744 memcpy(adapter->rx_ring, temp_rx, size); in e1000_set_ringparam()
745 adapter->rx_ring_count = new_rx_count; in e1000_set_ringparam()
757 clear_bit(__E1000_RESETTING, &adapter->state); in e1000_set_ringparam()
769 E1000_WRITE_REG_ARRAY(&adapter->hw, reg, offset, in reg_pattern_test()
771 val = E1000_READ_REG_ARRAY(&adapter->hw, reg, offset); in reg_pattern_test()
788 __ew32(&adapter->hw, reg, write & mask); in reg_set_and_check()
789 val = __er32(&adapter->hw, reg); in reg_set_and_check()
815 struct e1000_hw *hw = &adapter->hw; in e1000_reg_test()
816 struct e1000_mac_info *mac = &adapter->hw.mac; in e1000_reg_test() local
829 switch (mac->type) { in e1000_reg_test()
853 if (!(adapter->flags & FLAG_IS_ICH)) { in e1000_reg_test()
873 before = ((adapter->flags & FLAG_IS_ICH) ? 0x06C3B33E : 0x06DFB3FE); in e1000_reg_test()
879 if (!(adapter->flags & FLAG_IS_ICH)) in e1000_reg_test()
884 switch (mac->type) { in e1000_reg_test()
903 if (mac->type >= e1000_pch_lpt) in e1000_reg_test()
906 for (i = 0; i < mac->rar_entry_count; i++) { in e1000_reg_test()
907 if (mac->type >= e1000_pch_lpt) { in e1000_reg_test()
908 /* Cannot test write-protected SHRAL[n] registers */ in e1000_reg_test()
918 if (mac->type == e1000_pch2lan) { in e1000_reg_test()
925 /* RAR[1-6] owned by management engine - skipping */ in e1000_reg_test()
933 if ((mac->type == e1000_pch2lan) && (i > 6)) in e1000_reg_test()
934 i -= 6; in e1000_reg_test()
937 for (i = 0; i < mac->mta_reg_count; i++) in e1000_reg_test()
954 if ((e1000_read_nvm(&adapter->hw, i, 1, &temp)) < 0) { in e1000_eeprom_test()
972 struct e1000_hw *hw = &adapter->hw; in e1000_test_intr()
974 adapter->test_icr |= er32(ICR); in e1000_test_intr()
981 struct net_device *netdev = adapter->netdev; in e1000_intr_test()
982 struct e1000_hw *hw = &adapter->hw; in e1000_intr_test()
985 u32 irq = adapter->pdev->irq; in e1000_intr_test()
992 /* NOTE: we don't test MSI/MSI-X interrupts here, yet */ in e1000_intr_test()
993 if (adapter->int_mode == E1000E_INT_MODE_MSIX) { in e1000_intr_test()
994 int_mode = adapter->int_mode; in e1000_intr_test()
996 adapter->int_mode = E1000E_INT_MODE_LEGACY; in e1000_intr_test()
1000 if (!request_irq(irq, e1000_test_intr, IRQF_PROBE_SHARED, netdev->name, in e1000_intr_test()
1003 } else if (request_irq(irq, e1000_test_intr, IRQF_SHARED, netdev->name, in e1000_intr_test()
1006 ret_val = -1; in e1000_intr_test()
1021 if (adapter->flags & FLAG_IS_ICH) { in e1000_intr_test()
1026 if (adapter->hw.mac.type == e1000_ich8lan || in e1000_intr_test()
1027 adapter->hw.mac.type == e1000_ich9lan) in e1000_intr_test()
1042 adapter->test_icr = 0; in e1000_intr_test()
1048 if (adapter->test_icr & mask) { in e1000_intr_test()
1060 adapter->test_icr = 0; in e1000_intr_test()
1066 if (!(adapter->test_icr & mask)) { in e1000_intr_test()
1078 adapter->test_icr = 0; in e1000_intr_test()
1084 if (adapter->test_icr) { in e1000_intr_test()
1102 adapter->int_mode = int_mode; in e1000_intr_test()
1111 struct e1000_ring *tx_ring = &adapter->test_tx_ring; in e1000_free_desc_rings()
1112 struct e1000_ring *rx_ring = &adapter->test_rx_ring; in e1000_free_desc_rings()
1113 struct pci_dev *pdev = adapter->pdev; in e1000_free_desc_rings()
1117 if (tx_ring->desc && tx_ring->buffer_info) { in e1000_free_desc_rings()
1118 for (i = 0; i < tx_ring->count; i++) { in e1000_free_desc_rings()
1119 buffer_info = &tx_ring->buffer_info[i]; in e1000_free_desc_rings()
1121 if (buffer_info->dma) in e1000_free_desc_rings()
1122 dma_unmap_single(&pdev->dev, in e1000_free_desc_rings()
1123 buffer_info->dma, in e1000_free_desc_rings()
1124 buffer_info->length, in e1000_free_desc_rings()
1126 dev_kfree_skb(buffer_info->skb); in e1000_free_desc_rings()
1130 if (rx_ring->desc && rx_ring->buffer_info) { in e1000_free_desc_rings()
1131 for (i = 0; i < rx_ring->count; i++) { in e1000_free_desc_rings()
1132 buffer_info = &rx_ring->buffer_info[i]; in e1000_free_desc_rings()
1134 if (buffer_info->dma) in e1000_free_desc_rings()
1135 dma_unmap_single(&pdev->dev, in e1000_free_desc_rings()
1136 buffer_info->dma, in e1000_free_desc_rings()
1138 dev_kfree_skb(buffer_info->skb); in e1000_free_desc_rings()
1142 if (tx_ring->desc) { in e1000_free_desc_rings()
1143 dma_free_coherent(&pdev->dev, tx_ring->size, tx_ring->desc, in e1000_free_desc_rings()
1144 tx_ring->dma); in e1000_free_desc_rings()
1145 tx_ring->desc = NULL; in e1000_free_desc_rings()
1147 if (rx_ring->desc) { in e1000_free_desc_rings()
1148 dma_free_coherent(&pdev->dev, rx_ring->size, rx_ring->desc, in e1000_free_desc_rings()
1149 rx_ring->dma); in e1000_free_desc_rings()
1150 rx_ring->desc = NULL; in e1000_free_desc_rings()
1153 kfree(tx_ring->buffer_info); in e1000_free_desc_rings()
1154 tx_ring->buffer_info = NULL; in e1000_free_desc_rings()
1155 kfree(rx_ring->buffer_info); in e1000_free_desc_rings()
1156 rx_ring->buffer_info = NULL; in e1000_free_desc_rings()
1161 struct e1000_ring *tx_ring = &adapter->test_tx_ring; in e1000_setup_desc_rings()
1162 struct e1000_ring *rx_ring = &adapter->test_rx_ring; in e1000_setup_desc_rings()
1163 struct pci_dev *pdev = adapter->pdev; in e1000_setup_desc_rings()
1164 struct e1000_hw *hw = &adapter->hw; in e1000_setup_desc_rings()
1171 if (!tx_ring->count) in e1000_setup_desc_rings()
1172 tx_ring->count = E1000_DEFAULT_TXD; in e1000_setup_desc_rings()
1174 tx_ring->buffer_info = kcalloc(tx_ring->count, in e1000_setup_desc_rings()
1176 if (!tx_ring->buffer_info) { in e1000_setup_desc_rings()
1181 tx_ring->size = tx_ring->count * sizeof(struct e1000_tx_desc); in e1000_setup_desc_rings()
1182 tx_ring->size = ALIGN(tx_ring->size, 4096); in e1000_setup_desc_rings()
1183 tx_ring->desc = dma_alloc_coherent(&pdev->dev, tx_ring->size, in e1000_setup_desc_rings()
1184 &tx_ring->dma, GFP_KERNEL); in e1000_setup_desc_rings()
1185 if (!tx_ring->desc) { in e1000_setup_desc_rings()
1189 tx_ring->next_to_use = 0; in e1000_setup_desc_rings()
1190 tx_ring->next_to_clean = 0; in e1000_setup_desc_rings()
1192 ew32(TDBAL(0), ((u64)tx_ring->dma & 0x00000000FFFFFFFF)); in e1000_setup_desc_rings()
1193 ew32(TDBAH(0), ((u64)tx_ring->dma >> 32)); in e1000_setup_desc_rings()
1194 ew32(TDLEN(0), tx_ring->count * sizeof(struct e1000_tx_desc)); in e1000_setup_desc_rings()
1201 for (i = 0; i < tx_ring->count; i++) { in e1000_setup_desc_rings()
1212 tx_ring->buffer_info[i].skb = skb; in e1000_setup_desc_rings()
1213 tx_ring->buffer_info[i].length = skb->len; in e1000_setup_desc_rings()
1214 tx_ring->buffer_info[i].dma = in e1000_setup_desc_rings()
1215 dma_map_single(&pdev->dev, skb->data, skb->len, in e1000_setup_desc_rings()
1217 if (dma_mapping_error(&pdev->dev, in e1000_setup_desc_rings()
1218 tx_ring->buffer_info[i].dma)) { in e1000_setup_desc_rings()
1222 tx_desc->buffer_addr = cpu_to_le64(tx_ring->buffer_info[i].dma); in e1000_setup_desc_rings()
1223 tx_desc->lower.data = cpu_to_le32(skb->len); in e1000_setup_desc_rings()
1224 tx_desc->lower.data |= cpu_to_le32(E1000_TXD_CMD_EOP | in e1000_setup_desc_rings()
1227 tx_desc->upper.data = 0; in e1000_setup_desc_rings()
1232 if (!rx_ring->count) in e1000_setup_desc_rings()
1233 rx_ring->count = E1000_DEFAULT_RXD; in e1000_setup_desc_rings()
1235 rx_ring->buffer_info = kcalloc(rx_ring->count, in e1000_setup_desc_rings()
1237 if (!rx_ring->buffer_info) { in e1000_setup_desc_rings()
1242 rx_ring->size = rx_ring->count * sizeof(union e1000_rx_desc_extended); in e1000_setup_desc_rings()
1243 rx_ring->desc = dma_alloc_coherent(&pdev->dev, rx_ring->size, in e1000_setup_desc_rings()
1244 &rx_ring->dma, GFP_KERNEL); in e1000_setup_desc_rings()
1245 if (!rx_ring->desc) { in e1000_setup_desc_rings()
1249 rx_ring->next_to_use = 0; in e1000_setup_desc_rings()
1250 rx_ring->next_to_clean = 0; in e1000_setup_desc_rings()
1253 if (!(adapter->flags2 & FLAG2_NO_DISABLE_RX)) in e1000_setup_desc_rings()
1255 ew32(RDBAL(0), ((u64)rx_ring->dma & 0xFFFFFFFF)); in e1000_setup_desc_rings()
1256 ew32(RDBAH(0), ((u64)rx_ring->dma >> 32)); in e1000_setup_desc_rings()
1257 ew32(RDLEN(0), rx_ring->size); in e1000_setup_desc_rings()
1264 (adapter->hw.mac.mc_filter_type << E1000_RCTL_MO_SHIFT); in e1000_setup_desc_rings()
1267 for (i = 0; i < rx_ring->count; i++) { in e1000_setup_desc_rings()
1277 rx_ring->buffer_info[i].skb = skb; in e1000_setup_desc_rings()
1278 rx_ring->buffer_info[i].dma = in e1000_setup_desc_rings()
1279 dma_map_single(&pdev->dev, skb->data, 2048, in e1000_setup_desc_rings()
1281 if (dma_mapping_error(&pdev->dev, in e1000_setup_desc_rings()
1282 rx_ring->buffer_info[i].dma)) { in e1000_setup_desc_rings()
1287 rx_desc->read.buffer_addr = in e1000_setup_desc_rings()
1288 cpu_to_le64(rx_ring->buffer_info[i].dma); in e1000_setup_desc_rings()
1289 memset(skb->data, 0x00, skb->len); in e1000_setup_desc_rings()
1302 e1e_wphy(&adapter->hw, 29, 0x001F); in e1000_phy_disable_receiver()
1303 e1e_wphy(&adapter->hw, 30, 0x8FFC); in e1000_phy_disable_receiver()
1304 e1e_wphy(&adapter->hw, 29, 0x001A); in e1000_phy_disable_receiver()
1305 e1e_wphy(&adapter->hw, 30, 0x8FF0); in e1000_phy_disable_receiver()
1310 struct e1000_hw *hw = &adapter->hw; in e1000_integrated_phy_loopback()
1315 hw->mac.autoneg = 0; in e1000_integrated_phy_loopback()
1317 if (hw->phy.type == e1000_phy_ife) { in e1000_integrated_phy_loopback()
1321 /* Now set up the MAC to the same speed/duplex as the PHY. */ in e1000_integrated_phy_loopback()
1337 switch (hw->phy.type) { in e1000_integrated_phy_loopback()
1339 /* Auto-MDI/MDIX Off */ in e1000_integrated_phy_loopback()
1341 /* reset to update Auto-MDI/MDIX */ in e1000_integrated_phy_loopback()
1350 /* Set Default MAC Interface speed to 1GB */ in e1000_integrated_phy_loopback()
1356 hw->phy.ops.commit(hw); in e1000_integrated_phy_loopback()
1374 ret_val = hw->phy.ops.acquire(hw); in e1000_integrated_phy_loopback()
1380 hw->phy.ops.release(hw); in e1000_integrated_phy_loopback()
1400 /* Now set up the MAC to the same speed/duplex as the PHY. */ in e1000_integrated_phy_loopback()
1408 if (adapter->flags & FLAG_IS_ICH) in e1000_integrated_phy_loopback()
1411 if (hw->phy.media_type == e1000_media_type_copper && in e1000_integrated_phy_loopback()
1412 hw->phy.type == e1000_phy_m88) { in e1000_integrated_phy_loopback()
1427 if (hw->phy.type == e1000_phy_m88) in e1000_integrated_phy_loopback()
1437 struct e1000_hw *hw = &adapter->hw; in e1000_set_82571_fiber_loopback()
1476 struct e1000_hw *hw = &adapter->hw; in e1000_set_es2lan_mac_loopback()
1483 adapter->tx_fifo_head = ctrlext; in e1000_set_es2lan_mac_loopback()
1485 /* clear the serdes mode bits, putting the device into mac loopback */ in e1000_set_es2lan_mac_loopback()
1495 /* set mac loopback */ in e1000_set_es2lan_mac_loopback()
1511 struct e1000_hw *hw = &adapter->hw; in e1000_setup_loopback_test()
1514 if (hw->mac.type >= e1000_pch_spt) { in e1000_setup_loopback_test()
1525 if (hw->phy.media_type == e1000_media_type_fiber || in e1000_setup_loopback_test()
1526 hw->phy.media_type == e1000_media_type_internal_serdes) { in e1000_setup_loopback_test()
1527 switch (hw->mac.type) { in e1000_setup_loopback_test()
1539 } else if (hw->phy.media_type == e1000_media_type_copper) { in e1000_setup_loopback_test()
1548 struct e1000_hw *hw = &adapter->hw; in e1000_loopback_cleanup()
1556 switch (hw->mac.type) { in e1000_loopback_cleanup()
1575 if (hw->phy.media_type == e1000_media_type_fiber || in e1000_loopback_cleanup()
1576 hw->phy.media_type == e1000_media_type_internal_serdes) { in e1000_loopback_cleanup()
1578 ew32(CTRL_EXT, adapter->tx_fifo_head); in e1000_loopback_cleanup()
1579 adapter->tx_fifo_head = 0; in e1000_loopback_cleanup()
1584 if (hw->phy.media_type == e1000_media_type_fiber || in e1000_loopback_cleanup()
1585 hw->phy.media_type == e1000_media_type_internal_serdes) { in e1000_loopback_cleanup()
1593 hw->mac.autoneg = 1; in e1000_loopback_cleanup()
1594 if (hw->phy.type == e1000_phy_gg82563) in e1000_loopback_cleanup()
1600 if (hw->phy.ops.commit) in e1000_loopback_cleanup()
1601 hw->phy.ops.commit(hw); in e1000_loopback_cleanup()
1610 memset(skb->data, 0xFF, frame_size); in e1000_create_lbtest_frame()
1612 memset(&skb->data[frame_size / 2], 0xAA, frame_size / 2 - 1); in e1000_create_lbtest_frame()
1613 skb->data[frame_size / 2 + 10] = 0xBE; in e1000_create_lbtest_frame()
1614 skb->data[frame_size / 2 + 12] = 0xAF; in e1000_create_lbtest_frame()
1621 if (*(skb->data + 3) == 0xFF) in e1000_check_lbtest_frame()
1622 if ((*(skb->data + frame_size / 2 + 10) == 0xBE) && in e1000_check_lbtest_frame()
1623 (*(skb->data + frame_size / 2 + 12) == 0xAF)) in e1000_check_lbtest_frame()
1630 struct e1000_ring *tx_ring = &adapter->test_tx_ring; in e1000_run_loopback_test()
1631 struct e1000_ring *rx_ring = &adapter->test_rx_ring; in e1000_run_loopback_test()
1632 struct pci_dev *pdev = adapter->pdev; in e1000_run_loopback_test()
1633 struct e1000_hw *hw = &adapter->hw; in e1000_run_loopback_test()
1641 ew32(RDT(0), rx_ring->count - 1); in e1000_run_loopback_test()
1648 if (rx_ring->count <= tx_ring->count) in e1000_run_loopback_test()
1649 lc = ((tx_ring->count / 64) * 2) + 1; in e1000_run_loopback_test()
1651 lc = ((rx_ring->count / 64) * 2) + 1; in e1000_run_loopback_test()
1659 buffer_info = &tx_ring->buffer_info[k]; in e1000_run_loopback_test()
1661 e1000_create_lbtest_frame(buffer_info->skb, 1024); in e1000_run_loopback_test()
1662 dma_sync_single_for_device(&pdev->dev, in e1000_run_loopback_test()
1663 buffer_info->dma, in e1000_run_loopback_test()
1664 buffer_info->length, in e1000_run_loopback_test()
1667 if (k == tx_ring->count) in e1000_run_loopback_test()
1677 buffer_info = &rx_ring->buffer_info[l]; in e1000_run_loopback_test()
1679 dma_sync_single_for_cpu(&pdev->dev, in e1000_run_loopback_test()
1680 buffer_info->dma, 2048, in e1000_run_loopback_test()
1683 ret_val = e1000_check_lbtest_frame(buffer_info->skb, in e1000_run_loopback_test()
1688 if (l == rx_ring->count) in e1000_run_loopback_test()
1696 ret_val = 13; /* ret_val is the same as mis-compare */ in e1000_run_loopback_test()
1709 struct e1000_hw *hw = &adapter->hw; in e1000_loopback_test()
1712 if (hw->phy.ops.check_reset_block && in e1000_loopback_test()
1713 hw->phy.ops.check_reset_block(hw)) { in e1000_loopback_test()
1738 struct e1000_hw *hw = &adapter->hw; in e1000_link_test()
1741 if (hw->phy.media_type == e1000_media_type_internal_serdes) { in e1000_link_test()
1744 hw->mac.serdes_has_link = false; in e1000_link_test()
1747 * could take as long as 2-3 minutes in e1000_link_test()
1750 hw->mac.ops.check_for_link(hw); in e1000_link_test()
1751 if (hw->mac.serdes_has_link) in e1000_link_test()
1758 hw->mac.ops.check_for_link(hw); in e1000_link_test()
1759 if (hw->mac.autoneg) in e1000_link_test()
1782 return -EOPNOTSUPP; in e1000e_get_sset_count()
1795 set_bit(__E1000_TESTING, &adapter->state); in e1000_diag_test()
1799 if (adapter->flags & FLAG_HAS_AMT) in e1000_diag_test()
1804 adapter->hw.phy.autoneg_wait_to_complete = 1; in e1000_diag_test()
1806 adapter->hw.phy.autoneg_wait_to_complete = 0; in e1000_diag_test()
1809 if (eth_test->flags == ETH_TEST_FL_OFFLINE) { in e1000_diag_test()
1813 autoneg_advertised = adapter->hw.phy.autoneg_advertised; in e1000_diag_test()
1814 forced_speed_duplex = adapter->hw.mac.forced_speed_duplex; in e1000_diag_test()
1815 autoneg = adapter->hw.mac.autoneg; in e1000_diag_test()
1824 eth_test->flags |= ETH_TEST_FL_FAILED; in e1000_diag_test()
1828 eth_test->flags |= ETH_TEST_FL_FAILED; in e1000_diag_test()
1832 eth_test->flags |= ETH_TEST_FL_FAILED; in e1000_diag_test()
1836 eth_test->flags |= ETH_TEST_FL_FAILED; in e1000_diag_test()
1839 adapter->hw.phy.autoneg_wait_to_complete = 1; in e1000_diag_test()
1841 adapter->hw.phy.autoneg_wait_to_complete = 0; in e1000_diag_test()
1844 eth_test->flags |= ETH_TEST_FL_FAILED; in e1000_diag_test()
1847 adapter->hw.phy.autoneg_advertised = autoneg_advertised; in e1000_diag_test()
1848 adapter->hw.mac.forced_speed_duplex = forced_speed_duplex; in e1000_diag_test()
1849 adapter->hw.mac.autoneg = autoneg; in e1000_diag_test()
1852 clear_bit(__E1000_TESTING, &adapter->state); in e1000_diag_test()
1867 eth_test->flags |= ETH_TEST_FL_FAILED; in e1000_diag_test()
1869 clear_bit(__E1000_TESTING, &adapter->state); in e1000_diag_test()
1875 if (adapter->flags & FLAG_HAS_AMT) in e1000_diag_test()
1887 wol->supported = 0; in e1000_get_wol()
1888 wol->wolopts = 0; in e1000_get_wol()
1890 if (!(adapter->flags & FLAG_HAS_WOL) || in e1000_get_wol()
1891 !device_can_wakeup(&adapter->pdev->dev)) in e1000_get_wol()
1894 wol->supported = WAKE_UCAST | WAKE_MCAST | in e1000_get_wol()
1898 if (adapter->flags & FLAG_NO_WAKE_UCAST) { in e1000_get_wol()
1899 wol->supported &= ~WAKE_UCAST; in e1000_get_wol()
1901 if (adapter->wol & E1000_WUFC_EX) in e1000_get_wol()
1902 e_err("Interface does not support directed (unicast) frame wake-up packets\n"); in e1000_get_wol()
1905 if (adapter->wol & E1000_WUFC_EX) in e1000_get_wol()
1906 wol->wolopts |= WAKE_UCAST; in e1000_get_wol()
1907 if (adapter->wol & E1000_WUFC_MC) in e1000_get_wol()
1908 wol->wolopts |= WAKE_MCAST; in e1000_get_wol()
1909 if (adapter->wol & E1000_WUFC_BC) in e1000_get_wol()
1910 wol->wolopts |= WAKE_BCAST; in e1000_get_wol()
1911 if (adapter->wol & E1000_WUFC_MAG) in e1000_get_wol()
1912 wol->wolopts |= WAKE_MAGIC; in e1000_get_wol()
1913 if (adapter->wol & E1000_WUFC_LNKC) in e1000_get_wol()
1914 wol->wolopts |= WAKE_PHY; in e1000_get_wol()
1921 if (!(adapter->flags & FLAG_HAS_WOL) || in e1000_set_wol()
1922 !device_can_wakeup(&adapter->pdev->dev) || in e1000_set_wol()
1923 (wol->wolopts & ~(WAKE_UCAST | WAKE_MCAST | WAKE_BCAST | in e1000_set_wol()
1925 return -EOPNOTSUPP; in e1000_set_wol()
1928 adapter->wol = 0; in e1000_set_wol()
1930 if (wol->wolopts & WAKE_UCAST) in e1000_set_wol()
1931 adapter->wol |= E1000_WUFC_EX; in e1000_set_wol()
1932 if (wol->wolopts & WAKE_MCAST) in e1000_set_wol()
1933 adapter->wol |= E1000_WUFC_MC; in e1000_set_wol()
1934 if (wol->wolopts & WAKE_BCAST) in e1000_set_wol()
1935 adapter->wol |= E1000_WUFC_BC; in e1000_set_wol()
1936 if (wol->wolopts & WAKE_MAGIC) in e1000_set_wol()
1937 adapter->wol |= E1000_WUFC_MAG; in e1000_set_wol()
1938 if (wol->wolopts & WAKE_PHY) in e1000_set_wol()
1939 adapter->wol |= E1000_WUFC_LNKC; in e1000_set_wol()
1941 device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol); in e1000_set_wol()
1950 struct e1000_hw *hw = &adapter->hw; in e1000_set_phys_id()
1954 pm_runtime_get_sync(netdev->dev.parent); in e1000_set_phys_id()
1956 if (!hw->mac.ops.blink_led) in e1000_set_phys_id()
1959 hw->mac.ops.blink_led(hw); in e1000_set_phys_id()
1963 if (hw->phy.type == e1000_phy_ife) in e1000_set_phys_id()
1965 hw->mac.ops.led_off(hw); in e1000_set_phys_id()
1966 hw->mac.ops.cleanup_led(hw); in e1000_set_phys_id()
1967 pm_runtime_put_sync(netdev->dev.parent); in e1000_set_phys_id()
1971 hw->mac.ops.led_on(hw); in e1000_set_phys_id()
1975 hw->mac.ops.led_off(hw); in e1000_set_phys_id()
1989 if (adapter->itr_setting <= 4) in e1000_get_coalesce()
1990 ec->rx_coalesce_usecs = adapter->itr_setting; in e1000_get_coalesce()
1992 ec->rx_coalesce_usecs = 1000000 / adapter->itr_setting; in e1000_get_coalesce()
2004 if ((ec->rx_coalesce_usecs > E1000_MAX_ITR_USECS) || in e1000_set_coalesce()
2005 ((ec->rx_coalesce_usecs > 4) && in e1000_set_coalesce()
2006 (ec->rx_coalesce_usecs < E1000_MIN_ITR_USECS)) || in e1000_set_coalesce()
2007 (ec->rx_coalesce_usecs == 2)) in e1000_set_coalesce()
2008 return -EINVAL; in e1000_set_coalesce()
2010 if (ec->rx_coalesce_usecs == 4) { in e1000_set_coalesce()
2011 adapter->itr_setting = 4; in e1000_set_coalesce()
2012 adapter->itr = adapter->itr_setting; in e1000_set_coalesce()
2013 } else if (ec->rx_coalesce_usecs <= 3) { in e1000_set_coalesce()
2014 adapter->itr = 20000; in e1000_set_coalesce()
2015 adapter->itr_setting = ec->rx_coalesce_usecs; in e1000_set_coalesce()
2017 adapter->itr = (1000000 / ec->rx_coalesce_usecs); in e1000_set_coalesce()
2018 adapter->itr_setting = adapter->itr & ~3; in e1000_set_coalesce()
2021 if (adapter->itr_setting != 0) in e1000_set_coalesce()
2022 e1000e_write_itr(adapter, adapter->itr); in e1000_set_coalesce()
2034 return -EAGAIN; in e1000_nway_reset()
2036 if (!adapter->hw.mac.autoneg) in e1000_nway_reset()
2037 return -EINVAL; in e1000_nway_reset()
2103 info->data = 0; in e1000_get_rxnfc()
2105 switch (info->cmd) { in e1000_get_rxnfc()
2108 struct e1000_hw *hw = &adapter->hw; in e1000_get_rxnfc()
2116 switch (info->flow_type) { in e1000_get_rxnfc()
2119 info->data |= RXH_L4_B_0_1 | RXH_L4_B_2_3; in e1000_get_rxnfc()
2126 info->data |= RXH_IP_SRC | RXH_IP_DST; in e1000_get_rxnfc()
2130 info->data |= RXH_L4_B_0_1 | RXH_L4_B_2_3; in e1000_get_rxnfc()
2137 info->data |= RXH_IP_SRC | RXH_IP_DST; in e1000_get_rxnfc()
2145 return -EOPNOTSUPP; in e1000_get_rxnfc()
2152 struct e1000_hw *hw = &adapter->hw; in e1000e_get_eee()
2156 if (!(adapter->flags2 & FLAG2_HAS_EEE)) in e1000e_get_eee()
2157 return -EOPNOTSUPP; in e1000e_get_eee()
2159 switch (hw->phy.type) { in e1000e_get_eee()
2171 return -EOPNOTSUPP; in e1000e_get_eee()
2174 ret_val = hw->phy.ops.acquire(hw); in e1000e_get_eee()
2176 return -EBUSY; in e1000e_get_eee()
2182 mii_eee_cap1_mod_linkmode_t(edata->supported, phy_data); in e1000e_get_eee()
2185 mii_eee_cap1_mod_linkmode_t(edata->advertised, adapter->eee_advert); in e1000e_get_eee()
2191 mii_eee_cap1_mod_linkmode_t(edata->lp_advertised, phy_data); in e1000e_get_eee()
2197 if (hw->phy.type == e1000_phy_82579) in e1000e_get_eee()
2200 /* Result of the EEE auto negotiation - there is no register that in e1000e_get_eee()
2201 * has the status of the EEE negotiation so do a best-guess based in e1000e_get_eee()
2205 edata->eee_active = true; in e1000e_get_eee()
2207 edata->eee_enabled = !hw->dev_spec.ich8lan.eee_disable; in e1000e_get_eee()
2208 edata->tx_lpi_enabled = true; in e1000e_get_eee()
2209 edata->tx_lpi_timer = er32(LPIC) >> E1000_LPIC_LPIET_SHIFT; in e1000e_get_eee()
2212 hw->phy.ops.release(hw); in e1000e_get_eee()
2214 ret_val = -ENODATA; in e1000e_get_eee()
2224 struct e1000_hw *hw = &adapter->hw; in e1000e_set_eee()
2232 if (eee_curr.tx_lpi_enabled != edata->tx_lpi_enabled) { in e1000e_set_eee()
2233 e_err("Setting EEE tx-lpi is not supported\n"); in e1000e_set_eee()
2234 return -EINVAL; in e1000e_set_eee()
2237 if (eee_curr.tx_lpi_timer != edata->tx_lpi_timer) { in e1000e_set_eee()
2239 return -EINVAL; in e1000e_set_eee()
2247 if (linkmode_andnot(tmp, edata->advertised, supported)) { in e1000e_set_eee()
2248 e_err("EEE advertisement supports only 100TX and/or 1000T full-duplex\n"); in e1000e_set_eee()
2249 return -EINVAL; in e1000e_set_eee()
2252 adapter->eee_advert = linkmode_to_mii_eee_cap1_t(edata->advertised); in e1000e_set_eee()
2254 hw->dev_spec.ich8lan.eee_disable = !edata->eee_enabled; in e1000e_set_eee()
2272 if (!(adapter->flags & FLAG_HAS_HW_TIMESTAMP)) in e1000e_get_ts_info()
2275 info->so_timestamping |= (SOF_TIMESTAMPING_TX_HARDWARE | in e1000e_get_ts_info()
2279 info->tx_types = BIT(HWTSTAMP_TX_OFF) | BIT(HWTSTAMP_TX_ON); in e1000e_get_ts_info()
2281 info->rx_filters = (BIT(HWTSTAMP_FILTER_NONE) | in e1000e_get_ts_info()
2293 if (adapter->ptp_clock) in e1000e_get_ts_info()
2294 info->phc_index = ptp_clock_index(adapter->ptp_clock); in e1000e_get_ts_info()
2304 if (adapter->flags2 & FLAG2_ENABLE_S0IX_FLOWS) in e1000e_get_priv_flags()
2313 unsigned int flags2 = adapter->flags2; in e1000e_set_priv_flags()
2317 struct e1000_hw *hw = &adapter->hw; in e1000e_set_priv_flags()
2319 if (hw->mac.type < e1000_pch_cnp) in e1000e_set_priv_flags()
2320 return -EINVAL; in e1000e_set_priv_flags()
2324 if (flags2 != adapter->flags2) in e1000e_set_priv_flags()
2325 adapter->flags2 = flags2; in e1000e_set_priv_flags()
2367 netdev->ethtool_ops = &e1000_ethtool_ops; in e1000e_set_ethtool_ops()