|
iPXE
|
#include "etherboot.h"#include "nic.h"#include "mii.h"#include <ipxe/pci.h>#include <ipxe/ethernet.h>#include "string.h"#include "stdint.h"#include "amd8111e.h"Go to the source code of this file.
Data Structures | |
| struct | amd8111e_tx_desc |
| struct | amd8111e_rx_desc |
| struct | eth_frame |
| struct | amd8111e_priv |
Macros | |
| #define | NUM_TX_SLOTS 2 |
| #define | NUM_RX_SLOTS 4 |
| #define | TX_SLOTS_MASK 1 |
| #define | RX_SLOTS_MASK 3 |
| #define | TX_BUF_LEN 1536 |
| #define | RX_BUF_LEN 1536 |
| #define | TX_PKT_LEN_MAX (ETH_FRAME_LEN - ETH_HLEN) |
| #define | RX_PKT_LEN_MIN 60 |
| #define | RX_PKT_LEN_MAX ETH_FRAME_LEN |
| #define | TX_TIMEOUT 3000 |
| #define | TX_PROCESS_TIME 10 |
| #define | TX_RETRY (TX_TIMEOUT / TX_PROCESS_TIME) |
| #define | PHY_RW_RETRY 10 |
| #define | amd8111e NIC_FAKE_BSS ( struct amd8111e_priv ) |
Functions | |
| FILE_LICENCE (GPL2_OR_LATER) | |
| static void | amd8111e_init_hw_default (struct amd8111e_priv *lp) |
| static int | amd8111e_start (struct amd8111e_priv *lp) |
| static int | amd8111e_read_phy (struct amd8111e_priv *lp, int phy_addr, int reg, u32 *val) |
| static void | amd8111e_probe_ext_phy (struct amd8111e_priv *lp) |
| static void | amd8111e_disable_interrupt (struct amd8111e_priv *lp) |
| static void | amd8111e_enable_interrupt (struct amd8111e_priv *lp) |
| static void | amd8111e_force_interrupt (struct amd8111e_priv *lp) |
| static int | amd8111e_get_mac_address (struct amd8111e_priv *lp) |
| static int | amd8111e_init_rx_ring (struct amd8111e_priv *lp) |
| static int | amd8111e_init_tx_ring (struct amd8111e_priv *lp) |
| static int | amd8111e_wait_tx_ring (struct amd8111e_priv *lp, unsigned int index) |
| static void | amd8111e_wait_link (struct amd8111e_priv *lp) |
| static void | amd8111e_poll_link (struct amd8111e_priv *lp) |
| static void | amd8111e_restart (struct amd8111e_priv *lp) |
| static void | amd8111e_transmit (struct nic *nic, const char *dst_addr, unsigned int type, unsigned int size, const char *packet) |
| static int | amd8111e_poll (struct nic *nic, int retrieve) |
| static void | amd8111e_disable (struct nic *nic, void *hwdev __unused) |
| static void | amd8111e_irq (struct nic *nic, irq_action_t action) |
| static int | amd8111e_probe (struct nic *nic, struct pci_device *pdev) |
| PCI_DRIVER (amd8111e_driver, amd8111e_nics, PCI_NO_CLASS) | |
| DRIVER ("AMD8111E", nic_driver, pci_driver, amd8111e_driver, amd8111e_probe, amd8111e_disable, amd8111e) | |
Variables | |
| static struct nic_operations | amd8111e_operations |
| static struct pci_device_id | amd8111e_nics [] |
| #define NUM_TX_SLOTS 2 |
Definition at line 45 of file amd8111e.c.
| #define NUM_RX_SLOTS 4 |
Definition at line 46 of file amd8111e.c.
| #define TX_SLOTS_MASK 1 |
Definition at line 47 of file amd8111e.c.
| #define RX_SLOTS_MASK 3 |
Definition at line 48 of file amd8111e.c.
| #define TX_BUF_LEN 1536 |
Definition at line 50 of file amd8111e.c.
| #define RX_BUF_LEN 1536 |
Definition at line 51 of file amd8111e.c.
| #define TX_PKT_LEN_MAX (ETH_FRAME_LEN - ETH_HLEN) |
Definition at line 53 of file amd8111e.c.
| #define RX_PKT_LEN_MIN 60 |
Definition at line 54 of file amd8111e.c.
| #define RX_PKT_LEN_MAX ETH_FRAME_LEN |
Definition at line 55 of file amd8111e.c.
| #define TX_TIMEOUT 3000 |
Definition at line 57 of file amd8111e.c.
| #define TX_PROCESS_TIME 10 |
Definition at line 58 of file amd8111e.c.
| #define TX_RETRY (TX_TIMEOUT / TX_PROCESS_TIME) |
Definition at line 59 of file amd8111e.c.
| #define PHY_RW_RETRY 10 |
Definition at line 61 of file amd8111e.c.
| #define amd8111e NIC_FAKE_BSS ( struct amd8111e_priv ) |
Definition at line 108 of file amd8111e.c.
| FILE_LICENCE | ( | GPL2_OR_LATER | ) |
|
static |
Definition at line 136 of file amd8111e.c.
References CMD0, CMD0_CLEAR, CMD2, CMD2_CLEAR, CMD7, CMD7_CLEAR, CTRL1, CTRL1_DEFAULT, DLY_INT_A, DLY_INT_B, FLOW_CONTROL, INT0, INTEN0, INTEN0_CLEAR, LADRF, MIB_ADDR, MIB_CLEAR, amd8111e_priv::mmio, RCV_RING_BASE_ADDR0, RCV_RING_LEN0, readl(), RUN, SRAM_SIZE, STVAL, writel(), writew, XMT_RING_BASE_ADDR0, XMT_RING_BASE_ADDR1, XMT_RING_BASE_ADDR2, XMT_RING_BASE_ADDR3, XMT_RING_LEN0, XMT_RING_LEN1, XMT_RING_LEN2, XMT_RING_LEN3, and XMT_RING_LIMIT.
Referenced by amd8111e_disable(), and amd8111e_restart().
|
static |
Definition at line 217 of file amd8111e.c.
References amd8111e_init_rx_ring(), amd8111e_init_tx_ring(), APAD_XMT, AUTOPOLL0, CACHE_ALIGN, CMD0, CMD2, CMD3, CTRL1, CTRL2, DEFAULT_IPG, EN_PMGR, ETH_ALEN, amd8111e_priv::ext_phy_addr, IFS1, IFS1_DELTA, IPG, JUMBO, amd8111e_priv::mmio, amd8111e_priv::nic, nic::node_addr, NUM_RX_SLOTS, NUM_TX_SLOTS, PADR, RCV_RING_BASE_ADDR0, RCV_RING_LEN0, RDMD0, readl(), REX_RTRY, REX_UFLO, RUN, amd8111e_priv::rx_ring, amd8111e_priv::tx_ring, VAL0, VAL1, VAL2, virt_to_bus(), writeb(), writel(), writew, XMT_RING_BASE_ADDR0, XMT_RING_LEN0, XMTSP_128, XMTSP_MASK, XPHYANE, and XPHYRST.
Referenced by amd8111e_restart().
|
static |
Definition at line 271 of file amd8111e.c.
References amd8111e_priv::mmio, PHY_ACCESS, PHY_CMD_ACTIVE, PHY_RD_CMD, PHY_RD_ERR, PHY_RW_RETRY, readl(), reg, udelay(), val, and writel().
Referenced by amd8111e_poll_link(), amd8111e_probe_ext_phy(), and amd8111e_wait_link().
|
static |
Definition at line 325 of file amd8111e.c.
References amd8111e_read_phy(), amd8111e_priv::ext_phy_addr, amd8111e_priv::ext_phy_id, MII_PHYSID1, MII_PHYSID2, and printf().
Referenced by amd8111e_restart().
|
static |
Definition at line 351 of file amd8111e.c.
References CMD0, INT0, INTEN0, INTEN0_CLEAR, INTREN, amd8111e_priv::mmio, readl(), and writel().
Referenced by amd8111e_disable(), amd8111e_irq(), and amd8111e_restart().
|
static |
Definition at line 363 of file amd8111e.c.
References CMD0, INTEN0, INTREN, LCINTEN, amd8111e_priv::mmio, readl(), RINTEN0, TINTEN0, VAL0, VAL1, VAL3, and writel().
Referenced by amd8111e_irq().
|
static |
Definition at line 372 of file amd8111e.c.
References CMD0, amd8111e_priv::mmio, readl(), UINTCMD, VAL0, and writel().
Referenced by amd8111e_irq().
|
static |
Definition at line 380 of file amd8111e.c.
References DBG, ETH_ALEN, eth_ntoa(), amd8111e_priv::mmio, amd8111e_priv::nic, nic::node_addr, PADR, and readb().
Referenced by amd8111e_restart().
|
static |
Definition at line 397 of file amd8111e.c.
References amd8111e_rx_desc::buf_len, amd8111e_rx_desc::buf_phy_addr, cpu_to_le16, cpu_to_le32, NUM_RX_SLOTS, OWN_BIT, amd8111e_priv::rx_buf, RX_BUF_LEN, amd8111e_rx_desc::rx_flags, amd8111e_priv::rx_idx, amd8111e_priv::rx_ring, virt_to_bus(), and wmb().
Referenced by amd8111e_start().
|
static |
Definition at line 414 of file amd8111e.c.
References amd8111e_tx_desc::buf_len, amd8111e_tx_desc::buf_phy_addr, NUM_TX_SLOTS, amd8111e_priv::tx_consistent, amd8111e_tx_desc::tx_flags, amd8111e_priv::tx_idx, and amd8111e_priv::tx_ring.
Referenced by amd8111e_start().
|
static |
Definition at line 431 of file amd8111e.c.
References amd8111e_restart(), index, le16_to_cpu, mdelay(), OWN_BIT, printf(), status, amd8111e_tx_desc::tx_flags, TX_PROCESS_TIME, TX_RETRY, and amd8111e_priv::tx_ring.
Referenced by amd8111e_transmit().
|
static |
Definition at line 450 of file amd8111e.c.
References amd8111e_read_phy(), AUTONEG_COMPLETE, amd8111e_priv::ext_phy_addr, LINK_STATS, MII_ADVERTISE, MII_BMCR, MII_BMSR, MII_LPA, amd8111e_priv::mmio, readl(), STAT0, and status.
Referenced by amd8111e_restart().
|
static |
Definition at line 465 of file amd8111e.c.
References amd8111e_read_phy(), amd8111e_priv::duplex, amd8111e_priv::ext_phy_addr, FULL_DPLX, amd8111e_priv::link, LINK_STATS, MII_ADVERTISE, MII_BMCR, MII_BMSR, MII_LPA, amd8111e_priv::mmio, PHY_SPEED_100, printf(), readl(), amd8111e_priv::speed, SPEED_MASK, STAT0, and status.
Referenced by amd8111e_poll(), and amd8111e_restart().
|
static |
Definition at line 502 of file amd8111e.c.
References amd8111e_disable_interrupt(), amd8111e_get_mac_address(), amd8111e_init_hw_default(), amd8111e_poll_link(), amd8111e_probe_ext_phy(), amd8111e_start(), amd8111e_wait_link(), amd8111e_priv::link, and printf().
Referenced by amd8111e_probe(), and amd8111e_wait_tx_ring().
|
static |
Definition at line 522 of file amd8111e.c.
References ADD_FCS_BIT, amd8111e_wait_tx_ring(), amd8111e_tx_desc::buf_len, amd8111e_tx_desc::buf_phy_addr, CMD0, cpu_to_le16, cpu_to_le32, eth_frame::dst_addr, ENP_BIT, ETH_ALEN, ETH_HLEN, frame, htons, index, LTINT_BIT, memcpy(), memset(), amd8111e_priv::mmio, nic::node_addr, OWN_BIT, printf(), nic::priv_data, readl(), size, STP_BIT, TDMD0, amd8111e_priv::tx_buf, amd8111e_tx_desc::tx_flags, amd8111e_priv::tx_idx, TX_PKT_LEN_MAX, amd8111e_priv::tx_ring, TX_SLOTS_MASK, type, VAL1, virt_to_bus(), wmb(), and writel().
|
static |
Definition at line 561 of file amd8111e.c.
References amd8111e_poll_link(), amd8111e_rx_desc::buf_len, amd8111e_rx_desc::buf_phy_addr, CMD0, cpu_to_le16, cpu_to_le32, ENP_BIT, ERR_BIT, index, le16_to_cpu, memcpy(), amd8111e_priv::mmio, amd8111e_rx_desc::msg_len, OWN_BIT, nic::packet, nic::packetlen, pkt_len, nic::priv_data, RDMD0, readl(), amd8111e_priv::rx_buf, RX_BUF_LEN, amd8111e_rx_desc::rx_flags, amd8111e_priv::rx_idx, RX_PKT_LEN_MAX, RX_PKT_LEN_MIN, amd8111e_priv::rx_ring, RX_SLOTS_MASK, status, STP_BIT, VAL2, virt_to_bus(), wmb(), and writel().
|
static |
Definition at line 611 of file amd8111e.c.
References amd8111e_disable_interrupt(), amd8111e_init_hw_default(), iounmap(), amd8111e_priv::mmio, amd8111e_priv::opened, and nic::priv_data.
|
static |
Definition at line 628 of file amd8111e.c.
References amd8111e_disable_interrupt(), amd8111e_enable_interrupt(), amd8111e_force_interrupt(), DISABLE, ENABLE, FORCE, and nic::priv_data.
|
static |
Definition at line 652 of file amd8111e.c.
References adjust_pci_device(), amd8111e, amd8111e_operations, amd8111e_restart(), nic::ioaddr, pci_device::ioaddr, pci_device::irq, nic::irqno, memset(), amd8111e_priv::mmio, amd8111e_priv::nic, nic::nic_op, amd8111e_priv::opened, pci_bar_size(), pci_bar_start(), PCI_BASE_ADDRESS_0, pci_ioremap(), amd8111e_priv::pdev, and nic::priv_data.
| PCI_DRIVER | ( | amd8111e_driver | , |
| amd8111e_nics | , | ||
| PCI_NO_CLASS | |||
| ) |
| DRIVER | ( | "AMD8111E" | , |
| nic_driver | , | ||
| pci_driver | , | ||
| amd8111e_driver | , | ||
| amd8111e_probe | , | ||
| amd8111e_disable | , | ||
| amd8111e | |||
| ) |
|
static |
Definition at line 645 of file amd8111e.c.
Referenced by amd8111e_probe().
|
static |
Definition at line 678 of file amd8111e.c.
1.8.15