|
iPXE
|
Realtek 10/100/1000 network card driver. More...
Go to the source code of this file.
Data Structures | |
| struct | realtek_descriptor |
| A packet descriptor. More... | |
| struct | realtek_legacy_header |
| A legacy mode receive packet header. More... | |
| struct | realtek_ring |
| A Realtek descriptor ring. More... | |
| struct | realtek_rx_buffer |
| Receive buffer (legacy mode *) More... | |
| struct | realtek_nic |
| A Realtek network card. More... | |
Macros | |
| #define | RTL_BAR_SIZE 0x100 |
| PCI memory BAR size. | |
| #define | RTL_DESC_SIZE_MASK 0x3fff |
| Descriptor buffer size mask. | |
| #define | RTL_RING_ALIGN 256 |
| Descriptor ring alignment. | |
| #define | RTL_IDR0 0x00 |
| ID Register 0 (6 bytes) | |
| #define | RTL_MAR0 0x08 |
| Multicast Register 0 (dword) | |
| #define | RTL_MAR4 0x0c |
| Multicast Register 4 (dword) | |
| #define | RTL_TSD(n) |
| Transmit Status of Descriptor N (dword, 8139 only) | |
| #define | RTL_TSD_ERTXTH(x) |
| Early TX threshold. | |
| #define | RTL_TSD_ERTXTH_DEFAULT RTL_TSD_ERTXTH ( 256 / 32 ) |
| #define | RTL_TSD_OWN 0x00002000UL |
| Ownership. | |
| #define | RTL_TSAD(n) |
| Transmit Start Address of Descriptor N (dword, 8139 only) | |
| #define | RTL_TNPDS 0x20 |
| Transmit Normal Priority Descriptors (qword) | |
| #define | RTL_NUM_TX_DESC 4 |
| Number of transmit descriptors. | |
| #define | RTL_RBSTART 0x30 |
| Receive Buffer Start Address (dword, 8139 only) | |
| #define | RTL_RXBUF_LEN 8192 |
| Receive buffer length. | |
| #define | RTL_RXBUF_PAD 2038 /* Allow space for WRAP */ |
| Receive buffer padding. | |
| #define | RTL_RXBUF_ALIGN 16 |
| Receive buffer alignment. | |
| #define | RTL_CR 0x37 |
| Command Register (byte) | |
| #define | RTL_CR_RST 0x10 |
| Reset. | |
| #define | RTL_CR_RE 0x08 |
| Receiver Enable. | |
| #define | RTL_CR_TE 0x04 |
| Transmit Enable. | |
| #define | RTL_CR_BUFE 0x01 |
| Receive buffer empty. | |
| #define | RTL_RESET_MAX_WAIT_MS 100 |
| Maximum time to wait for a reset, in milliseconds. | |
| #define | RTL_CAPR 0x38 |
| Current Address of Packet Read (word, 8139 only) | |
| #define | RTL_TPPOLL_8169 0x38 |
| Transmit Priority Polling Register (byte, 8169 only) | |
| #define | RTL_TPPOLL_NPQ 0x40 |
| Normal Priority Queue Polling. | |
| #define | RTL_IMR 0x3c |
| Interrupt Mask Register (word) | |
| #define | RTL_IRQ_PUN_LINKCHG 0x0020 |
| Packet underrun / link change. | |
| #define | RTL_IRQ_TER 0x0008 |
| Transmit error. | |
| #define | RTL_IRQ_TOK 0x0004 |
| Transmit OK. | |
| #define | RTL_IRQ_RER 0x0002 |
| Receive error. | |
| #define | RTL_IRQ_ROK 0x0001 |
| Receive OK. | |
| #define | RTL_ISR 0x3e |
| Interrupt Status Register (word) | |
| #define | RTL_TCR 0x40 |
| Transmit (Tx) Configuration Register (dword) | |
| #define | RTL_TCR_MXDMA(x) |
| Max DMA burst size. | |
| #define | RTL_TCR_MXDMA_MASK RTL_TCR_MXDMA ( 0x7 ) |
| #define | RTL_TCR_MXDMA_DEFAULT RTL_TCR_MXDMA ( 0x7 /* Unlimited */ ) |
| #define | RTL_RCR 0x44 |
| Receive (Rx) Configuration Register (dword) | |
| #define | RTL_RCR_STOP_WORKING 0x01000000UL |
| Here be dragons. | |
| #define | RTL_RCR_RXFTH(x) |
| Receive FIFO threshold. | |
| #define | RTL_RCR_RXFTH_MASK RTL_RCR_RXFTH ( 0x7 ) |
| #define | RTL_RCR_RXFTH_DEFAULT RTL_RCR_RXFTH ( 0x7 /* Whole packet */ ) |
| #define | RTL_RCR_RBLEN(x) |
| Receive buffer length. | |
| #define | RTL_RCR_RBLEN_MASK RTL_RCR_RBLEN ( 0x3 ) |
| #define | RTL_RCR_RBLEN_DEFAULT RTL_RCR_RBLEN ( 0 /* 8kB */ ) |
| #define | RTL_RCR_MXDMA(x) |
| Max DMA burst size. | |
| #define | RTL_RCR_MXDMA_MASK RTL_RCR_MXDMA ( 0x7 ) |
| #define | RTL_RCR_MXDMA_DEFAULT RTL_RCR_MXDMA ( 0x7 /* Unlimited */ ) |
| #define | RTL_RCR_WRAP 0x00000080UL |
| Overrun receive buffer. | |
| #define | RTL_RCR_9356SEL 0x00000040UL |
| EEPROM is a 93C56. | |
| #define | RTL_RCR_AB 0x00000008UL |
| Accept broadcast packets. | |
| #define | RTL_RCR_AM 0x00000004UL |
| Accept multicast packets. | |
| #define | RTL_RCR_APM 0x00000002UL |
| Accept physical match. | |
| #define | RTL_RCR_AAP 0x00000001UL |
| Accept all packets. | |
| #define | RTL_9346CR 0x50 |
| 93C46 (93C56) Command Register (byte) | |
| #define | RTL_9346CR_EEM(x) |
| Mode select. | |
| #define | RTL_9346CR_EEM_EEPROM RTL_9346CR_EEM ( 0x2 ) |
| EEPROM mode. | |
| #define | RTL_9346CR_EEM_NORMAL RTL_9346CR_EEM ( 0x0 ) |
| Normal mode. | |
| #define | RTL_9346CR_EECS 0x08 |
| Chip select. | |
| #define | RTL_9346CR_EESK 0x04 |
| Clock. | |
| #define | RTL_9346CR_EEDI 0x02 |
| Data in. | |
| #define | RTL_9346CR_EEDO 0x01 |
| Data out. | |
| #define | RTL_EEPROM_ID ( 0x00 / 2 ) |
| Word offset of ID code word within EEPROM. | |
| #define | RTL_EEPROM_ID_MAGIC 0x8129 |
| EEPROM code word magic value. | |
| #define | RTL_EEPROM_MAC ( 0x0e / 2 ) |
| Word offset of MAC address within EEPROM. | |
| #define | RTL_EEPROM_VPD ( 0x40 / 2 ) |
| Word offset of VPD / non-volatile options within EEPROM. | |
| #define | RTL_EEPROM_VPD_LEN 0x40 |
| Length of VPD / non-volatile options within EEPROM. | |
| #define | RTL_CONFIG1 0x52 |
| Configuration Register 1 (byte) | |
| #define | RTL_CONFIG1_VPD 0x02 |
| Vital Product Data enabled. | |
| #define | RTL_MSR 0x58 |
| Media Status Register (byte, 8139 only) | |
| #define | RTL_MSR_TXFCE 0x80 |
| TX flow control enabled. | |
| #define | RTL_MSR_RXFCE 0x40 |
| RX flow control enabled. | |
| #define | RTL_MSR_AUX_STATUS 0x10 |
| Aux power present. | |
| #define | RTL_MSR_SPEED_10 0x08 |
| 10Mbps | |
| #define | RTL_MSR_LINKB 0x04 |
| Inverse of link status. | |
| #define | RTL_MSR_TXPF 0x02 |
| TX pause flag. | |
| #define | RTL_MSR_RXPF 0x01 |
| RX pause flag. | |
| #define | RTL_PHYAR 0x60 |
| PHY Access Register (dword, 8169 only) | |
| #define | RTL_PHYAR_FLAG 0x80000000UL |
| Read/write flag. | |
| #define | RTL_PHYAR_VALUE(flag, reg, data) |
| Construct PHY Access Register value. | |
| #define | RTL_PHYAR_DATA(value) |
| Extract PHY Access Register data. | |
| #define | RTL_MII_MAX_WAIT_US 500 |
| Maximum time to wait for PHY access, in microseconds. | |
| #define | RTL_PHYSTATUS 0x6c |
| PHY (GMII, MII, or TBI) Status Register (byte, 8169 only) | |
| #define | RTL_PHYSTATUS_ENTBI 0x80 |
| TBI / GMII mode. | |
| #define | RTL_PHYSTATUS_TXFLOW 0x40 |
| TX flow control enabled. | |
| #define | RTL_PHYSTATUS_RXFLOW 0x20 |
| RX flow control enabled. | |
| #define | RTL_PHYSTATUS_1000MF 0x10 |
| 1000Mbps full-duplex | |
| #define | RTL_PHYSTATUS_100M 0x08 |
| 100Mbps | |
| #define | RTL_PHYSTATUS_10M 0x04 |
| 10Mbps | |
| #define | RTL_PHYSTATUS_LINKSTS 0x02 |
| Link ok. | |
| #define | RTL_PHYSTATUS_FULLDUP 0x01 |
| Full duplex. | |
| #define | RTL_TPPOLL_8139CP 0xd9 |
| Transmit Priority Polling Register (byte, 8139C+ only) | |
| #define | RTL_RMS 0xda |
| RX Packet Maximum Size Register (word) | |
| #define | RTL_CPCR 0xe0 |
| C+ Command Register (word) | |
| #define | RTL_CPCR_VLAN 0x0040 |
| VLAN tag stripping enable. | |
| #define | RTL_CPCR_DAC 0x0010 |
| PCI Dual Address Cycle enable. | |
| #define | RTL_CPCR_MULRW 0x0008 |
| PCI Multiple Read/Write enable. | |
| #define | RTL_CPCR_CPRX 0x0002 |
| C+ receive enable. | |
| #define | RTL_CPCR_CPTX 0x0001 |
| C+ transmit enable. | |
| #define | RTL_RDSAR 0xe4 |
| Receive Descriptor Start Address Register (qword) | |
| #define | RTL_NUM_RX_DESC 4 |
| Number of receive descriptors. | |
| #define | RTL_RX_MAX_LEN ( ETH_FRAME_LEN + 4 /* VLAN */ + 4 /* CRC */ + 4 /* extra space */ ) |
| Receive buffer length. | |
Enumerations | |
| enum | realtek_descriptor_flags { RTL_DESC_OWN = 0x8000 , RTL_DESC_EOR = 0x4000 , RTL_DESC_FS = 0x2000 , RTL_DESC_LS = 0x1000 , RTL_DESC_RES = 0x0020 } |
| Packet descriptor flags. More... | |
| enum | realtek_legacy_status { RTL_STAT_ROK = 0x0001 } |
| Legacy mode status bits. More... | |
Functions | |
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
| FILE_SECBOOT (PERMITTED) | |
| static void | realtek_init_ring (struct realtek_ring *ring, unsigned int count, unsigned int reg) |
| Initialise descriptor ring. | |
Realtek 10/100/1000 network card driver.
Definition in file realtek.h.
| #define RTL_BAR_SIZE 0x100 |
| #define RTL_DESC_SIZE_MASK 0x3fff |
Descriptor buffer size mask.
Definition at line 34 of file realtek.h.
Referenced by realtek_poll_rx().
| #define RTL_RING_ALIGN 256 |
Descriptor ring alignment.
Definition at line 51 of file realtek.h.
Referenced by realtek_create_ring().
| #define RTL_IDR0 0x00 |
| #define RTL_MAR0 0x08 |
| #define RTL_MAR4 0x0c |
| #define RTL_TSD | ( | n | ) |
Transmit Status of Descriptor N (dword, 8139 only)
Definition at line 79 of file realtek.h.
Referenced by realtek_poll_tx(), and realtek_transmit().
| #define RTL_TSD_ERTXTH_DEFAULT RTL_TSD_ERTXTH ( 256 / 32 ) |
Definition at line 81 of file realtek.h.
Referenced by realtek_transmit().
| #define RTL_TSD_OWN 0x00002000UL |
| #define RTL_TSAD | ( | n | ) |
Transmit Start Address of Descriptor N (dword, 8139 only)
Definition at line 85 of file realtek.h.
Referenced by realtek_transmit().
| #define RTL_TNPDS 0x20 |
Transmit Normal Priority Descriptors (qword)
Definition at line 88 of file realtek.h.
Referenced by realtek_probe().
| #define RTL_NUM_TX_DESC 4 |
Number of transmit descriptors.
This is a hardware limit when using legacy mode.
Definition at line 94 of file realtek.h.
Referenced by realtek_poll_tx(), realtek_probe(), and realtek_transmit().
| #define RTL_RBSTART 0x30 |
Receive Buffer Start Address (dword, 8139 only)
Definition at line 97 of file realtek.h.
Referenced by realtek_create_buffer(), and realtek_destroy_buffer().
| #define RTL_RXBUF_LEN 8192 |
Receive buffer length.
Definition at line 100 of file realtek.h.
Referenced by realtek_create_buffer(), realtek_destroy_buffer(), and realtek_legacy_poll_rx().
| #define RTL_RXBUF_PAD 2038 /* Allow space for WRAP */ |
Receive buffer padding.
Definition at line 103 of file realtek.h.
Referenced by realtek_create_buffer(), and realtek_destroy_buffer().
| #define RTL_RXBUF_ALIGN 16 |
Receive buffer alignment.
Definition at line 106 of file realtek.h.
Referenced by realtek_create_buffer().
| #define RTL_CR 0x37 |
Command Register (byte)
Definition at line 109 of file realtek.h.
Referenced by realtek_close(), realtek_legacy_poll_rx(), realtek_open(), and realtek_reset().
| #define RTL_CR_RST 0x10 |
| #define RTL_CR_RE 0x08 |
| #define RTL_CR_TE 0x04 |
| #define RTL_CR_BUFE 0x01 |
Receive buffer empty.
Definition at line 113 of file realtek.h.
Referenced by realtek_legacy_poll_rx().
| #define RTL_RESET_MAX_WAIT_MS 100 |
Maximum time to wait for a reset, in milliseconds.
Definition at line 116 of file realtek.h.
Referenced by realtek_reset().
| #define RTL_CAPR 0x38 |
Current Address of Packet Read (word, 8139 only)
Definition at line 119 of file realtek.h.
Referenced by realtek_legacy_poll_rx().
| #define RTL_TPPOLL_8169 0x38 |
Transmit Priority Polling Register (byte, 8169 only)
Definition at line 122 of file realtek.h.
Referenced by realtek_detect().
| #define RTL_TPPOLL_NPQ 0x40 |
Normal Priority Queue Polling.
Definition at line 123 of file realtek.h.
Referenced by realtek_transmit().
| #define RTL_IMR 0x3c |
Interrupt Mask Register (word)
Definition at line 126 of file realtek.h.
Referenced by realtek_irq().
| #define RTL_IRQ_PUN_LINKCHG 0x0020 |
Packet underrun / link change.
Definition at line 127 of file realtek.h.
Referenced by realtek_irq(), and realtek_poll().
| #define RTL_IRQ_TER 0x0008 |
Transmit error.
Definition at line 128 of file realtek.h.
Referenced by realtek_irq(), and realtek_poll().
| #define RTL_IRQ_TOK 0x0004 |
Transmit OK.
Definition at line 129 of file realtek.h.
Referenced by realtek_irq(), and realtek_poll().
| #define RTL_IRQ_RER 0x0002 |
Receive error.
Definition at line 130 of file realtek.h.
Referenced by realtek_irq(), and realtek_poll().
| #define RTL_IRQ_ROK 0x0001 |
Receive OK.
Definition at line 131 of file realtek.h.
Referenced by realtek_irq(), and realtek_poll().
| #define RTL_ISR 0x3e |
Interrupt Status Register (word)
Definition at line 134 of file realtek.h.
Referenced by realtek_poll().
| #define RTL_TCR 0x40 |
Transmit (Tx) Configuration Register (dword)
Definition at line 137 of file realtek.h.
Referenced by realtek_open().
| #define RTL_TCR_MXDMA | ( | x | ) |
| #define RTL_TCR_MXDMA_MASK RTL_TCR_MXDMA ( 0x7 ) |
Definition at line 139 of file realtek.h.
Referenced by realtek_open().
| #define RTL_TCR_MXDMA_DEFAULT RTL_TCR_MXDMA ( 0x7 /* Unlimited */ ) |
Definition at line 140 of file realtek.h.
Referenced by realtek_open().
| #define RTL_RCR 0x44 |
Receive (Rx) Configuration Register (dword)
Definition at line 143 of file realtek.h.
Referenced by realtek_init_eeprom(), and realtek_open().
| #define RTL_RCR_STOP_WORKING 0x01000000UL |
| #define RTL_RCR_RXFTH | ( | x | ) |
| #define RTL_RCR_RXFTH_MASK RTL_RCR_RXFTH ( 0x7 ) |
Definition at line 146 of file realtek.h.
Referenced by realtek_open().
| #define RTL_RCR_RXFTH_DEFAULT RTL_RCR_RXFTH ( 0x7 /* Whole packet */ ) |
Definition at line 147 of file realtek.h.
Referenced by realtek_open().
| #define RTL_RCR_RBLEN | ( | x | ) |
| #define RTL_RCR_RBLEN_MASK RTL_RCR_RBLEN ( 0x3 ) |
Definition at line 149 of file realtek.h.
Referenced by realtek_open().
| #define RTL_RCR_RBLEN_DEFAULT RTL_RCR_RBLEN ( 0 /* 8kB */ ) |
Definition at line 150 of file realtek.h.
Referenced by realtek_open().
| #define RTL_RCR_MXDMA | ( | x | ) |
| #define RTL_RCR_MXDMA_MASK RTL_RCR_MXDMA ( 0x7 ) |
Definition at line 152 of file realtek.h.
Referenced by realtek_open().
| #define RTL_RCR_MXDMA_DEFAULT RTL_RCR_MXDMA ( 0x7 /* Unlimited */ ) |
Definition at line 153 of file realtek.h.
Referenced by realtek_open().
| #define RTL_RCR_WRAP 0x00000080UL |
| #define RTL_RCR_9356SEL 0x00000040UL |
| #define RTL_RCR_AB 0x00000008UL |
| #define RTL_RCR_AM 0x00000004UL |
| #define RTL_RCR_APM 0x00000002UL |
| #define RTL_RCR_AAP 0x00000001UL |
| #define RTL_9346CR 0x50 |
93C46 (93C56) Command Register (byte)
Definition at line 162 of file realtek.h.
Referenced by realtek_spi_close_bit(), realtek_spi_open_bit(), realtek_spi_read_bit(), and realtek_spi_write_bit().
| #define RTL_9346CR_EEM | ( | x | ) |
| #define RTL_9346CR_EEM_EEPROM RTL_9346CR_EEM ( 0x2 ) |
| #define RTL_9346CR_EEM_NORMAL RTL_9346CR_EEM ( 0x0 ) |
| #define RTL_EEPROM_ID ( 0x00 / 2 ) |
Word offset of ID code word within EEPROM.
Definition at line 172 of file realtek.h.
Referenced by realtek_init_eeprom().
| #define RTL_EEPROM_ID_MAGIC 0x8129 |
EEPROM code word magic value.
Definition at line 175 of file realtek.h.
Referenced by realtek_init_eeprom().
| #define RTL_EEPROM_MAC ( 0x0e / 2 ) |
Word offset of MAC address within EEPROM.
Definition at line 178 of file realtek.h.
Referenced by realtek_probe().
| #define RTL_EEPROM_VPD ( 0x40 / 2 ) |
Word offset of VPD / non-volatile options within EEPROM.
Definition at line 181 of file realtek.h.
Referenced by realtek_init_eeprom().
| #define RTL_EEPROM_VPD_LEN 0x40 |
Length of VPD / non-volatile options within EEPROM.
Definition at line 184 of file realtek.h.
Referenced by realtek_init_eeprom().
| #define RTL_CONFIG1 0x52 |
Configuration Register 1 (byte)
Definition at line 187 of file realtek.h.
Referenced by realtek_init_eeprom().
| #define RTL_CONFIG1_VPD 0x02 |
Vital Product Data enabled.
Definition at line 188 of file realtek.h.
Referenced by realtek_init_eeprom().
| #define RTL_MSR 0x58 |
Media Status Register (byte, 8139 only)
Definition at line 191 of file realtek.h.
Referenced by realtek_check_link().
| #define RTL_MSR_TXFCE 0x80 |
TX flow control enabled.
Definition at line 192 of file realtek.h.
Referenced by realtek_check_link().
| #define RTL_MSR_RXFCE 0x40 |
RX flow control enabled.
Definition at line 193 of file realtek.h.
Referenced by realtek_check_link().
| #define RTL_MSR_AUX_STATUS 0x10 |
| #define RTL_MSR_SPEED_10 0x08 |
| #define RTL_MSR_LINKB 0x04 |
Inverse of link status.
Definition at line 196 of file realtek.h.
Referenced by realtek_check_link().
| #define RTL_MSR_TXPF 0x02 |
| #define RTL_MSR_RXPF 0x01 |
| #define RTL_PHYAR 0x60 |
PHY Access Register (dword, 8169 only)
Definition at line 201 of file realtek.h.
Referenced by realtek_mii_read(), and realtek_mii_write().
| #define RTL_PHYAR_FLAG 0x80000000UL |
Read/write flag.
Definition at line 202 of file realtek.h.
Referenced by realtek_mii_read(), and realtek_mii_write().
Construct PHY Access Register value.
Definition at line 205 of file realtek.h.
Referenced by realtek_mii_read(), and realtek_mii_write().
| #define RTL_PHYAR_DATA | ( | value | ) |
| #define RTL_MII_MAX_WAIT_US 500 |
Maximum time to wait for PHY access, in microseconds.
Definition at line 211 of file realtek.h.
Referenced by realtek_mii_read(), and realtek_mii_write().
| #define RTL_PHYSTATUS 0x6c |
PHY (GMII, MII, or TBI) Status Register (byte, 8169 only)
Definition at line 214 of file realtek.h.
Referenced by realtek_check_link().
| #define RTL_PHYSTATUS_ENTBI 0x80 |
| #define RTL_PHYSTATUS_TXFLOW 0x40 |
TX flow control enabled.
Definition at line 216 of file realtek.h.
Referenced by realtek_check_link().
| #define RTL_PHYSTATUS_RXFLOW 0x20 |
RX flow control enabled.
Definition at line 217 of file realtek.h.
Referenced by realtek_check_link().
| #define RTL_PHYSTATUS_1000MF 0x10 |
| #define RTL_PHYSTATUS_100M 0x08 |
| #define RTL_PHYSTATUS_10M 0x04 |
| #define RTL_PHYSTATUS_LINKSTS 0x02 |
| #define RTL_PHYSTATUS_FULLDUP 0x01 |
| #define RTL_TPPOLL_8139CP 0xd9 |
Transmit Priority Polling Register (byte, 8139C+ only)
Definition at line 225 of file realtek.h.
Referenced by realtek_detect().
| #define RTL_RMS 0xda |
RX Packet Maximum Size Register (word)
Definition at line 228 of file realtek.h.
Referenced by realtek_detect().
| #define RTL_CPCR 0xe0 |
C+ Command Register (word)
Definition at line 231 of file realtek.h.
Referenced by realtek_detect().
| #define RTL_CPCR_VLAN 0x0040 |
VLAN tag stripping enable.
Definition at line 232 of file realtek.h.
Referenced by realtek_detect().
| #define RTL_CPCR_DAC 0x0010 |
PCI Dual Address Cycle enable.
Definition at line 233 of file realtek.h.
Referenced by realtek_detect().
| #define RTL_CPCR_MULRW 0x0008 |
PCI Multiple Read/Write enable.
Definition at line 234 of file realtek.h.
Referenced by realtek_detect().
| #define RTL_CPCR_CPRX 0x0002 |
| #define RTL_CPCR_CPTX 0x0001 |
| #define RTL_RDSAR 0xe4 |
Receive Descriptor Start Address Register (qword)
Definition at line 239 of file realtek.h.
Referenced by realtek_probe().
| #define RTL_NUM_RX_DESC 4 |
Number of receive descriptors.
Definition at line 242 of file realtek.h.
Referenced by realtek_close(), realtek_poll_rx(), realtek_probe(), and realtek_refill_rx().
| #define RTL_RX_MAX_LEN ( ETH_FRAME_LEN + 4 /* VLAN */ + 4 /* CRC */ + 4 /* extra space */ ) |
Receive buffer length.
Definition at line 245 of file realtek.h.
Referenced by realtek_detect(), and realtek_refill_rx().
Packet descriptor flags.
| Enumerator | |
|---|---|
| RTL_DESC_OWN | Descriptor is owned by NIC. |
| RTL_DESC_EOR | End of descriptor ring. |
| RTL_DESC_FS | First segment descriptor. |
| RTL_DESC_LS | Last segment descriptor. |
| RTL_DESC_RES | Receive error summary. |
Definition at line 37 of file realtek.h.
Legacy mode status bits.
| Enumerator | |
|---|---|
| RTL_STAT_ROK | Received OK. |
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
| FILE_SECBOOT | ( | PERMITTED | ) |
|
inlinestatic |
Initialise descriptor ring.
| ring | Descriptor ring |
| count | Number of descriptors |
| reg | Descriptor start address register |
Definition at line 273 of file realtek.h.
References count, realtek_ring::desc, realtek_ring::len, realtek_ring::reg, and reg.
Referenced by realtek_probe().