FreeBSD kernel E1000 device code
e1000_82540.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 * 82540EM Gigabit Ethernet Controller
38 * 82540EP Gigabit Ethernet Controller
39 * 82545EM Gigabit Ethernet Controller (Copper)
40 * 82545EM Gigabit Ethernet Controller (Fiber)
41 * 82545GM Gigabit Ethernet Controller
42 * 82546EB Gigabit Ethernet Controller (Copper)
43 * 82546EB Gigabit Ethernet Controller (Fiber)
44 * 82546GB Gigabit Ethernet Controller
45 */
46
47#include "e1000_api.h"
48
53static void e1000_clear_hw_cntrs_82540(struct e1000_hw *hw);
54static s32 e1000_init_hw_82540(struct e1000_hw *hw);
55static s32 e1000_reset_hw_82540(struct e1000_hw *hw);
56static s32 e1000_set_phy_mode_82540(struct e1000_hw *hw);
57static s32 e1000_set_vco_speed_82540(struct e1000_hw *hw);
60static void e1000_power_down_phy_copper_82540(struct e1000_hw *hw);
61static s32 e1000_read_mac_addr_82540(struct e1000_hw *hw);
62
68{
69 struct e1000_phy_info *phy = &hw->phy;
70 s32 ret_val;
71
72 phy->addr = 1;
74 phy->reset_delay_us = 10000;
75 phy->type = e1000_phy_m88;
76
77 /* Function Pointers */
89
90 ret_val = e1000_get_phy_id(hw);
91 if (ret_val)
92 goto out;
93
94 /* Verify phy id */
95 switch (hw->mac.type) {
96 case e1000_82540:
97 case e1000_82545:
99 case e1000_82546:
101 if (phy->id == M88E1011_I_PHY_ID)
102 break;
103 /* FALLTHROUGH */
104 default:
105 ret_val = -E1000_ERR_PHY;
106 goto out;
107 break;
108 }
109
110out:
111 return ret_val;
112}
113
119{
120 struct e1000_nvm_info *nvm = &hw->nvm;
121 u32 eecd = E1000_READ_REG(hw, E1000_EECD);
122
123 DEBUGFUNC("e1000_init_nvm_params_82540");
124
126 nvm->delay_usec = 50;
127 nvm->opcode_bits = 3;
128 switch (nvm->override) {
130 nvm->address_bits = 8;
131 nvm->word_size = 256;
132 break;
134 nvm->address_bits = 6;
135 nvm->word_size = 64;
136 break;
137 default:
138 nvm->address_bits = eecd & E1000_EECD_SIZE ? 8 : 6;
139 nvm->word_size = eecd & E1000_EECD_SIZE ? 256 : 64;
140 break;
141 }
142
143 /* Function Pointers */
151
152 return E1000_SUCCESS;
153}
154
160{
161 struct e1000_mac_info *mac = &hw->mac;
162 s32 ret_val = E1000_SUCCESS;
163
164 DEBUGFUNC("e1000_init_mac_params_82540");
165
166 /* Set media type */
167 switch (hw->device_id) {
173 break;
177 break;
178 default:
180 break;
181 }
182
183 /* Set mta register count */
184 mac->mta_reg_count = 128;
185 /* Set rar entry count */
187
188 /* Function pointers */
189
190 /* bus type/speed/width */
192 /* function id */
194 /* reset */
196 /* hw initialization */
198 /* link setup */
200 /* physical interface setup */
205 /* check for link */
206 switch (hw->phy.media_type) {
209 break;
212 break;
215 break;
216 default:
217 ret_val = -E1000_ERR_CONFIG;
218 goto out;
219 break;
220 }
221 /* link info */
222 mac->ops.get_link_up_info =
226 /* multicast address update */
228 /* writing VFTA */
230 /* clearing VFTA */
232 /* read mac address */
234 /* ID LED init */
236 /* setup LED */
238 /* cleanup LED */
240 /* turn on/off LED */
243 /* clear hardware counters */
245
246out:
247 return ret_val;
248}
249
257{
258 DEBUGFUNC("e1000_init_function_pointers_82540");
259
263}
264
272{
273 u32 ctrl, manc;
274 s32 ret_val = E1000_SUCCESS;
275
276 DEBUGFUNC("e1000_reset_hw_82540");
277
278 DEBUGOUT("Masking off all interrupts\n");
279 E1000_WRITE_REG(hw, E1000_IMC, 0xFFFFFFFF);
280
284
285 /*
286 * Delay to allow any outstanding PCI transactions to complete
287 * before resetting the device.
288 */
289 msec_delay(10);
290
291 ctrl = E1000_READ_REG(hw, E1000_CTRL);
292
293 DEBUGOUT("Issuing a global reset to 82540/82545/82546 MAC\n");
294 switch (hw->mac.type) {
298 break;
299 default:
300 /*
301 * These controllers can't ack the 64-bit write when
302 * issuing the reset, so we use IO-mapping as a
303 * workaround to issue the reset.
304 */
306 break;
307 }
308
309 /* Wait for EEPROM reload */
310 msec_delay(5);
311
312 /* Disable HW ARPs on ASF enabled adapters */
313 manc = E1000_READ_REG(hw, E1000_MANC);
314 manc &= ~E1000_MANC_ARP_EN;
315 E1000_WRITE_REG(hw, E1000_MANC, manc);
316
317 E1000_WRITE_REG(hw, E1000_IMC, 0xffffffff);
319
320 return ret_val;
321}
322
330{
331 struct e1000_mac_info *mac = &hw->mac;
332 u32 txdctl, ctrl_ext;
333 s32 ret_val;
334 u16 i;
335
336 DEBUGFUNC("e1000_init_hw_82540");
337
338 /* Initialize identification LED */
339 ret_val = mac->ops.id_led_init(hw);
340 if (ret_val) {
341 DEBUGOUT("Error initializing identification LED\n");
342 /* This is not fatal and we should not stop init due to this */
343 }
344
345 /* Disabling VLAN filtering */
346 DEBUGOUT("Initializing the IEEE VLAN\n");
347 if (mac->type < e1000_82545_rev_3)
349
350 mac->ops.clear_vfta(hw);
351
352 /* Setup the receive address. */
354
355 /* Zero out the Multicast HASH table */
356 DEBUGOUT("Zeroing the MTA\n");
357 for (i = 0; i < mac->mta_reg_count; i++) {
359 /*
360 * Avoid back to back register writes by adding the register
361 * read (flush). This is to protect against some strange
362 * bridge configurations that may issue Memory Write Block
363 * (MWB) to our register space. The *_rev_3 hardware at
364 * least doesn't respond correctly to every other dword in an
365 * MWB to our register space.
366 */
368 }
369
370 if (mac->type < e1000_82545_rev_3)
372
373 /* Setup link and flow control */
374 ret_val = mac->ops.setup_link(hw);
375
376 txdctl = E1000_READ_REG(hw, E1000_TXDCTL(0));
377 txdctl = (txdctl & ~E1000_TXDCTL_WTHRESH) |
379 E1000_WRITE_REG(hw, E1000_TXDCTL(0), txdctl);
380
381 /*
382 * Clear all of the statistics registers (clear on read). It is
383 * important that we do this after we have tried to establish link
384 * because the symbol error count will increment wildly if there
385 * is no link.
386 */
388
391 ctrl_ext = E1000_READ_REG(hw, E1000_CTRL_EXT);
392 /*
393 * Relaxed ordering must be disabled to avoid a parity
394 * error crash in a PCI slot.
395 */
396 ctrl_ext |= E1000_CTRL_EXT_RO_DIS;
397 E1000_WRITE_REG(hw, E1000_CTRL_EXT, ctrl_ext);
398 }
399
400 return ret_val;
401}
402
413{
414 u32 ctrl;
415 s32 ret_val;
416 u16 data;
417
418 DEBUGFUNC("e1000_setup_copper_link_82540");
419
420 ctrl = E1000_READ_REG(hw, E1000_CTRL);
421 ctrl |= E1000_CTRL_SLU;
423 E1000_WRITE_REG(hw, E1000_CTRL, ctrl);
424
425 ret_val = e1000_set_phy_mode_82540(hw);
426 if (ret_val)
427 goto out;
428
429 if (hw->mac.type == e1000_82545_rev_3 ||
430 hw->mac.type == e1000_82546_rev_3) {
431 ret_val = hw->phy.ops.read_reg(hw, M88E1000_PHY_SPEC_CTRL,
432 &data);
433 if (ret_val)
434 goto out;
435 data |= 0x00000008;
436 ret_val = hw->phy.ops.write_reg(hw, M88E1000_PHY_SPEC_CTRL,
437 data);
438 if (ret_val)
439 goto out;
440 }
441
442 ret_val = e1000_copper_link_setup_m88(hw);
443 if (ret_val)
444 goto out;
445
447
448out:
449 return ret_val;
450}
451
462{
463 struct e1000_mac_info *mac = &hw->mac;
464 s32 ret_val = E1000_SUCCESS;
465
466 DEBUGFUNC("e1000_setup_fiber_serdes_link_82540");
467
468 switch (mac->type) {
472 /*
473 * If we're on serdes media, adjust the output
474 * amplitude to value set in the EEPROM.
475 */
477 if (ret_val)
478 goto out;
479 }
480 /* Adjust VCO speed to improve BER performance */
481 ret_val = e1000_set_vco_speed_82540(hw);
482 if (ret_val)
483 goto out;
484 default:
485 break;
486 }
487
489
490out:
491 return ret_val;
492}
493
501{
502 s32 ret_val;
503 u16 nvm_data;
504
505 DEBUGFUNC("e1000_adjust_serdes_amplitude_82540");
506
507 ret_val = hw->nvm.ops.read(hw, NVM_SERDES_AMPLITUDE, 1, &nvm_data);
508 if (ret_val)
509 goto out;
510
511 if (nvm_data != NVM_RESERVED_WORD) {
512 /* Adjust serdes output amplitude only. */
513 nvm_data &= NVM_SERDES_AMPLITUDE_MASK;
514 ret_val = hw->phy.ops.write_reg(hw, M88E1000_PHY_EXT_CTRL,
515 nvm_data);
516 if (ret_val)
517 goto out;
518 }
519
520out:
521 return ret_val;
522}
523
531{
532 s32 ret_val;
533 u16 default_page = 0;
534 u16 phy_data;
535
536 DEBUGFUNC("e1000_set_vco_speed_82540");
537
538 /* Set PHY register 30, page 5, bit 8 to 0 */
539
540 ret_val = hw->phy.ops.read_reg(hw, M88E1000_PHY_PAGE_SELECT,
541 &default_page);
542 if (ret_val)
543 goto out;
544
545 ret_val = hw->phy.ops.write_reg(hw, M88E1000_PHY_PAGE_SELECT, 0x0005);
546 if (ret_val)
547 goto out;
548
549 ret_val = hw->phy.ops.read_reg(hw, M88E1000_PHY_GEN_CONTROL, &phy_data);
550 if (ret_val)
551 goto out;
552
553 phy_data &= ~M88E1000_PHY_VCO_REG_BIT8;
554 ret_val = hw->phy.ops.write_reg(hw, M88E1000_PHY_GEN_CONTROL, phy_data);
555 if (ret_val)
556 goto out;
557
558 /* Set PHY register 30, page 4, bit 11 to 1 */
559
560 ret_val = hw->phy.ops.write_reg(hw, M88E1000_PHY_PAGE_SELECT, 0x0004);
561 if (ret_val)
562 goto out;
563
564 ret_val = hw->phy.ops.read_reg(hw, M88E1000_PHY_GEN_CONTROL, &phy_data);
565 if (ret_val)
566 goto out;
567
568 phy_data |= M88E1000_PHY_VCO_REG_BIT11;
569 ret_val = hw->phy.ops.write_reg(hw, M88E1000_PHY_GEN_CONTROL, phy_data);
570 if (ret_val)
571 goto out;
572
573 ret_val = hw->phy.ops.write_reg(hw, M88E1000_PHY_PAGE_SELECT,
574 default_page);
575
576out:
577 return ret_val;
578}
579
590{
591 s32 ret_val = E1000_SUCCESS;
592 u16 nvm_data;
593
594 DEBUGFUNC("e1000_set_phy_mode_82540");
595
596 if (hw->mac.type != e1000_82545_rev_3)
597 goto out;
598
599 ret_val = hw->nvm.ops.read(hw, NVM_PHY_CLASS_WORD, 1, &nvm_data);
600 if (ret_val) {
601 ret_val = -E1000_ERR_PHY;
602 goto out;
603 }
604
605 if ((nvm_data != NVM_RESERVED_WORD) && (nvm_data & NVM_PHY_CLASS_A)) {
606 ret_val = hw->phy.ops.write_reg(hw, M88E1000_PHY_PAGE_SELECT,
607 0x000B);
608 if (ret_val) {
609 ret_val = -E1000_ERR_PHY;
610 goto out;
611 }
612 ret_val = hw->phy.ops.write_reg(hw, M88E1000_PHY_GEN_CONTROL,
613 0x8104);
614 if (ret_val) {
615 ret_val = -E1000_ERR_PHY;
616 goto out;
617 }
618
619 }
620
621out:
622 return ret_val;
623}
624
633{
634 /* If the management interface is not enabled, then power down */
637
638 return;
639}
640
648{
649 DEBUGFUNC("e1000_clear_hw_cntrs_82540");
650
652
665
672
676}
677
693{
694 s32 ret_val = E1000_SUCCESS;
695 u16 offset, nvm_data, i;
696
697 DEBUGFUNC("e1000_read_mac_addr");
698
699 for (i = 0; i < ETHER_ADDR_LEN; i += 2) {
700 offset = i >> 1;
701 ret_val = hw->nvm.ops.read(hw, offset, 1, &nvm_data);
702 if (ret_val) {
703 DEBUGOUT("NVM Read Error\n");
704 goto out;
705 }
706 hw->mac.perm_addr[i] = (u8)(nvm_data & 0xFF);
707 hw->mac.perm_addr[i+1] = (u8)(nvm_data >> 8);
708 }
709
710 /* Flip last bit of mac address if we're on second port */
711 if (hw->bus.func == E1000_FUNC_1)
712 hw->mac.perm_addr[5] ^= 1;
713
714 for (i = 0; i < ETHER_ADDR_LEN; i++)
715 hw->mac.addr[i] = hw->mac.perm_addr[i];
716
717out:
718 return ret_val;
719}
static s32 e1000_adjust_serdes_amplitude_82540(struct e1000_hw *hw)
Definition: e1000_82540.c:500
static s32 e1000_init_phy_params_82540(struct e1000_hw *hw)
Definition: e1000_82540.c:67
static s32 e1000_read_mac_addr_82540(struct e1000_hw *hw)
Definition: e1000_82540.c:692
static s32 e1000_setup_fiber_serdes_link_82540(struct e1000_hw *hw)
Definition: e1000_82540.c:461
static s32 e1000_reset_hw_82540(struct e1000_hw *hw)
Definition: e1000_82540.c:271
static s32 e1000_setup_copper_link_82540(struct e1000_hw *hw)
Definition: e1000_82540.c:412
static void e1000_power_down_phy_copper_82540(struct e1000_hw *hw)
Definition: e1000_82540.c:632
void e1000_init_function_pointers_82540(struct e1000_hw *hw)
Definition: e1000_82540.c:256
static s32 e1000_set_phy_mode_82540(struct e1000_hw *hw)
Definition: e1000_82540.c:589
static s32 e1000_init_mac_params_82540(struct e1000_hw *hw)
Definition: e1000_82540.c:159
static s32 e1000_set_vco_speed_82540(struct e1000_hw *hw)
Definition: e1000_82540.c:530
static s32 e1000_init_nvm_params_82540(struct e1000_hw *hw)
Definition: e1000_82540.c:118
static void e1000_clear_hw_cntrs_82540(struct e1000_hw *hw)
Definition: e1000_82540.c:647
static s32 e1000_init_hw_82540(struct e1000_hw *hw)
Definition: e1000_82540.c:329
#define M88E1000_PHY_GEN_CONTROL
#define E1000_ERR_PHY
#define M88E1000_PHY_EXT_CTRL
#define NVM_PHY_CLASS_A
#define E1000_EECD_SIZE
#define M88E1000_PHY_SPEC_CTRL
#define E1000_CTRL_FRCSPD
#define E1000_TCTL_PSP
#define E1000_CTRL_SLU
#define NVM_PHY_CLASS_WORD
#define E1000_CTRL_EXT_RO_DIS
Definition: e1000_defines.h:83
#define E1000_CTRL_RST
#define AUTONEG_ADVERTISE_SPEED_DEFAULT
#define E1000_MANC_SMBUS_EN
#define NVM_SERDES_AMPLITUDE
#define E1000_RAR_ENTRIES
#define NVM_RESERVED_WORD
#define M88E1000_PHY_VCO_REG_BIT11
#define E1000_CTRL_FRCDPX
#define NVM_SERDES_AMPLITUDE_MASK
#define E1000_ERR_CONFIG
#define E1000_SUCCESS
#define M88E1000_PHY_PAGE_SELECT
#define M88E1011_I_PHY_ID
#define E1000_TXDCTL_FULL_TX_DESC_WB
@ e1000_phy_m88
Definition: e1000_hw.h:310
@ e1000_nvm_override_microwire_large
Definition: e1000_hw.h:304
@ e1000_nvm_override_microwire_small
Definition: e1000_hw.h:303
#define E1000_DEV_ID_82545GM_SERDES
Definition: e1000_hw.h:61
#define E1000_FUNC_1
Definition: e1000_hw.h:229
#define E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3
Definition: e1000_hw.h:70
#define E1000_DEV_ID_82545EM_FIBER
Definition: e1000_hw.h:58
@ e1000_82540
Definition: e1000_hw.h:243
@ e1000_82545_rev_3
Definition: e1000_hw.h:245
@ e1000_82546
Definition: e1000_hw.h:246
@ e1000_82545
Definition: e1000_hw.h:244
@ e1000_82546_rev_3
Definition: e1000_hw.h:247
#define E1000_DEV_ID_82546GB_FIBER
Definition: e1000_hw.h:66
#define E1000_DEV_ID_82546GB_SERDES
Definition: e1000_hw.h:67
@ 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_microwire
Definition: e1000_hw.h:293
#define E1000_DEV_ID_82546EB_FIBER
Definition: e1000_hw.h:63
#define E1000_DEV_ID_82546GB_QUAD_COPPER
Definition: e1000_hw.h:69
#define E1000_DEV_ID_82545GM_FIBER
Definition: e1000_hw.h:60
void e1000_pcix_mmrbc_workaround_generic(struct e1000_hw *hw)
Definition: e1000_mac.c:632
s32 e1000_valid_led_default_generic(struct e1000_hw *hw, u16 *data)
Definition: e1000_mac.c:1752
s32 e1000_check_for_copper_link_generic(struct e1000_hw *hw)
Definition: e1000_mac.c:717
void e1000_set_lan_id_multi_port_pci(struct e1000_hw *hw)
Definition: e1000_mac.c:304
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_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_setup_fiber_serdes_link_generic(struct e1000_hw *hw)
Definition: e1000_mac.c:1184
void e1000_clear_vfta_generic(struct e1000_hw *hw)
Definition: e1000_mac.c:340
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_check_for_serdes_link_generic(struct e1000_hw *hw)
Definition: e1000_mac.c:849
s32 e1000_setup_led_generic(struct e1000_hw *hw)
Definition: e1000_mac.c:1843
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_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 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 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_get_cable_length_m88(struct e1000_hw *hw)
Definition: e1000_phy.c:2418
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
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_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_setup_copper_link_generic(struct e1000_hw *hw)
Definition: e1000_phy.c:1699
#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_CTRL_DUP
Definition: e1000_regs.h:40
#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_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_VET
Definition: e1000_regs.h:78
#define E1000_TSCTC
Definition: e1000_regs.h:382
#define E1000_CTRL_EXT
Definition: e1000_regs.h:44
struct e1000_bus_info bus
Definition: e1000_hw.h:1032
struct e1000_mac_info mac
Definition: e1000_hw.h:1028
struct e1000_nvm_info nvm
Definition: e1000_hw.h:1031
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
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(* 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
enum e1000_media_type media_type
Definition: e1000_hw.h:871
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
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(* 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
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