iPXE
pcnet32.h File Reference

Go to the source code of this file.

Data Structures

struct  pcnet32_rx_desc
struct  pcnet32_tx_desc
struct  pcnet32_init_block
struct  pcnet32_access
struct  pcnet32_private

Macros

#define _PCNET32_H_
#define PCNET32_LOG_TX_BUFFERS   4
#define PCNET32_LOG_RX_BUFFERS   5
#define PCNET32_LOG_MAX_TX_BUFFERS   9
#define PCNET32_LOG_MAX_RX_BUFFERS   9
#define TX_RING_SIZE   ( 1 << ( PCNET32_LOG_TX_BUFFERS ) )
#define TX_MAX_RING_SIZE   ( 1 << ( PCNET32_LOG_MAX_TX_BUFFERS ) )
#define RX_RING_SIZE   ( 1 << ( PCNET32_LOG_RX_BUFFERS ) )
#define RX_MAX_RING_SIZE   ( 1 << ( PCNET32_LOG_MAX_RX_BUFFERS ) )
#define RX_RING_BYTES   ( RX_RING_SIZE * sizeof(struct pcnet32_rx_desc ) )
#define TX_RING_BYTES   ( TX_RING_SIZE * sizeof(struct pcnet32_tx_desc ) )
#define PKT_BUF_SIZE   1536
#define RX_RING_ALIGN   16
#define TX_RING_ALIGN   16
#define INIT_BLOCK_ALIGN   32
#define PCNET32_WIO_RDP   0x10
#define PCNET32_WIO_RAP   0x12
#define PCNET32_WIO_RESET   0x14
#define PCNET32_WIO_BDP   0x16
#define PCNET32_DWIO_RDP   0x10
#define PCNET32_DWIO_RAP   0x14
#define PCNET32_DWIO_RESET   0x18
#define PCNET32_DWIO_BDP   0x1C
#define PCNET32_PORT_AUI   0x00
#define PCNET32_PORT_10BT   0x01
#define PCNET32_PORT_GPSI   0x02
#define PCNET32_PORT_MII   0x03
#define PCNET32_PORT_PORTSEL   0x03
#define PCNET32_PORT_ASEL   0x04
#define PCNET32_PORT_100   0x40
#define PCNET32_PORT_FD   0x80
#define PCNET32_SWSTYLE_LANCE   0x00
#define PCNET32_SWSTYLE_ILACC   0x01
#define PCNET32_SWSTYLE_PCNET32   0x02
#define PCNET32_MAX_PHYS   32
#define PCI_VENDOR_ID_AT   0x1259
#define PCI_SUBDEVICE_ID_AT_2700FX   0x2701
#define PCI_SUBDEVICE_ID_AT_2701FX   0x2703

Enumerations

enum  pcnet32_desc_status_bit { DescOwn = (1 << 15) , StartOfPacket = (1 << 9) , EndOfPacket = (1 << 8) }
enum  pcnet32_register_content {
  RxInt = (1 << 10) , TxInt = (1 << 9) , InitDone = (1 << 8) , IntFlag = (1 << 7) ,
  IntEnable = (1 << 6) , TxDemand = (1 << 3) , Stop = (1 << 2) , Strt = (1 << 1) ,
  Init = (1 << 0) , BablMask = (1 << 14) , MissFrameMask = (1 << 12) , MemErrMask = (1 << 11) ,
  RxIntMask = (1 << 10) , TxIntMask = (1 << 9) , InitDoneMask = (1 << 8)
}

Functions

 FILE_LICENCE (GPL2_OR_LATER)

Macro Definition Documentation

◆ _PCNET32_H_

#define _PCNET32_H_

Definition at line 24 of file pcnet32.h.

◆ PCNET32_LOG_TX_BUFFERS

#define PCNET32_LOG_TX_BUFFERS   4

Definition at line 30 of file pcnet32.h.

Referenced by pcnet32_setup_init_block().

◆ PCNET32_LOG_RX_BUFFERS

#define PCNET32_LOG_RX_BUFFERS   5

Definition at line 31 of file pcnet32.h.

Referenced by pcnet32_setup_init_block().

◆ PCNET32_LOG_MAX_TX_BUFFERS

#define PCNET32_LOG_MAX_TX_BUFFERS   9

Definition at line 34 of file pcnet32.h.

◆ PCNET32_LOG_MAX_RX_BUFFERS

#define PCNET32_LOG_MAX_RX_BUFFERS   9

Definition at line 35 of file pcnet32.h.

◆ TX_RING_SIZE

#define TX_RING_SIZE   ( 1 << ( PCNET32_LOG_TX_BUFFERS ) )

Definition at line 37 of file pcnet32.h.

◆ TX_MAX_RING_SIZE

#define TX_MAX_RING_SIZE   ( 1 << ( PCNET32_LOG_MAX_TX_BUFFERS ) )

Definition at line 38 of file pcnet32.h.

◆ RX_RING_SIZE

#define RX_RING_SIZE   ( 1 << ( PCNET32_LOG_RX_BUFFERS ) )

Definition at line 40 of file pcnet32.h.

◆ RX_MAX_RING_SIZE

#define RX_MAX_RING_SIZE   ( 1 << ( PCNET32_LOG_MAX_RX_BUFFERS ) )

Definition at line 41 of file pcnet32.h.

◆ RX_RING_BYTES

#define RX_RING_BYTES   ( RX_RING_SIZE * sizeof(struct pcnet32_rx_desc ) )

Definition at line 43 of file pcnet32.h.

◆ TX_RING_BYTES

#define TX_RING_BYTES   ( TX_RING_SIZE * sizeof(struct pcnet32_tx_desc ) )

Definition at line 44 of file pcnet32.h.

◆ PKT_BUF_SIZE

#define PKT_BUF_SIZE   1536

Definition at line 46 of file pcnet32.h.

Referenced by pcnet32_refill_rx_ring().

◆ RX_RING_ALIGN

#define RX_RING_ALIGN   16

Definition at line 48 of file pcnet32.h.

◆ TX_RING_ALIGN

#define TX_RING_ALIGN   16

Definition at line 49 of file pcnet32.h.

◆ INIT_BLOCK_ALIGN

#define INIT_BLOCK_ALIGN   32

Definition at line 51 of file pcnet32.h.

◆ PCNET32_WIO_RDP

#define PCNET32_WIO_RDP   0x10

Definition at line 53 of file pcnet32.h.

Referenced by pcnet32_wio_read_csr(), and pcnet32_wio_write_csr().

◆ PCNET32_WIO_RAP

◆ PCNET32_WIO_RESET

#define PCNET32_WIO_RESET   0x14

Definition at line 55 of file pcnet32.h.

Referenced by pcnet32_wio_reset().

◆ PCNET32_WIO_BDP

#define PCNET32_WIO_BDP   0x16

Definition at line 56 of file pcnet32.h.

Referenced by pcnet32_wio_read_bcr(), and pcnet32_wio_write_bcr().

◆ PCNET32_DWIO_RDP

#define PCNET32_DWIO_RDP   0x10

Definition at line 58 of file pcnet32.h.

Referenced by pcnet32_dwio_read_csr(), and pcnet32_dwio_write_csr().

◆ PCNET32_DWIO_RAP

◆ PCNET32_DWIO_RESET

#define PCNET32_DWIO_RESET   0x18

Definition at line 60 of file pcnet32.h.

Referenced by pcnet32_dwio_reset().

◆ PCNET32_DWIO_BDP

#define PCNET32_DWIO_BDP   0x1C

Definition at line 61 of file pcnet32.h.

Referenced by pcnet32_dwio_read_bcr(), and pcnet32_dwio_write_bcr().

◆ PCNET32_PORT_AUI

#define PCNET32_PORT_AUI   0x00

Definition at line 63 of file pcnet32.h.

Referenced by pcnet32_setup_if_duplex().

◆ PCNET32_PORT_10BT

#define PCNET32_PORT_10BT   0x01

Definition at line 64 of file pcnet32.h.

◆ PCNET32_PORT_GPSI

#define PCNET32_PORT_GPSI   0x02

Definition at line 65 of file pcnet32.h.

Referenced by pcnet32_probe(), and pcnet32_setup_if_duplex().

◆ PCNET32_PORT_MII

#define PCNET32_PORT_MII   0x03

Definition at line 66 of file pcnet32.h.

Referenced by pcnet32_setup_probe_phy().

◆ PCNET32_PORT_PORTSEL

#define PCNET32_PORT_PORTSEL   0x03

Definition at line 68 of file pcnet32.h.

Referenced by pcnet32_setup_if_duplex(), and pcnet32_setup_init_block().

◆ PCNET32_PORT_ASEL

#define PCNET32_PORT_ASEL   0x04

Definition at line 69 of file pcnet32.h.

Referenced by pcnet32_probe(), and pcnet32_setup_if_duplex().

◆ PCNET32_PORT_100

#define PCNET32_PORT_100   0x40

Definition at line 70 of file pcnet32.h.

Referenced by pcnet32_setup_if_duplex().

◆ PCNET32_PORT_FD

#define PCNET32_PORT_FD   0x80

Definition at line 71 of file pcnet32.h.

Referenced by pcnet32_probe(), and pcnet32_setup_if_duplex().

◆ PCNET32_SWSTYLE_LANCE

#define PCNET32_SWSTYLE_LANCE   0x00

Definition at line 73 of file pcnet32.h.

Referenced by pcnet32_close().

◆ PCNET32_SWSTYLE_ILACC

#define PCNET32_SWSTYLE_ILACC   0x01

Definition at line 74 of file pcnet32.h.

◆ PCNET32_SWSTYLE_PCNET32

#define PCNET32_SWSTYLE_PCNET32   0x02

Definition at line 75 of file pcnet32.h.

Referenced by pcnet32_open().

◆ PCNET32_MAX_PHYS

#define PCNET32_MAX_PHYS   32

Definition at line 77 of file pcnet32.h.

Referenced by pcnet32_setup_probe_phy().

◆ PCI_VENDOR_ID_AT

#define PCI_VENDOR_ID_AT   0x1259

Definition at line 80 of file pcnet32.h.

Referenced by pcnet32_setup_if_duplex().

◆ PCI_SUBDEVICE_ID_AT_2700FX

#define PCI_SUBDEVICE_ID_AT_2700FX   0x2701

Definition at line 84 of file pcnet32.h.

Referenced by pcnet32_setup_if_duplex().

◆ PCI_SUBDEVICE_ID_AT_2701FX

#define PCI_SUBDEVICE_ID_AT_2701FX   0x2703

Definition at line 88 of file pcnet32.h.

Referenced by pcnet32_setup_if_duplex().

Enumeration Type Documentation

◆ pcnet32_desc_status_bit

Enumerator
DescOwn 
StartOfPacket 
EndOfPacket 

Definition at line 152 of file pcnet32.h.

152 {
153 DescOwn = (1 << 15),
154 StartOfPacket = (1 << 9),
155 EndOfPacket = (1 << 8)
156};
@ StartOfPacket
Definition pcnet32.h:154
@ DescOwn
Definition pcnet32.h:153
@ EndOfPacket
Definition pcnet32.h:155

◆ pcnet32_register_content

Enumerator
RxInt 
TxInt 
InitDone 
IntFlag 
IntEnable 
TxDemand 
Stop 
Strt 
Init 
BablMask 
MissFrameMask 
MemErrMask 
RxIntMask 
TxIntMask 
InitDoneMask 

Definition at line 158 of file pcnet32.h.

158 {
159 /* CSR0 bits - Controller status register */
160 RxInt = (1 << 10),
161 TxInt = (1 << 9),
162 InitDone = (1 << 8),
163 IntFlag = (1 << 7),
164 IntEnable = (1 << 6),
165 TxDemand = (1 << 3),
166 Stop = (1 << 2),
167 Strt = (1 << 1),
168 Init = (1 << 0),
169
170 /* CSR3 bits - Controller status register */
171 BablMask = (1 << 14),
172 MissFrameMask = (1 << 12),
173 MemErrMask = (1 << 11),
174 RxIntMask = (1 << 10),
175 TxIntMask = (1 << 9),
176 InitDoneMask = (1 << 8)
177
178};
@ TxInt
Definition pcnet32.h:161
@ Init
Definition pcnet32.h:168
@ RxInt
Definition pcnet32.h:160
@ InitDoneMask
Definition pcnet32.h:176
@ MemErrMask
Definition pcnet32.h:173
@ IntEnable
Definition pcnet32.h:164
@ InitDone
Definition pcnet32.h:162
@ BablMask
Definition pcnet32.h:171
@ IntFlag
Definition pcnet32.h:163
@ RxIntMask
Definition pcnet32.h:174
@ TxDemand
Definition pcnet32.h:165
@ MissFrameMask
Definition pcnet32.h:172
@ TxIntMask
Definition pcnet32.h:175
@ Strt
Definition pcnet32.h:167
@ Stop
Definition pcnet32.h:166

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER )