FreeBSD kernel E1000 device code
e1000_82541.c
Go to the documentation of this file.
1/******************************************************************************
2 SPDX-License-Identifier: BSD-3-Clause
3
4 Copyright (c) 2001-2020, Intel Corporation
5 All rights reserved.
6
7 Redistribution and use in source and binary forms, with or without
8 modification, are permitted provided that the following conditions are met:
9
10 1. Redistributions of source code must retain the above copyright notice,
11 this list of conditions and the following disclaimer.
12
13 2. Redistributions in binary form must reproduce the above copyright
14 notice, this list of conditions and the following disclaimer in the
15 documentation and/or other materials provided with the distribution.
16
17 3. Neither the name of the Intel Corporation nor the names of its
18 contributors may be used to endorse or promote products derived from
19 this software without specific prior written permission.
20
21 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
25 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31 POSSIBILITY OF SUCH DAMAGE.
32
33******************************************************************************/
34/*$FreeBSD$*/
35
36/*
37 * 82541EI Gigabit Ethernet Controller
38 * 82541ER Gigabit Ethernet Controller
39 * 82541GI Gigabit Ethernet Controller
40 * 82541PI Gigabit Ethernet Controller
41 * 82547EI Gigabit Ethernet Controller
42 * 82547GI Gigabit Ethernet Controller
43 */
44
45#include "e1000_api.h"
46
50static s32 e1000_reset_hw_82541(struct e1000_hw *hw);
51static s32 e1000_init_hw_82541(struct e1000_hw *hw);
52static s32 e1000_get_link_up_info_82541(struct e1000_hw *hw, u16 *speed,
53 u16 *duplex);
54static s32 e1000_phy_hw_reset_82541(struct e1000_hw *hw);
56static s32 e1000_check_for_link_82541(struct e1000_hw *hw);
59 bool active);
60static s32 e1000_setup_led_82541(struct e1000_hw *hw);
61static s32 e1000_cleanup_led_82541(struct e1000_hw *hw);
62static void e1000_clear_hw_cntrs_82541(struct e1000_hw *hw);
63static s32 e1000_read_mac_addr_82541(struct e1000_hw *hw);
65 bool link_up);
67static void e1000_power_down_phy_copper_82541(struct e1000_hw *hw);
68
70 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 10, 10, 10,
71 10, 10, 20, 20, 20, 20, 20, 25, 25, 25, 25, 25, 25, 25, 30, 30, 30, 30,
72 40, 40, 40, 40, 40, 40, 40, 40, 40, 50, 50, 50, 50, 50, 50, 50, 60, 60,
73 60, 60, 60, 60, 60, 60, 60, 70, 70, 70, 70, 70, 70, 80, 80, 80, 80, 80,
74 80, 90, 90, 90, 90, 90, 90, 90, 90, 90, 100, 100, 100, 100, 100, 100,
75 100, 100, 100, 100, 100, 100, 100, 100, 110, 110, 110, 110, 110, 110,
76 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 120, 120,
77 120, 120, 120, 120, 120, 120, 120, 120};
78#define IGP01E1000_AGC_LENGTH_TABLE_SIZE \
79 (sizeof(e1000_igp_cable_length_table) / \
80 sizeof(e1000_igp_cable_length_table[0]))
81
87{
88 struct e1000_phy_info *phy = &hw->phy;
89 s32 ret_val;
90
91 DEBUGFUNC("e1000_init_phy_params_82541");
92
93 phy->addr = 1;
95 phy->reset_delay_us = 10000;
96 phy->type = e1000_phy_igp;
97
98 /* Function Pointers */
110
111 ret_val = e1000_get_phy_id(hw);
112 if (ret_val)
113 goto out;
114
115 /* Verify phy id */
116 if (phy->id != IGP01E1000_I_PHY_ID) {
117 ret_val = -E1000_ERR_PHY;
118 goto out;
119 }
120
121out:
122 return ret_val;
123}
124
130{
131 struct e1000_nvm_info *nvm = &hw->nvm;
132 s32 ret_val = E1000_SUCCESS;
133 u32 eecd = E1000_READ_REG(hw, E1000_EECD);
134 u16 size;
135
136 DEBUGFUNC("e1000_init_nvm_params_82541");
137
138 switch (nvm->override) {
141 eecd |= E1000_EECD_ADDR_BITS;
142 break;
145 eecd &= ~E1000_EECD_ADDR_BITS;
146 break;
149 eecd |= E1000_EECD_SIZE;
150 break;
153 eecd &= ~E1000_EECD_SIZE;
154 break;
155 default:
158 break;
159 }
160
161 if (nvm->type == e1000_nvm_eeprom_spi) {
162 nvm->address_bits = (eecd & E1000_EECD_ADDR_BITS) ? 16 : 8;
163 nvm->delay_usec = 1;
164 nvm->opcode_bits = 8;
165 nvm->page_size = (eecd & E1000_EECD_ADDR_BITS) ? 32 : 8;
166
167 /* Function Pointers */
175
176 /*
177 * nvm->word_size must be discovered after the pointers
178 * are set so we can verify the size from the nvm image
179 * itself. Temporarily set it to a dummy value so the
180 * read will work.
181 */
182 nvm->word_size = 64;
183 ret_val = nvm->ops.read(hw, NVM_CFG, 1, &size);
184 if (ret_val)
185 goto out;
186 size = (size & NVM_SIZE_MASK) >> NVM_SIZE_SHIFT;
187 /*
188 * if size != 0, it can be added to a constant and become
189 * the left-shift value to set the word_size. Otherwise,
190 * word_size stays at 64.
191 */
192 if (size) {
194 nvm->word_size = 1 << size;
195 }
196 } else {
197 nvm->address_bits = (eecd & E1000_EECD_ADDR_BITS) ? 8 : 6;
198 nvm->delay_usec = 50;
199 nvm->opcode_bits = 3;
200 nvm->word_size = (eecd & E1000_EECD_ADDR_BITS) ? 256 : 64;
201
202 /* Function Pointers */
210 }
211
212out:
213 return ret_val;
214}
215
221{
222 struct e1000_mac_info *mac = &hw->mac;
223
224 DEBUGFUNC("e1000_init_mac_params_82541");
225
226 /* Set media type */
228 /* Set mta register count */
229 mac->mta_reg_count = 128;
230 /* Set rar entry count */
232 /* Set if part includes ASF firmware */
233 mac->asf_firmware_present = true;
234
235 /* Function Pointers */
236
237 /* bus type/speed/width */
239 /* function id */
241 /* reset */
243 /* hw initialization */
245 /* link setup */
247 /* physical interface link setup */
249 /* check for link */
251 /* link info */
253 /* multicast address update */
255 /* writing VFTA */
257 /* clearing VFTA */
259 /* read mac address */
261 /* ID LED init */
263 /* setup LED */
265 /* cleanup LED */
267 /* turn on/off LED */
270 /* clear hardware counters */
272
273 return E1000_SUCCESS;
274}
275
283{
284 DEBUGFUNC("e1000_init_function_pointers_82541");
285
289}
290
298{
299 u32 ledctl, ctrl, manc;
300
301 DEBUGFUNC("e1000_reset_hw_82541");
302
303 DEBUGOUT("Masking off all interrupts\n");
304 E1000_WRITE_REG(hw, E1000_IMC, 0xFFFFFFFF);
305
309
310 /*
311 * Delay to allow any outstanding PCI transactions to complete
312 * before resetting the device.
313 */
314 msec_delay(10);
315
316 ctrl = E1000_READ_REG(hw, E1000_CTRL);
317
318 /* Must reset the Phy before resetting the MAC */
319 if ((hw->mac.type == e1000_82541) || (hw->mac.type == e1000_82547)) {
322 msec_delay(5);
323 }
324
325 DEBUGOUT("Issuing a global reset to 82541/82547 MAC\n");
326 switch (hw->mac.type) {
327 case e1000_82541:
329 /*
330 * These controllers can't ack the 64-bit write when
331 * issuing the reset, so we use IO-mapping as a
332 * workaround to issue the reset.
333 */
335 break;
336 default:
338 break;
339 }
340
341 /* Wait for NVM reload */
342 msec_delay(20);
343
344 /* Disable HW ARPs on ASF enabled adapters */
345 manc = E1000_READ_REG(hw, E1000_MANC);
346 manc &= ~E1000_MANC_ARP_EN;
347 E1000_WRITE_REG(hw, E1000_MANC, manc);
348
349 if ((hw->mac.type == e1000_82541) || (hw->mac.type == e1000_82547)) {
351
352 /* Configure activity LED after Phy reset */
353 ledctl = E1000_READ_REG(hw, E1000_LEDCTL);
354 ledctl &= IGP_ACTIVITY_LED_MASK;
356 E1000_WRITE_REG(hw, E1000_LEDCTL, ledctl);
357 }
358
359 /* Once again, mask the interrupts */
360 DEBUGOUT("Masking off all interrupts\n");
361 E1000_WRITE_REG(hw, E1000_IMC, 0xFFFFFFFF);
362
363 /* Clear any pending interrupt events. */
365
366 return E1000_SUCCESS;
367}
368
376{
377 struct e1000_mac_info *mac = &hw->mac;
378 struct e1000_dev_spec_82541 *dev_spec = &hw->dev_spec._82541;
379 u32 i, txdctl;
380 s32 ret_val;
381
382 DEBUGFUNC("e1000_init_hw_82541");
383
384 /* Initialize identification LED */
385 ret_val = mac->ops.id_led_init(hw);
386 if (ret_val) {
387 DEBUGOUT("Error initializing identification LED\n");
388 /* This is not fatal and we should not stop init due to this */
389 }
390
391 /* Storing the Speed Power Down value for later use */
392 ret_val = hw->phy.ops.read_reg(hw, IGP01E1000_GMII_FIFO,
393 &dev_spec->spd_default);
394 if (ret_val)
395 goto out;
396
397 /* Disabling VLAN filtering */
398 DEBUGOUT("Initializing the IEEE VLAN\n");
399 mac->ops.clear_vfta(hw);
400
401 /* Setup the receive address. */
403
404 /* Zero out the Multicast HASH table */
405 DEBUGOUT("Zeroing the MTA\n");
406 for (i = 0; i < mac->mta_reg_count; i++) {
408 /*
409 * Avoid back to back register writes by adding the register
410 * read (flush). This is to protect against some strange
411 * bridge configurations that may issue Memory Write Block
412 * (MWB) to our register space.
413 */
415 }
416
417 /* Setup link and flow control */
418 ret_val = mac->ops.setup_link(hw);
419
420 txdctl = E1000_READ_REG(hw, E1000_TXDCTL(0));
421 txdctl = (txdctl & ~E1000_TXDCTL_WTHRESH) |
423 E1000_WRITE_REG(hw, E1000_TXDCTL(0), txdctl);
424
425 /*
426 * Clear all of the statistics registers (clear on read). It is
427 * important that we do this after we have tried to establish link
428 * because the symbol error count will increment wildly if there
429 * is no link.
430 */
432
433out:
434 return ret_val;
435}
436
446 u16 *duplex)
447{
448 struct e1000_phy_info *phy = &hw->phy;
449 s32 ret_val;
450 u16 data;
451
452 DEBUGFUNC("e1000_get_link_up_info_82541");
453
454 ret_val = e1000_get_speed_and_duplex_copper_generic(hw, speed, duplex);
455 if (ret_val)
456 goto out;
457
458 if (!phy->speed_downgraded)
459 goto out;
460
461 /*
462 * IGP01 PHY may advertise full duplex operation after speed
463 * downgrade even if it is operating at half duplex.
464 * Here we set the duplex settings to match the duplex in the
465 * link partner's capabilities.
466 */
467 ret_val = phy->ops.read_reg(hw, PHY_AUTONEG_EXP, &data);
468 if (ret_val)
469 goto out;
470
471 if (!(data & NWAY_ER_LP_NWAY_CAPS)) {
472 *duplex = HALF_DUPLEX;
473 } else {
474 ret_val = phy->ops.read_reg(hw, PHY_LP_ABILITY, &data);
475 if (ret_val)
476 goto out;
477
478 if (*speed == SPEED_100) {
479 if (!(data & NWAY_LPAR_100TX_FD_CAPS))
480 *duplex = HALF_DUPLEX;
481 } else if (*speed == SPEED_10) {
482 if (!(data & NWAY_LPAR_10T_FD_CAPS))
483 *duplex = HALF_DUPLEX;
484 }
485 }
486
487out:
488 return ret_val;
489}
490
501{
502 s32 ret_val;
503 u32 ledctl;
504
505 DEBUGFUNC("e1000_phy_hw_reset_82541");
506
507 ret_val = e1000_phy_hw_reset_generic(hw);
508 if (ret_val)
509 goto out;
510
512
513 if ((hw->mac.type == e1000_82541) || (hw->mac.type == e1000_82547)) {
514 /* Configure activity LED after PHY reset */
515 ledctl = E1000_READ_REG(hw, E1000_LEDCTL);
516 ledctl &= IGP_ACTIVITY_LED_MASK;
518 E1000_WRITE_REG(hw, E1000_LEDCTL, ledctl);
519 }
520
521out:
522 return ret_val;
523}
524
535{
536 struct e1000_phy_info *phy = &hw->phy;
537 struct e1000_dev_spec_82541 *dev_spec = &hw->dev_spec._82541;
538 s32 ret_val;
539 u32 ctrl, ledctl;
540
541 DEBUGFUNC("e1000_setup_copper_link_82541");
542
543 ctrl = E1000_READ_REG(hw, E1000_CTRL);
544 ctrl |= E1000_CTRL_SLU;
546 E1000_WRITE_REG(hw, E1000_CTRL, ctrl);
547
548
549 /* Earlier revs of the IGP phy require us to force MDI. */
550 if (hw->mac.type == e1000_82541 || hw->mac.type == e1000_82547) {
552 phy->mdix = 1;
553 } else {
555 }
556
557 ret_val = e1000_copper_link_setup_igp(hw);
558 if (ret_val)
559 goto out;
560
561 if (hw->mac.autoneg) {
562 if (dev_spec->ffe_config == e1000_ffe_config_active)
564 }
565
566 /* Configure activity LED after Phy reset */
567 ledctl = E1000_READ_REG(hw, E1000_LEDCTL);
568 ledctl &= IGP_ACTIVITY_LED_MASK;
570 E1000_WRITE_REG(hw, E1000_LEDCTL, ledctl);
571
573
574out:
575 return ret_val;
576}
577
586{
587 struct e1000_mac_info *mac = &hw->mac;
588 s32 ret_val;
589 bool link;
590
591 DEBUGFUNC("e1000_check_for_link_82541");
592
593 /*
594 * We only want to go out to the PHY registers to see if Auto-Neg
595 * has completed and/or if our link status has changed. The
596 * get_link_status flag is set upon receiving a Link Status
597 * Change or Rx Sequence Error interrupt.
598 */
599 if (!mac->get_link_status) {
600 ret_val = E1000_SUCCESS;
601 goto out;
602 }
603
604 /*
605 * First we want to see if the MII Status Register reports
606 * link. If so, then we want to get the current speed/duplex
607 * of the PHY.
608 */
609 ret_val = e1000_phy_has_link_generic(hw, 1, 0, &link);
610 if (ret_val)
611 goto out;
612
613 if (!link) {
614 ret_val = e1000_config_dsp_after_link_change_82541(hw, false);
615 goto out; /* No link detected */
616 }
617
618 mac->get_link_status = false;
619
620 /*
621 * Check if there was DownShift, must be checked
622 * immediately after link-up
623 */
625
626 /*
627 * If we are forcing speed/duplex, then we simply return since
628 * we have already determined whether we have link or not.
629 */
630 if (!mac->autoneg) {
631 ret_val = -E1000_ERR_CONFIG;
632 goto out;
633 }
634
636
637 /*
638 * Auto-Neg is enabled. Auto Speed Detection takes care
639 * of MAC speed/duplex configuration. So we only need to
640 * configure Collision Distance in the MAC.
641 */
642 mac->ops.config_collision_dist(hw);
643
644 /*
645 * Configure Flow Control now that Auto-Neg has completed.
646 * First, we need to restore the desired flow control
647 * settings because we may have had to re-autoneg with a
648 * different link partner.
649 */
651 if (ret_val)
652 DEBUGOUT("Error configuring flow control\n");
653
654out:
655 return ret_val;
656}
657
670 bool link_up)
671{
672 struct e1000_phy_info *phy = &hw->phy;
673 struct e1000_dev_spec_82541 *dev_spec = &hw->dev_spec._82541;
674 s32 ret_val;
675 u32 idle_errs = 0;
676 u16 phy_data, phy_saved_data, speed, duplex, i;
677 u16 ffe_idle_err_timeout = FFE_IDLE_ERR_COUNT_TIMEOUT_20;
678 u16 dsp_reg_array[IGP01E1000_PHY_CHANNEL_NUM] = {
683
684 DEBUGFUNC("e1000_config_dsp_after_link_change_82541");
685
686 if (link_up) {
687 ret_val = hw->mac.ops.get_link_up_info(hw, &speed, &duplex);
688 if (ret_val) {
689 DEBUGOUT("Error getting link speed and duplex\n");
690 goto out;
691 }
692
693 if (speed != SPEED_1000) {
694 ret_val = E1000_SUCCESS;
695 goto out;
696 }
697
698 ret_val = phy->ops.get_cable_length(hw);
699 if (ret_val)
700 goto out;
701
702 if ((dev_spec->dsp_config == e1000_dsp_config_enabled) &&
703 phy->min_cable_length >= 50) {
704
705 for (i = 0; i < IGP01E1000_PHY_CHANNEL_NUM; i++) {
706 ret_val = phy->ops.read_reg(hw,
707 dsp_reg_array[i],
708 &phy_data);
709 if (ret_val)
710 goto out;
711
712 phy_data &= ~IGP01E1000_PHY_EDAC_MU_INDEX;
713
714 ret_val = phy->ops.write_reg(hw,
715 dsp_reg_array[i],
716 phy_data);
717 if (ret_val)
718 goto out;
719 }
721 }
722
723 if ((dev_spec->ffe_config != e1000_ffe_config_enabled) ||
724 (phy->min_cable_length >= 50)) {
725 ret_val = E1000_SUCCESS;
726 goto out;
727 }
728
729 /* clear previous idle error counts */
730 ret_val = phy->ops.read_reg(hw, PHY_1000T_STATUS, &phy_data);
731 if (ret_val)
732 goto out;
733
734 for (i = 0; i < ffe_idle_err_timeout; i++) {
735 usec_delay(1000);
736 ret_val = phy->ops.read_reg(hw, PHY_1000T_STATUS,
737 &phy_data);
738 if (ret_val)
739 goto out;
740
741 idle_errs += (phy_data & SR_1000T_IDLE_ERROR_CNT);
744
745 ret_val = phy->ops.write_reg(hw,
748 if (ret_val)
749 goto out;
750 break;
751 }
752
753 if (idle_errs)
754 ffe_idle_err_timeout =
756 }
757 } else {
758 if (dev_spec->dsp_config == e1000_dsp_config_activated) {
759 /*
760 * Save off the current value of register 0x2F5B
761 * to be restored at the end of the routines.
762 */
763 ret_val = phy->ops.read_reg(hw, 0x2F5B,
764 &phy_saved_data);
765 if (ret_val)
766 goto out;
767
768 /* Disable the PHY transmitter */
769 ret_val = phy->ops.write_reg(hw, 0x2F5B, 0x0003);
770 if (ret_val)
771 goto out;
772
773 msec_delay_irq(20);
774
775 ret_val = phy->ops.write_reg(hw, 0x0000,
777 if (ret_val)
778 goto out;
779 for (i = 0; i < IGP01E1000_PHY_CHANNEL_NUM; i++) {
780 ret_val = phy->ops.read_reg(hw,
781 dsp_reg_array[i],
782 &phy_data);
783 if (ret_val)
784 goto out;
785
786 phy_data &= ~IGP01E1000_PHY_EDAC_MU_INDEX;
788
789 ret_val = phy->ops.write_reg(hw,
790 dsp_reg_array[i],
791 phy_data);
792 if (ret_val)
793 goto out;
794 }
795
796 ret_val = phy->ops.write_reg(hw, 0x0000,
798 if (ret_val)
799 goto out;
800
801 msec_delay_irq(20);
802
803 /* Now enable the transmitter */
804 ret_val = phy->ops.write_reg(hw, 0x2F5B,
805 phy_saved_data);
806 if (ret_val)
807 goto out;
808
810 }
811
812 if (dev_spec->ffe_config != e1000_ffe_config_active) {
813 ret_val = E1000_SUCCESS;
814 goto out;
815 }
816
817 /*
818 * Save off the current value of register 0x2F5B
819 * to be restored at the end of the routines.
820 */
821 ret_val = phy->ops.read_reg(hw, 0x2F5B, &phy_saved_data);
822 if (ret_val)
823 goto out;
824
825 /* Disable the PHY transmitter */
826 ret_val = phy->ops.write_reg(hw, 0x2F5B, 0x0003);
827 if (ret_val)
828 goto out;
829
830 msec_delay_irq(20);
831
832 ret_val = phy->ops.write_reg(hw, 0x0000,
834 if (ret_val)
835 goto out;
836
837 ret_val = phy->ops.write_reg(hw, IGP01E1000_PHY_DSP_FFE,
839 if (ret_val)
840 goto out;
841
842 ret_val = phy->ops.write_reg(hw, 0x0000,
844 if (ret_val)
845 goto out;
846
847 msec_delay_irq(20);
848
849 /* Now enable the transmitter */
850 ret_val = phy->ops.write_reg(hw, 0x2F5B, phy_saved_data);
851
852 if (ret_val)
853 goto out;
854
856 }
857
858out:
859 return ret_val;
860}
861
874{
875 struct e1000_phy_info *phy = &hw->phy;
876 s32 ret_val = E1000_SUCCESS;
877 u16 i, data;
878 u16 cur_agc_value, agc_value = 0;
884
885 DEBUGFUNC("e1000_get_cable_length_igp_82541");
886
887 /* Read the AGC registers for all channels */
888 for (i = 0; i < IGP01E1000_PHY_CHANNEL_NUM; i++) {
889 ret_val = phy->ops.read_reg(hw, agc_reg_array[i], &data);
890 if (ret_val)
891 goto out;
892
893 cur_agc_value = data >> IGP01E1000_AGC_LENGTH_SHIFT;
894
895 /* Bounds checking */
896 if ((cur_agc_value >= IGP01E1000_AGC_LENGTH_TABLE_SIZE - 1) ||
897 (cur_agc_value == 0)) {
898 ret_val = -E1000_ERR_PHY;
899 goto out;
900 }
901
902 agc_value += cur_agc_value;
903
904 if (min_agc_value > cur_agc_value)
905 min_agc_value = cur_agc_value;
906 }
907
908 /* Remove the minimal AGC result for length < 50m */
909 if (agc_value < IGP01E1000_PHY_CHANNEL_NUM * 50) {
910 agc_value -= min_agc_value;
911 /* Average the three remaining channels for the length. */
912 agc_value /= (IGP01E1000_PHY_CHANNEL_NUM - 1);
913 } else {
914 /* Average the channels for the length. */
915 agc_value /= IGP01E1000_PHY_CHANNEL_NUM;
916 }
917
920 ? (e1000_igp_cable_length_table[agc_value] -
922 : 0;
925
926 phy->cable_length = (phy->min_cable_length + phy->max_cable_length) / 2;
927
928out:
929 return ret_val;
930}
931
946static s32 e1000_set_d3_lplu_state_82541(struct e1000_hw *hw, bool active)
947{
948 struct e1000_phy_info *phy = &hw->phy;
949 s32 ret_val;
950 u16 data;
951
952 DEBUGFUNC("e1000_set_d3_lplu_state_82541");
953
954 switch (hw->mac.type) {
957 break;
958 default:
959 ret_val = e1000_set_d3_lplu_state_generic(hw, active);
960 goto out;
961 break;
962 }
963
964 ret_val = phy->ops.read_reg(hw, IGP01E1000_GMII_FIFO, &data);
965 if (ret_val)
966 goto out;
967
968 if (!active) {
969 data &= ~IGP01E1000_GMII_FLEX_SPD;
970 ret_val = phy->ops.write_reg(hw, IGP01E1000_GMII_FIFO, data);
971 if (ret_val)
972 goto out;
973
974 /*
975 * LPLU and SmartSpeed are mutually exclusive. LPLU is used
976 * during Dx states where the power conservation is most
977 * important. During driver activity we should enable
978 * SmartSpeed, so performance is maintained.
979 */
980 if (phy->smart_speed == e1000_smart_speed_on) {
981 ret_val = phy->ops.read_reg(hw,
983 &data);
984 if (ret_val)
985 goto out;
986
988 ret_val = phy->ops.write_reg(hw,
990 data);
991 if (ret_val)
992 goto out;
993 } else if (phy->smart_speed == e1000_smart_speed_off) {
994 ret_val = phy->ops.read_reg(hw,
996 &data);
997 if (ret_val)
998 goto out;
999
1000 data &= ~IGP01E1000_PSCFR_SMART_SPEED;
1001 ret_val = phy->ops.write_reg(hw,
1003 data);
1004 if (ret_val)
1005 goto out;
1006 }
1007 } else if ((phy->autoneg_advertised == E1000_ALL_SPEED_DUPLEX) ||
1011 ret_val = phy->ops.write_reg(hw, IGP01E1000_GMII_FIFO, data);
1012 if (ret_val)
1013 goto out;
1014
1015 /* When LPLU is enabled, we should disable SmartSpeed */
1016 ret_val = phy->ops.read_reg(hw, IGP01E1000_PHY_PORT_CONFIG,
1017 &data);
1018 if (ret_val)
1019 goto out;
1020
1021 data &= ~IGP01E1000_PSCFR_SMART_SPEED;
1022 ret_val = phy->ops.write_reg(hw, IGP01E1000_PHY_PORT_CONFIG,
1023 data);
1024 }
1025
1026out:
1027 return ret_val;
1028}
1029
1038{
1039 struct e1000_dev_spec_82541 *dev_spec = &hw->dev_spec._82541;
1040 s32 ret_val;
1041
1042 DEBUGFUNC("e1000_setup_led_82541");
1043
1044 ret_val = hw->phy.ops.read_reg(hw, IGP01E1000_GMII_FIFO,
1045 &dev_spec->spd_default);
1046 if (ret_val)
1047 goto out;
1048
1049 ret_val = hw->phy.ops.write_reg(hw, IGP01E1000_GMII_FIFO,
1050 (u16)(dev_spec->spd_default &
1052 if (ret_val)
1053 goto out;
1054
1056
1057out:
1058 return ret_val;
1059}
1060
1069{
1070 struct e1000_dev_spec_82541 *dev_spec = &hw->dev_spec._82541;
1071 s32 ret_val;
1072
1073 DEBUGFUNC("e1000_cleanup_led_82541");
1074
1075 ret_val = hw->phy.ops.write_reg(hw, IGP01E1000_GMII_FIFO,
1076 dev_spec->spd_default);
1077 if (ret_val)
1078 goto out;
1079
1081
1082out:
1083 return ret_val;
1084}
1085
1093{
1094 struct e1000_dev_spec_82541 *dev_spec = &hw->dev_spec._82541;
1095 u32 ret_val;
1096 u16 phy_saved_data;
1097
1098 DEBUGFUNC("e1000_phy_init_script_82541");
1099
1100 if (!dev_spec->phy_init_script) {
1101 ret_val = E1000_SUCCESS;
1102 goto out;
1103 }
1104
1105 /* Delay after phy reset to enable NVM configuration to load */
1106 msec_delay(20);
1107
1108 /*
1109 * Save off the current value of register 0x2F5B to be restored at
1110 * the end of this routine.
1111 */
1112 ret_val = hw->phy.ops.read_reg(hw, 0x2F5B, &phy_saved_data);
1113
1114 /* Disabled the PHY transmitter */
1115 hw->phy.ops.write_reg(hw, 0x2F5B, 0x0003);
1116
1117 msec_delay(20);
1118
1119 hw->phy.ops.write_reg(hw, 0x0000, 0x0140);
1120
1121 msec_delay(5);
1122
1123 switch (hw->mac.type) {
1124 case e1000_82541:
1125 case e1000_82547:
1126 hw->phy.ops.write_reg(hw, 0x1F95, 0x0001);
1127
1128 hw->phy.ops.write_reg(hw, 0x1F71, 0xBD21);
1129
1130 hw->phy.ops.write_reg(hw, 0x1F79, 0x0018);
1131
1132 hw->phy.ops.write_reg(hw, 0x1F30, 0x1600);
1133
1134 hw->phy.ops.write_reg(hw, 0x1F31, 0x0014);
1135
1136 hw->phy.ops.write_reg(hw, 0x1F32, 0x161C);
1137
1138 hw->phy.ops.write_reg(hw, 0x1F94, 0x0003);
1139
1140 hw->phy.ops.write_reg(hw, 0x1F96, 0x003F);
1141
1142 hw->phy.ops.write_reg(hw, 0x2010, 0x0008);
1143 break;
1144 case e1000_82541_rev_2:
1145 case e1000_82547_rev_2:
1146 hw->phy.ops.write_reg(hw, 0x1F73, 0x0099);
1147 break;
1148 default:
1149 break;
1150 }
1151
1152 hw->phy.ops.write_reg(hw, 0x0000, 0x3300);
1153
1154 msec_delay(20);
1155
1156 /* Now enable the transmitter */
1157 hw->phy.ops.write_reg(hw, 0x2F5B, phy_saved_data);
1158
1159 if (hw->mac.type == e1000_82547) {
1160 u16 fused, fine, coarse;
1161
1162 /* Move to analog registers page */
1164 &fused);
1165
1166 if (!(fused & IGP01E1000_ANALOG_SPARE_FUSE_ENABLED)) {
1168 &fused);
1169
1170 fine = fused & IGP01E1000_ANALOG_FUSE_FINE_MASK;
1171 coarse = fused & IGP01E1000_ANALOG_FUSE_COARSE_MASK;
1172
1176 } else if (coarse ==
1179
1180 fused = (fused & IGP01E1000_ANALOG_FUSE_POLY_MASK) |
1183
1184 hw->phy.ops.write_reg(hw,
1186 fused);
1187 hw->phy.ops.write_reg(hw,
1190 }
1191 }
1192
1193out:
1194 return ret_val;
1195}
1196
1205void e1000_init_script_state_82541(struct e1000_hw *hw, bool state)
1206{
1207 struct e1000_dev_spec_82541 *dev_spec = &hw->dev_spec._82541;
1208
1209 DEBUGFUNC("e1000_init_script_state_82541");
1210
1211 if (hw->phy.type != e1000_phy_igp) {
1212 DEBUGOUT("Initialization script not necessary.\n");
1213 goto out;
1214 }
1215
1216 dev_spec->phy_init_script = state;
1217
1218out:
1219 return;
1220}
1221
1230{
1231 /* If the management interface is not enabled, then power down */
1234
1235 return;
1236}
1237
1245{
1246 DEBUGFUNC("e1000_clear_hw_cntrs_82541");
1247
1249
1262
1269
1273}
1274
1282{
1283 s32 ret_val = E1000_SUCCESS;
1284 u16 offset, nvm_data, i;
1285
1286 DEBUGFUNC("e1000_read_mac_addr");
1287
1288 for (i = 0; i < ETHER_ADDR_LEN; i += 2) {
1289 offset = i >> 1;
1290 ret_val = hw->nvm.ops.read(hw, offset, 1, &nvm_data);
1291 if (ret_val) {
1292 DEBUGOUT("NVM Read Error\n");
1293 goto out;
1294 }
1295 hw->mac.perm_addr[i] = (u8)(nvm_data & 0xFF);
1296 hw->mac.perm_addr[i+1] = (u8)(nvm_data >> 8);
1297 }
1298
1299 for (i = 0; i < ETHER_ADDR_LEN; i++)
1300 hw->mac.addr[i] = hw->mac.perm_addr[i];
1301
1302out:
1303 return ret_val;
1304}
1305
static s32 e1000_cleanup_led_82541(struct e1000_hw *hw)
Definition: e1000_82541.c:1068
static const u16 e1000_igp_cable_length_table[]
Definition: e1000_82541.c:69
static void e1000_clear_hw_cntrs_82541(struct e1000_hw *hw)
Definition: e1000_82541.c:1244
static s32 e1000_config_dsp_after_link_change_82541(struct e1000_hw *hw, bool link_up)
Definition: e1000_82541.c:669
static s32 e1000_init_nvm_params_82541(struct e1000_hw *hw)
Definition: e1000_82541.c:129
static s32 e1000_get_link_up_info_82541(struct e1000_hw *hw, u16 *speed, u16 *duplex)
Definition: e1000_82541.c:445
void e1000_init_script_state_82541(struct e1000_hw *hw, bool state)
Definition: e1000_82541.c:1205
static s32 e1000_init_mac_params_82541(struct e1000_hw *hw)
Definition: e1000_82541.c:220
static s32 e1000_init_hw_82541(struct e1000_hw *hw)
Definition: e1000_82541.c:375
static s32 e1000_read_mac_addr_82541(struct e1000_hw *hw)
Definition: e1000_82541.c:1281
static s32 e1000_check_for_link_82541(struct e1000_hw *hw)
Definition: e1000_82541.c:585
static s32 e1000_reset_hw_82541(struct e1000_hw *hw)
Definition: e1000_82541.c:297
static s32 e1000_phy_hw_reset_82541(struct e1000_hw *hw)
Definition: e1000_82541.c:500
static s32 e1000_setup_led_82541(struct e1000_hw *hw)
Definition: e1000_82541.c:1037
static s32 e1000_get_cable_length_igp_82541(struct e1000_hw *hw)
Definition: e1000_82541.c:873
#define IGP01E1000_AGC_LENGTH_TABLE_SIZE
Definition: e1000_82541.c:78
void e1000_init_function_pointers_82541(struct e1000_hw *hw)
Definition: e1000_82541.c:282
static s32 e1000_set_d3_lplu_state_82541(struct e1000_hw *hw, bool active)
Definition: e1000_82541.c:946
static s32 e1000_phy_init_script_82541(struct e1000_hw *hw)
Definition: e1000_82541.c:1092
static s32 e1000_init_phy_params_82541(struct e1000_hw *hw)
Definition: e1000_82541.c:86
static s32 e1000_setup_copper_link_82541(struct e1000_hw *hw)
Definition: e1000_82541.c:534
static void e1000_power_down_phy_copper_82541(struct e1000_hw *hw)
Definition: e1000_82541.c:1229
#define IGP01E1000_PHY_AGC_B
Definition: e1000_82541.h:44
#define IGP01E1000_PHY_EDAC_SIGN_EXT_9_BITS
Definition: e1000_82541.h:54
#define IGP01E1000_ANALOG_FUSE_COARSE_10
Definition: e1000_82541.h:80
#define IGP01E1000_ANALOG_SPARE_FUSE_ENABLED
Definition: e1000_82541.h:76
#define IGP01E1000_IEEE_RESTART_AUTONEG
Definition: e1000_82541.h:63
#define IGP01E1000_PHY_CHANNEL_NUM
Definition: e1000_82541.h:41
#define IGP01E1000_PHY_AGC_PARAM_C
Definition: e1000_82541.h:50
#define IGP01E1000_PHY_AGC_A
Definition: e1000_82541.h:43
#define IGP01E1000_ANALOG_FUSE_POLY_MASK
Definition: e1000_82541.h:83
#define IGP01E1000_ANALOG_SPARE_FUSE_STATUS
Definition: e1000_82541.h:72
#define IGP01E1000_ANALOG_FUSE_FINE_1
Definition: e1000_82541.h:81
#define IGP01E1000_AGC_LENGTH_SHIFT
Definition: e1000_82541.h:65
#define IGP01E1000_PHY_AGC_D
Definition: e1000_82541.h:46
#define IGP01E1000_ANALOG_FUSE_STATUS
Definition: e1000_82541.h:71
#define IGP01E1000_ANALOG_FUSE_CONTROL
Definition: e1000_82541.h:73
#define FFE_IDLE_ERR_COUNT_TIMEOUT_20
Definition: e1000_82541.h:68
#define IGP01E1000_AGC_RANGE
Definition: e1000_82541.h:66
#define IGP01E1000_PHY_AGC_PARAM_A
Definition: e1000_82541.h:48
#define IGP01E1000_ANALOG_FUSE_FINE_10
Definition: e1000_82541.h:82
#define IGP01E1000_ANALOG_FUSE_COARSE_MASK
Definition: e1000_82541.h:78
#define IGP01E1000_PHY_AGC_PARAM_B
Definition: e1000_82541.h:49
#define NVM_WORD_SIZE_BASE_SHIFT_82541
Definition: e1000_82541.h:39
#define IGP01E1000_PHY_DSP_FFE
Definition: e1000_82541.h:58
#define IGP01E1000_ANALOG_FUSE_ENABLE_SW_CONTROL
Definition: e1000_82541.h:84
#define IGP01E1000_IEEE_FORCE_GIG
Definition: e1000_82541.h:62
#define IGP01E1000_ANALOG_FUSE_COARSE_THRESH
Definition: e1000_82541.h:79
#define IGP01E1000_PHY_DSP_FFE_CM_CP
Definition: e1000_82541.h:59
#define IGP01E1000_ANALOG_FUSE_BYPASS
Definition: e1000_82541.h:74
#define IGP01E1000_ANALOG_FUSE_FINE_MASK
Definition: e1000_82541.h:77
#define FFE_IDLE_ERR_COUNT_TIMEOUT_100
Definition: e1000_82541.h:69
#define IGP01E1000_PHY_AGC_PARAM_D
Definition: e1000_82541.h:51
#define IGP01E1000_PHY_DSP_FFE_DEFAULT
Definition: e1000_82541.h:60
#define IGP01E1000_PHY_AGC_C
Definition: e1000_82541.h:45
#define E1000_ERR_PHY
#define IGP_ACTIVITY_LED_ENABLE
#define NVM_SIZE_SHIFT
#define SPEED_100
#define E1000_EECD_SIZE
#define E1000_CTRL_FRCSPD
#define E1000_EECD_TYPE
#define E1000_ALL_SPEED_DUPLEX
#define SPEED_1000
#define E1000_TCTL_PSP
#define IGP_ACTIVITY_LED_MASK
#define HALF_DUPLEX
#define E1000_CTRL_SLU
#define E1000_ALL_10_SPEED
#define NWAY_LPAR_10T_FD_CAPS
#define E1000_CTRL_PHY_RST
#define IGP_LED3_MODE
#define E1000_CTRL_RST
#define NWAY_ER_LP_NWAY_CAPS
#define AUTONEG_ADVERTISE_SPEED_DEFAULT
#define SR_1000T_IDLE_ERROR_CNT
#define E1000_MANC_SMBUS_EN
#define PHY_1000T_STATUS
#define PHY_LP_ABILITY
#define E1000_ALL_NOT_GIG
#define SPEED_10
#define E1000_EECD_ADDR_BITS
#define NVM_CFG
#define E1000_RAR_ENTRIES
#define E1000_CTRL_FRCDPX
#define SR_1000T_PHY_EXCESSIVE_IDLE_ERR_COUNT
#define E1000_ERR_CONFIG
#define E1000_SUCCESS
#define IGP01E1000_I_PHY_ID
#define PHY_AUTONEG_EXP
#define NVM_SIZE_MASK
#define E1000_TXDCTL_FULL_TX_DESC_WB
#define NWAY_LPAR_100TX_FD_CAPS
@ e1000_phy_igp
Definition: e1000_hw.h:311
@ e1000_nvm_override_microwire_large
Definition: e1000_hw.h:304
@ e1000_nvm_override_microwire_small
Definition: e1000_hw.h:303
@ e1000_nvm_override_spi_large
Definition: e1000_hw.h:302
@ e1000_nvm_override_spi_small
Definition: e1000_hw.h:301
@ e1000_82547_rev_2
Definition: e1000_hw.h:251
@ e1000_82541
Definition: e1000_hw.h:248
@ e1000_82541_rev_2
Definition: e1000_hw.h:249
@ e1000_82547
Definition: e1000_hw.h:250
@ e1000_dsp_config_activated
Definition: e1000_hw.h:386
@ e1000_dsp_config_enabled
Definition: e1000_hw.h:385
@ e1000_dsp_config_disabled
Definition: e1000_hw.h:384
@ e1000_smart_speed_off
Definition: e1000_hw.h:400
@ e1000_smart_speed_on
Definition: e1000_hw.h:399
@ e1000_media_type_copper
Definition: e1000_hw.h:283
@ e1000_nvm_eeprom_spi
Definition: e1000_hw.h:292
@ e1000_nvm_eeprom_microwire
Definition: e1000_hw.h:293
@ e1000_ffe_config_enabled
Definition: e1000_hw.h:378
@ e1000_ffe_config_active
Definition: e1000_hw.h:379
s32 e1000_valid_led_default_generic(struct e1000_hw *hw, u16 *data)
Definition: e1000_mac.c:1752
s32 e1000_id_led_init_generic(struct e1000_hw *hw)
Definition: e1000_mac.c:1775
s32 e1000_get_bus_info_pci_generic(struct e1000_hw *hw)
Definition: e1000_mac.c:185
s32 e1000_led_on_generic(struct e1000_hw *hw)
Definition: e1000_mac.c:1936
s32 e1000_setup_link_generic(struct e1000_hw *hw)
Definition: e1000_mac.c:1010
void e1000_clear_hw_cntrs_base_generic(struct e1000_hw *hw)
Definition: e1000_mac.c:666
s32 e1000_led_off_generic(struct e1000_hw *hw)
Definition: e1000_mac.c:1965
void e1000_update_mc_addr_list_generic(struct e1000_hw *hw, u8 *mc_addr_list, u32 mc_addr_count)
Definition: e1000_mac.c:595
void e1000_clear_vfta_generic(struct e1000_hw *hw)
Definition: e1000_mac.c:340
s32 e1000_get_speed_and_duplex_copper_generic(struct e1000_hw *hw, u16 *speed, u16 *duplex)
Definition: e1000_mac.c:1667
void e1000_init_rx_addrs_generic(struct e1000_hw *hw, u16 rar_count)
Definition: e1000_mac.c:378
void e1000_write_vfta_generic(struct e1000_hw *hw, u32 offset, u32 value)
Definition: e1000_mac.c:361
s32 e1000_config_fc_after_link_up_generic(struct e1000_hw *hw)
Definition: e1000_mac.c:1359
void e1000_set_lan_id_single_port(struct e1000_hw *hw)
Definition: e1000_mac.c:326
s32 e1000_update_nvm_checksum_generic(struct e1000_hw *hw)
Definition: e1000_nvm.c:1235
s32 e1000_read_nvm_microwire(struct e1000_hw *hw, u16 offset, u16 words, u16 *data)
Definition: e1000_nvm.c:508
s32 e1000_write_nvm_spi(struct e1000_hw *hw, u16 offset, u16 words, u16 *data)
Definition: e1000_nvm.c:611
s32 e1000_read_nvm_spi(struct e1000_hw *hw, u16 offset, u16 words, u16 *data)
Definition: e1000_nvm.c:448
s32 e1000_write_nvm_microwire(struct e1000_hw *hw, u16 offset, u16 words, u16 *data)
Definition: e1000_nvm.c:691
void e1000_release_nvm_generic(struct e1000_hw *hw)
Definition: e1000_nvm.c:370
s32 e1000_acquire_nvm_generic(struct e1000_hw *hw)
Definition: e1000_nvm.c:269
s32 e1000_validate_nvm_checksum_generic(struct e1000_hw *hw)
Definition: e1000_nvm.c:1202
#define E1000_WRITE_REG_IO(hw, reg, value)
Definition: e1000_osdep.h:229
#define msec_delay(x)
Definition: e1000_osdep.h:103
#define usec_delay(x)
Definition: e1000_osdep.h:101
#define E1000_WRITE_REG_ARRAY(hw, reg, index, value)
Definition: e1000_osdep.h:206
uint8_t u8
Definition: e1000_osdep.h:124
#define DEBUGFUNC(F)
Definition: e1000_osdep.h:115
#define E1000_WRITE_FLUSH(a)
Definition: e1000_osdep.h:177
#define E1000_WRITE_REG(hw, reg, value)
Definition: e1000_osdep.h:196
uint16_t u16
Definition: e1000_osdep.h:123
#define DEBUGOUT(...)
Definition: e1000_osdep.h:109
#define msec_delay_irq(x)
Definition: e1000_osdep.h:104
#define E1000_READ_REG(hw, reg)
Definition: e1000_osdep.h:191
int32_t s32
Definition: e1000_osdep.h:126
uint32_t u32
Definition: e1000_osdep.h:122
s32 e1000_phy_force_speed_duplex_igp(struct e1000_hw *hw)
Definition: e1000_phy.c:1752
s32 e1000_read_phy_reg_igp(struct e1000_hw *hw, u32 offset, u16 *data)
Definition: e1000_phy.c:777
s32 e1000_phy_has_link_generic(struct e1000_hw *hw, u32 iterations, u32 usec_interval, bool *success)
Definition: e1000_phy.c:2360
s32 e1000_get_phy_id(struct e1000_hw *hw)
Definition: e1000_phy.c:225
void e1000_power_down_phy_copper(struct e1000_hw *hw)
Definition: e1000_phy.c:3522
s32 e1000_get_phy_info_igp(struct e1000_hw *hw)
Definition: e1000_phy.c:2712
s32 e1000_check_polarity_igp(struct e1000_hw *hw)
Definition: e1000_phy.c:2244
void e1000_power_up_phy_copper(struct e1000_hw *hw)
Definition: e1000_phy.c:3504
s32 e1000_get_cfg_done_generic(struct e1000_hw E1000_UNUSEDARG *hw)
Definition: e1000_phy.c:2903
s32 e1000_phy_hw_reset_generic(struct e1000_hw *hw)
Definition: e1000_phy.c:2862
s32 e1000_set_d3_lplu_state_generic(struct e1000_hw *hw, bool active)
Definition: e1000_phy.c:2088
s32 e1000_check_downshift_generic(struct e1000_hw *hw)
Definition: e1000_phy.c:2172
s32 e1000_copper_link_setup_igp(struct e1000_hw *hw)
Definition: e1000_phy.c:1371
s32 e1000_write_phy_reg_igp(struct e1000_hw *hw, u32 offset, u16 data)
Definition: e1000_phy.c:845
s32 e1000_setup_copper_link_generic(struct e1000_hw *hw)
Definition: e1000_phy.c:1699
#define IGP01E1000_PHY_PORT_CONFIG
Definition: e1000_phy.h:133
#define IGP01E1000_GMII_FLEX_SPD
Definition: e1000_phy.h:246
#define IGP01E1000_GMII_SPD
Definition: e1000_phy.h:247
#define IGP01E1000_GMII_FIFO
Definition: e1000_phy.h:137
#define IGP01E1000_PSCFR_SMART_SPEED
Definition: e1000_phy.h:243
#define E1000_RXERRC
Definition: e1000_regs.h:329
#define E1000_PTC1522
Definition: e1000_regs.h:379
#define E1000_PTC255
Definition: e1000_regs.h:376
#define E1000_PTC127
Definition: e1000_regs.h:375
#define E1000_PTC511
Definition: e1000_regs.h:377
#define E1000_PRC255
Definition: e1000_regs.h:348
#define E1000_MANC
Definition: e1000_regs.h:509
#define E1000_PRC127
Definition: e1000_regs.h:347
#define E1000_PRC64
Definition: e1000_regs.h:346
#define E1000_TNCRS
Definition: e1000_regs.h:337
#define E1000_RCTL
Definition: e1000_regs.h:89
#define E1000_TCTL
Definition: e1000_regs.h:104
#define E1000_ALGNERRC
Definition: e1000_regs.h:327
#define E1000_TXDCTL(_n)
Definition: e1000_regs.h:278
#define E1000_MGTPRC
Definition: e1000_regs.h:365
#define E1000_PTC1023
Definition: e1000_regs.h:378
#define E1000_MGTPTC
Definition: e1000_regs.h:367
#define E1000_CTRL
Definition: e1000_regs.h:39
#define E1000_PRC1522
Definition: e1000_regs.h:351
#define E1000_IMC
Definition: e1000_regs.h:83
#define E1000_PRC1023
Definition: e1000_regs.h:350
#define E1000_PRC511
Definition: e1000_regs.h:349
#define E1000_LEDCTL
Definition: e1000_regs.h:109
#define E1000_TSCTFC
Definition: e1000_regs.h:383
#define E1000_CEXTERR
Definition: e1000_regs.h:339
#define E1000_MTA
Definition: e1000_regs.h:496
#define E1000_ICR
Definition: e1000_regs.h:79
#define E1000_PTC64
Definition: e1000_regs.h:374
#define E1000_EECD
Definition: e1000_regs.h:42
#define E1000_MGTPDC
Definition: e1000_regs.h:366
#define E1000_TSCTC
Definition: e1000_regs.h:382
enum e1000_ffe_config ffe_config
Definition: e1000_hw.h:953
enum e1000_dsp_config dsp_config
Definition: e1000_hw.h:952
union e1000_hw::@46 dev_spec
struct e1000_mac_info mac
Definition: e1000_hw.h:1028
struct e1000_dev_spec_82541 _82541
Definition: e1000_hw.h:1037
struct e1000_nvm_info nvm
Definition: e1000_hw.h:1031
struct e1000_phy_info phy
Definition: e1000_hw.h:1030
enum e1000_mac_type type
Definition: e1000_hw.h:815
u8 addr[ETHER_ADDR_LEN]
Definition: e1000_hw.h:812
u32 ledctl_default
Definition: e1000_hw.h:818
bool get_link_status
Definition: e1000_hw.h:846
u32 ledctl_mode1
Definition: e1000_hw.h:819
bool asf_firmware_present
Definition: e1000_hw.h:843
u16 mta_reg_count
Definition: e1000_hw.h:830
u16 rar_entry_count
Definition: e1000_hw.h:836
struct e1000_mac_operations ops
Definition: e1000_hw.h:811
u8 perm_addr[ETHER_ADDR_LEN]
Definition: e1000_hw.h:813
s32(* setup_led)(struct e1000_hw *)
Definition: e1000_hw.h:744
s32(* id_led_init)(struct e1000_hw *)
Definition: e1000_hw.h:725
s32(* get_link_up_info)(struct e1000_hw *, u16 *, u16 *)
Definition: e1000_hw.h:734
s32(* setup_physical_interface)(struct e1000_hw *)
Definition: e1000_hw.h:743
s32(* check_for_link)(struct e1000_hw *)
Definition: e1000_hw.h:728
void(* config_collision_dist)(struct e1000_hw *)
Definition: e1000_hw.h:746
void(* clear_vfta)(struct e1000_hw *)
Definition: e1000_hw.h:731
s32(* reset_hw)(struct e1000_hw *)
Definition: e1000_hw.h:738
s32(* led_on)(struct e1000_hw *)
Definition: e1000_hw.h:735
s32(* read_mac_addr)(struct e1000_hw *)
Definition: e1000_hw.h:748
void(* write_vfta)(struct e1000_hw *, u32, u32)
Definition: e1000_hw.h:745
s32(* init_hw)(struct e1000_hw *)
Definition: e1000_hw.h:739
s32(* setup_link)(struct e1000_hw *)
Definition: e1000_hw.h:742
s32(* cleanup_led)(struct e1000_hw *)
Definition: e1000_hw.h:729
void(* clear_hw_cntrs)(struct e1000_hw *)
Definition: e1000_hw.h:730
void(* set_lan_id)(struct e1000_hw *)
Definition: e1000_hw.h:733
void(* update_mc_addr_list)(struct e1000_hw *, u8 *, u32)
Definition: e1000_hw.h:737
s32(* led_off)(struct e1000_hw *)
Definition: e1000_hw.h:736
s32(* get_bus_info)(struct e1000_hw *)
Definition: e1000_hw.h:732
s32(* init_params)(struct e1000_hw *)
Definition: e1000_hw.h:724
struct e1000_nvm_operations ops
Definition: e1000_hw.h:889
enum e1000_nvm_type type
Definition: e1000_hw.h:890
enum e1000_nvm_override override
Definition: e1000_hw.h:891
u16 address_bits
Definition: e1000_hw.h:898
void(* release)(struct e1000_hw *)
Definition: e1000_hw.h:802
s32(* init_params)(struct e1000_hw *)
Definition: e1000_hw.h:799
s32(* write)(struct e1000_hw *, u16, u16, u16 *)
Definition: e1000_hw.h:807
s32(* validate)(struct e1000_hw *)
Definition: e1000_hw.h:806
s32(* update)(struct e1000_hw *)
Definition: e1000_hw.h:804
s32(* read)(struct e1000_hw *, u16, u16, u16 *)
Definition: e1000_hw.h:801
s32(* acquire)(struct e1000_hw *)
Definition: e1000_hw.h:800
s32(* valid_led_default)(struct e1000_hw *, u16 *)
Definition: e1000_hw.h:805
u32 reset_delay_us
Definition: e1000_hw.h:868
bool speed_downgraded
Definition: e1000_hw.h:884
u16 max_cable_length
Definition: e1000_hw.h:876
u16 min_cable_length
Definition: e1000_hw.h:877
enum e1000_media_type media_type
Definition: e1000_hw.h:871
u16 cable_length
Definition: e1000_hw.h:875
u16 autoneg_advertised
Definition: e1000_hw.h:873
struct e1000_phy_operations ops
Definition: e1000_hw.h:856
enum e1000_phy_type type
Definition: e1000_hw.h:857
u16 autoneg_mask
Definition: e1000_hw.h:874
enum e1000_smart_speed smart_speed
Definition: e1000_hw.h:864
s32(* get_cfg_done)(struct e1000_hw *hw)
Definition: e1000_hw.h:777
void(* power_up)(struct e1000_hw *)
Definition: e1000_hw.h:791
s32(* reset)(struct e1000_hw *)
Definition: e1000_hw.h:785
s32(* init_params)(struct e1000_hw *)
Definition: e1000_hw.h:770
s32(* read_reg)(struct e1000_hw *, u32, u16 *)
Definition: e1000_hw.h:781
s32(* get_info)(struct e1000_hw *)
Definition: e1000_hw.h:779
s32(* set_d3_lplu_state)(struct e1000_hw *, bool)
Definition: e1000_hw.h:787
s32(* force_speed_duplex)(struct e1000_hw *)
Definition: e1000_hw.h:776
s32(* get_cable_length)(struct e1000_hw *)
Definition: e1000_hw.h:778
s32(* write_reg)(struct e1000_hw *, u32, u16)
Definition: e1000_hw.h:788
void(* power_down)(struct e1000_hw *)
Definition: e1000_hw.h:792
s32(* check_polarity)(struct e1000_hw *)
Definition: e1000_hw.h:773