FreeBSD kernel E1000 device code
e1000_82571.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/* 82571EB Gigabit Ethernet Controller
37 * 82571EB Gigabit Ethernet Controller (Copper)
38 * 82571EB Gigabit Ethernet Controller (Fiber)
39 * 82571EB Dual Port Gigabit Mezzanine Adapter
40 * 82571EB Quad Port Gigabit Mezzanine Adapter
41 * 82571PT Gigabit PT Quad Port Server ExpressModule
42 * 82572EI Gigabit Ethernet Controller (Copper)
43 * 82572EI Gigabit Ethernet Controller (Fiber)
44 * 82572EI Gigabit Ethernet Controller
45 * 82573V Gigabit Ethernet Controller (Copper)
46 * 82573E Gigabit Ethernet Controller (Copper)
47 * 82573L Gigabit Ethernet Controller
48 * 82574L Gigabit Network Connection
49 * 82583V Gigabit Network Connection
50 */
51
52#include "e1000_api.h"
53
54static s32 e1000_acquire_nvm_82571(struct e1000_hw *hw);
55static void e1000_release_nvm_82571(struct e1000_hw *hw);
56static s32 e1000_write_nvm_82571(struct e1000_hw *hw, u16 offset,
57 u16 words, u16 *data);
60static s32 e1000_get_cfg_done_82571(struct e1000_hw *hw);
62 bool active);
63static s32 e1000_reset_hw_82571(struct e1000_hw *hw);
64static s32 e1000_init_hw_82571(struct e1000_hw *hw);
65static void e1000_clear_vfta_82571(struct e1000_hw *hw);
66static bool e1000_check_mng_mode_82574(struct e1000_hw *hw);
67static s32 e1000_led_on_82574(struct e1000_hw *hw);
68static s32 e1000_setup_link_82571(struct e1000_hw *hw);
72static s32 e1000_valid_led_default_82571(struct e1000_hw *hw, u16 *data);
73static void e1000_clear_hw_cntrs_82571(struct e1000_hw *hw);
75static s32 e1000_get_phy_id_82571(struct e1000_hw *hw);
77static void e1000_put_hw_semaphore_82574(struct e1000_hw *hw);
79 bool active);
81 bool active);
82static void e1000_initialize_hw_bits_82571(struct e1000_hw *hw);
83static s32 e1000_write_nvm_eewr_82571(struct e1000_hw *hw, u16 offset,
84 u16 words, u16 *data);
85static s32 e1000_read_mac_addr_82571(struct e1000_hw *hw);
86static void e1000_power_down_phy_copper_82571(struct e1000_hw *hw);
87
93{
94 struct e1000_phy_info *phy = &hw->phy;
95 s32 ret_val;
96
97 DEBUGFUNC("e1000_init_phy_params_82571");
98
100 phy->type = e1000_phy_none;
101 return E1000_SUCCESS;
102 }
103
104 phy->addr = 1;
106 phy->reset_delay_us = 100;
107
114
115 switch (hw->mac.type) {
116 case e1000_82571:
117 case e1000_82572:
118 phy->type = e1000_phy_igp_2;
128 break;
129 case e1000_82573:
130 phy->type = e1000_phy_m88;
141 break;
142 case e1000_82574:
143 case e1000_82583:
144
145 phy->type = e1000_phy_bm;
158 break;
159 default:
160 return -E1000_ERR_PHY;
161 break;
162 }
163
164 /* This can only be done after all function pointers are setup. */
165 ret_val = e1000_get_phy_id_82571(hw);
166 if (ret_val) {
167 DEBUGOUT("Error getting PHY ID\n");
168 return ret_val;
169 }
170
171 /* Verify phy id */
172 switch (hw->mac.type) {
173 case e1000_82571:
174 case e1000_82572:
175 if (phy->id != IGP01E1000_I_PHY_ID)
176 ret_val = -E1000_ERR_PHY;
177 break;
178 case e1000_82573:
179 if (phy->id != M88E1111_I_PHY_ID)
180 ret_val = -E1000_ERR_PHY;
181 break;
182 case e1000_82574:
183 case e1000_82583:
184 if (phy->id != BME1000_E_PHY_ID_R2)
185 ret_val = -E1000_ERR_PHY;
186 break;
187 default:
188 ret_val = -E1000_ERR_PHY;
189 break;
190 }
191
192 if (ret_val)
193 DEBUGOUT1("PHY ID unknown: type = 0x%08x\n", phy->id);
194
195 return ret_val;
196}
197
203{
204 struct e1000_nvm_info *nvm = &hw->nvm;
205 u32 eecd = E1000_READ_REG(hw, E1000_EECD);
206 u16 size;
207
208 DEBUGFUNC("e1000_init_nvm_params_82571");
209
210 nvm->opcode_bits = 8;
211 nvm->delay_usec = 1;
212 switch (nvm->override) {
214 nvm->page_size = 32;
215 nvm->address_bits = 16;
216 break;
218 nvm->page_size = 8;
219 nvm->address_bits = 8;
220 break;
221 default:
222 nvm->page_size = eecd & E1000_EECD_ADDR_BITS ? 32 : 8;
223 nvm->address_bits = eecd & E1000_EECD_ADDR_BITS ? 16 : 8;
224 break;
225 }
226
227 switch (hw->mac.type) {
228 case e1000_82573:
229 case e1000_82574:
230 case e1000_82583:
231 if (((eecd >> 15) & 0x3) == 0x3) {
233 nvm->word_size = 2048;
234 /* Autonomous Flash update bit must be cleared due
235 * to Flash update issue.
236 */
237 eecd &= ~E1000_EECD_AUPDEN;
238 E1000_WRITE_REG(hw, E1000_EECD, eecd);
239 break;
240 }
241 /* FALLTHROUGH */
242 default:
244 size = (u16)((eecd & E1000_EECD_SIZE_EX_MASK) >>
246 /* Added to a constant, "size" becomes the left-shift value
247 * for setting word_size.
248 */
250
251 /* EEPROM access above 16k is unsupported */
252 if (size > 14)
253 size = 14;
254 nvm->word_size = 1 << size;
255 break;
256 }
257
258 /* Function Pointers */
259 switch (hw->mac.type) {
260 case e1000_82574:
261 case e1000_82583:
264 break;
265 default:
268 break;
269 }
275
276 return E1000_SUCCESS;
277}
278
284{
285 struct e1000_mac_info *mac = &hw->mac;
286 u32 swsm = 0;
287 u32 swsm2 = 0;
288 bool force_clear_smbi = false;
289
290 DEBUGFUNC("e1000_init_mac_params_82571");
291
292 /* Set media type and media-dependent function pointers */
293 switch (hw->device_id) {
301 mac->ops.get_link_up_info =
303 break;
312 mac->ops.get_link_up_info =
314 break;
315 default:
320 mac->ops.get_link_up_info =
322 break;
323 }
324
325 /* Set mta register count */
326 mac->mta_reg_count = 128;
327 /* Set rar entry count */
329 /* Set if part includes ASF firmware */
330 mac->asf_firmware_present = true;
331 /* Adaptive IFS supported */
332 mac->adaptive_ifs = true;
333
334 /* Function pointers */
335
336 /* bus type/speed/width */
338 /* reset */
340 /* hw initialization */
342 /* link setup */
344 /* multicast address update */
346 /* writing VFTA */
348 /* clearing VFTA */
350 /* read mac address */
352 /* ID LED init */
354 /* setup LED */
356 /* cleanup LED */
358 /* turn off LED */
360 /* clear hardware counters */
362
363 /* MAC-specific function pointers */
364 switch (hw->mac.type) {
365 case e1000_82573:
370
371 /* FWSM register */
372 mac->has_fwsm = true;
373 /* ARC supported; valid only if manageability features are
374 * enabled.
375 */
378 break;
379 case e1000_82574:
380 case e1000_82583:
384 break;
385 default:
389
390 /* FWSM register */
391 mac->has_fwsm = true;
392 break;
393 }
394
395 /* Ensure that the inter-port SWSM.SMBI lock bit is clear before
396 * first NVM or PHY access. This should be done for single-port
397 * devices, and for one port only on dual-port devices so that
398 * for those devices we can still use the SMBI lock to synchronize
399 * inter-port accesses to the PHY & NVM.
400 */
401 switch (hw->mac.type) {
402 case e1000_82571:
403 case e1000_82572:
404 swsm2 = E1000_READ_REG(hw, E1000_SWSM2);
405
406 if (!(swsm2 & E1000_SWSM2_LOCK)) {
407 /* Only do this for the first interface on this card */
408 E1000_WRITE_REG(hw, E1000_SWSM2, swsm2 |
410 force_clear_smbi = true;
411 } else {
412 force_clear_smbi = false;
413 }
414 break;
415 default:
416 force_clear_smbi = true;
417 break;
418 }
419
420 if (force_clear_smbi) {
421 /* Make sure SWSM.SMBI is clear */
422 swsm = E1000_READ_REG(hw, E1000_SWSM);
423 if (swsm & E1000_SWSM_SMBI) {
424 /* This bit should not be set on a first interface, and
425 * indicates that the bootagent or EFI code has
426 * improperly left this bit enabled
427 */
428 DEBUGOUT("Please update your 82571 Bootagent\n");
429 }
431 }
432
433 /* Initialze device specific counter of SMBI acquisition timeouts. */
435
436 return E1000_SUCCESS;
437}
438
446{
447 DEBUGFUNC("e1000_init_function_pointers_82571");
448
452}
453
462{
463 struct e1000_phy_info *phy = &hw->phy;
464 s32 ret_val;
465 u16 phy_id = 0;
466
467 DEBUGFUNC("e1000_get_phy_id_82571");
468
469 switch (hw->mac.type) {
470 case e1000_82571:
471 case e1000_82572:
472 /* The 82571 firmware may still be configuring the PHY.
473 * In this case, we cannot access the PHY until the
474 * configuration is done. So we explicitly set the
475 * PHY ID.
476 */
477 phy->id = IGP01E1000_I_PHY_ID;
478 break;
479 case e1000_82573:
480 return e1000_get_phy_id(hw);
481 break;
482 case e1000_82574:
483 case e1000_82583:
484 ret_val = phy->ops.read_reg(hw, PHY_ID1, &phy_id);
485 if (ret_val)
486 return ret_val;
487
488 phy->id = (u32)(phy_id << 16);
489 usec_delay(20);
490 ret_val = phy->ops.read_reg(hw, PHY_ID2, &phy_id);
491 if (ret_val)
492 return ret_val;
493
494 phy->id |= (u32)(phy_id);
495 phy->revision = (u32)(phy_id & ~PHY_REVISION_MASK);
496 break;
497 default:
498 return -E1000_ERR_PHY;
499 break;
500 }
501
502 return E1000_SUCCESS;
503}
504
512static s32
514{
515 u32 extcnf_ctrl;
516 s32 i = 0;
517 /* XXX assert that mutex is held */
518 DEBUGFUNC("e1000_get_hw_semaphore_82574");
519
521 extcnf_ctrl = E1000_READ_REG(hw, E1000_EXTCNF_CTRL);
522 do {
524 E1000_WRITE_REG(hw, E1000_EXTCNF_CTRL, extcnf_ctrl);
525 extcnf_ctrl = E1000_READ_REG(hw, E1000_EXTCNF_CTRL);
526
527 if (extcnf_ctrl & E1000_EXTCNF_CTRL_MDIO_SW_OWNERSHIP)
528 break;
529
530 msec_delay(2);
531 i++;
532 } while (i < MDIO_OWNERSHIP_TIMEOUT);
533
534 if (i == MDIO_OWNERSHIP_TIMEOUT) {
535 /* Release semaphores */
537 DEBUGOUT("Driver can't access the PHY\n");
538 return -E1000_ERR_PHY;
539 }
540
541 return E1000_SUCCESS;
542}
543
551static void
553{
554 u32 extcnf_ctrl;
555
556 DEBUGFUNC("e1000_put_hw_semaphore_82574");
557
558 extcnf_ctrl = E1000_READ_REG(hw, E1000_EXTCNF_CTRL);
559 extcnf_ctrl &= ~E1000_EXTCNF_CTRL_MDIO_SW_OWNERSHIP;
560 E1000_WRITE_REG(hw, E1000_EXTCNF_CTRL, extcnf_ctrl);
561}
562
575static s32 e1000_set_d0_lplu_state_82574(struct e1000_hw *hw, bool active)
576{
577 u32 data = E1000_READ_REG(hw, E1000_POEMB);
578
579 DEBUGFUNC("e1000_set_d0_lplu_state_82574");
580
581 if (active)
583 else
584 data &= ~E1000_PHY_CTRL_D0A_LPLU;
585
586 E1000_WRITE_REG(hw, E1000_POEMB, data);
587 return E1000_SUCCESS;
588}
589
601static s32 e1000_set_d3_lplu_state_82574(struct e1000_hw *hw, bool active)
602{
603 u32 data = E1000_READ_REG(hw, E1000_POEMB);
604
605 DEBUGFUNC("e1000_set_d3_lplu_state_82574");
606
607 if (!active) {
608 data &= ~E1000_PHY_CTRL_NOND0A_LPLU;
609 } else if ((hw->phy.autoneg_advertised == E1000_ALL_SPEED_DUPLEX) ||
613 }
614
615 E1000_WRITE_REG(hw, E1000_POEMB, data);
616 return E1000_SUCCESS;
617}
618
629{
630 s32 ret_val;
631
632 DEBUGFUNC("e1000_acquire_nvm_82571");
633
634 ret_val = e1000_get_hw_semaphore(hw);
635 if (ret_val)
636 return ret_val;
637
638 switch (hw->mac.type) {
639 case e1000_82573:
640 break;
641 default:
642 ret_val = e1000_acquire_nvm_generic(hw);
643 break;
644 }
645
646 if (ret_val)
648
649 return ret_val;
650}
651
658static void e1000_release_nvm_82571(struct e1000_hw *hw)
659{
660 DEBUGFUNC("e1000_release_nvm_82571");
661
664}
665
678static s32 e1000_write_nvm_82571(struct e1000_hw *hw, u16 offset, u16 words,
679 u16 *data)
680{
681 s32 ret_val;
682
683 DEBUGFUNC("e1000_write_nvm_82571");
684
685 switch (hw->mac.type) {
686 case e1000_82573:
687 case e1000_82574:
688 case e1000_82583:
689 ret_val = e1000_write_nvm_eewr_82571(hw, offset, words, data);
690 break;
691 case e1000_82571:
692 case e1000_82572:
693 ret_val = e1000_write_nvm_spi(hw, offset, words, data);
694 break;
695 default:
696 ret_val = -E1000_ERR_NVM;
697 break;
698 }
699
700 return ret_val;
701}
702
712{
713 u32 eecd;
714 s32 ret_val;
715 u16 i;
716
717 DEBUGFUNC("e1000_update_nvm_checksum_82571");
718
720 if (ret_val)
721 return ret_val;
722
723 /* If our nvm is an EEPROM, then we're done
724 * otherwise, commit the checksum to the flash NVM.
725 */
726 if (hw->nvm.type != e1000_nvm_flash_hw)
727 return E1000_SUCCESS;
728
729 /* Check for pending operations. */
730 for (i = 0; i < E1000_FLASH_UPDATES; i++) {
731 msec_delay(1);
733 break;
734 }
735
736 if (i == E1000_FLASH_UPDATES)
737 return -E1000_ERR_NVM;
738
739 /* Reset the firmware if using STM opcode. */
740 if ((E1000_READ_REG(hw, E1000_FLOP) & 0xFF00) == E1000_STM_OPCODE) {
741 /* The enabling of and the actual reset must be done
742 * in two write cycles.
743 */
747 }
748
749 /* Commit the write to flash */
751 E1000_WRITE_REG(hw, E1000_EECD, eecd);
752
753 for (i = 0; i < E1000_FLASH_UPDATES; i++) {
754 msec_delay(1);
756 break;
757 }
758
759 if (i == E1000_FLASH_UPDATES)
760 return -E1000_ERR_NVM;
761
762 return E1000_SUCCESS;
763}
764
773{
774 DEBUGFUNC("e1000_validate_nvm_checksum_82571");
775
776 if (hw->nvm.type == e1000_nvm_flash_hw)
778
780}
781
796static s32 e1000_write_nvm_eewr_82571(struct e1000_hw *hw, u16 offset,
797 u16 words, u16 *data)
798{
799 struct e1000_nvm_info *nvm = &hw->nvm;
800 u32 i, eewr = 0;
801 s32 ret_val = E1000_SUCCESS;
802
803 DEBUGFUNC("e1000_write_nvm_eewr_82571");
804
805 /* A check for invalid values: offset too large, too many words,
806 * and not enough words.
807 */
808 if ((offset >= nvm->word_size) || (words > (nvm->word_size - offset)) ||
809 (words == 0)) {
810 DEBUGOUT("nvm parameter(s) out of bounds\n");
811 return -E1000_ERR_NVM;
812 }
813
814 for (i = 0; i < words; i++) {
815 eewr = ((data[i] << E1000_NVM_RW_REG_DATA) |
816 ((offset + i) << E1000_NVM_RW_ADDR_SHIFT) |
818
820 if (ret_val)
821 break;
822
823 E1000_WRITE_REG(hw, E1000_EEWR, eewr);
824
826 if (ret_val)
827 break;
828 }
829
830 return ret_val;
831}
832
840{
841 s32 timeout = PHY_CFG_TIMEOUT;
842
843 DEBUGFUNC("e1000_get_cfg_done_82571");
844
845 while (timeout) {
848 break;
849 msec_delay(1);
850 timeout--;
851 }
852 if (!timeout) {
853 DEBUGOUT("MNG configuration cycle has not completed.\n");
854 return -E1000_ERR_RESET;
855 }
856
857 return E1000_SUCCESS;
858}
859
871static s32 e1000_set_d0_lplu_state_82571(struct e1000_hw *hw, bool active)
872{
873 struct e1000_phy_info *phy = &hw->phy;
874 s32 ret_val;
875 u16 data;
876
877 DEBUGFUNC("e1000_set_d0_lplu_state_82571");
878
879 if (!(phy->ops.read_reg))
880 return E1000_SUCCESS;
881
882 ret_val = phy->ops.read_reg(hw, IGP02E1000_PHY_POWER_MGMT, &data);
883 if (ret_val)
884 return ret_val;
885
886 if (active) {
887 data |= IGP02E1000_PM_D0_LPLU;
888 ret_val = phy->ops.write_reg(hw, IGP02E1000_PHY_POWER_MGMT,
889 data);
890 if (ret_val)
891 return ret_val;
892
893 /* When LPLU is enabled, we should disable SmartSpeed */
894 ret_val = phy->ops.read_reg(hw, IGP01E1000_PHY_PORT_CONFIG,
895 &data);
896 if (ret_val)
897 return ret_val;
898 data &= ~IGP01E1000_PSCFR_SMART_SPEED;
899 ret_val = phy->ops.write_reg(hw, IGP01E1000_PHY_PORT_CONFIG,
900 data);
901 if (ret_val)
902 return ret_val;
903 } else {
904 data &= ~IGP02E1000_PM_D0_LPLU;
905 ret_val = phy->ops.write_reg(hw, IGP02E1000_PHY_POWER_MGMT,
906 data);
907 /* LPLU and SmartSpeed are mutually exclusive. LPLU is used
908 * during Dx states where the power conservation is most
909 * important. During driver activity we should enable
910 * SmartSpeed, so performance is maintained.
911 */
912 if (phy->smart_speed == e1000_smart_speed_on) {
913 ret_val = phy->ops.read_reg(hw,
915 &data);
916 if (ret_val)
917 return ret_val;
918
920 ret_val = phy->ops.write_reg(hw,
922 data);
923 if (ret_val)
924 return ret_val;
925 } else if (phy->smart_speed == e1000_smart_speed_off) {
926 ret_val = phy->ops.read_reg(hw,
928 &data);
929 if (ret_val)
930 return ret_val;
931
932 data &= ~IGP01E1000_PSCFR_SMART_SPEED;
933 ret_val = phy->ops.write_reg(hw,
935 data);
936 if (ret_val)
937 return ret_val;
938 }
939 }
940
941 return E1000_SUCCESS;
942}
943
951{
952 u32 ctrl, ctrl_ext, eecd, tctl;
953 s32 ret_val;
954
955 DEBUGFUNC("e1000_reset_hw_82571");
956
957 /* Prevent the PCI-E bus from sticking if there is no TLP connection
958 * on the last TLP read/write transaction when MAC is reset.
959 */
961 if (ret_val)
962 DEBUGOUT("PCI-E Master disable polling has failed.\n");
963
964 DEBUGOUT("Masking off all interrupts\n");
965 E1000_WRITE_REG(hw, E1000_IMC, 0xffffffff);
966
968 tctl = E1000_READ_REG(hw, E1000_TCTL);
969 tctl &= ~E1000_TCTL_EN;
970 E1000_WRITE_REG(hw, E1000_TCTL, tctl);
972
973 msec_delay(10);
974
975 /* Must acquire the MDIO ownership before MAC reset.
976 * Ownership defaults to firmware after a reset.
977 */
978 switch (hw->mac.type) {
979 case e1000_82573:
980 case e1000_82574:
981 case e1000_82583:
982 ret_val = e1000_get_hw_semaphore_82574(hw);
983 break;
984 default:
985 break;
986 }
987
988 ctrl = E1000_READ_REG(hw, E1000_CTRL);
989
990 DEBUGOUT("Issuing a global reset to MAC\n");
992
993 /* Must release MDIO ownership and mutex after MAC reset. */
994 switch (hw->mac.type) {
995 case e1000_82573:
996 case e1000_82574:
997 case e1000_82583:
998 /* Release mutex only if the hw semaphore is acquired */
999 if (!ret_val)
1001 break;
1002 default:
1003 /* we didn't get the semaphore no need to put it */
1004 break;
1005 }
1006
1007 if (hw->nvm.type == e1000_nvm_flash_hw) {
1008 usec_delay(10);
1009 ctrl_ext = E1000_READ_REG(hw, E1000_CTRL_EXT);
1010 ctrl_ext |= E1000_CTRL_EXT_EE_RST;
1011 E1000_WRITE_REG(hw, E1000_CTRL_EXT, ctrl_ext);
1013 }
1014
1015 ret_val = e1000_get_auto_rd_done_generic(hw);
1016 if (ret_val)
1017 /* We don't want to continue accessing MAC registers. */
1018 return ret_val;
1019
1020 /* Phy configuration from NVM just starts after EECD_AUTO_RD is set.
1021 * Need to wait for Phy configuration completion before accessing
1022 * NVM and Phy.
1023 */
1024
1025 switch (hw->mac.type) {
1026 case e1000_82571:
1027 case e1000_82572:
1028 /* REQ and GNT bits need to be cleared when using AUTO_RD
1029 * to access the EEPROM.
1030 */
1031 eecd = E1000_READ_REG(hw, E1000_EECD);
1032 eecd &= ~(E1000_EECD_REQ | E1000_EECD_GNT);
1033 E1000_WRITE_REG(hw, E1000_EECD, eecd);
1034 break;
1035 case e1000_82573:
1036 case e1000_82574:
1037 case e1000_82583:
1038 msec_delay(25);
1039 break;
1040 default:
1041 break;
1042 }
1043
1044 /* Clear any pending interrupt events. */
1045 E1000_WRITE_REG(hw, E1000_IMC, 0xffffffff);
1047
1048 if (hw->mac.type == e1000_82571) {
1049 /* Install any alternate MAC address into RAR0 */
1051 if (ret_val)
1052 return ret_val;
1053
1054 e1000_set_laa_state_82571(hw, true);
1055 }
1056
1057 /* Reinitialize the 82571 serdes link state machine */
1060
1061 return E1000_SUCCESS;
1062}
1063
1071{
1072 struct e1000_mac_info *mac = &hw->mac;
1073 u32 reg_data;
1074 s32 ret_val;
1075 u16 i, rar_count = mac->rar_entry_count;
1076
1077 DEBUGFUNC("e1000_init_hw_82571");
1078
1080
1081 /* Initialize identification LED */
1082 ret_val = mac->ops.id_led_init(hw);
1083 /* An error is not fatal and we should not stop init due to this */
1084 if (ret_val)
1085 DEBUGOUT("Error initializing identification LED\n");
1086
1087 /* Disabling VLAN filtering */
1088 DEBUGOUT("Initializing the IEEE VLAN\n");
1089 mac->ops.clear_vfta(hw);
1090
1091 /* Setup the receive address.
1092 * If, however, a locally administered address was assigned to the
1093 * 82571, we must reserve a RAR for it to work around an issue where
1094 * resetting one port will reload the MAC on the other port.
1095 */
1097 rar_count--;
1098 e1000_init_rx_addrs_generic(hw, rar_count);
1099
1100 /* Zero out the Multicast HASH table */
1101 DEBUGOUT("Zeroing the MTA\n");
1102 for (i = 0; i < mac->mta_reg_count; i++)
1104
1105 /* Setup link and flow control */
1106 ret_val = mac->ops.setup_link(hw);
1107
1108 /* Set the transmit descriptor write-back policy */
1109 reg_data = E1000_READ_REG(hw, E1000_TXDCTL(0));
1110 reg_data = ((reg_data & ~E1000_TXDCTL_WTHRESH) |
1112 E1000_WRITE_REG(hw, E1000_TXDCTL(0), reg_data);
1113
1114 /* ...for both queues. */
1115 switch (mac->type) {
1116 case e1000_82573:
1118 /* FALLTHROUGH */
1119 case e1000_82574:
1120 case e1000_82583:
1121 reg_data = E1000_READ_REG(hw, E1000_GCR);
1123 E1000_WRITE_REG(hw, E1000_GCR, reg_data);
1124 break;
1125 default:
1126 reg_data = E1000_READ_REG(hw, E1000_TXDCTL(1));
1127 reg_data = ((reg_data & ~E1000_TXDCTL_WTHRESH) |
1130 E1000_WRITE_REG(hw, E1000_TXDCTL(1), reg_data);
1131 break;
1132 }
1133
1134 /* Clear all of the statistics registers (clear on read). It is
1135 * important that we do this after we have tried to establish link
1136 * because the symbol error count will increment wildly if there
1137 * is no link.
1138 */
1140
1141 return ret_val;
1142}
1143
1151{
1152 u32 reg;
1153
1154 DEBUGFUNC("e1000_initialize_hw_bits_82571");
1155
1156 /* Transmit Descriptor Control 0 */
1157 reg = E1000_READ_REG(hw, E1000_TXDCTL(0));
1158 reg |= (1 << 22);
1159 E1000_WRITE_REG(hw, E1000_TXDCTL(0), reg);
1160
1161 /* Transmit Descriptor Control 1 */
1162 reg = E1000_READ_REG(hw, E1000_TXDCTL(1));
1163 reg |= (1 << 22);
1164 E1000_WRITE_REG(hw, E1000_TXDCTL(1), reg);
1165
1166 /* Transmit Arbitration Control 0 */
1167 reg = E1000_READ_REG(hw, E1000_TARC(0));
1168 reg &= ~(0xF << 27); /* 30:27 */
1169 switch (hw->mac.type) {
1170 case e1000_82571:
1171 case e1000_82572:
1172 reg |= (1 << 23) | (1 << 24) | (1 << 25) | (1 << 26);
1173 break;
1174 case e1000_82574:
1175 case e1000_82583:
1176 reg |= (1 << 26);
1177 break;
1178 default:
1179 break;
1180 }
1181 E1000_WRITE_REG(hw, E1000_TARC(0), reg);
1182
1183 /* Transmit Arbitration Control 1 */
1184 reg = E1000_READ_REG(hw, E1000_TARC(1));
1185 switch (hw->mac.type) {
1186 case e1000_82571:
1187 case e1000_82572:
1188 reg &= ~((1 << 29) | (1 << 30));
1189 reg |= (1 << 22) | (1 << 24) | (1 << 25) | (1 << 26);
1191 reg &= ~(1 << 28);
1192 else
1193 reg |= (1 << 28);
1194 E1000_WRITE_REG(hw, E1000_TARC(1), reg);
1195 break;
1196 default:
1197 break;
1198 }
1199
1200 /* Device Control */
1201 switch (hw->mac.type) {
1202 case e1000_82573:
1203 case e1000_82574:
1204 case e1000_82583:
1205 reg = E1000_READ_REG(hw, E1000_CTRL);
1206 reg &= ~(1 << 29);
1207 E1000_WRITE_REG(hw, E1000_CTRL, reg);
1208 break;
1209 default:
1210 break;
1211 }
1212
1213 /* Extended Device Control */
1214 switch (hw->mac.type) {
1215 case e1000_82573:
1216 case e1000_82574:
1217 case e1000_82583:
1218 reg = E1000_READ_REG(hw, E1000_CTRL_EXT);
1219 reg &= ~(1 << 23);
1220 reg |= (1 << 22);
1222 break;
1223 default:
1224 break;
1225 }
1226
1227 if (hw->mac.type == e1000_82571) {
1228 reg = E1000_READ_REG(hw, E1000_PBA_ECC);
1229 reg |= E1000_PBA_ECC_CORR_EN;
1231 }
1232
1233 /* Workaround for hardware errata.
1234 * Ensure that DMA Dynamic Clock gating is disabled on 82571 and 82572
1235 */
1236 if ((hw->mac.type == e1000_82571) ||
1237 (hw->mac.type == e1000_82572)) {
1238 reg = E1000_READ_REG(hw, E1000_CTRL_EXT);
1239 reg &= ~E1000_CTRL_EXT_DMA_DYN_CLK_EN;
1241 }
1242
1243 /* Disable IPv6 extension header parsing because some malformed
1244 * IPv6 headers can hang the Rx.
1245 */
1246 if (hw->mac.type <= e1000_82573) {
1247 reg = E1000_READ_REG(hw, E1000_RFCTL);
1249 E1000_WRITE_REG(hw, E1000_RFCTL, reg);
1250 }
1251
1252 /* PCI-Ex Control Registers */
1253 switch (hw->mac.type) {
1254 case e1000_82574:
1255 case e1000_82583:
1256 reg = E1000_READ_REG(hw, E1000_GCR);
1257 reg |= (1 << 22);
1258 E1000_WRITE_REG(hw, E1000_GCR, reg);
1259
1260 /* Workaround for hardware errata.
1261 * apply workaround for hardware errata documented in errata
1262 * docs Fixes issue where some error prone or unreliable PCIe
1263 * completions are occurring, particularly with ASPM enabled.
1264 * Without fix, issue can cause Tx timeouts.
1265 */
1266 reg = E1000_READ_REG(hw, E1000_GCR2);
1267 reg |= 1;
1268 E1000_WRITE_REG(hw, E1000_GCR2, reg);
1269 break;
1270 default:
1271 break;
1272 }
1273
1274 return;
1275}
1276
1284static void e1000_clear_vfta_82571(struct e1000_hw *hw)
1285{
1286 u32 offset;
1287 u32 vfta_value = 0;
1288 u32 vfta_offset = 0;
1289 u32 vfta_bit_in_reg = 0;
1290
1291 DEBUGFUNC("e1000_clear_vfta_82571");
1292
1293 switch (hw->mac.type) {
1294 case e1000_82573:
1295 case e1000_82574:
1296 case e1000_82583:
1297 if (hw->mng_cookie.vlan_id != 0) {
1298 /* The VFTA is a 4096b bit-field, each identifying
1299 * a single VLAN ID. The following operations
1300 * determine which 32b entry (i.e. offset) into the
1301 * array we want to set the VLAN ID (i.e. bit) of
1302 * the manageability unit.
1303 */
1304 vfta_offset = (hw->mng_cookie.vlan_id >>
1307 vfta_bit_in_reg =
1308 1 << (hw->mng_cookie.vlan_id &
1310 }
1311 break;
1312 default:
1313 break;
1314 }
1315 for (offset = 0; offset < E1000_VLAN_FILTER_TBL_SIZE; offset++) {
1316 /* If the offset we want to clear is the same offset of the
1317 * manageability VLAN ID, then clear all bits except that of
1318 * the manageability unit.
1319 */
1320 vfta_value = (offset == vfta_offset) ? vfta_bit_in_reg : 0;
1321 E1000_WRITE_REG_ARRAY(hw, E1000_VFTA, offset, vfta_value);
1323 }
1324}
1325
1334{
1335 u16 data;
1336 s32 ret_val;
1337
1338 DEBUGFUNC("e1000_check_mng_mode_82574");
1339
1340 ret_val = hw->nvm.ops.read(hw, NVM_INIT_CONTROL2_REG, 1, &data);
1341 if (ret_val)
1342 return false;
1343
1344 return (data & E1000_NVM_INIT_CTRL2_MNGM) != 0;
1345}
1346
1354{
1355 u32 ctrl;
1356 u32 i;
1357
1358 DEBUGFUNC("e1000_led_on_82574");
1359
1360 ctrl = hw->mac.ledctl_mode2;
1362 /* If no link, then turn LED on by setting the invert bit
1363 * for each LED that's "on" (0x0E) in ledctl_mode2.
1364 */
1365 for (i = 0; i < 4; i++)
1366 if (((hw->mac.ledctl_mode2 >> (i * 8)) & 0xFF) ==
1368 ctrl |= (E1000_LEDCTL_LED0_IVRT << (i * 8));
1369 }
1370 E1000_WRITE_REG(hw, E1000_LEDCTL, ctrl);
1371
1372 return E1000_SUCCESS;
1373}
1374
1382{
1383 u16 status_1kbt = 0;
1384 u16 receive_errors = 0;
1385 s32 ret_val;
1386
1387 DEBUGFUNC("e1000_check_phy_82574");
1388
1389 /* Read PHY Receive Error counter first, if its is max - all F's then
1390 * read the Base1000T status register If both are max then PHY is hung.
1391 */
1392 ret_val = hw->phy.ops.read_reg(hw, E1000_RECEIVE_ERROR_COUNTER,
1393 &receive_errors);
1394 if (ret_val)
1395 return false;
1396 if (receive_errors == E1000_RECEIVE_ERROR_MAX) {
1397 ret_val = hw->phy.ops.read_reg(hw, E1000_BASE1000T_STATUS,
1398 &status_1kbt);
1399 if (ret_val)
1400 return false;
1401 if ((status_1kbt & E1000_IDLE_ERROR_COUNT_MASK) ==
1403 return true;
1404 }
1405
1406 return false;
1407}
1408
1409
1421{
1422 DEBUGFUNC("e1000_setup_link_82571");
1423
1424 /* 82573 does not have a word in the NVM to determine
1425 * the default flow control setting, so we explicitly
1426 * set it to full.
1427 */
1428 switch (hw->mac.type) {
1429 case e1000_82573:
1430 case e1000_82574:
1431 case e1000_82583:
1434 break;
1435 default:
1436 break;
1437 }
1438
1439 return e1000_setup_link_generic(hw);
1440}
1441
1451{
1452 u32 ctrl;
1453 s32 ret_val;
1454
1455 DEBUGFUNC("e1000_setup_copper_link_82571");
1456
1457 ctrl = E1000_READ_REG(hw, E1000_CTRL);
1458 ctrl |= E1000_CTRL_SLU;
1460 E1000_WRITE_REG(hw, E1000_CTRL, ctrl);
1461
1462 switch (hw->phy.type) {
1463 case e1000_phy_m88:
1464 case e1000_phy_bm:
1465 ret_val = e1000_copper_link_setup_m88(hw);
1466 break;
1467 case e1000_phy_igp_2:
1468 ret_val = e1000_copper_link_setup_igp(hw);
1469 break;
1470 default:
1471 return -E1000_ERR_PHY;
1472 break;
1473 }
1474
1475 if (ret_val)
1476 return ret_val;
1477
1479}
1480
1489{
1490 DEBUGFUNC("e1000_setup_fiber_serdes_link_82571");
1491
1492 switch (hw->mac.type) {
1493 case e1000_82571:
1494 case e1000_82572:
1495 /* If SerDes loopback mode is entered, there is no form
1496 * of reset to take the adapter out of that mode. So we
1497 * have to explicitly take the adapter out of loopback
1498 * mode. This prevents drivers from twiddling their thumbs
1499 * if another tool failed to take it out of loopback mode.
1500 */
1503 break;
1504 default:
1505 break;
1506 }
1507
1509}
1510
1531{
1532 struct e1000_mac_info *mac = &hw->mac;
1533 u32 rxcw;
1534 u32 ctrl;
1535 u32 status;
1536 u32 txcw;
1537 u32 i;
1538 s32 ret_val = E1000_SUCCESS;
1539
1540 DEBUGFUNC("e1000_check_for_serdes_link_82571");
1541
1542 ctrl = E1000_READ_REG(hw, E1000_CTRL);
1543 status = E1000_READ_REG(hw, E1000_STATUS);
1545 /* SYNCH bit and IV bit are sticky */
1546 usec_delay(10);
1547 rxcw = E1000_READ_REG(hw, E1000_RXCW);
1548
1549 if ((rxcw & E1000_RXCW_SYNCH) && !(rxcw & E1000_RXCW_IV)) {
1550 /* Receiver is synchronized with no invalid bits. */
1551 switch (mac->serdes_link_state) {
1553 if (!(status & E1000_STATUS_LU)) {
1554 /* We have lost link, retry autoneg before
1555 * reporting link failure
1556 */
1557 mac->serdes_link_state =
1559 mac->serdes_has_link = false;
1560 DEBUGOUT("AN_UP -> AN_PROG\n");
1561 } else {
1562 mac->serdes_has_link = true;
1563 }
1564 break;
1565
1567 /* If we are receiving /C/ ordered sets, re-enable
1568 * auto-negotiation in the TXCW register and disable
1569 * forced link in the Device Control register in an
1570 * attempt to auto-negotiate with our link partner.
1571 */
1572 if (rxcw & E1000_RXCW_C) {
1573 /* Enable autoneg, and unforce link up */
1574 E1000_WRITE_REG(hw, E1000_TXCW, mac->txcw);
1576 (ctrl & ~E1000_CTRL_SLU));
1577 mac->serdes_link_state =
1579 mac->serdes_has_link = false;
1580 DEBUGOUT("FORCED_UP -> AN_PROG\n");
1581 } else {
1582 mac->serdes_has_link = true;
1583 }
1584 break;
1585
1587 if (rxcw & E1000_RXCW_C) {
1588 /* We received /C/ ordered sets, meaning the
1589 * link partner has autonegotiated, and we can
1590 * trust the Link Up (LU) status bit.
1591 */
1592 if (status & E1000_STATUS_LU) {
1593 mac->serdes_link_state =
1595 DEBUGOUT("AN_PROG -> AN_UP\n");
1596 mac->serdes_has_link = true;
1597 } else {
1598 /* Autoneg completed, but failed. */
1599 mac->serdes_link_state =
1601 DEBUGOUT("AN_PROG -> DOWN\n");
1602 }
1603 } else {
1604 /* The link partner did not autoneg.
1605 * Force link up and full duplex, and change
1606 * state to forced.
1607 */
1609 (mac->txcw & ~E1000_TXCW_ANE));
1610 ctrl |= (E1000_CTRL_SLU | E1000_CTRL_FD);
1611 E1000_WRITE_REG(hw, E1000_CTRL, ctrl);
1612
1613 /* Configure Flow Control after link up. */
1614 ret_val =
1616 if (ret_val) {
1617 DEBUGOUT("Error config flow control\n");
1618 break;
1619 }
1620 mac->serdes_link_state =
1622 mac->serdes_has_link = true;
1623 DEBUGOUT("AN_PROG -> FORCED_UP\n");
1624 }
1625 break;
1626
1628 default:
1629 /* The link was down but the receiver has now gained
1630 * valid sync, so lets see if we can bring the link
1631 * up.
1632 */
1633 E1000_WRITE_REG(hw, E1000_TXCW, mac->txcw);
1634 E1000_WRITE_REG(hw, E1000_CTRL, (ctrl &
1635 ~E1000_CTRL_SLU));
1636 mac->serdes_link_state =
1638 mac->serdes_has_link = false;
1639 DEBUGOUT("DOWN -> AN_PROG\n");
1640 break;
1641 }
1642 } else {
1643 if (!(rxcw & E1000_RXCW_SYNCH)) {
1644 mac->serdes_has_link = false;
1646 DEBUGOUT("ANYSTATE -> DOWN\n");
1647 } else {
1648 /* Check several times, if SYNCH bit and CONFIG
1649 * bit both are consistently 1 then simply ignore
1650 * the IV bit and restart Autoneg
1651 */
1652 for (i = 0; i < AN_RETRY_COUNT; i++) {
1653 usec_delay(10);
1654 rxcw = E1000_READ_REG(hw, E1000_RXCW);
1655 if ((rxcw & E1000_RXCW_SYNCH) &&
1656 (rxcw & E1000_RXCW_C))
1657 continue;
1658
1659 if (rxcw & E1000_RXCW_IV) {
1660 mac->serdes_has_link = false;
1661 mac->serdes_link_state =
1663 DEBUGOUT("ANYSTATE -> DOWN\n");
1664 break;
1665 }
1666 }
1667
1668 if (i == AN_RETRY_COUNT) {
1672 mac->serdes_link_state =
1674 mac->serdes_has_link = false;
1675 DEBUGOUT("ANYSTATE -> AN_PROG\n");
1676 }
1677 }
1678 }
1679
1680 return ret_val;
1681}
1682
1692{
1693 s32 ret_val;
1694
1695 DEBUGFUNC("e1000_valid_led_default_82571");
1696
1697 ret_val = hw->nvm.ops.read(hw, NVM_ID_LED_SETTINGS, 1, data);
1698 if (ret_val) {
1699 DEBUGOUT("NVM Read Error\n");
1700 return ret_val;
1701 }
1702
1703 switch (hw->mac.type) {
1704 case e1000_82573:
1705 case e1000_82574:
1706 case e1000_82583:
1707 if (*data == ID_LED_RESERVED_F746)
1708 *data = ID_LED_DEFAULT_82573;
1709 break;
1710 default:
1711 if (*data == ID_LED_RESERVED_0000 ||
1712 *data == ID_LED_RESERVED_FFFF)
1713 *data = ID_LED_DEFAULT;
1714 break;
1715 }
1716
1717 return E1000_SUCCESS;
1718}
1719
1727{
1728 DEBUGFUNC("e1000_get_laa_state_82571");
1729
1730 if (hw->mac.type != e1000_82571)
1731 return false;
1732
1733 return hw->dev_spec._82571.laa_is_present;
1734}
1735
1743void e1000_set_laa_state_82571(struct e1000_hw *hw, bool state)
1744{
1745 DEBUGFUNC("e1000_set_laa_state_82571");
1746
1747 if (hw->mac.type != e1000_82571)
1748 return;
1749
1750 hw->dev_spec._82571.laa_is_present = state;
1751
1752 /* If workaround is activated... */
1753 if (state)
1754 /* Hold a copy of the LAA in RAR[14] This is done so that
1755 * between the time RAR[0] gets clobbered and the time it
1756 * gets fixed, the actual LAA is in one of the RARs and no
1757 * incoming packets directed to this port are dropped.
1758 * Eventually the LAA will be in RAR[0] and RAR[14].
1759 */
1760 hw->mac.ops.rar_set(hw, hw->mac.addr,
1761 hw->mac.rar_entry_count - 1);
1762 return;
1763}
1764
1776{
1777 struct e1000_nvm_info *nvm = &hw->nvm;
1778 s32 ret_val;
1779 u16 data;
1780
1781 DEBUGFUNC("e1000_fix_nvm_checksum_82571");
1782
1783 if (nvm->type != e1000_nvm_flash_hw)
1784 return E1000_SUCCESS;
1785
1786 /* Check bit 4 of word 10h. If it is 0, firmware is done updating
1787 * 10h-12h. Checksum may need to be fixed.
1788 */
1789 ret_val = nvm->ops.read(hw, 0x10, 1, &data);
1790 if (ret_val)
1791 return ret_val;
1792
1793 if (!(data & 0x10)) {
1794 /* Read 0x23 and check bit 15. This bit is a 1
1795 * when the checksum has already been fixed. If
1796 * the checksum is still wrong and this bit is a
1797 * 1, we need to return bad checksum. Otherwise,
1798 * we need to set this bit to a 1 and update the
1799 * checksum.
1800 */
1801 ret_val = nvm->ops.read(hw, 0x23, 1, &data);
1802 if (ret_val)
1803 return ret_val;
1804
1805 if (!(data & 0x8000)) {
1806 data |= 0x8000;
1807 ret_val = nvm->ops.write(hw, 0x23, 1, &data);
1808 if (ret_val)
1809 return ret_val;
1810 ret_val = nvm->ops.update(hw);
1811 if (ret_val)
1812 return ret_val;
1813 }
1814 }
1815
1816 return E1000_SUCCESS;
1817}
1818
1819
1825{
1826 DEBUGFUNC("e1000_read_mac_addr_82571");
1827
1828 if (hw->mac.type == e1000_82571) {
1829 s32 ret_val;
1830
1831 /* If there's an alternate MAC address place it in RAR0
1832 * so that it will override the Si installed default perm
1833 * address.
1834 */
1836 if (ret_val)
1837 return ret_val;
1838 }
1839
1840 return e1000_read_mac_addr_generic(hw);
1841}
1842
1851{
1852 struct e1000_phy_info *phy = &hw->phy;
1853 struct e1000_mac_info *mac = &hw->mac;
1854
1855 if (!phy->ops.check_reset_block)
1856 return;
1857
1858 /* If the management interface is not enabled, then power down */
1859 if (!(mac->ops.check_mng_mode(hw) || phy->ops.check_reset_block(hw)))
1861
1862 return;
1863}
1864
1872{
1873 DEBUGFUNC("e1000_clear_hw_cntrs_82571");
1874
1876
1889
1896
1900
1903
1911}
static s32 e1000_setup_link_82571(struct e1000_hw *hw)
Definition: e1000_82571.c:1420
static s32 e1000_update_nvm_checksum_82571(struct e1000_hw *hw)
Definition: e1000_82571.c:711
static void e1000_initialize_hw_bits_82571(struct e1000_hw *hw)
Definition: e1000_82571.c:1150
static s32 e1000_validate_nvm_checksum_82571(struct e1000_hw *hw)
Definition: e1000_82571.c:772
static s32 e1000_write_nvm_eewr_82571(struct e1000_hw *hw, u16 offset, u16 words, u16 *data)
Definition: e1000_82571.c:796
static s32 e1000_setup_fiber_serdes_link_82571(struct e1000_hw *hw)
Definition: e1000_82571.c:1488
static void e1000_put_hw_semaphore_82574(struct e1000_hw *hw)
Definition: e1000_82571.c:552
bool e1000_get_laa_state_82571(struct e1000_hw *hw)
Definition: e1000_82571.c:1726
static s32 e1000_get_hw_semaphore_82574(struct e1000_hw *hw)
Definition: e1000_82571.c:513
static void e1000_clear_hw_cntrs_82571(struct e1000_hw *hw)
Definition: e1000_82571.c:1871
static s32 e1000_init_phy_params_82571(struct e1000_hw *hw)
Definition: e1000_82571.c:92
static void e1000_release_nvm_82571(struct e1000_hw *hw)
Definition: e1000_82571.c:658
void e1000_init_function_pointers_82571(struct e1000_hw *hw)
Definition: e1000_82571.c:445
static s32 e1000_led_on_82574(struct e1000_hw *hw)
Definition: e1000_82571.c:1353
static void e1000_clear_vfta_82571(struct e1000_hw *hw)
Definition: e1000_82571.c:1284
static s32 e1000_get_cfg_done_82571(struct e1000_hw *hw)
Definition: e1000_82571.c:839
void e1000_set_laa_state_82571(struct e1000_hw *hw, bool state)
Definition: e1000_82571.c:1743
static void e1000_power_down_phy_copper_82571(struct e1000_hw *hw)
Definition: e1000_82571.c:1850
static s32 e1000_fix_nvm_checksum_82571(struct e1000_hw *hw)
Definition: e1000_82571.c:1775
static s32 e1000_read_mac_addr_82571(struct e1000_hw *hw)
Definition: e1000_82571.c:1824
static s32 e1000_init_nvm_params_82571(struct e1000_hw *hw)
Definition: e1000_82571.c:202
static s32 e1000_set_d3_lplu_state_82574(struct e1000_hw *hw, bool active)
Definition: e1000_82571.c:601
static s32 e1000_check_for_serdes_link_82571(struct e1000_hw *hw)
Definition: e1000_82571.c:1530
static s32 e1000_get_phy_id_82571(struct e1000_hw *hw)
Definition: e1000_82571.c:461
static s32 e1000_set_d0_lplu_state_82574(struct e1000_hw *hw, bool active)
Definition: e1000_82571.c:575
static s32 e1000_acquire_nvm_82571(struct e1000_hw *hw)
Definition: e1000_82571.c:628
static s32 e1000_valid_led_default_82571(struct e1000_hw *hw, u16 *data)
Definition: e1000_82571.c:1691
static bool e1000_check_mng_mode_82574(struct e1000_hw *hw)
Definition: e1000_82571.c:1333
static s32 e1000_set_d0_lplu_state_82571(struct e1000_hw *hw, bool active)
Definition: e1000_82571.c:871
static s32 e1000_setup_copper_link_82571(struct e1000_hw *hw)
Definition: e1000_82571.c:1450
static s32 e1000_init_mac_params_82571(struct e1000_hw *hw)
Definition: e1000_82571.c:283
static s32 e1000_init_hw_82571(struct e1000_hw *hw)
Definition: e1000_82571.c:1070
static s32 e1000_reset_hw_82571(struct e1000_hw *hw)
Definition: e1000_82571.c:950
static s32 e1000_write_nvm_82571(struct e1000_hw *hw, u16 offset, u16 words, u16 *data)
Definition: e1000_82571.c:678
bool e1000_check_phy_82574(struct e1000_hw *hw)
Definition: e1000_82571.c:1381
#define ID_LED_DEFAULT_82573
Definition: e1000_82571.h:40
#define E1000_BASE1000T_STATUS
Definition: e1000_82571.h:59
#define E1000_RECEIVE_ERROR_MAX
Definition: e1000_82571.h:62
#define E1000_NVM_INIT_CTRL2_MNGM
Definition: e1000_82571.h:57
#define E1000_IDLE_ERROR_COUNT_MASK
Definition: e1000_82571.h:60
#define AN_RETRY_COUNT
Definition: e1000_82571.h:46
#define E1000_RECEIVE_ERROR_COUNTER
Definition: e1000_82571.h:61
#define ID_LED_RESERVED_F746
Definition: e1000_82571.h:39
#define E1000_GCR_L1_ACT_WITHOUT_L0S_RX
Definition: e1000_82571.h:45
#define ID_LED_RESERVED_0000
#define E1000_ERR_PHY
#define E1000_SWSM2_LOCK
#define PHY_REVISION_MASK
#define BME1000_E_PHY_ID_R2
#define ID_LED_DEFAULT
#define NVM_INIT_CONTROL2_REG
#define M88E1111_I_PHY_ID
#define E1000_TCTL_MULR
#define E1000_CTRL_FRCSPD
#define NVM_WORD_SIZE_BASE_SHIFT
#define E1000_RXCW_IV
#define E1000_NVM_POLL_WRITE
#define E1000_ALL_SPEED_DUPLEX
#define E1000_CTRL_FD
#define E1000_ERR_RESET
#define PHY_ID1
#define E1000_CTRL_SLU
#define E1000_ALL_10_SPEED
#define E1000_EECD_SIZE_EX_SHIFT
#define E1000_EECD_SIZE_EX_MASK
#define E1000_VLAN_FILTER_TBL_SIZE
#define E1000_EECD_GNT
#define E1000_NVM_RW_REG_DATA
#define E1000_NVM_RW_ADDR_SHIFT
#define E1000_TXDCTL_COUNT_DESC
#define ID_LED_RESERVED_FFFF
#define E1000_EECD_FLUPD
#define PHY_CFG_TIMEOUT
#define E1000_RXCW_C
#define E1000_TXCW_ANE
#define E1000_CTRL_RST
#define E1000_PHY_CTRL_D0A_LPLU
#define E1000_EXTCNF_CTRL_MDIO_SW_OWNERSHIP
#define E1000_STATUS_LU
#define E1000_RXCW_SYNCH
#define AUTONEG_ADVERTISE_SPEED_DEFAULT
#define E1000_LEDCTL_LED0_IVRT
#define E1000_NVM_CFG_DONE_PORT_0
#define PHY_ID2
#define E1000_NVM_RW_REG_START
#define E1000_ALL_NOT_GIG
#define E1000_SWSM_SMBI
#define E1000_EECD_ADDR_BITS
#define E1000_EECD_REQ
#define E1000_PBA_ECC_CORR_EN
#define E1000_RAR_ENTRIES
#define E1000_PHY_CTRL_NOND0A_LPLU
#define E1000_CTRL_FRCDPX
#define E1000_SCTL_DISABLE_SERDES_LOOPBACK
#define E1000_FLASH_UPDATES
#define E1000_SUCCESS
#define E1000_RFCTL_NEW_IPV6_EXT_DIS
#define IGP01E1000_I_PHY_ID
#define E1000_CTRL_EXT_EE_RST
Definition: e1000_defines.h:78
#define E1000_LEDCTL_MODE_LED_ON
#define E1000_ERR_NVM
#define E1000_TXDCTL_FULL_TX_DESC_WB
#define NVM_ID_LED_SETTINGS
#define MDIO_OWNERSHIP_TIMEOUT
#define E1000_RFCTL_IPV6_EX_DIS
#define E1000_DEV_ID_82571EB_SERDES_DUAL
Definition: e1000_hw.h:84
@ e1000_phy_m88
Definition: e1000_hw.h:310
@ e1000_phy_igp_2
Definition: e1000_hw.h:312
@ e1000_phy_bm
Definition: e1000_hw.h:316
@ e1000_phy_none
Definition: e1000_hw.h:309
@ e1000_nvm_override_spi_large
Definition: e1000_hw.h:302
@ e1000_nvm_override_spi_small
Definition: e1000_hw.h:301
#define E1000_DEV_ID_82572EI_FIBER
Definition: e1000_hw.h:91
#define E1000_DEV_ID_82571EB_QUAD_FIBER
Definition: e1000_hw.h:88
@ e1000_82573
Definition: e1000_hw.h:254
@ e1000_82572
Definition: e1000_hw.h:253
@ e1000_82571
Definition: e1000_hw.h:252
@ e1000_82574
Definition: e1000_hw.h:255
@ e1000_82583
Definition: e1000_hw.h:256
@ e1000_fc_default
Definition: e1000_hw.h:374
@ e1000_fc_full
Definition: e1000_hw.h:373
@ e1000_smart_speed_off
Definition: e1000_hw.h:400
@ e1000_smart_speed_on
Definition: e1000_hw.h:399
#define E1000_DEV_ID_82571EB_SERDES_QUAD
Definition: e1000_hw.h:85
@ e1000_media_type_fiber
Definition: e1000_hw.h:284
@ e1000_media_type_internal_serdes
Definition: e1000_hw.h:285
@ e1000_media_type_copper
Definition: e1000_hw.h:283
@ e1000_nvm_eeprom_spi
Definition: e1000_hw.h:292
@ e1000_nvm_flash_hw
Definition: e1000_hw.h:294
#define E1000_DEV_ID_82571EB_SERDES
Definition: e1000_hw.h:83
@ e1000_serdes_link_forced_up
Definition: e1000_hw.h:407
@ e1000_serdes_link_autoneg_progress
Definition: e1000_hw.h:405
@ e1000_serdes_link_down
Definition: e1000_hw.h:404
@ e1000_serdes_link_autoneg_complete
Definition: e1000_hw.h:406
#define E1000_DEV_ID_82571EB_FIBER
Definition: e1000_hw.h:82
#define E1000_DEV_ID_82572EI_SERDES
Definition: e1000_hw.h:92
#define E1000_STM_OPCODE
Definition: e1000_i210.h:51
s32 e1000_get_bus_info_pcie_generic(struct e1000_hw *hw)
Definition: e1000_mac.c:240
s32 e1000_get_hw_semaphore(struct e1000_hw *hw)
Definition: e1000_mac.c:2199
s32 e1000_check_for_copper_link_generic(struct e1000_hw *hw)
Definition: e1000_mac.c:717
s32 e1000_id_led_init_generic(struct e1000_hw *hw)
Definition: e1000_mac.c:1775
void e1000_put_hw_semaphore(struct e1000_hw *hw)
Definition: e1000_mac.c:2278
s32 e1000_led_on_generic(struct e1000_hw *hw)
Definition: e1000_mac.c:1936
s32 e1000_disable_pcie_master_generic(struct e1000_hw *hw)
Definition: e1000_mac.c:2023
s32 e1000_check_alt_mac_addr_generic(struct e1000_hw *hw)
Definition: e1000_mac.c:408
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_cleanup_led_generic(struct e1000_hw *hw)
Definition: e1000_mac.c:1875
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
s32 e1000_blink_led_generic(struct e1000_hw *hw)
Definition: e1000_mac.c:1889
s32 e1000_setup_fiber_serdes_link_generic(struct e1000_hw *hw)
Definition: e1000_mac.c:1184
s32 e1000_check_for_fiber_link_generic(struct e1000_hw *hw)
Definition: e1000_mac.c:782
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_get_speed_and_duplex_fiber_serdes_generic(struct e1000_hw E1000_UNUSEDARG *hw, u16 *speed, u16 *duplex)
Definition: e1000_mac.c:1706
s32 e1000_setup_led_generic(struct e1000_hw *hw)
Definition: e1000_mac.c:1843
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_get_auto_rd_done_generic(struct e1000_hw *hw)
Definition: e1000_mac.c:1723
bool e1000_enable_tx_pkt_filtering_generic(struct e1000_hw *hw)
Definition: e1000_manage.c:132
bool e1000_check_mng_mode_generic(struct e1000_hw *hw)
Definition: e1000_manage.c:114
#define E1000_HICR_FW_RESET_ENABLE
Definition: e1000_manage.h:91
#define E1000_FWSM_MODE_MASK
Definition: e1000_manage.h:63
#define E1000_VFTA_ENTRY_MASK
Definition: e1000_manage.h:77
#define E1000_VFTA_ENTRY_BIT_SHIFT_MASK
Definition: e1000_manage.h:78
#define E1000_HICR_FW_RESET
Definition: e1000_manage.h:92
#define E1000_VFTA_ENTRY_SHIFT
Definition: e1000_manage.h:76
s32 e1000_update_nvm_checksum_generic(struct e1000_hw *hw)
Definition: e1000_nvm.c:1235
s32 e1000_read_mac_addr_generic(struct e1000_hw *hw)
Definition: e1000_nvm.c:1174
s32 e1000_write_nvm_spi(struct e1000_hw *hw, u16 offset, u16 words, u16 *data)
Definition: e1000_nvm.c:611
s32 e1000_read_nvm_eerd(struct e1000_hw *hw, u16 offset, u16 words, u16 *data)
Definition: e1000_nvm.c:563
void e1000_release_nvm_generic(struct e1000_hw *hw)
Definition: e1000_nvm.c:370
s32 e1000_poll_eerd_eewr_done(struct e1000_hw *hw, int ee_reg)
Definition: e1000_nvm.c:239
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 DEBUGOUT1(...)
Definition: e1000_osdep.h:111
#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
#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 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
#define ASSERT_CTX_LOCK_HELD(hw)
Definition: e1000_osdep.h:149
s32 e1000_phy_force_speed_duplex_igp(struct e1000_hw *hw)
Definition: e1000_phy.c:1752
s32 e1000_check_reset_block_generic(struct e1000_hw *hw)
Definition: e1000_phy.c:206
s32 e1000_get_cable_length_m88(struct e1000_hw *hw)
Definition: e1000_phy.c:2418
s32 e1000_read_phy_reg_igp(struct e1000_hw *hw, u32 offset, u16 *data)
Definition: e1000_phy.c:777
s32 e1000_read_phy_reg_bm2(struct e1000_hw *hw, u32 offset, u16 *data)
Definition: e1000_phy.c:3243
s32 e1000_get_cable_length_igp_2(struct e1000_hw *hw)
Definition: e1000_phy.c:2567
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_m88(struct e1000_hw *hw)
Definition: e1000_phy.c:2637
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_phy_sw_reset_generic(struct e1000_hw *hw)
Definition: e1000_phy.c:2829
s32 e1000_get_cfg_done_generic(struct e1000_hw E1000_UNUSEDARG *hw)
Definition: e1000_phy.c:2903
s32 e1000_phy_force_speed_duplex_m88(struct e1000_hw *hw)
Definition: e1000_phy.c:1818
s32 e1000_check_polarity_m88(struct e1000_hw *hw)
Definition: e1000_phy.c:2217
s32 e1000_write_phy_reg_m88(struct e1000_hw *hw, u32 offset, u16 data)
Definition: e1000_phy.c:685
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_write_phy_reg_bm2(struct e1000_hw *hw, u32 offset, u16 data)
Definition: e1000_phy.c:3288
s32 e1000_copper_link_setup_m88(struct e1000_hw *hw)
Definition: e1000_phy.c:1120
s32 e1000_read_phy_reg_m88(struct e1000_hw *hw, u32 offset, u16 *data)
Definition: e1000_phy.c:655
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 IGP02E1000_PM_D0_LPLU
Definition: e1000_phy.h:250
#define IGP02E1000_PHY_POWER_MGMT
Definition: e1000_phy.h:138
#define IGP01E1000_PSCFR_SMART_SPEED
Definition: e1000_phy.h:243
#define E1000_RXERRC
Definition: e1000_regs.h:329
#define E1000_GCR
Definition: e1000_regs.h:536
#define E1000_PTC1522
Definition: e1000_regs.h:379
#define E1000_PTC255
Definition: e1000_regs.h:376
#define E1000_ICTXQMTC
Definition: e1000_regs.h:391
#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_ICRXDMTC
Definition: e1000_regs.h:392
#define E1000_VFTA
Definition: e1000_regs.h:499
#define E1000_PRC127
Definition: e1000_regs.h:347
#define E1000_TXCW
Definition: e1000_regs.h:91
#define E1000_PRC64
Definition: e1000_regs.h:346
#define E1000_ICRXPTC
Definition: e1000_regs.h:386
#define E1000_EEMNGCTL
Definition: e1000_regs.h:119
#define E1000_ICTXATC
Definition: e1000_regs.h:389
#define E1000_TNCRS
Definition: e1000_regs.h:337
#define E1000_GCR2
Definition: e1000_regs.h:537
#define E1000_RCTL
Definition: e1000_regs.h:89
#define E1000_HICR
Definition: e1000_regs.h:552
#define E1000_ICTXQEC
Definition: e1000_regs.h:390
#define E1000_RXCW
Definition: e1000_regs.h:92
#define E1000_FLOP
Definition: e1000_regs.h:128
#define E1000_SWSM
Definition: e1000_regs.h:544
#define E1000_TCTL
Definition: e1000_regs.h:104
#define E1000_EEWR
Definition: e1000_regs.h:124
#define E1000_ICRXOC
Definition: e1000_regs.h:393
#define E1000_STATUS
Definition: e1000_regs.h:41
#define E1000_FWSM
Definition: e1000_regs.h:545
#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_ICRXATC
Definition: e1000_regs.h:387
#define E1000_PBA_ECC
Definition: e1000_regs.h:93
#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_SCTL
Definition: e1000_regs.h:60
#define E1000_ICTXPTC
Definition: e1000_regs.h:388
#define E1000_EXTCNF_CTRL
Definition: e1000_regs.h:111
#define E1000_TARC(_n)
Definition: e1000_regs.h:284
#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_SWSM2
Definition: e1000_regs.h:547
#define E1000_POEMB
Definition: e1000_regs.h:114
#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_IAC
Definition: e1000_regs.h:384
#define E1000_MGTPDC
Definition: e1000_regs.h:366
#define E1000_TSCTC
Definition: e1000_regs.h:382
#define E1000_CTRL_EXT
Definition: e1000_regs.h:44
#define E1000_RFCTL
Definition: e1000_regs.h:495
enum e1000_fc_mode requested_mode
Definition: e1000_hw.h:920
union e1000_hw::@46 dev_spec
struct e1000_mac_info mac
Definition: e1000_hw.h:1028
struct e1000_dev_spec_82571 _82571
Definition: e1000_hw.h:1040
struct e1000_nvm_info nvm
Definition: e1000_hw.h:1031
struct e1000_host_mng_dhcp_cookie mng_cookie
Definition: e1000_hw.h:1034
struct e1000_fc_info fc
Definition: e1000_hw.h:1029
u16 device_id
Definition: e1000_hw.h:1047
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
bool adaptive_ifs
Definition: e1000_hw.h:840
bool arc_subsystem_valid
Definition: e1000_hw.h:842
bool asf_firmware_present
Definition: e1000_hw.h:843
enum e1000_serdes_link_state serdes_link_state
Definition: e1000_hw.h:849
u16 mta_reg_count
Definition: e1000_hw.h:830
bool serdes_has_link
Definition: e1000_hw.h:850
u32 ledctl_mode2
Definition: e1000_hw.h:820
u16 rar_entry_count
Definition: e1000_hw.h:836
struct e1000_mac_operations ops
Definition: e1000_hw.h:811
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(* clear_vfta)(struct e1000_hw *)
Definition: e1000_hw.h:731
s32(* blink_led)(struct e1000_hw *)
Definition: e1000_hw.h:726
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
int(* rar_set)(struct e1000_hw *, u8 *, u32)
Definition: e1000_hw.h:747
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
bool(* check_mng_mode)(struct e1000_hw *)
Definition: e1000_hw.h:727
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
enum e1000_media_type media_type
Definition: e1000_hw.h:871
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
void(* release)(struct e1000_hw *)
Definition: e1000_hw.h:784
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(* check_reset_block)(struct e1000_hw *)
Definition: e1000_hw.h:774
s32(* acquire)(struct e1000_hw *)
Definition: e1000_hw.h:771
s32(* set_d0_lplu_state)(struct e1000_hw *, bool)
Definition: e1000_hw.h:786
s32(* write_reg)(struct e1000_hw *, u32, u16)
Definition: e1000_hw.h:788
s32(* commit)(struct e1000_hw *)
Definition: e1000_hw.h:775
void(* power_down)(struct e1000_hw *)
Definition: e1000_hw.h:792
s32(* check_polarity)(struct e1000_hw *)
Definition: e1000_hw.h:773