FreeBSD kernel usb device Code
if_ruereg.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  rue_intrpkt
 
struct  rue_softc
 

Macros

#define RUE_CONFIG_IDX   0 /* config number 1 */
 
#define RUE_IFACE_IDX   0
 
#define RUE_INTR_PKTLEN   0x8
 
#define RUE_TIMEOUT   50
 
#define RUE_MIN_FRAMELEN   60
 
#define RUE_IDR0   0x0120
 
#define RUE_IDR1   0x0121
 
#define RUE_IDR2   0x0122
 
#define RUE_IDR3   0x0123
 
#define RUE_IDR4   0x0124
 
#define RUE_IDR5   0x0125
 
#define RUE_MAR0   0x0126
 
#define RUE_MAR1   0x0127
 
#define RUE_MAR2   0x0128
 
#define RUE_MAR3   0x0129
 
#define RUE_MAR4   0x012A
 
#define RUE_MAR5   0x012B
 
#define RUE_MAR6   0x012C
 
#define RUE_MAR7   0x012D
 
#define RUE_CR   0x012E /* B, R/W */
 
#define RUE_CR_SOFT_RST   0x10
 
#define RUE_CR_RE   0x08
 
#define RUE_CR_TE   0x04
 
#define RUE_CR_EP3CLREN   0x02
 
#define RUE_TCR   0x012F /* B, R/W */
 
#define RUE_TCR_TXRR1   0x80
 
#define RUE_TCR_TXRR0   0x40
 
#define RUE_TCR_IFG1   0x10
 
#define RUE_TCR_IFG0   0x08
 
#define RUE_TCR_NOCRC   0x01
 
#define RUE_TCR_CONFIG
 
#define RUE_RCR   0x0130 /* W, R/W */
 
#define RUE_RCR_TAIL   0x80
 
#define RUE_RCR_AER   0x40
 
#define RUE_RCR_AR   0x20
 
#define RUE_RCR_AM   0x10
 
#define RUE_RCR_AB   0x08
 
#define RUE_RCR_AD   0x04
 
#define RUE_RCR_AAM   0x02
 
#define RUE_RCR_AAP   0x01
 
#define RUE_RCR_CONFIG   (RUE_RCR_TAIL | RUE_RCR_AD)
 
#define RUE_TSR   0x0132
 
#define RUE_RSR   0x0133
 
#define RUE_CON0   0x0135
 
#define RUE_CON1   0x0136
 
#define RUE_MSR   0x0137
 
#define RUE_PHYADD   0x0138
 
#define RUE_PHYDAT   0x0139
 
#define RUE_PHYCNT   0x013B /* B, R/W */
 
#define RUE_PHYCNT_PHYOWN   0x40
 
#define RUE_PHYCNT_RWCR   0x20
 
#define RUE_GPPC   0x013D
 
#define RUE_WAKECNT   0x013E
 
#define RUE_BMCR   0x0140
 
#define RUE_BMCR_SPD_SET   0x2000
 
#define RUE_BMCR_DUPLEX   0x0100
 
#define RUE_BMSR   0x0142
 
#define RUE_ANAR   0x0144 /* W, R/W */
 
#define RUE_ANAR_PAUSE   0x0400
 
#define RUE_ANLP   0x0146 /* W, R/O */
 
#define RUE_ANLP_PAUSE   0x0400
 
#define RUE_AER   0x0148
 
#define RUE_NWAYT   0x014A
 
#define RUE_CSCR   0x014C
 
#define RUE_CRC0   0x014E
 
#define RUE_CRC1   0x0150
 
#define RUE_CRC2   0x0152
 
#define RUE_CRC3   0x0154
 
#define RUE_CRC4   0x0156
 
#define RUE_BYTEMASK0   0x0158
 
#define RUE_BYTEMASK1   0x0160
 
#define RUE_BYTEMASK2   0x0168
 
#define RUE_BYTEMASK3   0x0170
 
#define RUE_BYTEMASK4   0x0178
 
#define RUE_PHY1   0x0180
 
#define RUE_PHY2   0x0184
 
#define RUE_TW1   0x0186
 
#define RUE_REG_MIN   0x0120
 
#define RUE_REG_MAX   0x0189
 
#define RUE_EEPROM_BASE   0x1200
 
#define RUE_EEPROM_IDR0   (RUE_EEPROM_BASE + 0x02)
 
#define RUE_EEPROM_IDR1   (RUE_EEPROM_BASE + 0x03)
 
#define RUE_EEPROM_IDR2   (RUE_EEPROM_BASE + 0x03)
 
#define RUE_EEPROM_IDR3   (RUE_EEPROM_BASE + 0x03)
 
#define RUE_EEPROM_IDR4   (RUE_EEPROM_BASE + 0x03)
 
#define RUE_EEPROM_IDR5   (RUE_EEPROM_BASE + 0x03)
 
#define RUE_EEPROM_INTERVAL   (RUE_EEPROM_BASE + 0x17)
 
#define RUE_RXSTAT_VALID   (0x01 << 12)
 
#define RUE_RXSTAT_RUNT   (0x02 << 12)
 
#define RUE_RXSTAT_PMATCH   (0x04 << 12)
 
#define RUE_RXSTAT_MCAST   (0x08 << 12)
 
#define GET_MII(sc)   uether_getmii(&(sc)->sc_ue)
 
#define RUE_FLAG_LINK   0x0001
 
#define RUE_LOCK(_sc)   mtx_lock(&(_sc)->sc_mtx)
 
#define RUE_UNLOCK(_sc)   mtx_unlock(&(_sc)->sc_mtx)
 
#define RUE_LOCK_ASSERT(_sc, t)   mtx_assert(&(_sc)->sc_mtx, t)
 

Enumerations

enum  { RUE_BULK_DT_WR , RUE_BULK_DT_RD , RUE_INTR_DT_RD , RUE_N_TRANSFER }
 

Variables

struct rue_intrpkt __packed
 

Macro Definition Documentation

◆ GET_MII

#define GET_MII (   sc)    uether_getmii(&(sc)->sc_ue)

Definition at line 149 of file if_ruereg.h.

◆ RUE_AER

#define RUE_AER   0x0148

Definition at line 109 of file if_ruereg.h.

◆ RUE_ANAR

#define RUE_ANAR   0x0144 /* W, R/W */

Definition at line 103 of file if_ruereg.h.

◆ RUE_ANAR_PAUSE

#define RUE_ANAR_PAUSE   0x0400

Definition at line 104 of file if_ruereg.h.

◆ RUE_ANLP

#define RUE_ANLP   0x0146 /* W, R/O */

Definition at line 106 of file if_ruereg.h.

◆ RUE_ANLP_PAUSE

#define RUE_ANLP_PAUSE   0x0400

Definition at line 107 of file if_ruereg.h.

◆ RUE_BMCR

#define RUE_BMCR   0x0140

Definition at line 97 of file if_ruereg.h.

◆ RUE_BMCR_DUPLEX

#define RUE_BMCR_DUPLEX   0x0100

Definition at line 99 of file if_ruereg.h.

◆ RUE_BMCR_SPD_SET

#define RUE_BMCR_SPD_SET   0x2000

Definition at line 98 of file if_ruereg.h.

◆ RUE_BMSR

#define RUE_BMSR   0x0142

Definition at line 101 of file if_ruereg.h.

◆ RUE_BYTEMASK0

#define RUE_BYTEMASK0   0x0158

Definition at line 120 of file if_ruereg.h.

◆ RUE_BYTEMASK1

#define RUE_BYTEMASK1   0x0160

Definition at line 121 of file if_ruereg.h.

◆ RUE_BYTEMASK2

#define RUE_BYTEMASK2   0x0168

Definition at line 122 of file if_ruereg.h.

◆ RUE_BYTEMASK3

#define RUE_BYTEMASK3   0x0170

Definition at line 123 of file if_ruereg.h.

◆ RUE_BYTEMASK4

#define RUE_BYTEMASK4   0x0178

Definition at line 124 of file if_ruereg.h.

◆ RUE_CON0

#define RUE_CON0   0x0135

Definition at line 84 of file if_ruereg.h.

◆ RUE_CON1

#define RUE_CON1   0x0136

Definition at line 85 of file if_ruereg.h.

◆ RUE_CONFIG_IDX

#define RUE_CONFIG_IDX   0 /* config number 1 */

Definition at line 31 of file if_ruereg.h.

◆ RUE_CR

#define RUE_CR   0x012E /* B, R/W */

Definition at line 56 of file if_ruereg.h.

◆ RUE_CR_EP3CLREN

#define RUE_CR_EP3CLREN   0x02

Definition at line 60 of file if_ruereg.h.

◆ RUE_CR_RE

#define RUE_CR_RE   0x08

Definition at line 58 of file if_ruereg.h.

◆ RUE_CR_SOFT_RST

#define RUE_CR_SOFT_RST   0x10

Definition at line 57 of file if_ruereg.h.

◆ RUE_CR_TE

#define RUE_CR_TE   0x04

Definition at line 59 of file if_ruereg.h.

◆ RUE_CRC0

#define RUE_CRC0   0x014E

Definition at line 114 of file if_ruereg.h.

◆ RUE_CRC1

#define RUE_CRC1   0x0150

Definition at line 115 of file if_ruereg.h.

◆ RUE_CRC2

#define RUE_CRC2   0x0152

Definition at line 116 of file if_ruereg.h.

◆ RUE_CRC3

#define RUE_CRC3   0x0154

Definition at line 117 of file if_ruereg.h.

◆ RUE_CRC4

#define RUE_CRC4   0x0156

Definition at line 118 of file if_ruereg.h.

◆ RUE_CSCR

#define RUE_CSCR   0x014C

Definition at line 112 of file if_ruereg.h.

◆ RUE_EEPROM_BASE

#define RUE_EEPROM_BASE   0x1200

Definition at line 135 of file if_ruereg.h.

◆ RUE_EEPROM_IDR0

#define RUE_EEPROM_IDR0   (RUE_EEPROM_BASE + 0x02)

Definition at line 136 of file if_ruereg.h.

◆ RUE_EEPROM_IDR1

#define RUE_EEPROM_IDR1   (RUE_EEPROM_BASE + 0x03)

Definition at line 137 of file if_ruereg.h.

◆ RUE_EEPROM_IDR2

#define RUE_EEPROM_IDR2   (RUE_EEPROM_BASE + 0x03)

Definition at line 138 of file if_ruereg.h.

◆ RUE_EEPROM_IDR3

#define RUE_EEPROM_IDR3   (RUE_EEPROM_BASE + 0x03)

Definition at line 139 of file if_ruereg.h.

◆ RUE_EEPROM_IDR4

#define RUE_EEPROM_IDR4   (RUE_EEPROM_BASE + 0x03)

Definition at line 140 of file if_ruereg.h.

◆ RUE_EEPROM_IDR5

#define RUE_EEPROM_IDR5   (RUE_EEPROM_BASE + 0x03)

Definition at line 141 of file if_ruereg.h.

◆ RUE_EEPROM_INTERVAL

#define RUE_EEPROM_INTERVAL   (RUE_EEPROM_BASE + 0x17)

Definition at line 142 of file if_ruereg.h.

◆ RUE_FLAG_LINK

#define RUE_FLAG_LINK   0x0001

Definition at line 175 of file if_ruereg.h.

◆ RUE_GPPC

#define RUE_GPPC   0x013D

Definition at line 94 of file if_ruereg.h.

◆ RUE_IDR0

#define RUE_IDR0   0x0120

Definition at line 40 of file if_ruereg.h.

◆ RUE_IDR1

#define RUE_IDR1   0x0121

Definition at line 41 of file if_ruereg.h.

◆ RUE_IDR2

#define RUE_IDR2   0x0122

Definition at line 42 of file if_ruereg.h.

◆ RUE_IDR3

#define RUE_IDR3   0x0123

Definition at line 43 of file if_ruereg.h.

◆ RUE_IDR4

#define RUE_IDR4   0x0124

Definition at line 44 of file if_ruereg.h.

◆ RUE_IDR5

#define RUE_IDR5   0x0125

Definition at line 45 of file if_ruereg.h.

◆ RUE_IFACE_IDX

#define RUE_IFACE_IDX   0

Definition at line 32 of file if_ruereg.h.

◆ RUE_INTR_PKTLEN

#define RUE_INTR_PKTLEN   0x8

Definition at line 34 of file if_ruereg.h.

◆ RUE_LOCK

#define RUE_LOCK (   _sc)    mtx_lock(&(_sc)->sc_mtx)

Definition at line 178 of file if_ruereg.h.

◆ RUE_LOCK_ASSERT

#define RUE_LOCK_ASSERT (   _sc,
 
)    mtx_assert(&(_sc)->sc_mtx, t)

Definition at line 180 of file if_ruereg.h.

◆ RUE_MAR0

#define RUE_MAR0   0x0126

Definition at line 47 of file if_ruereg.h.

◆ RUE_MAR1

#define RUE_MAR1   0x0127

Definition at line 48 of file if_ruereg.h.

◆ RUE_MAR2

#define RUE_MAR2   0x0128

Definition at line 49 of file if_ruereg.h.

◆ RUE_MAR3

#define RUE_MAR3   0x0129

Definition at line 50 of file if_ruereg.h.

◆ RUE_MAR4

#define RUE_MAR4   0x012A

Definition at line 51 of file if_ruereg.h.

◆ RUE_MAR5

#define RUE_MAR5   0x012B

Definition at line 52 of file if_ruereg.h.

◆ RUE_MAR6

#define RUE_MAR6   0x012C

Definition at line 53 of file if_ruereg.h.

◆ RUE_MAR7

#define RUE_MAR7   0x012D

Definition at line 54 of file if_ruereg.h.

◆ RUE_MIN_FRAMELEN

#define RUE_MIN_FRAMELEN   60

Definition at line 37 of file if_ruereg.h.

◆ RUE_MSR

#define RUE_MSR   0x0137

Definition at line 86 of file if_ruereg.h.

◆ RUE_NWAYT

#define RUE_NWAYT   0x014A

Definition at line 111 of file if_ruereg.h.

◆ RUE_PHY1

#define RUE_PHY1   0x0180

Definition at line 126 of file if_ruereg.h.

◆ RUE_PHY2

#define RUE_PHY2   0x0184

Definition at line 127 of file if_ruereg.h.

◆ RUE_PHYADD

#define RUE_PHYADD   0x0138

Definition at line 87 of file if_ruereg.h.

◆ RUE_PHYCNT

#define RUE_PHYCNT   0x013B /* B, R/W */

Definition at line 90 of file if_ruereg.h.

◆ RUE_PHYCNT_PHYOWN

#define RUE_PHYCNT_PHYOWN   0x40

Definition at line 91 of file if_ruereg.h.

◆ RUE_PHYCNT_RWCR

#define RUE_PHYCNT_RWCR   0x20

Definition at line 92 of file if_ruereg.h.

◆ RUE_PHYDAT

#define RUE_PHYDAT   0x0139

Definition at line 88 of file if_ruereg.h.

◆ RUE_RCR

#define RUE_RCR   0x0130 /* W, R/W */

Definition at line 71 of file if_ruereg.h.

◆ RUE_RCR_AAM

#define RUE_RCR_AAM   0x02

Definition at line 78 of file if_ruereg.h.

◆ RUE_RCR_AAP

#define RUE_RCR_AAP   0x01

Definition at line 79 of file if_ruereg.h.

◆ RUE_RCR_AB

#define RUE_RCR_AB   0x08

Definition at line 76 of file if_ruereg.h.

◆ RUE_RCR_AD

#define RUE_RCR_AD   0x04

Definition at line 77 of file if_ruereg.h.

◆ RUE_RCR_AER

#define RUE_RCR_AER   0x40

Definition at line 73 of file if_ruereg.h.

◆ RUE_RCR_AM

#define RUE_RCR_AM   0x10

Definition at line 75 of file if_ruereg.h.

◆ RUE_RCR_AR

#define RUE_RCR_AR   0x20

Definition at line 74 of file if_ruereg.h.

◆ RUE_RCR_CONFIG

#define RUE_RCR_CONFIG   (RUE_RCR_TAIL | RUE_RCR_AD)

Definition at line 80 of file if_ruereg.h.

◆ RUE_RCR_TAIL

#define RUE_RCR_TAIL   0x80

Definition at line 72 of file if_ruereg.h.

◆ RUE_REG_MAX

#define RUE_REG_MAX   0x0189

Definition at line 132 of file if_ruereg.h.

◆ RUE_REG_MIN

#define RUE_REG_MIN   0x0120

Definition at line 131 of file if_ruereg.h.

◆ RUE_RSR

#define RUE_RSR   0x0133

Definition at line 83 of file if_ruereg.h.

◆ RUE_RXSTAT_MCAST

#define RUE_RXSTAT_MCAST   (0x08 << 12)

Definition at line 147 of file if_ruereg.h.

◆ RUE_RXSTAT_PMATCH

#define RUE_RXSTAT_PMATCH   (0x04 << 12)

Definition at line 146 of file if_ruereg.h.

◆ RUE_RXSTAT_RUNT

#define RUE_RXSTAT_RUNT   (0x02 << 12)

Definition at line 145 of file if_ruereg.h.

◆ RUE_RXSTAT_VALID

#define RUE_RXSTAT_VALID   (0x01 << 12)

Definition at line 144 of file if_ruereg.h.

◆ RUE_TCR

#define RUE_TCR   0x012F /* B, R/W */

Definition at line 62 of file if_ruereg.h.

◆ RUE_TCR_CONFIG

#define RUE_TCR_CONFIG
Value:
RUE_TCR_IFG1 | RUE_TCR_IFG0)
#define RUE_TCR_IFG0
Definition: if_ruereg.h:66
#define RUE_TCR_TXRR0
Definition: if_ruereg.h:64
#define RUE_TCR_TXRR1
Definition: if_ruereg.h:63

Definition at line 68 of file if_ruereg.h.

◆ RUE_TCR_IFG0

#define RUE_TCR_IFG0   0x08

Definition at line 66 of file if_ruereg.h.

◆ RUE_TCR_IFG1

#define RUE_TCR_IFG1   0x10

Definition at line 65 of file if_ruereg.h.

◆ RUE_TCR_NOCRC

#define RUE_TCR_NOCRC   0x01

Definition at line 67 of file if_ruereg.h.

◆ RUE_TCR_TXRR0

#define RUE_TCR_TXRR0   0x40

Definition at line 64 of file if_ruereg.h.

◆ RUE_TCR_TXRR1

#define RUE_TCR_TXRR1   0x80

Definition at line 63 of file if_ruereg.h.

◆ RUE_TIMEOUT

#define RUE_TIMEOUT   50

Definition at line 36 of file if_ruereg.h.

◆ RUE_TSR

#define RUE_TSR   0x0132

Definition at line 82 of file if_ruereg.h.

◆ RUE_TW1

#define RUE_TW1   0x0186

Definition at line 129 of file if_ruereg.h.

◆ RUE_UNLOCK

#define RUE_UNLOCK (   _sc)    mtx_unlock(&(_sc)->sc_mtx)

Definition at line 179 of file if_ruereg.h.

◆ RUE_WAKECNT

#define RUE_WAKECNT   0x013E

Definition at line 95 of file if_ruereg.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
RUE_BULK_DT_WR 
RUE_BULK_DT_RD 
RUE_INTR_DT_RD 
RUE_N_TRANSFER 

Definition at line 162 of file if_ruereg.h.

Variable Documentation

◆ __packed