#include <mii.h>#include <stdlib.h>#include <string.h>#include <unistd.h>#include <byteswap.h>#include <errno.h>#include <gpxe/malloc.h>#include <gpxe/pci.h>#include <gpxe/pci_io.h>#include <gpxe/iobuf.h>#include <gpxe/netdevice.h>#include <gpxe/ethernet.h>#include <gpxe/if_ether.h>#include <gpxe/io.h>Go to the source code of this file.
| #define ETH_FCS_LEN 4 |
Definition at line 43 of file atl1e.h.
Referenced by atl1e_clean_rx_irq(), atl1e_configure(), atl1e_configure_tx(), atl1e_init_ring_resources(), e1000_sw_init(), e1000e_get_variants_ich8lan(), e1000e_probe(), igb_probe(), igb_sw_init(), and vxge_hw_vpath_poll_rx().
| #define VLAN_HLEN 4 |
Definition at line 44 of file atl1e.h.
Referenced by atl1e_configure(), atl1e_configure_tx(), and atl1e_init_ring_resources().
| #define NET_IP_ALIGN 2 |
| #define SPEED_0 0xffff |
Definition at line 47 of file atl1e.h.
Referenced by atl1e_check_link(), atl1e_down(), and atl1e_sw_init().
| #define SPEED_10 10 |
Definition at line 48 of file atl1e.h.
Referenced by atl1e_get_speed_and_duplex(), bnx2_5708s_linkup(), bnx2_copper_linkup(), bnx2_report_fw_link(), bnx2_set_mac_link(), e1000_get_link_up_info_82541(), e1000_get_speed_and_duplex_copper_generic(), e1000e_get_speed_and_duplex_copper(), igb_get_pcs_speed_and_duplex_82575(), igb_get_speed_and_duplex_copper_generic(), rtl8169_set_speed_xmii(), sky2_phy_speed(), tg3_aux_stat_to_speed_duplex(), tg3_setup_copper_phy(), yukon_mac_init(), and yukon_speed().
| #define SPEED_100 100 |
Definition at line 49 of file atl1e.h.
Referenced by atl1e_get_speed_and_duplex(), bnx2_5708s_linkup(), bnx2_copper_linkup(), bnx2_report_fw_link(), bnx2_set_mac_link(), bnx2_setup_copper_phy(), e1000_get_link_up_info_82541(), e1000_get_speed_and_duplex_copper_generic(), e1000e_get_speed_and_duplex_copper(), igb_get_pcs_speed_and_duplex_82575(), igb_get_speed_and_duplex_copper_generic(), rtl8169_set_speed_xmii(), skge_led(), sky2_phy_init(), sky2_phy_speed(), tg3_aux_stat_to_speed_duplex(), tg3_link_report(), tg3_setup_copper_phy(), yukon_init(), yukon_mac_init(), and yukon_speed().
| #define SPEED_1000 1000 |
Definition at line 50 of file atl1e.h.
Referenced by atl1e_get_speed_and_duplex(), atl1e_setup_mac_ctrl(), bcom_check_link(), bnx2_5706s_linkup(), bnx2_5708s_linkup(), bnx2_copper_linkup(), bnx2_init_board(), bnx2_report_fw_link(), bnx2_set_mac_link(), e1000_check_for_copper_link_82543(), e1000_get_speed_and_duplex_copper_generic(), e1000_get_speed_and_duplex_fiber_serdes_generic(), e1000e_cfg_on_link_up_80003es2lan(), e1000e_get_link_up_info_ich8lan(), e1000e_get_speed_and_duplex_copper(), e1000e_get_speed_and_duplex_fiber_serdes(), igb_get_pcs_speed_and_duplex_82575(), igb_get_speed_and_duplex_copper_generic(), igb_get_speed_and_duplex_fiber_serdes_generic(), rtl8169_init_phy(), rtl8169_set_speed_tbi(), rtl8169_set_speed_xmii(), sky2_autoneg_done(), sky2_phy_init(), sky2_phy_speed(), tg3_aux_stat_to_speed_duplex(), tg3_link_report(), tg3_setup_copper_phy(), tg3_setup_fiber_phy(), tg3_setup_phy(), xm_check_link(), yukon_init(), yukon_mac_init(), yukon_phy_intr(), and yukon_speed().
| #define HALF_DUPLEX 1 |
Definition at line 51 of file atl1e.h.
Referenced by atl1e_get_speed_and_duplex(), e1000_config_fc_after_link_up_generic(), e1000_get_link_up_info_82541(), e1000_get_speed_and_duplex_copper_generic(), e1000e_cfg_kmrn_10_100_80003es2lan(), e1000e_config_fc_after_link_up(), e1000e_get_speed_and_duplex_copper(), igb_config_fc_after_link_up_generic(), igb_get_pcs_speed_and_duplex_82575(), and igb_get_speed_and_duplex_copper_generic().
| #define FULL_DUPLEX 2 |
Definition at line 52 of file atl1e.h.
Referenced by atl1e_check_link(), atl1e_get_speed_and_duplex(), atl1e_setup_mac_ctrl(), atl1e_sw_init(), e1000_get_speed_and_duplex_copper_generic(), e1000_get_speed_and_duplex_fiber_serdes_generic(), e1000e_get_speed_and_duplex_copper(), e1000e_get_speed_and_duplex_fiber_serdes(), igb_get_pcs_speed_and_duplex_82575(), igb_get_speed_and_duplex_copper_generic(), and igb_get_speed_and_duplex_fiber_serdes_generic().
| #define AT_ERR_EEPROM 1 |
| #define AT_ERR_PHY 2 |
Definition at line 56 of file atl1e.h.
Referenced by atl1e_read_phy_reg(), and atl1e_write_phy_reg().
| #define AT_ERR_PHY_SPEED 7 |
| #define AT_ERR_PHY_RES 8 |
| #define AT_ERR_TIMEOUT 9 |
Definition at line 63 of file atl1e.h.
Referenced by atl1e_get_permanent_address(), and atl1e_reset_hw().
| #define AT_PAGE_NUM_PER_QUEUE 2 |
Definition at line 66 of file atl1e.h.
Referenced by atl1e_cal_ring_size(), atl1e_clean_rx_ring(), atl1e_configure_des_ring(), atl1e_init_ring_ptrs(), and atl1e_setup_ring_resources().
| #define AT_TWSI_EEPROM_TIMEOUT 100 |
| #define AT_HW_MAX_IDLE_DELAY 10 |
| #define TPD_BUFLEN_MASK 0x3FFF |
| #define TPD_BUFLEN_SHIFT 0 |
| #define TPD_EOP_SHIFT 0 |
| #define RRS_PKT_SIZE_MASK 0x3FFF |
| #define RRS_PKT_SIZE_SHIFT 16 |
| #define RRS_IS_ERR_FRAME 0x0200 |
| #define RRS_ERR_BAD_CRC 0x0001 |
| #define RRS_ERR_CODE 0x0002 |
| #define RRS_ERR_DRIBBLE 0x0004 |
| #define RRS_ERR_TRUNC 0x0020 |
| #define AT_WRITE_REG | ( | a, | |||
| reg, | |||||
| value | ) | writel((value), ((a)->hw_addr + reg)) |
Definition at line 239 of file atl1e.h.
Referenced by atl1e_check_eeprom_exist(), atl1e_check_link(), atl1e_configure(), atl1e_configure_des_ring(), atl1e_configure_dma(), atl1e_configure_rx(), atl1e_configure_tx(), atl1e_get_permanent_address(), atl1e_init_hw(), atl1e_init_pcie(), atl1e_irq_disable(), atl1e_irq_enable(), atl1e_irq_reset(), atl1e_poll(), atl1e_read_phy_reg(), atl1e_reset_hw(), atl1e_setup_mac_ctrl(), atl1e_tx_queue(), atl1e_up(), and atl1e_write_phy_reg().
| #define AT_WRITE_FLUSH | ( | a | ) | readl((a)->hw_addr) |
Definition at line 242 of file atl1e.h.
Referenced by atl1e_irq_disable(), atl1e_irq_enable(), and atl1e_irq_reset().
| #define AT_READ_REG | ( | a, | |||
| reg | ) | readl((a)->hw_addr + reg) |
Definition at line 245 of file atl1e.h.
Referenced by atl1e_check_eeprom_exist(), atl1e_check_link(), atl1e_configure(), atl1e_configure_rx(), atl1e_configure_tx(), atl1e_get_permanent_address(), atl1e_init_pcie(), atl1e_phy_commit(), atl1e_poll(), atl1e_read_phy_reg(), atl1e_reset_hw(), atl1e_sw_init(), atl1e_up(), and atl1e_write_phy_reg().
| #define AT_WRITE_REGB | ( | a, | |||
| reg, | |||||
| value | ) | writeb((value), ((a)->hw_addr + reg)) |
Definition at line 248 of file atl1e.h.
Referenced by atl1e_clean_rx_irq(), and atl1e_configure_des_ring().
| #define AT_WRITE_REGW | ( | a, | |||
| reg, | |||||
| value | ) | writew((value), ((a)->hw_addr + reg)) |
Definition at line 254 of file atl1e.h.
Referenced by atl1e_configure(), atl1e_configure_rx(), atl1e_configure_tx(), atl1e_force_ps(), and atl1e_phy_init().
| #define AT_READ_REGW | ( | a, | |||
| reg | ) | readw((a)->hw_addr + reg) |
Definition at line 257 of file atl1e.h.
Referenced by atl1e_check_eeprom_exist(), and atl1e_clean_tx_irq().
| #define AT_WRITE_REG_ARRAY | ( | a, | |||
| reg, | |||||
| offset, | |||||
| value | ) | writel((value), (((a)->hw_addr + reg) + ((offset) << 2))) |
Definition at line 260 of file atl1e.h.
Referenced by atl1e_configure(), atl1e_hw_set_mac_addr(), and atl1e_init_hw().
| #define REG_PM_CTRLSTAT 0x44 |
| #define REG_PCIE_CAP_LIST 0x58 |
| #define REG_DEVICE_CTRL 0x60 |
| #define DEVICE_CTRL_MAX_PAYLOAD_MASK 0x7 |
| #define DEVICE_CTRL_MAX_PAYLOAD_SHIFT 5 |
| #define DEVICE_CTRL_MAX_RREQ_SZ_MASK 0x7 |
| #define DEVICE_CTRL_MAX_RREQ_SZ_SHIFT 12 |
| #define REG_SPI_FLASH_CTRL 0x200 |
| #define SPI_FLASH_CTRL_EN_VPD 0x2000 |
| #define REG_TWSI_CTRL 0x218 |
| #define TWSI_CTRL_SW_LDSTART 0x800 |
| #define REG_MASTER_CTRL 0x1400 |
Definition at line 397 of file atl1e.h.
Referenced by atl1e_configure(), atl1e_reset_hw(), and atl1e_up().
| #define MASTER_CTRL_SOFT_RST 0x1 |
| #define MASTER_CTRL_ITIMER_EN 0x4 |
| #define MASTER_CTRL_MANUAL_INT 0x8 |
| #define MASTER_CTRL_ITIMER2_EN 0x20 |
| #define MASTER_CTRL_LED_MODE 0x200 |
| #define REG_IRQ_MODU_TIMER_INIT 0x1408 |
| #define REG_IRQ_MODU_TIMER2_INIT 0x140A |
| #define REG_GPHY_CTRL 0x140C |
| #define GPHY_CTRL_EXT_RESET 1 |
| #define GPHY_CTRL_DEFAULT |
| #define GPHY_CTRL_PW_WOL_DIS |
Value:
(\
GPHY_CTRL_PHY_PLL_ON |\
GPHY_CTRL_SEL_ANA_RST |\
GPHY_CTRL_HIB_PULSE |\
GPHY_CTRL_HIB_EN |\
GPHY_CTRL_PWDOWN_HW |\
GPHY_CTRL_PCLK_SEL_DIS |\
GPHY_CTRL_PHY_IDDQ)
Definition at line 441 of file atl1e.h.
Referenced by atl1e_force_ps().
| #define REG_CMBDISDMA_TIMER 0x140E |
| #define REG_IDLE_STATUS 0x1410 |
| #define REG_MDIO_CTRL 0x1414 |
Definition at line 466 of file atl1e.h.
Referenced by atl1e_phy_commit(), atl1e_read_phy_reg(), and atl1e_write_phy_reg().
| #define MDIO_DATA_MASK 0xffff |
| #define MDIO_DATA_SHIFT 0 |
| #define MDIO_REG_ADDR_MASK 0x1f |
Definition at line 469 of file atl1e.h.
Referenced by atl1e_mdio_read(), atl1e_mdio_write(), atl1e_probe(), atl1e_read_phy_reg(), and atl1e_write_phy_reg().
| #define MDIO_REG_ADDR_SHIFT 16 |
Definition at line 470 of file atl1e.h.
Referenced by atl1e_read_phy_reg(), and atl1e_write_phy_reg().
| #define MDIO_RW 0x200000 |
| #define MDIO_SUP_PREAMBLE 0x400000 |
Definition at line 472 of file atl1e.h.
Referenced by atl1e_read_phy_reg(), and atl1e_write_phy_reg().
| #define MDIO_START 0x800000 |
Definition at line 473 of file atl1e.h.
Referenced by atl1e_phy_commit(), atl1e_read_phy_reg(), and atl1e_write_phy_reg().
| #define MDIO_CLK_SEL_SHIFT 24 |
Definition at line 474 of file atl1e.h.
Referenced by atl1e_read_phy_reg(), and atl1e_write_phy_reg().
| #define MDIO_CLK_25_4 0 |
Definition at line 475 of file atl1e.h.
Referenced by atl1e_read_phy_reg(), and atl1e_write_phy_reg().
| #define MDIO_BUSY 0x8000000 |
Definition at line 482 of file atl1e.h.
Referenced by atl1e_phy_commit(), atl1e_read_phy_reg(), and atl1e_write_phy_reg().
| #define MDIO_WAIT_TIMES 10 |
Definition at line 484 of file atl1e.h.
Referenced by atl1e_read_phy_reg(), and atl1e_write_phy_reg().
| #define REG_PHY_STATUS 0x1418 |
| #define PHY_STATUS_100M 0x20000 |
| #define PHY_STATUS_EMI_CA 0x40000 |
| #define REG_MAC_CTRL 0x1480 |
Definition at line 513 of file atl1e.h.
Referenced by atl1e_check_link(), and atl1e_setup_mac_ctrl().
| #define MAC_CTRL_TX_EN 1 |
| #define MAC_CTRL_RX_EN 2 |
Definition at line 515 of file atl1e.h.
Referenced by atl1e_check_link(), and atl1e_setup_mac_ctrl().
| #define MAC_CTRL_TX_FLOW 4 |
| #define MAC_CTRL_RX_FLOW 8 |
| #define MAC_CTRL_DUPLX 0x20 |
| #define MAC_CTRL_ADD_CRC 0x40 |
| #define MAC_CTRL_PAD 0x80 |
| #define MAC_CTRL_PRMLEN_SHIFT 10 |
| #define MAC_CTRL_PRMLEN_MASK 0xf |
| #define MAC_CTRL_SPEED_SHIFT 20 |
| #define MAC_CTRL_SPEED_1000 2 |
| #define MAC_CTRL_SPEED_10_100 1 |
| #define MAC_CTRL_MC_ALL_EN 0x2000000 |
| #define MAC_CTRL_BC_EN 0x4000000 |
| #define REG_MAC_STA_ADDR 0x1488 |
Definition at line 555 of file atl1e.h.
Referenced by atl1e_get_permanent_address(), and atl1e_hw_set_mac_addr().
| #define REG_RX_HASH_TABLE 0x1490 |
| #define REG_MTU 0x149c |
| #define REG_WOL_CTRL 0x14a0 |
| #define REG_SRAM_RXF_LEN 0x1524 |
| #define REG_LOAD_PTR 0x1534 |
| #define REG_DESC_BASE_ADDR_HI 0x1540 |
| #define REG_RXF0_BASE_ADDR_HI 0x1540 |
| #define REG_TPD_BASE_ADDR_LO 0x154C |
| #define REG_HOST_RXFPAGE_SIZE 0x1558 |
| #define REG_TPD_RING_SIZE 0x155C |
| #define REG_IDT_TABLE REG_IDT_TABLE0 |
| #define REG_BASE_CPU_NUMBER 0x157C |
| #define REG_TXQ_CTRL 0x1580 |
| #define TXQ_CTRL_NUM_TPD_BURST_MASK 0xF |
| #define TXQ_CTRL_NUM_TPD_BURST_SHIFT 0 |
| #define TXQ_CTRL_EN 0x20 |
| #define TXQ_CTRL_ENH_MODE 0x40 |
| #define REG_TX_EARLY_TH 0x1584 |
| #define REG_RXQ_CTRL 0x15A0 |
| #define RXQ_CTRL_PBA_ALIGN_32 0 |
| #define RXQ_CTRL_CUT_THRU_EN 0x40000000 |
| #define RXQ_CTRL_EN 0x80000000 |
| #define REG_RXQ_JMBOSZ_RRDTIM 0x15A4 |
| #define RXQ_JMBOSZ_TH_MASK 0x7ff |
| #define RXQ_JMBOSZ_TH_SHIFT 0 |
| #define RXQ_JMBO_LKAH_MASK 0xf |
| #define RXQ_JMBO_LKAH_SHIFT 11 |
| #define REG_RXQ_RXF_PAUSE_THRESH 0x15A8 |
| #define RXQ_RXF_PAUSE_TH_HI_SHIFT 0 |
| #define RXQ_RXF_PAUSE_TH_HI_MASK 0xfff |
| #define RXQ_RXF_PAUSE_TH_LO_SHIFT 16 |
| #define RXQ_RXF_PAUSE_TH_LO_MASK 0xfff |
| #define REG_DMA_CTRL 0x15C0 |
| #define DMA_CTRL_DMAR_OUT_ORDER 0x4 |
| #define DMA_CTRL_DMAR_BURST_LEN_SHIFT 4 |
| #define DMA_CTRL_DMAR_BURST_LEN_MASK 7 |
| #define DMA_CTRL_DMAW_BURST_LEN_SHIFT 7 |
| #define DMA_CTRL_DMAW_BURST_LEN_MASK 7 |
| #define DMA_CTRL_DMAR_REQ_PRI 0x400 |
| #define DMA_CTRL_DMAR_DLY_CNT_MASK 0x1F |
| #define DMA_CTRL_DMAR_DLY_CNT_SHIFT 11 |
| #define DMA_CTRL_DMAW_DLY_CNT_MASK 0xF |
| #define DMA_CTRL_DMAW_DLY_CNT_SHIFT 16 |
| #define DMA_CTRL_RXCMB_EN 0x200000 |
| #define REG_SMB_STAT_TIMER 0x15C4 |
| #define REG_TRIG_RRD_THRESH 0x15CA |
| #define REG_TRIG_TPD_THRESH 0x15C8 |
| #define REG_TRIG_TXTIMER 0x15CC |
| #define REG_TRIG_RXTIMER 0x15CE |
| #define REG_MB_TPD_PROD_IDX 0x15F0 |
| #define REG_ISR 0x1600 |
Definition at line 780 of file atl1e.h.
Referenced by atl1e_configure(), atl1e_irq_enable(), atl1e_irq_reset(), and atl1e_poll().
| #define ISR_MANUAL 4 |
| #define ISR_DMAR_TO_RST 0x400 |
| #define ISR_DMAW_TO_RST 0x800 |
| #define ISR_GPHY 0x1000 |
| #define ISR_PHY_LINKDOWN 0x10000000 |
| #define ISR_DIS_INT 0x80000000 |
| #define REG_IMR 0x1604 |
Definition at line 817 of file atl1e.h.
Referenced by atl1e_irq_disable(), atl1e_irq_enable(), and atl1e_irq_reset().
| #define IMR_NORMAL_MASK |
Value:
(\
ISR_SMB |\
ISR_TXF_UN |\
ISR_HW_RXF_OV |\
ISR_HOST_RXF0_OV|\
ISR_MANUAL |\
ISR_GPHY |\
ISR_GPHY_LPW |\
ISR_DMAR_TO_RST |\
ISR_DMAW_TO_RST |\
ISR_PHY_LINKDOWN|\
ISR_RX_PKT |\
ISR_TX_PKT)
Definition at line 820 of file atl1e.h.
Referenced by atl1e_irq_enable(), and atl1e_poll().
| #define ISR_TX_EVENT (ISR_TXF_UN | ISR_TX_PKT) |
| #define ISR_RX_EVENT (ISR_HOST_RXF0_OV | ISR_HW_RXF_OV | ISR_RX_PKT) |
| #define REG_TPD_CONS_IDX 0x1804 |
| #define REG_HOST_TX_CMB_LO 0x1840 |
| #define MII_BMCR 0x00 |
Definition at line 869 of file atl1e.h.
Referenced by amd8111e_poll_link(), amd8111e_wait_link(), atl1e_phy_commit(), atl1e_restart_autoneg(), b44_phy_reset(), bnx2_5706s_linkup(), bnx2_copper_linkup(), bnx2_reset_phy(), bnx2_set_link(), bnx2_setup_copper_phy(), bnx2_setup_serdes_phy(), phy_init(), phy_reset(), rtl8169_set_speed_xmii(), rtl8169_xmii_reset_enable(), rtl8169_xmii_reset_pending(), sis190_default_phy(), sis190_phy_task(), sis190_set_speed_auto(), sundance_probe(), tg3_bmcr_reset(), tg3_phy_copper_begin(), tg3_phy_probe(), tg3_phy_reset_5703_4_5(), tg3_setup_copper_phy(), tg3_setup_fiber_phy(), TLan_PhyDetect(), TLan_PhyFinishAutoNeg(), TLan_PhyPowerDown(), TLan_PhyPowerUp(), TLan_PhyReset(), and TLan_PhyStartLink().
| #define MII_BMSR 0x01 |
Definition at line 870 of file atl1e.h.
Referenced by amd8111e_poll_link(), amd8111e_wait_link(), atl1e_check_link(), bnx2_poll_link(), bnx2_report_fw_link(), bnx2_set_link(), bnx2_setup_copper_phy(), getlinkstatus(), gmii_link_ok(), mii_link_ok(), pcnet32_probe(), phy_init(), sis190_default_phy(), sis190_mii_probe(), sis190_phy_task(), sundance_probe(), tg3_phy_reset(), tg3_setup_copper_phy(), TLan_FinishReset(), TLan_PhyFinishAutoNeg(), TLan_PhyStartLink(), and update_linkspeed().
| #define MII_PHYSID1 0x02 |
Definition at line 871 of file atl1e.h.
Referenced by amd8111e_probe_ext_phy(), bnx2_init_phy(), forcedeth_probe(), sis190_init_phy(), tg3_phy_probe(), TLan_FinishReset(), and TLan_PhyDetect().
| #define MII_PHYSID2 0x03 |
Definition at line 872 of file atl1e.h.
Referenced by amd8111e_probe_ext_phy(), bnx2_init_phy(), forcedeth_probe(), sis190_init_phy(), tg3_phy_probe(), TLan_FinishReset(), and TLan_PhyDetect().
| #define MII_ADVERTISE 0x04 |
Definition at line 873 of file atl1e.h.
Referenced by amd8111e_poll_link(), amd8111e_wait_link(), atl1e_phy_setup_autoneg_adv(), atl1e_restart_autoneg(), bnx2_5706s_linkup(), bnx2_copper_linkup(), bnx2_resolve_flow_ctrl(), bnx2_setup_copper_phy(), bnx2_setup_serdes_phy(), gmii_autoneg_advertised(), mii_check_media(), pcnet32_probe(), phy_init(), rtl8169_set_speed_xmii(), sis190_phy_task(), sis190_set_speed_auto(), sundance_probe(), tg3_phy_copper_begin(), tg3_phy_probe(), tg3_setup_copper_phy(), TLan_PhyFinishAutoNeg(), TLan_PhyStartLink(), and update_linkspeed().
| #define MII_LPA 0x05 |
Definition at line 874 of file atl1e.h.
Referenced by amd8111e_poll_link(), amd8111e_wait_link(), bnx2_5706s_linkup(), bnx2_copper_linkup(), bnx2_resolve_flow_ctrl(), check_duplex(), gmii_autoneg_lpa(), mii_check_media(), pcnet32_probe(), sis190_phy_task(), sundance_probe(), tg3_setup_copper_phy(), TLan_FinishReset(), TLan_PhyFinishAutoNeg(), and update_linkspeed().
| #define MII_EXPANSION 0x06 |
| #define MII_AT001_CR 0x09 |
Definition at line 876 of file atl1e.h.
Referenced by atl1e_phy_setup_autoneg_adv(), and atl1e_restart_autoneg().
| #define MII_AT001_PSSR 0x11 |
| #define MII_INT_CTRL 0x12 |
| #define MII_INT_STATUS 0x13 |
| #define MII_SREVISION 0x16 |
| #define MII_RESV1 0x17 |
| #define MII_NCONFIG 0x1c |
| #define MII_DBG_ADDR 0x1D |
| #define MII_DBG_DATA 0x1E |
| #define MII_CR_RESTART_AUTO_NEG 0x0200 |
Definition at line 901 of file atl1e.h.
Referenced by atl1e_phy_commit(), atl1e_restart_autoneg(), e1000_copper_link_autoneg(), e1000e_copper_link_autoneg(), and igb_copper_link_autoneg().
| #define MII_CR_POWER_DOWN 0x0800 |
Definition at line 903 of file atl1e.h.
Referenced by e1000_power_down_phy_copper(), e1000_power_up_phy_copper(), e1000e_power_down_phy_copper(), e1000e_power_up_phy_copper(), igb_power_down_phy_copper(), and igb_power_up_phy_copper().
| #define MII_CR_AUTO_NEG_EN 0x1000 |
Definition at line 904 of file atl1e.h.
Referenced by atl1e_phy_commit(), atl1e_restart_autoneg(), e1000_copper_link_autoneg(), e1000e_copper_link_autoneg(), and igb_copper_link_autoneg().
| #define MII_CR_RESET 0x8000 |
Definition at line 907 of file atl1e.h.
Referenced by atl1e_phy_commit(), atl1e_restart_autoneg(), e1000_phy_sw_reset_generic(), e1000e_phy_sw_reset(), and igb_phy_sw_reset_generic().
| #define MII_SR_LINK_STATUS 0x0004 |
Definition at line 917 of file atl1e.h.
Referenced by e1000_phy_has_link_generic(), e1000_polarity_reversal_workaround_82543(), e1000e_phy_has_link_generic(), and igb_phy_has_link_generic().
| #define MII_SR_AUTONEG_COMPLETE 0x0020 |
Definition at line 920 of file atl1e.h.
Referenced by e1000_config_fc_after_link_up_generic(), e1000_wait_autoneg_generic(), e1000e_config_fc_after_link_up(), e1000e_wait_autoneg(), igb_config_fc_after_link_up_generic(), and igb_wait_autoneg_generic().
| #define MII_AR_10T_HD_CAPS 0x0020 |
| #define MII_AR_10T_FD_CAPS 0x0040 |
| #define MII_AR_100TX_HD_CAPS 0x0080 |
| #define MII_AR_100TX_FD_CAPS 0x0100 |
| #define MII_AR_PAUSE 0x0400 |
| #define MII_AR_ASM_DIR 0x0800 |
| #define MII_AR_SPEED_MASK 0x01E0 |
| #define MII_AR_DEFAULT_CAP_MASK 0x0DE0 |
| #define MII_AT001_CR_1000T_FD_CAPS 0x0200 |
| #define MII_AT001_CR_1000T_SPEED_MASK 0x0300 |
| #define MII_AT001_CR_1000T_DEFAULT_CAP_MASK 0x0300 |
| #define MII_AT001_PSSR_SPD_DPLX_RESOLVED 0x0800 |
| #define MII_AT001_PSSR_DPLX 0x2000 |
| #define MII_AT001_PSSR_SPEED 0xC000 |
| #define MII_AT001_PSSR_10MBS 0x0000 |
| #define MII_AT001_PSSR_100MBS 0x4000 |
| #define MII_AT001_PSSR_1000MBS 0x8000 |
| enum atl1e_dma_req_block |
| atl1e_dma_req_128 | |
| atl1e_dma_req_256 | |
| atl1e_dma_req_512 | |
| atl1e_dma_req_1024 | |
| atl1e_dma_req_2048 | |
| atl1e_dma_req_4096 |
Definition at line 137 of file atl1e.h.
00137 { 00138 atl1e_dma_req_128 = 0, 00139 atl1e_dma_req_256 = 1, 00140 atl1e_dma_req_512 = 2, 00141 atl1e_dma_req_1024 = 3, 00142 atl1e_dma_req_2048 = 4, 00143 atl1e_dma_req_4096 = 5 00144 };
| enum atl1e_nic_type |
Definition at line 146 of file atl1e.h.
00146 { 00147 athr_l1e = 0, 00148 athr_l2e_revA = 1, 00149 athr_l2e_revB = 2 00150 };
| int atl1e_up | ( | struct atl1e_adapter * | adapter | ) |
Definition at line 992 of file atl1e.c.
References AT_READ_REG, AT_WRITE_REG, atl1e_configure(), atl1e_init_hw(), atl1e_init_ring_ptrs(), atl1e_irq_disable(), EIO, ETH_ALEN, atl1e_adapter::hw, net_device::ll_addr, atl1e_hw::mac_addr, MASTER_CTRL_MANUAL_INT, memcpy, atl1e_adapter::netdev, netdev, REG_MASTER_CTRL, and u32.
Referenced by atl1e_open(), and atl1e_reset().
00993 { 00994 struct net_device *netdev = adapter->netdev; 00995 int err = 0; 00996 u32 val; 00997 00998 /* hardware has been reset, we need to reload some things */ 00999 err = atl1e_init_hw(&adapter->hw); 01000 if (err) { 01001 return -EIO; 01002 } 01003 atl1e_init_ring_ptrs(adapter); 01004 01005 memcpy(adapter->hw.mac_addr, netdev->ll_addr, ETH_ALEN); 01006 01007 if (atl1e_configure(adapter) != 0) { 01008 return -EIO; 01009 } 01010 01011 atl1e_irq_disable(adapter); 01012 01013 val = AT_READ_REG(&adapter->hw, REG_MASTER_CTRL); 01014 AT_WRITE_REG(&adapter->hw, REG_MASTER_CTRL, 01015 val | MASTER_CTRL_MANUAL_INT); 01016 01017 return err; 01018 }
| void atl1e_down | ( | struct atl1e_adapter * | adapter | ) |
Definition at line 1030 of file atl1e.c.
References atl1e_clean_rx_ring(), atl1e_clean_tx_ring(), atl1e_reset_hw(), atl1e_adapter::hw, atl1e_adapter::link_duplex, atl1e_adapter::link_speed, mdelay(), atl1e_adapter::netdev, netdev, netdev_link_down(), and SPEED_0.
Referenced by atl1e_close(), and atl1e_reset().
01031 { 01032 struct net_device *netdev = adapter->netdev; 01033 01034 /* reset MAC to disable all RX/TX */ 01035 atl1e_reset_hw(&adapter->hw); 01036 mdelay(1); 01037 01038 netdev_link_down(netdev); 01039 adapter->link_speed = SPEED_0; 01040 adapter->link_duplex = -1; 01041 01042 atl1e_clean_tx_ring(adapter); 01043 atl1e_clean_rx_ring(adapter); 01044 }
Definition at line 1623 of file atl1e.c.
References atl1e_hw::adapter, AT_ERR_TIMEOUT, AT_HW_MAX_IDLE_DELAY, AT_READ_REG, AT_WRITE_REG, DBG, MASTER_CTRL_LED_MODE, MASTER_CTRL_SOFT_RST, mdelay(), PCI_COMMAND, PCI_COMMAND_IO, PCI_COMMAND_MASTER, PCI_COMMAND_MEM, pci_read_config_word(), pci_write_config_word(), atl1e_adapter::pdev, REG_IDLE_STATUS, REG_MASTER_CTRL, timeout(), u16, u32, and wmb.
Referenced by atl1e_down(), atl1e_open(), and atl1e_probe().
01624 { 01625 struct atl1e_adapter *adapter = hw->adapter; 01626 struct pci_device *pdev = adapter->pdev; 01627 int timeout = 0; 01628 u32 idle_status_data = 0; 01629 u16 pci_cfg_cmd_word = 0; 01630 01631 /* Workaround for PCI problem when BIOS sets MMRBC incorrectly. */ 01632 pci_read_config_word(pdev, PCI_COMMAND, &pci_cfg_cmd_word); 01633 if ((pci_cfg_cmd_word & (PCI_COMMAND_IO | PCI_COMMAND_MEM | 01634 PCI_COMMAND_MASTER)) 01635 != (PCI_COMMAND_IO | PCI_COMMAND_MEM | 01636 PCI_COMMAND_MASTER)) { 01637 pci_cfg_cmd_word |= (PCI_COMMAND_IO | PCI_COMMAND_MEM | 01638 PCI_COMMAND_MASTER); 01639 pci_write_config_word(pdev, PCI_COMMAND, pci_cfg_cmd_word); 01640 } 01641 01642 /* 01643 * Issue Soft Reset to the MAC. This will reset the chip's 01644 * transmit, receive, DMA. It will not effect 01645 * the current PCI configuration. The global reset bit is self- 01646 * clearing, and should clear within a microsecond. 01647 */ 01648 AT_WRITE_REG(hw, REG_MASTER_CTRL, 01649 MASTER_CTRL_LED_MODE | MASTER_CTRL_SOFT_RST); 01650 wmb(); 01651 mdelay(1); 01652 01653 /* Wait at least 10ms for All module to be Idle */ 01654 for (timeout = 0; timeout < AT_HW_MAX_IDLE_DELAY; timeout++) { 01655 idle_status_data = AT_READ_REG(hw, REG_IDLE_STATUS); 01656 if (idle_status_data == 0) 01657 break; 01658 mdelay(1); 01659 } 01660 01661 if (timeout >= AT_HW_MAX_IDLE_DELAY) { 01662 DBG("atl1e: MAC reset timeout\n"); 01663 return AT_ERR_TIMEOUT; 01664 } 01665 01666 return 0; 01667 }
Definition at line 1344 of file atl1e.c.
References AT_ERR_EEPROM, atl1e_get_permanent_address(), atl1e_hw::mac_addr, memcpy, and atl1e_hw::perm_mac_addr.
Referenced by atl1e_probe().
01345 { 01346 int err = 0; 01347 01348 err = atl1e_get_permanent_address(hw); 01349 if (err) 01350 return AT_ERR_EEPROM; 01351 memcpy(hw->mac_addr, hw->perm_mac_addr, sizeof(hw->perm_mac_addr)); 01352 return 0; 01353 }
Definition at line 1679 of file atl1e.c.
References AT_WRITE_REG, AT_WRITE_REG_ARRAY, atl1e_init_pcie(), atl1e_phy_init(), and REG_RX_HASH_TABLE.
Referenced by atl1e_up().
01680 { 01681 s32 ret_val = 0; 01682 01683 atl1e_init_pcie(hw); 01684 01685 /* Zero out the Multicast HASH table */ 01686 /* clear the old settings from the multicast hash table */ 01687 AT_WRITE_REG(hw, REG_RX_HASH_TABLE, 0); 01688 AT_WRITE_REG_ARRAY(hw, REG_RX_HASH_TABLE, 1, 0); 01689 01690 ret_val = atl1e_phy_init(hw); 01691 01692 return ret_val; 01693 }
Definition at line 1500 of file atl1e.c.
References AT_READ_REG, atl1e_write_phy_reg(), DBG, mdelay(), MDIO_BUSY, MDIO_START, MII_BMCR, MII_CR_AUTO_NEG_EN, MII_CR_RESET, MII_CR_RESTART_AUTO_NEG, REG_MDIO_CTRL, u16, and u32.
Referenced by atl1e_phy_init().
01501 { 01502 int ret_val; 01503 u16 phy_data; 01504 01505 phy_data = MII_CR_RESET | MII_CR_AUTO_NEG_EN | MII_CR_RESTART_AUTO_NEG; 01506 01507 ret_val = atl1e_write_phy_reg(hw, MII_BMCR, phy_data); 01508 if (ret_val) { 01509 u32 val; 01510 int i; 01511 /************************************** 01512 * pcie serdes link may be down ! 01513 **************************************/ 01514 for (i = 0; i < 25; i++) { 01515 mdelay(1); 01516 val = AT_READ_REG(hw, REG_MDIO_CTRL); 01517 if (!(val & (MDIO_START | MDIO_BUSY))) 01518 break; 01519 } 01520 01521 if (0 != (val & (MDIO_START | MDIO_BUSY))) { 01522 DBG("atl1e: PCI-E link down for at least 25ms\n"); 01523 return ret_val; 01524 } 01525 01526 DBG("atl1e: PCI-E link up after %d ms\n", i); 01527 } 01528 return 0; 01529 }
Definition at line 1702 of file atl1e.c.
References AT_ERR_PHY_RES, AT_ERR_PHY_SPEED, atl1e_read_phy_reg(), FULL_DUPLEX, HALF_DUPLEX, MII_AT001_PSSR, MII_AT001_PSSR_1000MBS, MII_AT001_PSSR_100MBS, MII_AT001_PSSR_10MBS, MII_AT001_PSSR_DPLX, MII_AT001_PSSR_SPD_DPLX_RESOLVED, MII_AT001_PSSR_SPEED, SPEED_10, SPEED_100, SPEED_1000, and u16.
Referenced by atl1e_check_link().
01703 { 01704 int err; 01705 u16 phy_data; 01706 01707 /* Read PHY Specific Status Register (17) */ 01708 err = atl1e_read_phy_reg(hw, MII_AT001_PSSR, &phy_data); 01709 if (err) 01710 return err; 01711 01712 if (!(phy_data & MII_AT001_PSSR_SPD_DPLX_RESOLVED)) 01713 return AT_ERR_PHY_RES; 01714 01715 switch (phy_data & MII_AT001_PSSR_SPEED) { 01716 case MII_AT001_PSSR_1000MBS: 01717 *speed = SPEED_1000; 01718 break; 01719 case MII_AT001_PSSR_100MBS: 01720 *speed = SPEED_100; 01721 break; 01722 case MII_AT001_PSSR_10MBS: 01723 *speed = SPEED_10; 01724 break; 01725 default: 01726 return AT_ERR_PHY_SPEED; 01727 break; 01728 } 01729 01730 if (phy_data & MII_AT001_PSSR_DPLX) 01731 *duplex = FULL_DUPLEX; 01732 else 01733 *duplex = HALF_DUPLEX; 01734 01735 return 0; 01736 }
| u32 atl1e_auto_get_fc | ( | struct atl1e_adapter * | adapter, | |
| u16 | duplex | |||
| ) |
Definition at line 1360 of file atl1e.c.
References AT_ERR_PHY, AT_READ_REG, AT_WRITE_REG, MDIO_BUSY, MDIO_CLK_25_4, MDIO_CLK_SEL_SHIFT, MDIO_REG_ADDR_MASK, MDIO_REG_ADDR_SHIFT, MDIO_RW, MDIO_START, MDIO_SUP_PREAMBLE, MDIO_WAIT_TIMES, REG_MDIO_CTRL, u16, u32, udelay(), and wmb.
Referenced by atl1e_check_link(), atl1e_clear_phy_int(), atl1e_get_speed_and_duplex(), and atl1e_mdio_read().
01361 { 01362 u32 val; 01363 int i; 01364 01365 val = ((u32)(reg_addr & MDIO_REG_ADDR_MASK)) << MDIO_REG_ADDR_SHIFT | 01366 MDIO_START | MDIO_SUP_PREAMBLE | MDIO_RW | 01367 MDIO_CLK_25_4 << MDIO_CLK_SEL_SHIFT; 01368 01369 AT_WRITE_REG(hw, REG_MDIO_CTRL, val); 01370 01371 wmb(); 01372 01373 for (i = 0; i < MDIO_WAIT_TIMES; i++) { 01374 udelay(2); 01375 val = AT_READ_REG(hw, REG_MDIO_CTRL); 01376 if (!(val & (MDIO_START | MDIO_BUSY))) 01377 break; 01378 wmb(); 01379 } 01380 if (!(val & (MDIO_START | MDIO_BUSY))) { 01381 *phy_data = (u16)val; 01382 return 0; 01383 } 01384 01385 return AT_ERR_PHY; 01386 }
Definition at line 1394 of file atl1e.c.
References AT_ERR_PHY, AT_READ_REG, AT_WRITE_REG, MDIO_BUSY, MDIO_CLK_25_4, MDIO_CLK_SEL_SHIFT, MDIO_DATA_MASK, MDIO_DATA_SHIFT, MDIO_REG_ADDR_MASK, MDIO_REG_ADDR_SHIFT, MDIO_START, MDIO_SUP_PREAMBLE, MDIO_WAIT_TIMES, REG_MDIO_CTRL, u32, udelay(), and wmb.
Referenced by atl1e_mdio_write(), atl1e_phy_commit(), atl1e_phy_init(), atl1e_phy_setup_autoneg_adv(), and atl1e_restart_autoneg().
01395 { 01396 int i; 01397 u32 val; 01398 01399 val = ((u32)(phy_data & MDIO_DATA_MASK)) << MDIO_DATA_SHIFT | 01400 (reg_addr&MDIO_REG_ADDR_MASK) << MDIO_REG_ADDR_SHIFT | 01401 MDIO_SUP_PREAMBLE | 01402 MDIO_START | 01403 MDIO_CLK_25_4 << MDIO_CLK_SEL_SHIFT; 01404 01405 AT_WRITE_REG(hw, REG_MDIO_CTRL, val); 01406 wmb(); 01407 01408 for (i = 0; i < MDIO_WAIT_TIMES; i++) { 01409 udelay(2); 01410 val = AT_READ_REG(hw, REG_MDIO_CTRL); 01411 if (!(val & (MDIO_START | MDIO_BUSY))) 01412 break; 01413 wmb(); 01414 } 01415 01416 if (!(val & (MDIO_START | MDIO_BUSY))) 01417 return 0; 01418 01419 return AT_ERR_PHY; 01420 }
| void atl1e_hw_set_mac_addr | ( | struct atl1e_hw * | hw | ) |
Definition at line 1274 of file atl1e.c.
References AT_WRITE_REG_ARRAY, atl1e_hw::mac_addr, REG_MAC_STA_ADDR, and u32.
Referenced by atl1e_configure().
01275 { 01276 u32 value; 01277 /* 01278 * 00-0B-6A-F6-00-DC 01279 * 0: 6AF600DC 1: 000B 01280 * low dword 01281 */ 01282 value = (((u32)hw->mac_addr[2]) << 24) | 01283 (((u32)hw->mac_addr[3]) << 16) | 01284 (((u32)hw->mac_addr[4]) << 8) | 01285 (((u32)hw->mac_addr[5])) ; 01286 AT_WRITE_REG_ARRAY(hw, REG_MAC_STA_ADDR, 0, value); 01287 /* hight dword */ 01288 value = (((u32)hw->mac_addr[0]) << 8) | 01289 (((u32)hw->mac_addr[1])) ; 01290 AT_WRITE_REG_ARRAY(hw, REG_MAC_STA_ADDR, 1, value); 01291 }
Definition at line 1531 of file atl1e.c.
References AT_WRITE_REGW, atl1e_phy_commit(), atl1e_phy_setup_autoneg_adv(), atl1e_restart_autoneg(), atl1e_write_phy_reg(), DBG, GPHY_CTRL_DEFAULT, GPHY_CTRL_EXT_RESET, mdelay(), MII_DBG_ADDR, MII_DBG_DATA, MII_INT_CTRL, atl1e_hw::phy_configured, atl1e_hw::re_autoneg, REG_GPHY_CTRL, and u16.
Referenced by atl1e_init_hw(), and atl1e_probe().
01532 { 01533 s32 ret_val; 01534 u16 phy_val; 01535 01536 if (hw->phy_configured) { 01537 if (hw->re_autoneg) { 01538 hw->re_autoneg = 0; 01539 return atl1e_restart_autoneg(hw); 01540 } 01541 return 0; 01542 } 01543 01544 /* RESET GPHY Core */ 01545 AT_WRITE_REGW(hw, REG_GPHY_CTRL, GPHY_CTRL_DEFAULT); 01546 mdelay(2); 01547 AT_WRITE_REGW(hw, REG_GPHY_CTRL, GPHY_CTRL_DEFAULT | 01548 GPHY_CTRL_EXT_RESET); 01549 mdelay(2); 01550 01551 /* patches */ 01552 /* p1. eable hibernation mode */ 01553 ret_val = atl1e_write_phy_reg(hw, MII_DBG_ADDR, 0xB); 01554 if (ret_val) 01555 return ret_val; 01556 ret_val = atl1e_write_phy_reg(hw, MII_DBG_DATA, 0xBC00); 01557 if (ret_val) 01558 return ret_val; 01559 /* p2. set Class A/B for all modes */ 01560 ret_val = atl1e_write_phy_reg(hw, MII_DBG_ADDR, 0); 01561 if (ret_val) 01562 return ret_val; 01563 phy_val = 0x02ef; 01564 /* remove Class AB */ 01565 /* phy_val = hw->emi_ca ? 0x02ef : 0x02df; */ 01566 ret_val = atl1e_write_phy_reg(hw, MII_DBG_DATA, phy_val); 01567 if (ret_val) 01568 return ret_val; 01569 /* p3. 10B ??? */ 01570 ret_val = atl1e_write_phy_reg(hw, MII_DBG_ADDR, 0x12); 01571 if (ret_val) 01572 return ret_val; 01573 ret_val = atl1e_write_phy_reg(hw, MII_DBG_DATA, 0x4C04); 01574 if (ret_val) 01575 return ret_val; 01576 /* p4. 1000T power */ 01577 ret_val = atl1e_write_phy_reg(hw, MII_DBG_ADDR, 0x4); 01578 if (ret_val) 01579 return ret_val; 01580 ret_val = atl1e_write_phy_reg(hw, MII_DBG_DATA, 0x8BBB); 01581 if (ret_val) 01582 return ret_val; 01583 01584 ret_val = atl1e_write_phy_reg(hw, MII_DBG_ADDR, 0x5); 01585 if (ret_val) 01586 return ret_val; 01587 ret_val = atl1e_write_phy_reg(hw, MII_DBG_DATA, 0x2C46); 01588 if (ret_val) 01589 return ret_val; 01590 01591 mdelay(1); 01592 01593 /*Enable PHY LinkChange Interrupt */ 01594 ret_val = atl1e_write_phy_reg(hw, MII_INT_CTRL, 0xC00); 01595 if (ret_val) { 01596 DBG("atl1e: Error enable PHY linkChange Interrupt\n"); 01597 return ret_val; 01598 } 01599 /* setup AutoNeg parameters */ 01600 ret_val = atl1e_phy_setup_autoneg_adv(hw); 01601 if (ret_val) { 01602 DBG("atl1e: Error Setting up Auto-Negotiation\n"); 01603 return ret_val; 01604 } 01605 /* SW.Reset & En-Auto-Neg to restart Auto-Neg*/ 01606 DBG("atl1e: Restarting Auto-Neg"); 01607 ret_val = atl1e_phy_commit(hw); 01608 if (ret_val) { 01609 DBG("atl1e: Error Resetting the phy"); 01610 return ret_val; 01611 } 01612 01613 hw->phy_configured = 1; 01614 01615 return 0; 01616 }
| int atl1e_check_eeprom_exist | ( | struct atl1e_hw * | hw | ) |
Definition at line 1261 of file atl1e.c.
References AT_READ_REG, AT_READ_REGW, AT_WRITE_REG, REG_PCIE_CAP_LIST, REG_SPI_FLASH_CTRL, SPI_FLASH_CTRL_EN_VPD, and u32.
Referenced by atl1e_get_permanent_address().
01262 { 01263 u32 value; 01264 01265 value = AT_READ_REG(hw, REG_SPI_FLASH_CTRL); 01266 if (value & SPI_FLASH_CTRL_EN_VPD) { 01267 value &= ~SPI_FLASH_CTRL_EN_VPD; 01268 AT_WRITE_REG(hw, REG_SPI_FLASH_CTRL, value); 01269 } 01270 value = AT_READ_REGW(hw, REG_PCIE_CAP_LIST); 01271 return ((value & 0xFF00) == 0x6C00) ? 0 : 1; 01272 }
| void atl1e_force_ps | ( | struct atl1e_hw * | hw | ) |
Definition at line 1333 of file atl1e.c.
References AT_WRITE_REGW, GPHY_CTRL_EXT_RESET, GPHY_CTRL_PW_WOL_DIS, and REG_GPHY_CTRL.
Referenced by atl1e_remove().
01334 { 01335 AT_WRITE_REGW(hw, REG_GPHY_CTRL, 01336 GPHY_CTRL_PW_WOL_DIS | GPHY_CTRL_EXT_RESET); 01337 }
Definition at line 1738 of file atl1e.c.
References athr_l1e, athr_l2e_revA, atl1e_write_phy_reg(), atl1e_hw::mii_1000t_ctrl_reg, MII_ADVERTISE, MII_AT001_CR, atl1e_hw::mii_autoneg_adv_reg, MII_BMCR, MII_CR_AUTO_NEG_EN, MII_CR_RESET, MII_CR_RESTART_AUTO_NEG, and atl1e_hw::nic_type.
Referenced by atl1e_phy_init(), and atl1e_probe().
01739 { 01740 int err = 0; 01741 01742 err = atl1e_write_phy_reg(hw, MII_ADVERTISE, hw->mii_autoneg_adv_reg); 01743 if (err) 01744 return err; 01745 01746 if (hw->nic_type == athr_l1e || hw->nic_type == athr_l2e_revA) { 01747 err = atl1e_write_phy_reg(hw, MII_AT001_CR, 01748 hw->mii_1000t_ctrl_reg); 01749 if (err) 01750 return err; 01751 } 01752 01753 err = atl1e_write_phy_reg(hw, MII_BMCR, 01754 MII_CR_RESET | MII_CR_AUTO_NEG_EN | 01755 MII_CR_RESTART_AUTO_NEG); 01756 return err; 01757 }
1.5.7.1