iPXE
epic100.c File Reference
#include "etherboot.h"
#include <ipxe/pci.h>
#include <ipxe/ethernet.h>
#include "nic.h"
#include "epic100.h"

Go to the source code of this file.

Data Structures

struct  epic_rx_desc
struct  epic_tx_desc
struct  epic100_bss

Macros

#define LINUX_OUT_MACROS
#define virt_to_le32desc(addr)
#define le32desc_to_virt(addr)
#define TX_RING_SIZE   2 /* use at least 2 buffers for TX */
#define RX_RING_SIZE   2
#define PKT_BUF_SZ   1536 /* Size of each temporary Tx/Rx buffer.*/
#define EPIC_DEBUG   0 /* debug level */
#define TD_STDFLAGS   TD_LASTDESC
#define delay(nanosec)
#define epic100_bufs   NIC_FAKE_BSS ( struct epic100_bss )
#define rx_ring   epic100_bufs.rx_ring
#define tx_ring   epic100_bufs.tx_ring
#define rx_packet   epic100_bufs.rx_packet
#define tx_packet   epic100_bufs.tx_packet
#define MII_READOP   1
#define MII_WRITEOP   2

Functions

 FILE_LICENCE (GPL2_OR_LATER)
static void epic100_open (void)
static void epic100_init_ring (void)
static void epic100_disable (struct nic *nic, void *hwdev)
static int epic100_poll (struct nic *nic, int retrieve)
static void epic100_transmit (struct nic *nic, const char *destaddr, unsigned int type, unsigned int len, const char *data)
static int mii_read (int phy_id, int location)
static void epic100_irq (struct nic *nic, irq_action_t action)
static int epic100_probe (struct nic *nic, struct pci_device *pci)
static void set_rx_mode (void)
static void epic100_disable (struct nic *nic __unused, void *hwdev __unused)
static void epic100_irq (struct nic *nic __unused, irq_action_t action __unused)
 PCI_DRIVER (epic100_driver, epic100_nics, PCI_NO_CLASS)
 DRIVER ("EPIC100", nic_driver, pci_driver, epic100_driver, epic100_probe, epic100_disable, epic100_bufs)

Variables

static struct nic_operations epic100_operations
static int ioaddr
static int command
static int intstat
static int intmask
static int genctl
static int eectl
static int test
static int mmctl
static int mmdata
static int lan0
static int mc0
static int rxcon
static int txcon
static int prcdar
static int ptcdar
static int eththr
static unsigned int cur_rx
static unsigned int cur_tx
static signed char phys [4]
static struct pci_device_id epic100_nics []

Macro Definition Documentation

◆ LINUX_OUT_MACROS

#define LINUX_OUT_MACROS

Definition at line 7 of file epic100.c.

◆ virt_to_le32desc

#define virt_to_le32desc ( addr)
Value:
uint32_t addr
Buffer address.
Definition dwmac.h:9
#define cpu_to_le32(value)
Definition byteswap.h:108
static __always_inline unsigned long virt_to_bus(volatile const void *addr)
Convert virtual address to a bus address.
Definition io.h:184

Definition at line 16 of file epic100.c.

Referenced by epic100_init_ring(), and epic100_open().

◆ le32desc_to_virt

#define le32desc_to_virt ( addr)
Value:
#define le32_to_cpu(value)
Definition byteswap.h:114
static __always_inline void * bus_to_virt(unsigned long bus_addr)
Convert bus address to a virtual address.
Definition io.h:196

Definition at line 17 of file epic100.c.

◆ TX_RING_SIZE

#define TX_RING_SIZE   2 /* use at least 2 buffers for TX */

Definition at line 19 of file epic100.c.

◆ RX_RING_SIZE

#define RX_RING_SIZE   2

Definition at line 20 of file epic100.c.

◆ PKT_BUF_SZ

#define PKT_BUF_SZ   1536 /* Size of each temporary Tx/Rx buffer.*/

Definition at line 22 of file epic100.c.

◆ EPIC_DEBUG

#define EPIC_DEBUG   0 /* debug level */

Definition at line 30 of file epic100.c.

◆ TD_STDFLAGS

#define TD_STDFLAGS   TD_LASTDESC

Definition at line 40 of file epic100.c.

Referenced by epic100_init_ring().

◆ delay

#define delay ( nanosec)
Value:
do { int _i = 3; while (--_i > 0) \
{ __SLOW_DOWN_IO; }} while (0)

Definition at line 49 of file epic100.c.

49#define delay(nanosec) do { int _i = 3; while (--_i > 0) \
50 { __SLOW_DOWN_IO; }} while (0)

Referenced by ath5k_hw_reset(), hunt_mcdi_request_poll(), neighbour_tx(), neighbour_tx_queue(), and reg_delay().

◆ epic100_bufs

#define epic100_bufs   NIC_FAKE_BSS ( struct epic100_bss )

Definition at line 97 of file epic100.c.

Referenced by DRIVER().

◆ rx_ring

◆ tx_ring

◆ rx_packet

#define rx_packet   epic100_bufs.rx_packet

Definition at line 100 of file epic100.c.

Referenced by epic100_init_ring(), and epic100_poll().

◆ tx_packet

#define tx_packet   epic100_bufs.tx_packet

Definition at line 101 of file epic100.c.

Referenced by epic100_init_ring(), and epic100_transmit().

◆ MII_READOP

#define MII_READOP   1

Definition at line 496 of file epic100.c.

Referenced by mii_read().

◆ MII_WRITEOP

#define MII_WRITEOP   2

Definition at line 497 of file epic100.c.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER )

◆ epic100_open()

void epic100_open ( void )
static

Definition at line 231 of file epic100.c.

232{
233 int mii_reg5;
234 unsigned long tmp;
235
237
238 /* Pull the chip out of low-power mode, and set for PCI read multiple. */
240
242
244
245 mii_reg5 = mii_read(phys[0], 5);
246 if (mii_reg5 != 0xffff && (mii_reg5 & 0x0100)) {
247 printf(" full-duplex mode");
249 } else
250 tmp |= TC_LM_NORMAL;
251
252 outl(tmp, txcon);
253
254 /* Give address of RX and TX ring to the chip */
257
258 /* Start the chip's Rx process: receive unicast and broadcast */
259 set_rx_mode();
261
262 putchar('\n');
263}
int putchar(int character)
Write a single character to each console device.
Definition console.c:29
static int eththr
Definition epic100.c:82
#define virt_to_le32desc(addr)
Definition epic100.c:16
#define tx_ring
Definition epic100.c:99
static int ptcdar
Definition epic100.c:81
static int mii_read(int phy_id, int location)
Definition epic100.c:500
#define rx_ring
Definition epic100.c:98
static void set_rx_mode(void)
Definition epic100.c:219
static void epic100_init_ring(void)
Definition epic100.c:267
static signed char phys[4]
Definition epic100.c:88
static int prcdar
Definition epic100.c:80
static int genctl
Definition epic100.c:71
static int txcon
Definition epic100.c:79
#define GC_ONE_COPY
Definition epic100.h:93
#define TC_LM_NORMAL
Definition epic100.h:140
#define GC_RX_FIFO_THR_64
Definition epic100.h:106
#define TC_LM_FULL_DPX
Definition epic100.h:143
#define CR_START_RX
Definition epic100.h:47
#define CR_QUEUE_RX
Definition epic100.h:49
#define TC_EARLY_TX_ENABLE
Definition epic100.h:137
#define TX_FIFO_THRESH
Definition epic100.h:148
#define TX_SLOT_TIME
Definition epic100.h:145
#define GC_MRC_READ_MULT
Definition epic100.h:112
#define outl(data, io_addr)
Definition io.h:330
unsigned long tmp
Definition linux_pci.h:65
A command-line command.
Definition command.h:10
int printf(const char *fmt,...)
Write a formatted string to the console.
Definition vsprintf.c:465

References CR_QUEUE_RX, CR_START_RX, epic100_init_ring(), eththr, GC_MRC_READ_MULT, GC_ONE_COPY, GC_RX_FIFO_THR_64, genctl, mii_read(), outl, phys, prcdar, printf(), ptcdar, putchar(), rx_ring, set_rx_mode(), TC_EARLY_TX_ENABLE, TC_LM_FULL_DPX, TC_LM_NORMAL, tmp, TX_FIFO_THRESH, tx_ring, TX_SLOT_TIME, txcon, and virt_to_le32desc.

Referenced by epic100_probe(), and epic100_transmit().

◆ epic100_init_ring()

void epic100_init_ring ( void )
static

Definition at line 267 of file epic100.c.

268{
269 int i;
270
271 cur_rx = cur_tx = 0;
272
273 for (i = 0; i < RX_RING_SIZE; i++) {
274 rx_ring[i].status = cpu_to_le32(RRING_OWN); /* Owned by Epic chip */
275 rx_ring[i].buflength = cpu_to_le32(PKT_BUF_SZ);
276 rx_ring[i].bufaddr = virt_to_bus(&rx_packet[i * PKT_BUF_SZ]);
277 rx_ring[i].next = virt_to_le32desc(&rx_ring[i + 1]) ;
278 }
279 /* Mark the last entry as wrapping the ring. */
280 rx_ring[i-1].next = virt_to_le32desc(&rx_ring[0]);
281
282 /*
283 *The Tx buffer descriptor is filled in as needed,
284 * but we do need to clear the ownership bit.
285 */
286
287 for (i = 0; i < TX_RING_SIZE; i++) {
288 tx_ring[i].status = 0x0000; /* Owned by CPU */
289 tx_ring[i].buflength = 0x0000 | cpu_to_le32(TD_STDFLAGS << 16);
290 tx_ring[i].bufaddr = virt_to_bus(&tx_packet[i * PKT_BUF_SZ]);
291 tx_ring[i].next = virt_to_le32desc(&tx_ring[i + 1]);
292 }
293 tx_ring[i-1].next = virt_to_le32desc(&tx_ring[0]);
294}
#define PKT_BUF_SZ
Definition 3c515.c:87
#define TX_RING_SIZE
Definition 3c515.c:85
#define RX_RING_SIZE
Definition 3c515.c:86
#define tx_packet
Definition epic100.c:101
#define rx_packet
Definition epic100.c:100
static unsigned int cur_rx
Definition epic100.c:84
static unsigned int cur_tx
Definition epic100.c:84
#define TD_STDFLAGS
Definition epic100.c:40
#define RRING_OWN
Definition epic100.h:161

References cpu_to_le32, cur_rx, cur_tx, PKT_BUF_SZ, RRING_OWN, rx_packet, rx_ring, RX_RING_SIZE, TD_STDFLAGS, tx_packet, tx_ring, TX_RING_SIZE, virt_to_bus(), and virt_to_le32desc.

Referenced by epic100_open().

◆ epic100_disable() [1/2]

void epic100_disable ( struct nic * nic,
void * hwdev )
static

References data, len, and type.

Referenced by DRIVER().

◆ epic100_poll()

int epic100_poll ( struct nic * nic,
int retrieve )
static

Definition at line 376 of file epic100.c.

377{
378 int entry;
379 int retcode;
380 unsigned long status;
381 entry = cur_rx % RX_RING_SIZE;
382
383 if ((rx_ring[entry].status & cpu_to_le32(RRING_OWN)) == RRING_OWN)
384 return (0);
385
386 if ( ! retrieve ) return 1;
387
389 /* We own the next entry, it's a new packet. Send it up. */
390
391#if (EPIC_DEBUG > 4)
392 printf("epic_poll: entry %d status %hX\n", entry, status);
393#endif
394
395 cur_rx++;
396 if (status & 0x2000) {
397 printf("epic_poll: Giant packet\n");
398 retcode = 0;
399 } else if (status & 0x0006) {
400 /* Rx Frame errors are counted in hardware. */
401 printf("epic_poll: Frame received with errors\n");
402 retcode = 0;
403 } else {
404 /* Omit the four octet CRC from the length. */
405 nic->packetlen = (status >> 16) - 4;
407 retcode = 1;
408 }
409
410 /* Clear all error sources. */
412
413 /* Give the descriptor back to the chip */
414 rx_ring[entry].status = RRING_OWN;
415
416 /* Restart Receiver */
418
419 return retcode;
420}
uint8_t status
Status.
Definition ena.h:5
static int intstat
Definition epic100.c:69
#define INTR_CLEARERRS
Definition epic100.h:84
void * memcpy(void *dest, const void *src, size_t len) __nonnull
Definition nic.h:49
unsigned char * packet
Definition nic.h:53
unsigned int packetlen
Definition nic.h:54

References cpu_to_le32, CR_QUEUE_RX, CR_START_RX, cur_rx, INTR_CLEARERRS, intstat, le32_to_cpu, memcpy(), outl, nic::packet, nic::packetlen, PKT_BUF_SZ, printf(), RRING_OWN, rx_packet, rx_ring, RX_RING_SIZE, and status.

◆ epic100_transmit()

void epic100_transmit ( struct nic * nic,
const char * destaddr,
unsigned int type,
unsigned int len,
const char * data )
static

Definition at line 306 of file epic100.c.

308{
309 unsigned short nstype;
310 unsigned char *txp;
311 int entry;
312 unsigned long ct;
313
314 /* Calculate the next Tx descriptor entry. */
315 entry = cur_tx % TX_RING_SIZE;
316
317 if ((tx_ring[entry].status & TRING_OWN) == TRING_OWN) {
318 printf("eth_transmit: Unable to transmit. status=%4.4lx. Resetting...\n",
319 tx_ring[entry].status);
320
321 epic100_open();
322 return;
323 }
324
325 txp = tx_packet + (entry * PKT_BUF_SZ);
326
327 memcpy(txp, destaddr, ETH_ALEN);
329 nstype = htons(type);
330 memcpy(txp + 12, (char*)&nstype, 2);
331 memcpy(txp + ETH_HLEN, data, len);
332
333 len += ETH_HLEN;
334 len &= 0x0FFF;
335 while(len < ETH_ZLEN)
336 txp[len++] = '\0';
337 /*
338 * Caution: the write order is important here,
339 * set the base address with the "ownership"
340 * bits last.
341 */
342
343 tx_ring[entry].buflength |= cpu_to_le32(len);
344 tx_ring[entry].status = cpu_to_le32(len << 16) |
345 cpu_to_le32(TRING_OWN); /* Pass ownership to the chip. */
346
347 cur_tx++;
348
349 /* Trigger an immediate transmit demand. */
351
352 ct = currticks();
353 /* timeout 10 ms for transmit */
354 while ((le32_to_cpu(tx_ring[entry].status) & (TRING_OWN)) &&
355 ct + 10*1000 < currticks())
356 /* Wait */;
357
358 if ((le32_to_cpu(tx_ring[entry].status) & TRING_OWN) != 0)
359 printf("Oops, transmitter timeout, status=%4.4lX\n",
360 tx_ring[entry].status);
361}
ring len
Length.
Definition dwmac.h:226
uint32_t type
Operating system type.
Definition ena.h:1
uint8_t data[48]
Additional event data.
Definition ena.h:11
static void epic100_open(void)
Definition epic100.c:231
#define TRING_OWN
Definition epic100.h:177
#define CR_QUEUE_TX
Definition epic100.h:48
#define ETH_ZLEN
Definition if_ether.h:11
#define ETH_ALEN
Definition if_ether.h:9
#define ETH_HLEN
Definition if_ether.h:10
#define htons(value)
Definition byteswap.h:136
unsigned char * node_addr
Definition nic.h:52
unsigned long currticks(void)
Get current system time in ticks.
Definition timer.c:43

References cpu_to_le32, CR_QUEUE_TX, cur_tx, currticks(), data, epic100_open(), ETH_ALEN, ETH_HLEN, ETH_ZLEN, htons, le32_to_cpu, len, memcpy(), nic::node_addr, outl, PKT_BUF_SZ, printf(), status, TRING_OWN, tx_packet, tx_ring, TX_RING_SIZE, and type.

◆ mii_read()

int mii_read ( int phy_id,
int location )
static

Definition at line 500 of file epic100.c.

501{
502 int i;
503
504 outl((phy_id << 9) | (location << 4) | MII_READOP, mmctl);
505 /* Typical operation takes < 50 ticks. */
506
507 for (i = 4000; i > 0; i--)
508 if ((inl(mmctl) & MII_READOP) == 0)
509 break;
510 return inw(mmdata);
511}
#define MII_READOP
Definition epic100.c:496
static int mmctl
Definition epic100.c:74
static int mmdata
Definition epic100.c:75
#define inw(io_addr)
Definition io.h:292
#define inl(io_addr)
Definition io.h:301

References inl, inw, MII_READOP, mmctl, mmdata, and outl.

Referenced by epic100_open(), epic100_probe(), mii_check_link(), mii_find(), mii_reset(), mii_restart(), realtek_phy_speed(), rhine_probe(), smscusb_mii_check_link(), and velocity_set_link().

◆ epic100_irq() [1/2]

void epic100_irq ( struct nic * nic,
irq_action_t action )
static

◆ epic100_probe()

int epic100_probe ( struct nic * nic,
struct pci_device * pci )
static

Definition at line 109 of file epic100.c.

109 {
110
111 int i;
112 unsigned short* ap;
113 unsigned int phy, phy_idx;
114
115 if (pci->ioaddr == 0)
116 return 0;
117
118 /* Ideally we would detect all network cards in slot order. That would
119 be best done a central PCI probe dispatch, which wouldn't work
120 well with the current structure. So instead we detect just the
121 Epic cards in slot order. */
122
123 ioaddr = pci->ioaddr;
124
125 nic->irqno = 0;
126 nic->ioaddr = pci->ioaddr & ~3;
127
128 /* compute all used static epic100 registers address */
129 command = ioaddr + COMMAND; /* Control Register */
130 intstat = ioaddr + INTSTAT; /* Interrupt Status */
131 intmask = ioaddr + INTMASK; /* Interrupt Mask */
132 genctl = ioaddr + GENCTL; /* General Control */
133 eectl = ioaddr + EECTL; /* EEPROM Control */
134 test = ioaddr + TEST; /* Test register (clocks) */
135 mmctl = ioaddr + MMCTL; /* MII Management Interface Control */
136 mmdata = ioaddr + MMDATA; /* MII Management Interface Data */
137 lan0 = ioaddr + LAN0; /* MAC address. (0x40-0x48) */
138 mc0 = ioaddr + MC0; /* Multicast Control */
139 rxcon = ioaddr + RXCON; /* Receive Control */
140 txcon = ioaddr + TXCON; /* Transmit Control */
141 prcdar = ioaddr + PRCDAR; /* PCI Receive Current Descr Address */
142 ptcdar = ioaddr + PTCDAR; /* PCI Transmit Current Descr Address */
143 eththr = ioaddr + ETHTHR; /* Early Transmit Threshold */
144
145 /* Reset the chip & bring it out of low-power mode. */
147
148 /* Disable ALL interrupts by setting the interrupt mask. */
150
151 /*
152 * set the internal clocks:
153 * Application Note 7.15 says:
154 * In order to set the CLOCK TEST bit in the TEST register,
155 * perform the following:
156 *
157 * Write 0x0008 to the test register at least sixteen
158 * consecutive times.
159 *
160 * The CLOCK TEST bit is Write-Only. Writing it several times
161 * consecutively insures a successful write to the bit...
162 */
163
164 for (i = 0; i < 16; i++) {
165 outl(0x00000008, test);
166 }
167
168#ifdef DEBUG_EEPROM
169{
170 unsigned short sum = 0;
171 unsigned short value;
172 for (i = 0; i < 64; i++) {
173 value = read_eeprom(i);
174 eeprom[i] = value;
175 sum += value;
176 }
177}
178
179#if (EPIC_DEBUG > 1)
180 printf("EEPROM contents\n");
181 for (i = 0; i < 64; i++) {
182 printf(" %hhX%s", eeprom[i], i % 16 == 15 ? "\n" : "");
183 }
184#endif
185#endif
186
187 /* This could also be read from the EEPROM. */
188 ap = (unsigned short*)nic->node_addr;
189 for (i = 0; i < 3; i++)
190 *ap++ = inw(lan0 + i*4);
191
192 DBG ( " I/O %4.4x %s ", ioaddr, eth_ntoa ( nic->node_addr ) );
193
194 /* Find the connected MII xcvrs. */
195 for (phy = 0, phy_idx = 0; phy < 32 && phy_idx < sizeof(phys); phy++) {
196 int mii_status = mii_read(phy, 0);
197
198 if (mii_status != 0xffff && mii_status != 0x0000) {
199 phys[phy_idx++] = phy;
200#if (EPIC_DEBUG > 1)
201 printf("MII transceiver found at address %d.\n", phy);
202#endif
203 }
204 }
205 if (phy_idx == 0) {
206#if (EPIC_DEBUG > 1)
207 printf("***WARNING***: No MII transceiver found!\n");
208#endif
209 /* Use the known PHY address of the EPII. */
210 phys[0] = 3;
211 }
212
213 epic100_open();
215
216 return 1;
217}
eeprom
Definition 3c90x.h:232
pseudo_bit_t value[0x00020]
Definition arbel.h:2
#define COMMAND(name, exec)
Definition command.h:27
static unsigned long ioaddr
Definition davicom.c:129
static int read_eeprom(unsigned long ioaddr, int location, int addr_len)
Definition davicom.c:378
static int test
Definition epic100.c:73
static int rxcon
Definition epic100.c:78
static int eectl
Definition epic100.c:72
static int intmask
Definition epic100.c:70
static int mc0
Definition epic100.c:77
static int lan0
Definition epic100.c:76
static struct nic_operations epic100_operations
Definition epic100.c:64
#define GC_SOFT_RESET
Definition epic100.h:89
#define INTR_DISABLE
Definition epic100.h:83
@ GENCTL
Definition epic100.h:21
@ MMDATA
Definition epic100.h:29
@ RXCON
Definition epic100.h:35
@ ETHTHR
Definition epic100.h:42
@ LAN0
Definition epic100.h:32
@ INTMASK
Definition epic100.h:20
@ PRCDAR
Definition epic100.h:38
@ MMCTL
Definition epic100.h:28
@ TXCON
Definition epic100.h:36
@ PTCDAR
Definition epic100.h:41
@ TEST
Definition epic100.h:24
@ EECTL
Definition epic100.h:23
@ MC0
Definition epic100.h:34
@ INTSTAT
Definition epic100.h:19
const char * eth_ntoa(const void *ll_addr)
Transcribe Ethernet address.
Definition ethernet.c:176
#define DBG(...)
Print a debugging message.
Definition compiler.h:498
unsigned char irqno
Definition nic.h:56
unsigned int ioaddr
Definition nic.h:55
struct nic_operations * nic_op
Definition nic.h:50
unsigned long ioaddr
I/O address.
Definition pci.h:226

References COMMAND, DBG, EECTL, eectl, epic100_open(), epic100_operations, eth_ntoa(), ETHTHR, eththr, GC_SOFT_RESET, GENCTL, genctl, INTMASK, intmask, INTR_DISABLE, INTSTAT, intstat, inw, ioaddr, nic::ioaddr, pci_device::ioaddr, nic::irqno, LAN0, lan0, MC0, mc0, mii_read(), MMCTL, mmctl, MMDATA, mmdata, nic::nic_op, nic::node_addr, outl, phys, PRCDAR, prcdar, printf(), PTCDAR, ptcdar, read_eeprom(), RXCON, rxcon, TEST, test, TXCON, txcon, and value.

Referenced by DRIVER().

◆ set_rx_mode()

void set_rx_mode ( void )
static

Definition at line 219 of file epic100.c.

220{
221 unsigned char mc_filter[8];
222 int i;
223 memset(mc_filter, 0xff, sizeof(mc_filter));
224 outl(0x0C, rxcon);
225 for(i = 0; i < 4; i++)
226 outw(((unsigned short *)mc_filter)[i], mc0 + i*4);
227 return;
228}
#define outw(data, io_addr)
Definition io.h:320
void * memset(void *dest, int character, size_t len) __nonnull

References mc0, memset(), outl, outw, and rxcon.

Referenced by epic100_open(), sundance_reset(), and tulip_reset().

◆ epic100_disable() [2/2]

void epic100_disable ( struct nic *nic __unused,
void *hwdev __unused )
static

Definition at line 423 of file epic100.c.

423 {
424 /* Soft reset the chip. */
426}

References __unused, GC_SOFT_RESET, genctl, and outl.

◆ epic100_irq() [2/2]

void epic100_irq ( struct nic *nic __unused,
irq_action_t action __unused )
static

Definition at line 428 of file epic100.c.

429{
430 switch ( action ) {
431 case DISABLE :
432 break;
433 case ENABLE :
434 break;
435 case FORCE :
436 break;
437 }
438}
@ FORCE
Definition nic.h:37
@ ENABLE
Definition nic.h:36
@ DISABLE
Definition nic.h:35

References __unused, DISABLE, ENABLE, and FORCE.

◆ PCI_DRIVER()

PCI_DRIVER ( epic100_driver ,
epic100_nics ,
PCI_NO_CLASS  )

References epic100_nics.

◆ DRIVER()

DRIVER ( "EPIC100" ,
nic_driver ,
pci_driver ,
epic100_driver ,
epic100_probe ,
epic100_disable ,
epic100_bufs  )

Variable Documentation

◆ epic100_operations

struct nic_operations epic100_operations
static
Initial value:
= {
.connect = dummy_connect,
.poll = epic100_poll,
.transmit = epic100_transmit,
.irq = epic100_irq,
}
static int epic100_poll(struct nic *nic, int retrieve)
Definition epic100.c:376
static void epic100_irq(struct nic *nic, irq_action_t action)
static void epic100_transmit(struct nic *nic, const char *destaddr, unsigned int type, unsigned int len, const char *data)
Definition epic100.c:306
int dummy_connect(struct nic *nic __unused)
Definition legacy.c:175

Definition at line 64 of file epic100.c.

Referenced by epic100_probe().

◆ ioaddr

int ioaddr
static

Definition at line 66 of file epic100.c.

◆ command

int command
static

Definition at line 68 of file epic100.c.

◆ intstat

int intstat
static

Definition at line 69 of file epic100.c.

Referenced by epic100_poll(), and epic100_probe().

◆ intmask

int intmask
static

Definition at line 70 of file epic100.c.

Referenced by epic100_probe().

◆ genctl

int genctl
static

Definition at line 71 of file epic100.c.

Referenced by epic100_disable(), epic100_open(), and epic100_probe().

◆ eectl

int eectl
static

Definition at line 72 of file epic100.c.

Referenced by epic100_probe().

◆ test

int test
static

Definition at line 73 of file epic100.c.

Referenced by adaptive_proportion_test(), adaptive_proportion_test_init(), asn1_okx(), ath9k_hw_4k_set_txpower(), ath9k_hw_ar9287_set_txpower(), ath9k_hw_ar9300_set_txpower(), ath9k_hw_def_set_txpower(), ath9k_hw_get_channel_centers(), ath9k_hw_set_txpowerlimit(), base16_decode_okx(), base16_encode_okx(), base64_decode_okx(), base64_encode_okx(), cipher_decrypt_okx(), cipher_encrypt_okx(), cipher_okx(), cpio_okx(), deflate_okx(), dhe_key_okx(), digest_frag_okx(), digest_okx(), dns_compare_fail_okx(), dns_compare_okx(), dns_copy_fail_okx(), dns_copy_okx(), dns_decode_fail_okx(), dns_decode_okx(), dns_encode_fail_okx(), dns_encode_okx(), dns_list_okx(), editstring_okx(), elliptic_add_okx(), elliptic_multiply_okx(), epic100_probe(), eth_probe(), gzip_okx(), hmac_okx(), linebuf_accumulated_okx(), linebuf_consume_okx(), linebuf_okx(), longjmp_okx(), mschapv2_okx(), ne_probe(), ntlm_authenticate_okx(), ntlm_key_okx(), ocsp_prepare_test(), peerdist_info_block_okx(), peerdist_info_okx(), peerdist_info_passphrase_okx(), peerdist_info_segment_okx(), pixbuf_okx(), profile_okx(), pubkey_okx(), pubkey_sign_okx(), repetition_count_test(), repetition_count_test_init(), REQUIRE_OBJECT(), script_probe(), setjmp_return_ok(), startup_test(), startup_test_init(), string_test_exec(), tcpip_okx(), tcpip_random_okx(), test_ok(), typeof(), uri_churi_okx(), uri_format_okx(), uri_params_list_okx(), uri_params_okx(), uri_parse_format_dup_okx(), uri_parse_okx(), uri_port_okx(), uri_pxe_okx(), uri_resolve_okx(), uri_resolve_path_okx(), utf8_accumulate_okx(), x25519_invert_okx(), x25519_key_okx(), x25519_multiply_okx(), and zlib_okx().

◆ mmctl

int mmctl
static

Definition at line 74 of file epic100.c.

Referenced by epic100_probe(), and mii_read().

◆ mmdata

int mmdata
static

Definition at line 75 of file epic100.c.

Referenced by epic100_probe(), and mii_read().

◆ lan0

int lan0
static

Definition at line 76 of file epic100.c.

Referenced by epic100_probe().

◆ mc0

int mc0
static

Definition at line 77 of file epic100.c.

Referenced by epic100_probe(), and set_rx_mode().

◆ rxcon

int rxcon
static

Definition at line 78 of file epic100.c.

Referenced by epic100_probe(), and set_rx_mode().

◆ txcon

int txcon
static

Definition at line 79 of file epic100.c.

Referenced by epic100_open(), and epic100_probe().

◆ prcdar

int prcdar
static

Definition at line 80 of file epic100.c.

Referenced by epic100_open(), and epic100_probe().

◆ ptcdar

int ptcdar
static

Definition at line 81 of file epic100.c.

Referenced by epic100_open(), and epic100_probe().

◆ eththr

int eththr
static

Definition at line 82 of file epic100.c.

Referenced by epic100_open(), and epic100_probe().

◆ cur_rx

◆ cur_tx

unsigned int cur_tx
static

Definition at line 84 of file epic100.c.

Referenced by epic100_init_ring(), and epic100_transmit().

◆ phys

◆ epic100_nics

struct pci_device_id epic100_nics[]
static
Initial value:
= {
PCI_ROM(0x10b8, 0x0005, "epic100", "SMC EtherPowerII", 0),
PCI_ROM(0x10b8, 0x0006, "smc-83c175", "SMC EPIC/C 83c175", 0),
}
#define PCI_ROM(_vendor, _device, _name, _description, _data)
Definition pci.h:308

Definition at line 521 of file epic100.c.

521 {
522PCI_ROM(0x10b8, 0x0005, "epic100", "SMC EtherPowerII", 0), /* SMC 83c170 EPIC/100 */
523PCI_ROM(0x10b8, 0x0006, "smc-83c175", "SMC EPIC/C 83c175", 0),
524};

Referenced by PCI_DRIVER().