iPXE
Data Structures | Macros | Functions | Variables
amd8111e.c File Reference
#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
 

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)
 
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)
 

Variables

static struct amd8111e_priv amd8111e
 
static struct nic_operations amd8111e_operations
 
static struct pci_device_id amd8111e_nics []
 

Macro Definition Documentation

◆ NUM_TX_SLOTS

#define NUM_TX_SLOTS   2

Definition at line 45 of file amd8111e.c.

◆ NUM_RX_SLOTS

#define NUM_RX_SLOTS   4

Definition at line 46 of file amd8111e.c.

◆ TX_SLOTS_MASK

#define TX_SLOTS_MASK   1

Definition at line 47 of file amd8111e.c.

◆ RX_SLOTS_MASK

#define RX_SLOTS_MASK   3

Definition at line 48 of file amd8111e.c.

◆ TX_BUF_LEN

#define TX_BUF_LEN   1536

Definition at line 50 of file amd8111e.c.

◆ RX_BUF_LEN

#define RX_BUF_LEN   1536

Definition at line 51 of file amd8111e.c.

◆ TX_PKT_LEN_MAX

#define TX_PKT_LEN_MAX   (ETH_FRAME_LEN - ETH_HLEN)

Definition at line 53 of file amd8111e.c.

◆ RX_PKT_LEN_MIN

#define RX_PKT_LEN_MIN   60

Definition at line 54 of file amd8111e.c.

◆ RX_PKT_LEN_MAX

#define RX_PKT_LEN_MAX   ETH_FRAME_LEN

Definition at line 55 of file amd8111e.c.

◆ TX_TIMEOUT

#define TX_TIMEOUT   3000

Definition at line 57 of file amd8111e.c.

◆ TX_PROCESS_TIME

#define TX_PROCESS_TIME   10

Definition at line 58 of file amd8111e.c.

◆ TX_RETRY

#define TX_RETRY   (TX_TIMEOUT / TX_PROCESS_TIME)

Definition at line 59 of file amd8111e.c.

◆ PHY_RW_RETRY

#define PHY_RW_RETRY   10

Definition at line 61 of file amd8111e.c.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER  )

◆ amd8111e_init_hw_default()

static void amd8111e_init_hw_default ( struct amd8111e_priv lp)
static

Definition at line 137 of file amd8111e.c.

138 {
139  unsigned int reg_val;
140  void *mmio = lp->mmio;
141 
142  /* stop the chip */
143  writel(RUN, mmio + CMD0);
144 
145  /* Clear RCV_RING_BASE_ADDR */
146  writel(0, mmio + RCV_RING_BASE_ADDR0);
147 
148  /* Clear XMT_RING_BASE_ADDR */
149  writel(0, mmio + XMT_RING_BASE_ADDR0);
150  writel(0, mmio + XMT_RING_BASE_ADDR1);
151  writel(0, mmio + XMT_RING_BASE_ADDR2);
152  writel(0, mmio + XMT_RING_BASE_ADDR3);
153 
154  /* Clear CMD0 */
155  writel(CMD0_CLEAR, mmio + CMD0);
156 
157  /* Clear CMD2 */
158  writel(CMD2_CLEAR, mmio + CMD2);
159 
160  /* Clear CMD7 */
161  writel(CMD7_CLEAR, mmio + CMD7);
162 
163  /* Clear DLY_INT_A and DLY_INT_B */
164  writel(0x0, mmio + DLY_INT_A);
165  writel(0x0, mmio + DLY_INT_B);
166 
167  /* Clear FLOW_CONTROL */
168  writel(0x0, mmio + FLOW_CONTROL);
169 
170  /* Clear INT0 write 1 to clear register */
171  reg_val = readl(mmio + INT0);
172  writel(reg_val, mmio + INT0);
173 
174  /* Clear STVAL */
175  writel(0x0, mmio + STVAL);
176 
177  /* Clear INTEN0 */
178  writel(INTEN0_CLEAR, mmio + INTEN0);
179 
180  /* Clear LADRF */
181  writel(0x0, mmio + LADRF);
182 
183  /* Set SRAM_SIZE & SRAM_BOUNDARY registers */
184  writel(0x80010, mmio + SRAM_SIZE);
185 
186  /* Clear RCV_RING0_LEN */
187  writel(0x0, mmio + RCV_RING_LEN0);
188 
189  /* Clear XMT_RING0/1/2/3_LEN */
190  writel(0x0, mmio + XMT_RING_LEN0);
191  writel(0x0, mmio + XMT_RING_LEN1);
192  writel(0x0, mmio + XMT_RING_LEN2);
193  writel(0x0, mmio + XMT_RING_LEN3);
194 
195  /* Clear XMT_RING_LIMIT */
196  writel(0x0, mmio + XMT_RING_LIMIT);
197 
198  /* Clear MIB */
199  writew(MIB_CLEAR, mmio + MIB_ADDR);
200 
201  /* Clear LARF */
202  writel( 0, mmio + LADRF);
203  writel( 0, mmio + LADRF + 4);
204 
205  /* SRAM_SIZE register */
206  reg_val = readl(mmio + SRAM_SIZE);
207 
208  /* Set default value to CTRL1 Register */
209  writel(CTRL1_DEFAULT, mmio + CTRL1);
210 
211  /* To avoid PCI posting bug */
212  readl(mmio + CMD2);
213 }
#define XMT_RING_LEN2
Definition: amd8111e.h:106
void * mmio
Definition: amd8111e.c:106
#define DLY_INT_A
Definition: amd8111e.h:84
#define XMT_RING_BASE_ADDR2
Definition: amd8111e.h:94
uint32_t readl(volatile uint32_t *io_addr)
Read 32-bit dword from memory-mapped device.
#define CMD0
Definition: amd8111e.h:66
#define DLY_INT_B
Definition: amd8111e.h:85
Definition: amd8111e.h:248
#define XMT_RING_LIMIT
Definition: amd8111e.h:74
#define SRAM_SIZE
Definition: amd8111e.h:111
#define INT0
Definition: amd8111e.h:64
#define XMT_RING_BASE_ADDR0
Definition: amd8111e.h:92
void writel(uint32_t data, volatile uint32_t *io_addr)
Write 32-bit dword to memory-mapped device.
#define RCV_RING_BASE_ADDR0
Definition: amd8111e.h:97
#define RCV_RING_LEN0
Definition: amd8111e.h:109
#define CMD2
Definition: amd8111e.h:67
#define XMT_RING_LEN3
Definition: amd8111e.h:107
#define STVAL
Definition: amd8111e.h:90
#define LADRF
Definition: amd8111e.h:123
#define MIB_ADDR
Definition: amd8111e.h:62
#define writew
Definition: w89c840.c:159
#define XMT_RING_LEN1
Definition: amd8111e.h:105
#define CTRL1
Definition: amd8111e.h:71
#define CMD7
Definition: amd8111e.h:69
#define FLOW_CONTROL
Definition: amd8111e.h:87
#define XMT_RING_LEN0
Definition: amd8111e.h:104
#define XMT_RING_BASE_ADDR3
Definition: amd8111e.h:95
#define XMT_RING_BASE_ADDR1
Definition: amd8111e.h:93
#define INTEN0
Definition: amd8111e.h:65

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().

◆ amd8111e_start()

static int amd8111e_start ( struct amd8111e_priv lp)
static

Definition at line 218 of file amd8111e.c.

219 {
220  struct nic *nic = lp->nic;
221  void *mmio = lp->mmio;
222  int i, reg_val;
223 
224  /* stop the chip */
225  writel(RUN, mmio + CMD0);
226 
227  /* AUTOPOLL0 Register *//*TBD default value is 8100 in FPS */
228  writew(0x8100 | lp->ext_phy_addr, mmio + AUTOPOLL0);
229 
230  /* enable the port manager and set auto negotiation always */
231  writel(VAL1 | EN_PMGR, mmio + CMD3 );
232  writel(XPHYANE | XPHYRST, mmio + CTRL2);
233 
234  /* set control registers */
235  reg_val = readl(mmio + CTRL1);
236  reg_val &= ~XMTSP_MASK;
237  writel(reg_val | XMTSP_128 | CACHE_ALIGN, mmio + CTRL1);
238 
239  /* initialize tx and rx ring base addresses */
246 
247  /* set default IPG to 96 */
248  writew(DEFAULT_IPG, mmio + IPG);
249  writew(DEFAULT_IPG - IFS1_DELTA, mmio + IFS1);
250 
251  /* AutoPAD transmit, Retransmit on Underflow */
252  writel(VAL0 | APAD_XMT | REX_RTRY | REX_UFLO, mmio + CMD2);
253 
254  /* JUMBO disabled */
255  writel(JUMBO, mmio + CMD3);
256 
257  /* Setting the MAC address to the device */
258  for(i = 0; i < ETH_ALEN; i++)
259  writeb(nic->node_addr[i], mmio + PADR + i);
260 
261  /* set RUN bit to start the chip, interrupt not enabled */
262  writel(VAL2 | RDMD0 | VAL0 | RUN, mmio + CMD0);
263 
264  /* To avoid PCI posting bug */
265  readl(mmio + CMD0);
266  return 0;
267 }
#define PADR
Definition: amd8111e.h:116
Definition: epic100.h:31
void * mmio
Definition: amd8111e.c:106
uint32_t readl(volatile uint32_t *io_addr)
Read 32-bit dword from memory-mapped device.
#define CMD0
Definition: amd8111e.h:66
Definition: amd8111e.h:248
#define IFS1
Definition: amd8111e.h:118
Definition: amd8111e.h:198
Definition: amd8111e.h:196
struct amd8111e_tx_desc tx_ring[NUM_TX_SLOTS]
Definition: amd8111e.c:90
void writeb(uint8_t data, volatile uint8_t *io_addr)
Write byte to memory-mapped device.
static __always_inline unsigned long virt_to_bus(volatile const void *addr)
Convert virtual address to a bus address.
Definition: io.h:183
#define XMT_RING_BASE_ADDR0
Definition: amd8111e.h:92
void writel(uint32_t data, volatile uint32_t *io_addr)
Write 32-bit dword to memory-mapped device.
#define RCV_RING_BASE_ADDR0
Definition: amd8111e.h:97
#define CTRL2
Definition: amd8111e.h:72
#define RCV_RING_LEN0
Definition: amd8111e.h:109
struct nic * nic
Definition: amd8111e.c:105
static int amd8111e_init_tx_ring(struct amd8111e_priv *lp)
Definition: amd8111e.c:415
#define CMD2
Definition: amd8111e.h:67
#define CMD3
Definition: amd8111e.h:68
#define IFS1_DELTA
Definition: amd8111e.h:572
#define NUM_TX_SLOTS
Definition: amd8111e.c:45
int ext_phy_addr
Definition: amd8111e.c:101
#define ETH_ALEN
Definition: if_ether.h:8
Definition: nic.h:49
#define NUM_RX_SLOTS
Definition: amd8111e.c:46
Definition: amd8111e.h:197
unsigned char * node_addr
Definition: nic.h:52
static int amd8111e_init_rx_ring(struct amd8111e_priv *lp)
Definition: amd8111e.c:398
#define writew
Definition: w89c840.c:159
#define CTRL1
Definition: amd8111e.h:71
#define DEFAULT_IPG
Definition: amd8111e.h:571
#define XMT_RING_LEN0
Definition: amd8111e.h:104
#define AUTOPOLL0
Definition: amd8111e.h:76
struct amd8111e_rx_desc rx_ring[NUM_RX_SLOTS]
Definition: amd8111e.c:91

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().

◆ amd8111e_read_phy()

static int amd8111e_read_phy ( struct amd8111e_priv lp,
int  phy_addr,
int  reg,
u32 val 
)
static

Definition at line 272 of file amd8111e.c.

273 {
274  void *mmio = lp->mmio;
275  unsigned int reg_val;
276  unsigned int retry = PHY_RW_RETRY;
277 
278  reg_val = readl(mmio + PHY_ACCESS);
279  while (reg_val & PHY_CMD_ACTIVE)
280  reg_val = readl(mmio + PHY_ACCESS);
281 
282  writel(PHY_RD_CMD | ((phy_addr & 0x1f) << 21) | ((reg & 0x1f) << 16),
283  mmio + PHY_ACCESS);
284  do {
285  reg_val = readl(mmio + PHY_ACCESS);
286  udelay(30); /* It takes 30 us to read/write data */
287  } while (--retry && (reg_val & PHY_CMD_ACTIVE));
288 
289  if (reg_val & PHY_RD_ERR) {
290  *val = 0;
291  return -1;
292  }
293 
294  *val = reg_val & 0xffff;
295  return 0;
296 }
void * mmio
Definition: amd8111e.c:106
uint32_t readl(volatile uint32_t *io_addr)
Read 32-bit dword from memory-mapped device.
#define PHY_ACCESS
Definition: amd8111e.h:88
void writel(uint32_t data, volatile uint32_t *io_addr)
Write 32-bit dword to memory-mapped device.
void udelay(unsigned long usecs)
Delay for a fixed number of microseconds.
Definition: timer.c:60
static unsigned int unsigned int reg
Definition: intel.h:245
void __asmcall int val
Definition: setjmp.h:28
#define PHY_RW_RETRY
Definition: amd8111e.c:61

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().

◆ amd8111e_probe_ext_phy()

static void amd8111e_probe_ext_phy ( struct amd8111e_priv lp)
static

Definition at line 326 of file amd8111e.c.

327 {
328  int i;
329 
330  lp->ext_phy_id = 0;
331  lp->ext_phy_addr = 1;
332 
333  for (i = 0x1e; i >= 0; i--) {
334  u32 id1, id2;
335 
336  if (amd8111e_read_phy(lp, i, MII_PHYSID1, &id1))
337  continue;
338  if (amd8111e_read_phy(lp, i, MII_PHYSID2, &id2))
339  continue;
340  lp->ext_phy_id = (id1 << 16) | id2;
341  lp->ext_phy_addr = i;
342  break;
343  }
344 
345  if (lp->ext_phy_id)
346  printf("Found MII PHY ID 0x%08x at address 0x%02x\n",
347  (unsigned int) lp->ext_phy_id, lp->ext_phy_addr);
348  else
349  printf("Couldn't detect MII PHY, assuming address 0x01\n");
350 }
int printf(const char *fmt,...)
Write a formatted string to the console.
Definition: vsprintf.c:464
static int amd8111e_read_phy(struct amd8111e_priv *lp, int phy_addr, int reg, u32 *val)
Definition: amd8111e.c:272
int ext_phy_addr
Definition: amd8111e.c:101
#define MII_PHYSID2
Definition: atl1e.h:874
#define MII_PHYSID1
Definition: atl1e.h:873
u32 ext_phy_id
Definition: amd8111e.c:102
uint32_t u32
Definition: stdint.h:23

References amd8111e_read_phy(), amd8111e_priv::ext_phy_addr, amd8111e_priv::ext_phy_id, MII_PHYSID1, MII_PHYSID2, and printf().

Referenced by amd8111e_restart().

◆ amd8111e_disable_interrupt()

static void amd8111e_disable_interrupt ( struct amd8111e_priv lp)
static

Definition at line 352 of file amd8111e.c.

353 {
354  void *mmio = lp->mmio;
355  unsigned int int0;
356 
357  writel(INTREN, mmio + CMD0);
358  writel(INTEN0_CLEAR, mmio + INTEN0);
359  int0 = readl(mmio + INT0);
360  writel(int0, mmio + INT0);
361  readl(mmio + INT0);
362 }
void * mmio
Definition: amd8111e.c:106
uint32_t readl(volatile uint32_t *io_addr)
Read 32-bit dword from memory-mapped device.
#define CMD0
Definition: amd8111e.h:66
#define INT0
Definition: amd8111e.h:64
void writel(uint32_t data, volatile uint32_t *io_addr)
Write 32-bit dword to memory-mapped device.
#define INTEN0
Definition: amd8111e.h:65

References CMD0, INT0, INTEN0, INTEN0_CLEAR, INTREN, amd8111e_priv::mmio, readl(), and writel().

Referenced by amd8111e_disable(), amd8111e_irq(), and amd8111e_restart().

◆ amd8111e_enable_interrupt()

static void amd8111e_enable_interrupt ( struct amd8111e_priv lp)
static

Definition at line 364 of file amd8111e.c.

365 {
366  void *mmio = lp->mmio;
367 
368  writel(VAL3 | LCINTEN | VAL1 | TINTEN0 | VAL0 | RINTEN0, mmio + INTEN0);
369  writel(VAL0 | INTREN, mmio + CMD0);
370  readl(mmio + CMD0);
371 }
Definition: amd8111e.h:195
void * mmio
Definition: amd8111e.c:106
uint32_t readl(volatile uint32_t *io_addr)
Read 32-bit dword from memory-mapped device.
#define CMD0
Definition: amd8111e.h:66
Definition: amd8111e.h:198
void writel(uint32_t data, volatile uint32_t *io_addr)
Write 32-bit dword to memory-mapped device.
Definition: amd8111e.h:197
#define INTEN0
Definition: amd8111e.h:65

References CMD0, INTEN0, INTREN, LCINTEN, amd8111e_priv::mmio, readl(), RINTEN0, TINTEN0, VAL0, VAL1, VAL3, and writel().

Referenced by amd8111e_irq().

◆ amd8111e_force_interrupt()

static void amd8111e_force_interrupt ( struct amd8111e_priv lp)
static

Definition at line 373 of file amd8111e.c.

374 {
375  void *mmio = lp->mmio;
376 
377  writel(VAL0 | UINTCMD, mmio + CMD0);
378  readl(mmio + CMD0);
379 }
void * mmio
Definition: amd8111e.c:106
uint32_t readl(volatile uint32_t *io_addr)
Read 32-bit dword from memory-mapped device.
#define CMD0
Definition: amd8111e.h:66
Definition: amd8111e.h:198
void writel(uint32_t data, volatile uint32_t *io_addr)
Write 32-bit dword to memory-mapped device.

References CMD0, amd8111e_priv::mmio, readl(), UINTCMD, VAL0, and writel().

Referenced by amd8111e_irq().

◆ amd8111e_get_mac_address()

static int amd8111e_get_mac_address ( struct amd8111e_priv lp)
static

Definition at line 381 of file amd8111e.c.

382 {
383  struct nic *nic = lp->nic;
384  void *mmio = lp->mmio;
385  int i;
386 
387  /* BIOS should have set mac address to PADR register,
388  * so we read PADR to get it.
389  */
390  for (i = 0; i < ETH_ALEN; i++)
391  nic->node_addr[i] = readb(mmio + PADR + i);
392 
393  DBG ( "Ethernet addr: %s\n", eth_ntoa ( nic->node_addr ) );
394 
395  return 0;
396 }
uint8_t readb(volatile uint8_t *io_addr)
Read byte from memory-mapped device.
#define PADR
Definition: amd8111e.h:116
void * mmio
Definition: amd8111e.c:106
struct nic * nic
Definition: amd8111e.c:105
const char * eth_ntoa(const void *ll_addr)
Transcribe Ethernet address.
Definition: ethernet.c:175
#define ETH_ALEN
Definition: if_ether.h:8
Definition: nic.h:49
unsigned char * node_addr
Definition: nic.h:52
#define DBG(...)
Print a debugging message.
Definition: compiler.h:498

References DBG, ETH_ALEN, eth_ntoa(), amd8111e_priv::mmio, amd8111e_priv::nic, nic::node_addr, PADR, and readb().

Referenced by amd8111e_restart().

◆ amd8111e_init_rx_ring()

static int amd8111e_init_rx_ring ( struct amd8111e_priv lp)
static

Definition at line 398 of file amd8111e.c.

399 {
400  int i;
401 
402  lp->rx_idx = 0;
403 
404  /* Initilaizing receive descriptors */
405  for (i = 0; i < NUM_RX_SLOTS; i++) {
408  wmb();
410  }
411 
412  return 0;
413 }
wmb()
static __always_inline unsigned long virt_to_bus(volatile const void *addr)
Convert virtual address to a bus address.
Definition: io.h:183
unsigned long rx_idx
Definition: amd8111e.c:94
#define cpu_to_le32(value)
Definition: byteswap.h:107
#define NUM_RX_SLOTS
Definition: amd8111e.c:46
#define cpu_to_le16(value)
Definition: byteswap.h:106
#define RX_BUF_LEN
Definition: amd8111e.c:51
unsigned char rx_buf[NUM_RX_SLOTS][RX_BUF_LEN]
Definition: amd8111e.c:93
struct amd8111e_rx_desc rx_ring[NUM_RX_SLOTS]
Definition: amd8111e.c:91

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().

◆ amd8111e_init_tx_ring()

static int amd8111e_init_tx_ring ( struct amd8111e_priv lp)
static

Definition at line 415 of file amd8111e.c.

416 {
417  int i;
418 
419  lp->tx_idx = 0;
420  lp->tx_consistent = 1;
421 
422  /* Initializing transmit descriptors */
423  for (i = 0; i < NUM_TX_SLOTS; i++) {
424  lp->tx_ring[i].tx_flags = 0;
425  lp->tx_ring[i].buf_phy_addr = 0;
426  lp->tx_ring[i].buf_len = 0;
427  }
428 
429  return 0;
430 }
struct amd8111e_tx_desc tx_ring[NUM_TX_SLOTS]
Definition: amd8111e.c:90
unsigned long tx_idx
Definition: amd8111e.c:94
#define NUM_TX_SLOTS
Definition: amd8111e.c:45
int tx_consistent
Definition: amd8111e.c:95

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().

◆ amd8111e_wait_tx_ring()

static int amd8111e_wait_tx_ring ( struct amd8111e_priv lp,
unsigned int  index 
)
static

Definition at line 432 of file amd8111e.c.

433 {
434  volatile u16 status;
435  int retry = TX_RETRY;
436 
438  while (--retry && (status & OWN_BIT)) {
441  }
442  if (status & OWN_BIT) {
443  printf("Error: tx slot %d timeout, stat = 0x%x\n", index, status);
444  amd8111e_restart(lp);
445  return -1;
446  }
447 
448  return 0;
449 }
uint16_t u16
Definition: stdint.h:21
int printf(const char *fmt,...)
Write a formatted string to the console.
Definition: vsprintf.c:464
struct amd8111e_tx_desc tx_ring[NUM_TX_SLOTS]
Definition: amd8111e.c:90
uint8_t status
Status.
Definition: ena.h:16
#define le16_to_cpu(value)
Definition: byteswap.h:112
#define TX_RETRY
Definition: amd8111e.c:59
static void amd8111e_restart(struct amd8111e_priv *lp)
Definition: amd8111e.c:503
void mdelay(unsigned long msecs)
Delay for a fixed number of milliseconds.
Definition: timer.c:78
#define TX_PROCESS_TIME
Definition: amd8111e.c:58
uint64_t index
Index of the first segment within the content.
Definition: pccrc.h:21

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().

◆ amd8111e_wait_link()

static void amd8111e_wait_link ( struct amd8111e_priv lp)
static

Definition at line 451 of file amd8111e.c.

452 {
453  unsigned int status;
454  u32 reg_val;
455 
456  do {
457  /* read phy to update STAT0 register */
458  amd8111e_read_phy(lp, lp->ext_phy_addr, MII_BMCR, &reg_val);
459  amd8111e_read_phy(lp, lp->ext_phy_addr, MII_BMSR, &reg_val);
460  amd8111e_read_phy(lp, lp->ext_phy_addr, MII_ADVERTISE, &reg_val);
461  amd8111e_read_phy(lp, lp->ext_phy_addr, MII_LPA, &reg_val);
462  status = readl(lp->mmio + STAT0);
463  } while (!(status & AUTONEG_COMPLETE) || !(status & LINK_STATS));
464 }
#define MII_ADVERTISE
Definition: atl1e.h:875
#define MII_LPA
Definition: atl1e.h:876
void * mmio
Definition: amd8111e.c:106
uint32_t readl(volatile uint32_t *io_addr)
Read 32-bit dword from memory-mapped device.
static int amd8111e_read_phy(struct amd8111e_priv *lp, int phy_addr, int reg, u32 *val)
Definition: amd8111e.c:272
uint8_t status
Status.
Definition: ena.h:16
#define MII_BMCR
Definition: atl1e.h:871
int ext_phy_addr
Definition: amd8111e.c:101
#define MII_BMSR
Definition: atl1e.h:872
#define STAT0
Definition: amd8111e.h:63
uint32_t u32
Definition: stdint.h:23

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().

◆ amd8111e_poll_link()

static void amd8111e_poll_link ( struct amd8111e_priv lp)
static

Definition at line 466 of file amd8111e.c.

467 {
468  unsigned int status, speed;
469  u32 reg_val;
470 
471  if (!lp->link) {
472  /* read phy to update STAT0 register */
473  amd8111e_read_phy(lp, lp->ext_phy_addr, MII_BMCR, &reg_val);
474  amd8111e_read_phy(lp, lp->ext_phy_addr, MII_BMSR, &reg_val);
475  amd8111e_read_phy(lp, lp->ext_phy_addr, MII_ADVERTISE, &reg_val);
476  amd8111e_read_phy(lp, lp->ext_phy_addr, MII_LPA, &reg_val);
477  status = readl(lp->mmio + STAT0);
478 
479  if (status & LINK_STATS) {
480  lp->link = 1;
481  speed = (status & SPEED_MASK) >> 7;
482  if (speed == PHY_SPEED_100)
483  lp->speed = 1;
484  else
485  lp->speed = 0;
486  if (status & FULL_DPLX)
487  lp->duplex = 1;
488  else
489  lp->duplex = 0;
490 
491  printf("Link is up: %s Mbps %s duplex\n",
492  lp->speed ? "100" : "10", lp->duplex ? "full" : "half");
493  }
494  } else {
495  status = readl(lp->mmio + STAT0);
496  if (!(status & LINK_STATS)) {
497  lp->link = 0;
498  printf("Link is down\n");
499  }
500  }
501 }
#define MII_ADVERTISE
Definition: atl1e.h:875
#define MII_LPA
Definition: atl1e.h:876
int printf(const char *fmt,...)
Write a formatted string to the console.
Definition: vsprintf.c:464
void * mmio
Definition: amd8111e.c:106
char speed
Definition: amd8111e.c:99
uint32_t readl(volatile uint32_t *io_addr)
Read 32-bit dword from memory-mapped device.
#define PHY_SPEED_100
Definition: amd8111e.h:161
static int amd8111e_read_phy(struct amd8111e_priv *lp, int phy_addr, int reg, u32 *val)
Definition: amd8111e.c:272
uint8_t status
Status.
Definition: ena.h:16
#define MII_BMCR
Definition: atl1e.h:871
int ext_phy_addr
Definition: amd8111e.c:101
#define MII_BMSR
Definition: atl1e.h:872
#define STAT0
Definition: amd8111e.h:63
uint32_t u32
Definition: stdint.h:23

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().

◆ amd8111e_restart()

static void amd8111e_restart ( struct amd8111e_priv lp)
static

Definition at line 503 of file amd8111e.c.

504 {
505  printf("\nStarting nic...\n");
510  amd8111e_start(lp);
511 
512  printf("Waiting link up...\n");
513  lp->link = 0;
514  amd8111e_wait_link(lp);
515  amd8111e_poll_link(lp);
516 }
int printf(const char *fmt,...)
Write a formatted string to the console.
Definition: vsprintf.c:464
static int amd8111e_get_mac_address(struct amd8111e_priv *lp)
Definition: amd8111e.c:381
static void amd8111e_poll_link(struct amd8111e_priv *lp)
Definition: amd8111e.c:466
static int amd8111e_start(struct amd8111e_priv *lp)
Definition: amd8111e.c:218
static void amd8111e_wait_link(struct amd8111e_priv *lp)
Definition: amd8111e.c:451
static void amd8111e_probe_ext_phy(struct amd8111e_priv *lp)
Definition: amd8111e.c:326
static void amd8111e_init_hw_default(struct amd8111e_priv *lp)
Definition: amd8111e.c:137
static void amd8111e_disable_interrupt(struct amd8111e_priv *lp)
Definition: amd8111e.c:352

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().

◆ amd8111e_transmit()

static void amd8111e_transmit ( struct nic nic,
const char *  dst_addr,
unsigned int  type,
unsigned int  size,
const char *  packet 
)
static

Definition at line 523 of file amd8111e.c.

525 {
526  struct amd8111e_priv *lp = nic->priv_data;
527  struct eth_frame *frame;
528  unsigned int index;
529 
530  /* check packet size */
531  if (size > TX_PKT_LEN_MAX) {
532  printf("amd8111e_transmit(): too large packet, drop\n");
533  return;
534  }
535 
536  /* get tx slot */
537  index = lp->tx_idx;
538  if (amd8111e_wait_tx_ring(lp, index))
539  return;
540 
541  /* fill frame */
542  frame = (struct eth_frame *)lp->tx_buf[index];
543  memset(frame->data, 0, TX_PKT_LEN_MAX);
544  memcpy(frame->dst_addr, dst_addr, ETH_ALEN);
545  memcpy(frame->src_addr, nic->node_addr, ETH_ALEN);
546  frame->type = htons(type);
547  memcpy(frame->data, packet, size);
548 
549  /* start xmit */
552  wmb();
553  lp->tx_ring[index].tx_flags =
555  writel(VAL1 | TDMD0, lp->mmio + CMD0);
556  readl(lp->mmio + CMD0);
557 
558  /* update slot pointer */
559  lp->tx_idx = (lp->tx_idx + 1) & TX_SLOTS_MASK;
560 }
wmb()
int printf(const char *fmt,...)
Write a formatted string to the console.
Definition: vsprintf.c:464
void * mmio
Definition: amd8111e.c:106
uint8_t type
Type.
Definition: ena.h:16
uint32_t readl(volatile uint32_t *io_addr)
Read 32-bit dword from memory-mapped device.
#define CMD0
Definition: amd8111e.h:66
struct amd8111e_tx_desc tx_ring[NUM_TX_SLOTS]
Definition: amd8111e.c:90
unsigned long frame
Definition: xengrant.h:178
void * memcpy(void *dest, const void *src, size_t len) __nonnull
static __always_inline unsigned long virt_to_bus(volatile const void *addr)
Convert virtual address to a bus address.
Definition: io.h:183
#define ETH_HLEN
Definition: if_ether.h:9
void writel(uint32_t data, volatile uint32_t *io_addr)
Write 32-bit dword to memory-mapped device.
unsigned char tx_buf[NUM_TX_SLOTS][TX_BUF_LEN]
Definition: amd8111e.c:92
void * priv_data
Definition: nic.h:59
#define cpu_to_le32(value)
Definition: byteswap.h:107
unsigned long tx_idx
Definition: amd8111e.c:94
#define TX_SLOTS_MASK
Definition: amd8111e.c:47
#define ETH_ALEN
Definition: if_ether.h:8
Definition: nic.h:49
Definition: amd8111e.h:197
unsigned char * node_addr
Definition: nic.h:52
#define TX_PKT_LEN_MAX
Definition: amd8111e.c:53
#define cpu_to_le16(value)
Definition: byteswap.h:106
uint8_t size
Entry size (in 32-bit words)
Definition: ena.h:16
uint64_t index
Index of the first segment within the content.
Definition: pccrc.h:21
#define htons(value)
Definition: byteswap.h:135
static int amd8111e_wait_tx_ring(struct amd8111e_priv *lp, unsigned int index)
Definition: amd8111e.c:432
u8 dst_addr[ETH_ALEN]
Definition: amd8111e.c:83
void * memset(void *dest, int character, size_t len) __nonnull

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().

◆ amd8111e_poll()

static int amd8111e_poll ( struct nic nic,
int  retrieve 
)
static

Definition at line 562 of file amd8111e.c.

563 {
564  /* return true if there's an ethernet packet ready to read */
565  /* nic->packet should contain data on return */
566  /* nic->packetlen should contain length of data */
567 
568  struct amd8111e_priv *lp = nic->priv_data;
569  u16 status, pkt_len;
570  unsigned int index, pkt_ok;
571 
572  amd8111e_poll_link(lp);
573 
574  index = lp->rx_idx;
576  pkt_len = le16_to_cpu(lp->rx_ring[index].msg_len) - 4; /* remove 4bytes FCS */
577 
578  if (status & OWN_BIT)
579  return 0;
580 
581  if (status & ERR_BIT)
582  pkt_ok = 0;
583  else if (!(status & STP_BIT))
584  pkt_ok = 0;
585  else if (!(status & ENP_BIT))
586  pkt_ok = 0;
587  else if (pkt_len < RX_PKT_LEN_MIN)
588  pkt_ok = 0;
589  else if (pkt_len > RX_PKT_LEN_MAX)
590  pkt_ok = 0;
591  else
592  pkt_ok = 1;
593 
594  if (pkt_ok) {
595  if (!retrieve)
596  return 1;
597  nic->packetlen = pkt_len;
599  }
600 
603  wmb();
605  writel(VAL2 | RDMD0, lp->mmio + CMD0);
606  readl(lp->mmio + CMD0);
607 
608  lp->rx_idx = (lp->rx_idx + 1) & RX_SLOTS_MASK;
609  return pkt_ok;
610 }
uint16_t u16
Definition: stdint.h:21
wmb()
void * mmio
Definition: amd8111e.c:106
uint32_t readl(volatile uint32_t *io_addr)
Read 32-bit dword from memory-mapped device.
#define CMD0
Definition: amd8111e.h:66
Definition: amd8111e.h:196
#define RX_PKT_LEN_MIN
Definition: amd8111e.c:54
uint8_t status
Status.
Definition: ena.h:16
void * memcpy(void *dest, const void *src, size_t len) __nonnull
static __always_inline unsigned long virt_to_bus(volatile const void *addr)
Convert virtual address to a bus address.
Definition: io.h:183
static void amd8111e_poll_link(struct amd8111e_priv *lp)
Definition: amd8111e.c:466
unsigned long rx_idx
Definition: amd8111e.c:94
void writel(uint32_t data, volatile uint32_t *io_addr)
Write 32-bit dword to memory-mapped device.
void * priv_data
Definition: nic.h:59
#define cpu_to_le32(value)
Definition: byteswap.h:107
unsigned int packetlen
Definition: nic.h:54
#define RX_PKT_LEN_MAX
Definition: amd8111e.c:55
#define le16_to_cpu(value)
Definition: byteswap.h:112
Definition: nic.h:49
unsigned char * packet
Definition: nic.h:53
#define cpu_to_le16(value)
Definition: byteswap.h:106
#define RX_SLOTS_MASK
Definition: amd8111e.c:48
#define RX_BUF_LEN
Definition: amd8111e.c:51
unsigned char rx_buf[NUM_RX_SLOTS][RX_BUF_LEN]
Definition: amd8111e.c:93
uint64_t index
Index of the first segment within the content.
Definition: pccrc.h:21
struct amd8111e_rx_desc rx_ring[NUM_RX_SLOTS]
Definition: amd8111e.c:91

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, 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().

◆ amd8111e_disable()

static void amd8111e_disable ( struct nic nic)
static

Definition at line 612 of file amd8111e.c.

613 {
614  struct amd8111e_priv *lp = nic->priv_data;
615 
616  /* disable interrupt */
618 
619  /* stop chip */
621 
622  /* unmap mmio */
623  iounmap(lp->mmio);
624 
625  /* update status */
626  lp->opened = 0;
627 }
void * mmio
Definition: amd8111e.c:106
void * priv_data
Definition: nic.h:59
char opened
Definition: amd8111e.c:97
Definition: nic.h:49
static void amd8111e_init_hw_default(struct amd8111e_priv *lp)
Definition: amd8111e.c:137
static void amd8111e_disable_interrupt(struct amd8111e_priv *lp)
Definition: amd8111e.c:352
void iounmap(volatile const void *io_addr)
Unmap I/O address.

References amd8111e_disable_interrupt(), amd8111e_init_hw_default(), iounmap(), amd8111e_priv::mmio, amd8111e_priv::opened, and nic::priv_data.

◆ amd8111e_irq()

static void amd8111e_irq ( struct nic nic,
irq_action_t  action 
)
static

Definition at line 629 of file amd8111e.c.

630 {
631  struct amd8111e_priv *lp = nic->priv_data;
632 
633  switch (action) {
634  case DISABLE:
636  break;
637  case ENABLE:
639  break;
640  case FORCE:
642  break;
643  }
644 }
static void amd8111e_force_interrupt(struct amd8111e_priv *lp)
Definition: amd8111e.c:373
Definition: nic.h:35
void * priv_data
Definition: nic.h:59
static void amd8111e_enable_interrupt(struct amd8111e_priv *lp)
Definition: amd8111e.c:364
Definition: nic.h:37
Definition: nic.h:49
static void amd8111e_disable_interrupt(struct amd8111e_priv *lp)
Definition: amd8111e.c:352
Definition: nic.h:36

References amd8111e_disable_interrupt(), amd8111e_enable_interrupt(), amd8111e_force_interrupt(), DISABLE, ENABLE, FORCE, and nic::priv_data.

◆ amd8111e_probe()

static int amd8111e_probe ( struct nic nic,
struct pci_device pdev 
)
static

Definition at line 653 of file amd8111e.c.

654 {
655  struct amd8111e_priv *lp = &amd8111e;
656  unsigned long mmio_start, mmio_len;
657 
658  nic->ioaddr = pdev->ioaddr;
659  nic->irqno = pdev->irq;
660 
661  mmio_start = pci_bar_start(pdev, PCI_BASE_ADDRESS_0);
662  mmio_len = pci_bar_size(pdev, PCI_BASE_ADDRESS_0);
663 
664  memset(lp, 0, sizeof(*lp));
665  lp->pdev = pdev;
666  lp->nic = nic;
667  lp->mmio = ioremap(mmio_start, mmio_len);
668  lp->opened = 1;
670 
671  nic->priv_data = lp;
672 
673  amd8111e_restart(lp);
674 
676  return 1;
677 }
unsigned char irqno
Definition: nic.h:56
uint8_t irq
Interrupt number.
Definition: pci.h:208
void * mmio
Definition: amd8111e.c:106
unsigned long ioaddr
I/O address.
Definition: pci.h:200
#define PCI_BASE_ADDRESS_0
Definition: pci.h:61
void adjust_pci_device(struct pci_device *pci)
Enable PCI device.
Definition: pci.c:149
struct pci_device * pdev
Definition: amd8111e.c:104
unsigned int ioaddr
Definition: nic.h:55
void * priv_data
Definition: nic.h:59
unsigned long pci_bar_start(struct pci_device *pci, unsigned int reg)
Find the start of a PCI BAR.
Definition: pci.c:96
struct nic * nic
Definition: amd8111e.c:105
char opened
Definition: amd8111e.c:97
static struct nic_operations amd8111e_operations
Definition: amd8111e.c:646
unsigned long pci_bar_size(struct pci_device *pci, unsigned int reg)
Find the size of a PCI BAR.
Definition: pciextra.c:90
Definition: nic.h:49
static void amd8111e_restart(struct amd8111e_priv *lp)
Definition: amd8111e.c:503
static struct amd8111e_priv amd8111e
Definition: amd8111e.c:109
void * ioremap(unsigned long bus_addr, size_t len)
Map bus address as an I/O address.
struct nic_operations * nic_op
Definition: nic.h:50
struct nic nic
Definition: legacy.c:22
void * memset(void *dest, int character, size_t len) __nonnull

References adjust_pci_device(), amd8111e, amd8111e_operations, amd8111e_restart(), nic::ioaddr, pci_device::ioaddr, ioremap(), pci_device::irq, nic::irqno, memset(), amd8111e_priv::mmio, nic, amd8111e_priv::nic, nic::nic_op, amd8111e_priv::opened, pci_bar_size(), pci_bar_start(), PCI_BASE_ADDRESS_0, amd8111e_priv::pdev, and nic::priv_data.

◆ PCI_DRIVER()

PCI_DRIVER ( amd8111e_driver  ,
amd8111e_nics  ,
PCI_NO_CLASS   
)

◆ DRIVER()

DRIVER ( "AMD8111E"  ,
nic_driver  ,
pci_driver  ,
amd8111e_driver  ,
amd8111e_probe  ,
amd8111e_disable   
)

Variable Documentation

◆ amd8111e

struct amd8111e_priv amd8111e
static

Definition at line 109 of file amd8111e.c.

Referenced by amd8111e_probe().

◆ amd8111e_operations

struct nic_operations amd8111e_operations
static
Initial value:
= {
.connect = dummy_connect,
.poll = amd8111e_poll,
.transmit = amd8111e_transmit,
.irq = amd8111e_irq,
}
static int amd8111e_poll(struct nic *nic, int retrieve)
Definition: amd8111e.c:562
static void amd8111e_irq(struct nic *nic, irq_action_t action)
Definition: amd8111e.c:629
int dummy_connect(struct nic *nic __unused)
Definition: legacy.c:151
static void amd8111e_transmit(struct nic *nic, const char *dst_addr, unsigned int type, unsigned int size, const char *packet)
Definition: amd8111e.c:523

Definition at line 646 of file amd8111e.c.

Referenced by amd8111e_probe().

◆ amd8111e_nics

struct pci_device_id amd8111e_nics[]
static
Initial value:
= {
PCI_ROM(0x1022, 0x7462, "amd8111e", "AMD8111E", 0),
}
#define PCI_ROM(_vendor, _device, _name, _description, _data)
Definition: pci.h:283

Definition at line 679 of file amd8111e.c.