Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

r8169.h 14KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486
  1. /*
  2. * Copyright (c) 2008 Marty Connor <mdc@etherboot.org>
  3. * Copyright (c) 2008 Entity Cyber, Inc.
  4. *
  5. * This program is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU General Public License as
  7. * published by the Free Software Foundation; either version 2 of the
  8. * License, or any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful, but
  11. * WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. * General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program; if not, write to the Free Software
  17. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18. *
  19. * This driver is based on rtl8169 data sheets and work by:
  20. *
  21. * Copyright (c) 2002 ShuChen <shuchen@realtek.com.tw>
  22. * Copyright (c) 2003 - 2007 Francois Romieu <romieu@fr.zoreil.com>
  23. * Copyright (c) a lot of people too. Please respect their work.
  24. *
  25. */
  26. FILE_LICENCE ( GPL2_OR_LATER );
  27. #ifndef _R8169_H_
  28. #define _R8169_H_
  29. #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
  30. /** FIXME: include/linux/pci_regs.h has these PCI regs, maybe
  31. we need such a file in iPXE?
  32. **/
  33. #define PCI_EXP_DEVCTL 8 /* Device Control */
  34. #define PCI_EXP_DEVCTL_READRQ 0x7000 /* Max_Read_Request_Size */
  35. #define PCI_EXP_LNKCTL 16 /* Link Control */
  36. #define PCI_EXP_LNKCTL_CLKREQ_EN 0x100 /* Enable clkreq */
  37. #define PCI_EXP_DEVCTL_NOSNOOP_EN 0x0800 /* Enable No Snoop */
  38. /** FIXME: update mii.h in src/include/mii.h from Linux sources
  39. so we don't have to include these definitiions.
  40. **/
  41. /* The forced speed, 10Mb, 100Mb, gigabit, 2.5Gb, 10GbE. */
  42. #define SPEED_10 10
  43. #define SPEED_100 100
  44. #define SPEED_1000 1000
  45. #define SPEED_2500 2500
  46. #define SPEED_10000 10000
  47. /* Duplex, half or full. */
  48. #define DUPLEX_HALF 0x00
  49. #define DUPLEX_FULL 0x01
  50. #define AUTONEG_DISABLE 0x00
  51. #define AUTONEG_ENABLE 0x01
  52. /* MAC address length */
  53. #define MAC_ADDR_LEN 6
  54. #define MAX_READ_REQUEST_SHIFT 12
  55. #define RX_FIFO_THRESH 7 /* 7 means NO threshold, Rx buffer level before first PCI xfer. */
  56. #define RX_DMA_BURST 6 /* Maximum PCI burst, '6' is 1024 */
  57. #define TX_DMA_BURST 6 /* Maximum PCI burst, '6' is 1024 */
  58. #define EarlyTxThld 0x3F /* 0x3F means NO early transmit */
  59. #define RxPacketMaxSize 0x3FE8 /* 16K - 1 - ETH_HLEN - VLAN - CRC... */
  60. #define SafeMtu 0x1c20 /* ... actually life sucks beyond ~7k */
  61. #define InterFrameGap 0x03 /* 3 means InterFrameGap = the shortest one */
  62. #define R8169_REGS_SIZE 256
  63. #define R8169_NAPI_WEIGHT 64
  64. #define NUM_TX_DESC 8 /* Number of Tx descriptor registers */
  65. #define NUM_RX_DESC 8 /* Number of Rx descriptor registers */
  66. #define RX_BUF_SIZE 1536 /* Rx Buffer size */
  67. #define R8169_TX_RING_BYTES (NUM_TX_DESC * sizeof(struct TxDesc))
  68. #define R8169_RX_RING_BYTES (NUM_RX_DESC * sizeof(struct RxDesc))
  69. #define TX_RING_ALIGN 256
  70. #define RX_RING_ALIGN 256
  71. #define RTL8169_TX_TIMEOUT (6*HZ)
  72. #define RTL8169_PHY_TIMEOUT (10*HZ)
  73. #define RTL_EEPROM_SIG cpu_to_le32(0x8129)
  74. #define RTL_EEPROM_SIG_MASK cpu_to_le32(0xffff)
  75. #define RTL_EEPROM_SIG_ADDR 0x0000
  76. /* write/read MMIO register */
  77. #define RTL_W8(reg, val8) writeb ((val8), ioaddr + (reg))
  78. #define RTL_W16(reg, val16) writew ((val16), ioaddr + (reg))
  79. #define RTL_W32(reg, val32) writel ((val32), ioaddr + (reg))
  80. #define RTL_R8(reg) readb (ioaddr + (reg))
  81. #define RTL_R16(reg) readw (ioaddr + (reg))
  82. #define RTL_R32(reg) ((unsigned long) readl (ioaddr + (reg)))
  83. enum mac_version {
  84. RTL_GIGA_MAC_VER_01 = 0x01, // 8169
  85. RTL_GIGA_MAC_VER_02 = 0x02, // 8169S
  86. RTL_GIGA_MAC_VER_03 = 0x03, // 8110S
  87. RTL_GIGA_MAC_VER_04 = 0x04, // 8169SB
  88. RTL_GIGA_MAC_VER_05 = 0x05, // 8110SCd
  89. RTL_GIGA_MAC_VER_06 = 0x06, // 8110SCe
  90. RTL_GIGA_MAC_VER_07 = 0x07, // 8102e
  91. RTL_GIGA_MAC_VER_08 = 0x08, // 8102e
  92. RTL_GIGA_MAC_VER_09 = 0x09, // 8102e
  93. RTL_GIGA_MAC_VER_10 = 0x0a, // 8101e
  94. RTL_GIGA_MAC_VER_11 = 0x0b, // 8168Bb
  95. RTL_GIGA_MAC_VER_12 = 0x0c, // 8168Be
  96. RTL_GIGA_MAC_VER_13 = 0x0d, // 8101Eb
  97. RTL_GIGA_MAC_VER_14 = 0x0e, // 8101 ?
  98. RTL_GIGA_MAC_VER_15 = 0x0f, // 8101 ?
  99. RTL_GIGA_MAC_VER_16 = 0x11, // 8101Ec
  100. RTL_GIGA_MAC_VER_17 = 0x10, // 8168Bf
  101. RTL_GIGA_MAC_VER_18 = 0x12, // 8168CP
  102. RTL_GIGA_MAC_VER_19 = 0x13, // 8168C
  103. RTL_GIGA_MAC_VER_20 = 0x14, // 8168C
  104. RTL_GIGA_MAC_VER_21 = 0x15, // 8168C
  105. RTL_GIGA_MAC_VER_22 = 0x16, // 8168C
  106. RTL_GIGA_MAC_VER_23 = 0x17, // 8168CP
  107. RTL_GIGA_MAC_VER_24 = 0x18, // 8168CP
  108. RTL_GIGA_MAC_VER_25 = 0x19, // 8168D
  109. };
  110. #define _R(NAME,MAC,MASK) \
  111. { .name = NAME, .mac_version = MAC, .RxConfigMask = MASK }
  112. static const struct {
  113. const char *name;
  114. u8 mac_version;
  115. u32 RxConfigMask; /* Clears the bits supported by this chip */
  116. } rtl_chip_info[] = {
  117. _R("RTL8169", RTL_GIGA_MAC_VER_01, 0xff7e1880), // 8169
  118. _R("RTL8169s", RTL_GIGA_MAC_VER_02, 0xff7e1880), // 8169S
  119. _R("RTL8110s", RTL_GIGA_MAC_VER_03, 0xff7e1880), // 8110S
  120. _R("RTL8169sb/8110sb", RTL_GIGA_MAC_VER_04, 0xff7e1880), // 8169SB
  121. _R("RTL8169sc/8110sc", RTL_GIGA_MAC_VER_05, 0xff7e1880), // 8110SCd
  122. _R("RTL8169sc/8110sc", RTL_GIGA_MAC_VER_06, 0xff7e1880), // 8110SCe
  123. _R("RTL8102e", RTL_GIGA_MAC_VER_07, 0xff7e1880), // PCI-E
  124. _R("RTL8102e", RTL_GIGA_MAC_VER_08, 0xff7e1880), // PCI-E
  125. _R("RTL8102e", RTL_GIGA_MAC_VER_09, 0xff7e1880), // PCI-E
  126. _R("RTL8101e", RTL_GIGA_MAC_VER_10, 0xff7e1880), // PCI-E
  127. _R("RTL8168b/8111b", RTL_GIGA_MAC_VER_11, 0xff7e1880), // PCI-E
  128. _R("RTL8168b/8111b", RTL_GIGA_MAC_VER_12, 0xff7e1880), // PCI-E
  129. _R("RTL8101e", RTL_GIGA_MAC_VER_13, 0xff7e1880), // PCI-E 8139
  130. _R("RTL8100e", RTL_GIGA_MAC_VER_14, 0xff7e1880), // PCI-E 8139
  131. _R("RTL8100e", RTL_GIGA_MAC_VER_15, 0xff7e1880), // PCI-E 8139
  132. _R("RTL8168b/8111b", RTL_GIGA_MAC_VER_17, 0xff7e1880), // PCI-E
  133. _R("RTL8101e", RTL_GIGA_MAC_VER_16, 0xff7e1880), // PCI-E
  134. _R("RTL8168cp/8111cp", RTL_GIGA_MAC_VER_18, 0xff7e1880), // PCI-E
  135. _R("RTL8168c/8111c", RTL_GIGA_MAC_VER_19, 0xff7e1880), // PCI-E
  136. _R("RTL8168c/8111c", RTL_GIGA_MAC_VER_20, 0xff7e1880), // PCI-E
  137. _R("RTL8168c/8111c", RTL_GIGA_MAC_VER_21, 0xff7e1880), // PCI-E
  138. _R("RTL8168c/8111c", RTL_GIGA_MAC_VER_22, 0xff7e1880), // PCI-E
  139. _R("RTL8168cp/8111cp", RTL_GIGA_MAC_VER_23, 0xff7e1880), // PCI-E
  140. _R("RTL8168cp/8111cp", RTL_GIGA_MAC_VER_24, 0xff7e1880), // PCI-E
  141. _R("RTL8168d/8111d", RTL_GIGA_MAC_VER_25, 0xff7e1880) // PCI-E
  142. };
  143. #undef _R
  144. enum cfg_version {
  145. RTL_CFG_0 = 0x00,
  146. RTL_CFG_1,
  147. RTL_CFG_2
  148. };
  149. #if 0
  150. /** Device Table from Linux Driver **/
  151. static struct pci_device_id rtl8169_pci_tbl[] = {
  152. { PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8129), 0, 0, RTL_CFG_0 },
  153. { PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8136), 0, 0, RTL_CFG_2 },
  154. { PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8167), 0, 0, RTL_CFG_0 },
  155. { PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8168), 0, 0, RTL_CFG_1 },
  156. { PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8169), 0, 0, RTL_CFG_0 },
  157. { PCI_DEVICE(PCI_VENDOR_ID_DLINK, 0x4300), 0, 0, RTL_CFG_0 },
  158. { PCI_DEVICE(PCI_VENDOR_ID_AT, 0xc107), 0, 0, RTL_CFG_0 },
  159. { PCI_DEVICE(0x16ec, 0x0116), 0, 0, RTL_CFG_0 },
  160. { PCI_VENDOR_ID_LINKSYS, 0x1032,
  161. PCI_ANY_ID, 0x0024, 0, 0, RTL_CFG_0 },
  162. { 0x0001, 0x8168,
  163. PCI_ANY_ID, 0x2410, 0, 0, RTL_CFG_2 },
  164. {0,},
  165. };
  166. #endif
  167. enum rtl_registers {
  168. MAC0 = 0, /* Ethernet hardware address. */
  169. MAC4 = 4,
  170. MAR0 = 8, /* Multicast filter. */
  171. CounterAddrLow = 0x10,
  172. CounterAddrHigh = 0x14,
  173. TxDescStartAddrLow = 0x20,
  174. TxDescStartAddrHigh = 0x24,
  175. TxHDescStartAddrLow = 0x28,
  176. TxHDescStartAddrHigh = 0x2c,
  177. FLASH = 0x30,
  178. ERSR = 0x36,
  179. ChipCmd = 0x37,
  180. TxPoll = 0x38,
  181. IntrMask = 0x3c,
  182. IntrStatus = 0x3e,
  183. TxConfig = 0x40,
  184. RxConfig = 0x44,
  185. RxMissed = 0x4c,
  186. Cfg9346 = 0x50,
  187. Config0 = 0x51,
  188. Config1 = 0x52,
  189. Config2 = 0x53,
  190. Config3 = 0x54,
  191. Config4 = 0x55,
  192. Config5 = 0x56,
  193. MultiIntr = 0x5c,
  194. PHYAR = 0x60,
  195. PHYstatus = 0x6c,
  196. RxMaxSize = 0xda,
  197. CPlusCmd = 0xe0,
  198. IntrMitigate = 0xe2,
  199. RxDescAddrLow = 0xe4,
  200. RxDescAddrHigh = 0xe8,
  201. EarlyTxThres = 0xec,
  202. FuncEvent = 0xf0,
  203. FuncEventMask = 0xf4,
  204. FuncPresetState = 0xf8,
  205. FuncForceEvent = 0xfc,
  206. };
  207. enum rtl8110_registers {
  208. TBICSR = 0x64,
  209. TBI_ANAR = 0x68,
  210. TBI_LPAR = 0x6a,
  211. };
  212. enum rtl8168_8101_registers {
  213. CSIDR = 0x64,
  214. CSIAR = 0x68,
  215. #define CSIAR_FLAG 0x80000000
  216. #define CSIAR_WRITE_CMD 0x80000000
  217. #define CSIAR_BYTE_ENABLE 0x0f
  218. #define CSIAR_BYTE_ENABLE_SHIFT 12
  219. #define CSIAR_ADDR_MASK 0x0fff
  220. EPHYAR = 0x80,
  221. #define EPHYAR_FLAG 0x80000000
  222. #define EPHYAR_WRITE_CMD 0x80000000
  223. #define EPHYAR_REG_MASK 0x1f
  224. #define EPHYAR_REG_SHIFT 16
  225. #define EPHYAR_DATA_MASK 0xffff
  226. DBG_REG = 0xd1,
  227. #define FIX_NAK_1 (1 << 4)
  228. #define FIX_NAK_2 (1 << 3)
  229. };
  230. enum rtl_register_content {
  231. /* InterruptStatusBits */
  232. SYSErr = 0x8000,
  233. PCSTimeout = 0x4000,
  234. SWInt = 0x0100,
  235. TxDescUnavail = 0x0080,
  236. RxFIFOOver = 0x0040,
  237. LinkChg = 0x0020,
  238. RxOverflow = 0x0010,
  239. TxErr = 0x0008,
  240. TxOK = 0x0004,
  241. RxErr = 0x0002,
  242. RxOK = 0x0001,
  243. /* RxStatusDesc */
  244. RxFOVF = (1 << 23),
  245. RxRWT = (1 << 22),
  246. RxRES = (1 << 21),
  247. RxRUNT = (1 << 20),
  248. RxCRC = (1 << 19),
  249. /* ChipCmdBits */
  250. CmdReset = 0x10,
  251. CmdRxEnb = 0x08,
  252. CmdTxEnb = 0x04,
  253. RxBufEmpty = 0x01,
  254. /* TXPoll register p.5 */
  255. HPQ = 0x80, /* Poll cmd on the high prio queue */
  256. NPQ = 0x40, /* Poll cmd on the low prio queue */
  257. FSWInt = 0x01, /* Forced software interrupt */
  258. /* Cfg9346Bits */
  259. Cfg9346_Lock = 0x00,
  260. Cfg9346_Unlock = 0xc0,
  261. /* rx_mode_bits */
  262. AcceptErr = 0x20,
  263. AcceptRunt = 0x10,
  264. AcceptBroadcast = 0x08,
  265. AcceptMulticast = 0x04,
  266. AcceptMyPhys = 0x02,
  267. AcceptAllPhys = 0x01,
  268. /* RxConfigBits */
  269. RxCfgFIFOShift = 13,
  270. RxCfgDMAShift = 8,
  271. /* TxConfigBits */
  272. TxInterFrameGapShift = 24,
  273. TxDMAShift = 8, /* DMA burst value (0-7) is shift this many bits */
  274. /* Config1 register p.24 */
  275. LEDS1 = (1 << 7),
  276. LEDS0 = (1 << 6),
  277. MSIEnable = (1 << 5), /* Enable Message Signaled Interrupt */
  278. Speed_down = (1 << 4),
  279. MEMMAP = (1 << 3),
  280. IOMAP = (1 << 2),
  281. VPD = (1 << 1),
  282. PMEnable = (1 << 0), /* Power Management Enable */
  283. /* Config2 register p. 25 */
  284. PCI_Clock_66MHz = 0x01,
  285. PCI_Clock_33MHz = 0x00,
  286. /* Config3 register p.25 */
  287. MagicPacket = (1 << 5), /* Wake up when receives a Magic Packet */
  288. LinkUp = (1 << 4), /* Wake up when the cable connection is re-established */
  289. Beacon_en = (1 << 0), /* 8168 only. Reserved in the 8168b */
  290. /* Config5 register p.27 */
  291. BWF = (1 << 6), /* Accept Broadcast wakeup frame */
  292. MWF = (1 << 5), /* Accept Multicast wakeup frame */
  293. UWF = (1 << 4), /* Accept Unicast wakeup frame */
  294. LanWake = (1 << 1), /* LanWake enable/disable */
  295. PMEStatus = (1 << 0), /* PME status can be reset by PCI RST# */
  296. /* TBICSR p.28 */
  297. TBIReset = 0x80000000,
  298. TBILoopback = 0x40000000,
  299. TBINwEnable = 0x20000000,
  300. TBINwRestart = 0x10000000,
  301. TBILinkOk = 0x02000000,
  302. TBINwComplete = 0x01000000,
  303. /* CPlusCmd p.31 */
  304. EnableBist = (1 << 15), // 8168 8101
  305. Mac_dbgo_oe = (1 << 14), // 8168 8101
  306. Normal_mode = (1 << 13), // unused
  307. Force_half_dup = (1 << 12), // 8168 8101
  308. Force_rxflow_en = (1 << 11), // 8168 8101
  309. Force_txflow_en = (1 << 10), // 8168 8101
  310. Cxpl_dbg_sel = (1 << 9), // 8168 8101
  311. ASF = (1 << 8), // 8168 8101
  312. PktCntrDisable = (1 << 7), // 8168 8101
  313. Mac_dbgo_sel = 0x001c, // 8168
  314. RxVlan = (1 << 6),
  315. RxChkSum = (1 << 5),
  316. PCIDAC = (1 << 4),
  317. PCIMulRW = (1 << 3),
  318. INTT_0 = 0x0000, // 8168
  319. INTT_1 = 0x0001, // 8168
  320. INTT_2 = 0x0002, // 8168
  321. INTT_3 = 0x0003, // 8168
  322. /* rtl8169_PHYstatus */
  323. TBI_Enable = 0x80,
  324. TxFlowCtrl = 0x40,
  325. RxFlowCtrl = 0x20,
  326. _1000bpsF = 0x10,
  327. _100bps = 0x08,
  328. _10bps = 0x04,
  329. LinkStatus = 0x02,
  330. FullDup = 0x01,
  331. /* _TBICSRBit */
  332. TBILinkOK = 0x02000000,
  333. /* DumpCounterCommand */
  334. CounterDump = 0x8,
  335. };
  336. enum desc_status_bit {
  337. DescOwn = (1 << 31), /* Descriptor is owned by NIC */
  338. RingEnd = (1 << 30), /* End of descriptor ring */
  339. FirstFrag = (1 << 29), /* First segment of a packet */
  340. LastFrag = (1 << 28), /* Final segment of a packet */
  341. /* Tx private */
  342. LargeSend = (1 << 27), /* TCP Large Send Offload (TSO) */
  343. MSSShift = 16, /* MSS value position */
  344. MSSMask = 0xfff, /* MSS value + LargeSend bit: 12 bits */
  345. IPCS = (1 << 18), /* Calculate IP checksum */
  346. UDPCS = (1 << 17), /* Calculate UDP/IP checksum */
  347. TCPCS = (1 << 16), /* Calculate TCP/IP checksum */
  348. TxVlanTag = (1 << 17), /* Add VLAN tag */
  349. /* Rx private */
  350. PID1 = (1 << 18), /* Protocol ID bit 1/2 */
  351. PID0 = (1 << 17), /* Protocol ID bit 2/2 */
  352. #define RxProtoUDP (PID1)
  353. #define RxProtoTCP (PID0)
  354. #define RxProtoIP (PID1 | PID0)
  355. #define RxProtoMask RxProtoIP
  356. IPFail = (1 << 16), /* IP checksum failed */
  357. UDPFail = (1 << 15), /* UDP/IP checksum failed */
  358. TCPFail = (1 << 14), /* TCP/IP checksum failed */
  359. RxVlanTag = (1 << 16), /* VLAN tag available */
  360. };
  361. #define RsvdMask 0x3fffc000
  362. struct TxDesc {
  363. volatile uint32_t opts1;
  364. volatile uint32_t opts2;
  365. volatile uint32_t addr_lo;
  366. volatile uint32_t addr_hi;
  367. };
  368. struct RxDesc {
  369. volatile uint32_t opts1;
  370. volatile uint32_t opts2;
  371. volatile uint32_t addr_lo;
  372. volatile uint32_t addr_hi;
  373. };
  374. enum features {
  375. RTL_FEATURE_WOL = (1 << 0),
  376. RTL_FEATURE_MSI = (1 << 1),
  377. RTL_FEATURE_GMII = (1 << 2),
  378. };
  379. static void rtl_hw_start_8169(struct net_device *);
  380. static void rtl_hw_start_8168(struct net_device *);
  381. static void rtl_hw_start_8101(struct net_device *);
  382. struct rtl8169_private {
  383. struct pci_device *pci_dev;
  384. struct net_device *netdev;
  385. uint8_t *hw_addr;
  386. void *mmio_addr;
  387. uint32_t irqno;
  388. int chipset;
  389. int mac_version;
  390. u16 intr_event;
  391. struct io_buffer *tx_iobuf[NUM_TX_DESC];
  392. struct io_buffer *rx_iobuf[NUM_RX_DESC];
  393. struct TxDesc *tx_base;
  394. struct RxDesc *rx_base;
  395. uint32_t tx_curr;
  396. uint32_t rx_curr;
  397. uint32_t tx_tail;
  398. uint32_t tx_fill_ctr;
  399. u16 cp_cmd;
  400. int phy_auto_nego_reg;
  401. int phy_1000_ctrl_reg;
  402. int ( *set_speed ) (struct net_device *, u8 autoneg, u16 speed, u8 duplex );
  403. void ( *phy_reset_enable ) ( void *ioaddr );
  404. void ( *hw_start ) ( struct net_device * );
  405. unsigned int ( *phy_reset_pending ) ( void *ioaddr );
  406. unsigned int ( *link_ok ) ( void *ioaddr );
  407. int pcie_cap;
  408. unsigned features;
  409. };
  410. static const unsigned int rtl8169_rx_config =
  411. (RX_FIFO_THRESH << RxCfgFIFOShift) | (RX_DMA_BURST << RxCfgDMAShift);
  412. #endif /* _R8169_H_ */
  413. /*
  414. * Local variables:
  415. * c-basic-offset: 8
  416. * c-indent-level: 8
  417. * tab-width: 8
  418. * End:
  419. */