nic.h 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514
  1. /****************************************************************************
  2. * Driver for Solarflare Solarstorm network controllers and boards
  3. * Copyright 2005-2006 Fen Systems Ltd.
  4. * Copyright 2006-2011 Solarflare Communications Inc.
  5. *
  6. * This program is free software; you can redistribute it and/or modify it
  7. * under the terms of the GNU General Public License version 2 as published
  8. * by the Free Software Foundation, incorporated herein by reference.
  9. */
  10. #ifndef EFX_NIC_H
  11. #define EFX_NIC_H
  12. #include <linux/net_tstamp.h>
  13. #include <linux/i2c-algo-bit.h>
  14. #include "net_driver.h"
  15. #include "efx.h"
  16. #include "mcdi.h"
  17. #include "spi.h"
  18. /*
  19. * Falcon hardware control
  20. */
  21. enum {
  22. EFX_REV_FALCON_A0 = 0,
  23. EFX_REV_FALCON_A1 = 1,
  24. EFX_REV_FALCON_B0 = 2,
  25. EFX_REV_SIENA_A0 = 3,
  26. };
  27. static inline int efx_nic_rev(struct efx_nic *efx)
  28. {
  29. return efx->type->revision;
  30. }
  31. extern u32 efx_farch_fpga_ver(struct efx_nic *efx);
  32. /* NIC has two interlinked PCI functions for the same port. */
  33. static inline bool efx_nic_is_dual_func(struct efx_nic *efx)
  34. {
  35. return efx_nic_rev(efx) < EFX_REV_FALCON_B0;
  36. }
  37. /* Read the current event from the event queue */
  38. static inline efx_qword_t *efx_event(struct efx_channel *channel,
  39. unsigned int index)
  40. {
  41. return ((efx_qword_t *) (channel->eventq.buf.addr)) +
  42. (index & channel->eventq_mask);
  43. }
  44. /* See if an event is present
  45. *
  46. * We check both the high and low dword of the event for all ones. We
  47. * wrote all ones when we cleared the event, and no valid event can
  48. * have all ones in either its high or low dwords. This approach is
  49. * robust against reordering.
  50. *
  51. * Note that using a single 64-bit comparison is incorrect; even
  52. * though the CPU read will be atomic, the DMA write may not be.
  53. */
  54. static inline int efx_event_present(efx_qword_t *event)
  55. {
  56. return !(EFX_DWORD_IS_ALL_ONES(event->dword[0]) |
  57. EFX_DWORD_IS_ALL_ONES(event->dword[1]));
  58. }
  59. /* Returns a pointer to the specified transmit descriptor in the TX
  60. * descriptor queue belonging to the specified channel.
  61. */
  62. static inline efx_qword_t *
  63. efx_tx_desc(struct efx_tx_queue *tx_queue, unsigned int index)
  64. {
  65. return ((efx_qword_t *) (tx_queue->txd.buf.addr)) + index;
  66. }
  67. /* Decide whether to push a TX descriptor to the NIC vs merely writing
  68. * the doorbell. This can reduce latency when we are adding a single
  69. * descriptor to an empty queue, but is otherwise pointless. Further,
  70. * Falcon and Siena have hardware bugs (SF bug 33851) that may be
  71. * triggered if we don't check this.
  72. */
  73. static inline bool efx_nic_may_push_tx_desc(struct efx_tx_queue *tx_queue,
  74. unsigned int write_count)
  75. {
  76. unsigned empty_read_count = ACCESS_ONCE(tx_queue->empty_read_count);
  77. if (empty_read_count == 0)
  78. return false;
  79. tx_queue->empty_read_count = 0;
  80. return ((empty_read_count ^ write_count) & ~EFX_EMPTY_COUNT_VALID) == 0
  81. && tx_queue->write_count - write_count == 1;
  82. }
  83. /* Returns a pointer to the specified descriptor in the RX descriptor queue */
  84. static inline efx_qword_t *
  85. efx_rx_desc(struct efx_rx_queue *rx_queue, unsigned int index)
  86. {
  87. return ((efx_qword_t *) (rx_queue->rxd.buf.addr)) + index;
  88. }
  89. enum {
  90. PHY_TYPE_NONE = 0,
  91. PHY_TYPE_TXC43128 = 1,
  92. PHY_TYPE_88E1111 = 2,
  93. PHY_TYPE_SFX7101 = 3,
  94. PHY_TYPE_QT2022C2 = 4,
  95. PHY_TYPE_PM8358 = 6,
  96. PHY_TYPE_SFT9001A = 8,
  97. PHY_TYPE_QT2025C = 9,
  98. PHY_TYPE_SFT9001B = 10,
  99. };
  100. #define FALCON_XMAC_LOOPBACKS \
  101. ((1 << LOOPBACK_XGMII) | \
  102. (1 << LOOPBACK_XGXS) | \
  103. (1 << LOOPBACK_XAUI))
  104. #define FALCON_GMAC_LOOPBACKS \
  105. (1 << LOOPBACK_GMAC)
  106. /* Alignment of PCIe DMA boundaries (4KB) */
  107. #define EFX_PAGE_SIZE 4096
  108. /* Size and alignment of buffer table entries (same) */
  109. #define EFX_BUF_SIZE EFX_PAGE_SIZE
  110. /**
  111. * struct falcon_board_type - board operations and type information
  112. * @id: Board type id, as found in NVRAM
  113. * @init: Allocate resources and initialise peripheral hardware
  114. * @init_phy: Do board-specific PHY initialisation
  115. * @fini: Shut down hardware and free resources
  116. * @set_id_led: Set state of identifying LED or revert to automatic function
  117. * @monitor: Board-specific health check function
  118. */
  119. struct falcon_board_type {
  120. u8 id;
  121. int (*init) (struct efx_nic *nic);
  122. void (*init_phy) (struct efx_nic *efx);
  123. void (*fini) (struct efx_nic *nic);
  124. void (*set_id_led) (struct efx_nic *efx, enum efx_led_mode mode);
  125. int (*monitor) (struct efx_nic *nic);
  126. };
  127. /**
  128. * struct falcon_board - board information
  129. * @type: Type of board
  130. * @major: Major rev. ('A', 'B' ...)
  131. * @minor: Minor rev. (0, 1, ...)
  132. * @i2c_adap: I2C adapter for on-board peripherals
  133. * @i2c_data: Data for bit-banging algorithm
  134. * @hwmon_client: I2C client for hardware monitor
  135. * @ioexp_client: I2C client for power/port control
  136. */
  137. struct falcon_board {
  138. const struct falcon_board_type *type;
  139. int major;
  140. int minor;
  141. struct i2c_adapter i2c_adap;
  142. struct i2c_algo_bit_data i2c_data;
  143. struct i2c_client *hwmon_client, *ioexp_client;
  144. };
  145. /**
  146. * struct falcon_nic_data - Falcon NIC state
  147. * @pci_dev2: Secondary function of Falcon A
  148. * @board: Board state and functions
  149. * @stats_disable_count: Nest count for disabling statistics fetches
  150. * @stats_pending: Is there a pending DMA of MAC statistics.
  151. * @stats_timer: A timer for regularly fetching MAC statistics.
  152. * @stats_dma_done: Pointer to the flag which indicates DMA completion.
  153. * @spi_flash: SPI flash device
  154. * @spi_eeprom: SPI EEPROM device
  155. * @spi_lock: SPI bus lock
  156. * @mdio_lock: MDIO bus lock
  157. * @xmac_poll_required: XMAC link state needs polling
  158. */
  159. struct falcon_nic_data {
  160. struct pci_dev *pci_dev2;
  161. struct falcon_board board;
  162. unsigned int stats_disable_count;
  163. bool stats_pending;
  164. struct timer_list stats_timer;
  165. u32 *stats_dma_done;
  166. struct efx_spi_device spi_flash;
  167. struct efx_spi_device spi_eeprom;
  168. struct mutex spi_lock;
  169. struct mutex mdio_lock;
  170. bool xmac_poll_required;
  171. };
  172. static inline struct falcon_board *falcon_board(struct efx_nic *efx)
  173. {
  174. struct falcon_nic_data *data = efx->nic_data;
  175. return &data->board;
  176. }
  177. /**
  178. * struct siena_nic_data - Siena NIC state
  179. * @wol_filter_id: Wake-on-LAN packet filter id
  180. */
  181. struct siena_nic_data {
  182. int wol_filter_id;
  183. };
  184. /*
  185. * On the SFC9000 family each port is associated with 1 PCI physical
  186. * function (PF) handled by sfc and a configurable number of virtual
  187. * functions (VFs) that may be handled by some other driver, often in
  188. * a VM guest. The queue pointer registers are mapped in both PF and
  189. * VF BARs such that an 8K region provides access to a single RX, TX
  190. * and event queue (collectively a Virtual Interface, VI or VNIC).
  191. *
  192. * The PF has access to all 1024 VIs while VFs are mapped to VIs
  193. * according to VI_BASE and VI_SCALE: VF i has access to VIs numbered
  194. * in range [VI_BASE + i << VI_SCALE, VI_BASE + i + 1 << VI_SCALE).
  195. * The number of VIs and the VI_SCALE value are configurable but must
  196. * be established at boot time by firmware.
  197. */
  198. /* Maximum VI_SCALE parameter supported by Siena */
  199. #define EFX_VI_SCALE_MAX 6
  200. /* Base VI to use for SR-IOV. Must be aligned to (1 << EFX_VI_SCALE_MAX),
  201. * so this is the smallest allowed value. */
  202. #define EFX_VI_BASE 128U
  203. /* Maximum number of VFs allowed */
  204. #define EFX_VF_COUNT_MAX 127
  205. /* Limit EVQs on VFs to be only 8k to reduce buffer table reservation */
  206. #define EFX_MAX_VF_EVQ_SIZE 8192UL
  207. /* The number of buffer table entries reserved for each VI on a VF */
  208. #define EFX_VF_BUFTBL_PER_VI \
  209. ((EFX_MAX_VF_EVQ_SIZE + 2 * EFX_MAX_DMAQ_SIZE) * \
  210. sizeof(efx_qword_t) / EFX_BUF_SIZE)
  211. #ifdef CONFIG_SFC_SRIOV
  212. static inline bool efx_sriov_wanted(struct efx_nic *efx)
  213. {
  214. return efx->vf_count != 0;
  215. }
  216. static inline bool efx_sriov_enabled(struct efx_nic *efx)
  217. {
  218. return efx->vf_init_count != 0;
  219. }
  220. static inline unsigned int efx_vf_size(struct efx_nic *efx)
  221. {
  222. return 1 << efx->vi_scale;
  223. }
  224. extern int efx_init_sriov(void);
  225. extern void efx_sriov_probe(struct efx_nic *efx);
  226. extern int efx_sriov_init(struct efx_nic *efx);
  227. extern void efx_sriov_mac_address_changed(struct efx_nic *efx);
  228. extern void efx_sriov_tx_flush_done(struct efx_nic *efx, efx_qword_t *event);
  229. extern void efx_sriov_rx_flush_done(struct efx_nic *efx, efx_qword_t *event);
  230. extern void efx_sriov_event(struct efx_channel *channel, efx_qword_t *event);
  231. extern void efx_sriov_desc_fetch_err(struct efx_nic *efx, unsigned dmaq);
  232. extern void efx_sriov_flr(struct efx_nic *efx, unsigned flr);
  233. extern void efx_sriov_reset(struct efx_nic *efx);
  234. extern void efx_sriov_fini(struct efx_nic *efx);
  235. extern void efx_fini_sriov(void);
  236. #else
  237. static inline bool efx_sriov_wanted(struct efx_nic *efx) { return false; }
  238. static inline bool efx_sriov_enabled(struct efx_nic *efx) { return false; }
  239. static inline unsigned int efx_vf_size(struct efx_nic *efx) { return 0; }
  240. static inline int efx_init_sriov(void) { return 0; }
  241. static inline void efx_sriov_probe(struct efx_nic *efx) {}
  242. static inline int efx_sriov_init(struct efx_nic *efx) { return -EOPNOTSUPP; }
  243. static inline void efx_sriov_mac_address_changed(struct efx_nic *efx) {}
  244. static inline void efx_sriov_tx_flush_done(struct efx_nic *efx,
  245. efx_qword_t *event) {}
  246. static inline void efx_sriov_rx_flush_done(struct efx_nic *efx,
  247. efx_qword_t *event) {}
  248. static inline void efx_sriov_event(struct efx_channel *channel,
  249. efx_qword_t *event) {}
  250. static inline void efx_sriov_desc_fetch_err(struct efx_nic *efx, unsigned dmaq) {}
  251. static inline void efx_sriov_flr(struct efx_nic *efx, unsigned flr) {}
  252. static inline void efx_sriov_reset(struct efx_nic *efx) {}
  253. static inline void efx_sriov_fini(struct efx_nic *efx) {}
  254. static inline void efx_fini_sriov(void) {}
  255. #endif
  256. extern int efx_sriov_set_vf_mac(struct net_device *dev, int vf, u8 *mac);
  257. extern int efx_sriov_set_vf_vlan(struct net_device *dev, int vf,
  258. u16 vlan, u8 qos);
  259. extern int efx_sriov_get_vf_config(struct net_device *dev, int vf,
  260. struct ifla_vf_info *ivf);
  261. extern int efx_sriov_set_vf_spoofchk(struct net_device *net_dev, int vf,
  262. bool spoofchk);
  263. struct ethtool_ts_info;
  264. extern void efx_ptp_probe(struct efx_nic *efx);
  265. extern int efx_ptp_ioctl(struct efx_nic *efx, struct ifreq *ifr, int cmd);
  266. extern void efx_ptp_get_ts_info(struct efx_nic *efx,
  267. struct ethtool_ts_info *ts_info);
  268. extern bool efx_ptp_is_ptp_tx(struct efx_nic *efx, struct sk_buff *skb);
  269. extern int efx_ptp_tx(struct efx_nic *efx, struct sk_buff *skb);
  270. extern void efx_ptp_event(struct efx_nic *efx, efx_qword_t *ev);
  271. extern const struct efx_nic_type falcon_a1_nic_type;
  272. extern const struct efx_nic_type falcon_b0_nic_type;
  273. extern const struct efx_nic_type siena_a0_nic_type;
  274. /**************************************************************************
  275. *
  276. * Externs
  277. *
  278. **************************************************************************
  279. */
  280. extern int falcon_probe_board(struct efx_nic *efx, u16 revision_info);
  281. /* TX data path */
  282. static inline int efx_nic_probe_tx(struct efx_tx_queue *tx_queue)
  283. {
  284. return tx_queue->efx->type->tx_probe(tx_queue);
  285. }
  286. static inline void efx_nic_init_tx(struct efx_tx_queue *tx_queue)
  287. {
  288. tx_queue->efx->type->tx_init(tx_queue);
  289. }
  290. static inline void efx_nic_remove_tx(struct efx_tx_queue *tx_queue)
  291. {
  292. tx_queue->efx->type->tx_remove(tx_queue);
  293. }
  294. static inline void efx_nic_push_buffers(struct efx_tx_queue *tx_queue)
  295. {
  296. tx_queue->efx->type->tx_write(tx_queue);
  297. }
  298. /* RX data path */
  299. static inline int efx_nic_probe_rx(struct efx_rx_queue *rx_queue)
  300. {
  301. return rx_queue->efx->type->rx_probe(rx_queue);
  302. }
  303. static inline void efx_nic_init_rx(struct efx_rx_queue *rx_queue)
  304. {
  305. rx_queue->efx->type->rx_init(rx_queue);
  306. }
  307. static inline void efx_nic_remove_rx(struct efx_rx_queue *rx_queue)
  308. {
  309. rx_queue->efx->type->rx_remove(rx_queue);
  310. }
  311. static inline void efx_nic_notify_rx_desc(struct efx_rx_queue *rx_queue)
  312. {
  313. rx_queue->efx->type->rx_write(rx_queue);
  314. }
  315. static inline void efx_nic_generate_fill_event(struct efx_rx_queue *rx_queue)
  316. {
  317. rx_queue->efx->type->rx_defer_refill(rx_queue);
  318. }
  319. /* Event data path */
  320. static inline int efx_nic_probe_eventq(struct efx_channel *channel)
  321. {
  322. return channel->efx->type->ev_probe(channel);
  323. }
  324. static inline void efx_nic_init_eventq(struct efx_channel *channel)
  325. {
  326. channel->efx->type->ev_init(channel);
  327. }
  328. static inline void efx_nic_fini_eventq(struct efx_channel *channel)
  329. {
  330. channel->efx->type->ev_fini(channel);
  331. }
  332. static inline void efx_nic_remove_eventq(struct efx_channel *channel)
  333. {
  334. channel->efx->type->ev_remove(channel);
  335. }
  336. static inline int
  337. efx_nic_process_eventq(struct efx_channel *channel, int quota)
  338. {
  339. return channel->efx->type->ev_process(channel, quota);
  340. }
  341. static inline void efx_nic_eventq_read_ack(struct efx_channel *channel)
  342. {
  343. channel->efx->type->ev_read_ack(channel);
  344. }
  345. extern void efx_nic_event_test_start(struct efx_channel *channel);
  346. /* Falcon/Siena queue operations */
  347. extern int efx_farch_tx_probe(struct efx_tx_queue *tx_queue);
  348. extern void efx_farch_tx_init(struct efx_tx_queue *tx_queue);
  349. extern void efx_farch_tx_fini(struct efx_tx_queue *tx_queue);
  350. extern void efx_farch_tx_remove(struct efx_tx_queue *tx_queue);
  351. extern void efx_farch_tx_write(struct efx_tx_queue *tx_queue);
  352. extern int efx_farch_rx_probe(struct efx_rx_queue *rx_queue);
  353. extern void efx_farch_rx_init(struct efx_rx_queue *rx_queue);
  354. extern void efx_farch_rx_fini(struct efx_rx_queue *rx_queue);
  355. extern void efx_farch_rx_remove(struct efx_rx_queue *rx_queue);
  356. extern void efx_farch_rx_write(struct efx_rx_queue *rx_queue);
  357. extern void efx_farch_rx_defer_refill(struct efx_rx_queue *rx_queue);
  358. extern int efx_farch_ev_probe(struct efx_channel *channel);
  359. extern void efx_farch_ev_init(struct efx_channel *channel);
  360. extern void efx_farch_ev_fini(struct efx_channel *channel);
  361. extern void efx_farch_ev_remove(struct efx_channel *channel);
  362. extern int efx_farch_ev_process(struct efx_channel *channel, int quota);
  363. extern void efx_farch_ev_read_ack(struct efx_channel *channel);
  364. extern void efx_farch_ev_test_generate(struct efx_channel *channel);
  365. /* Falcon/Siena filter operations */
  366. extern int efx_farch_filter_table_probe(struct efx_nic *efx);
  367. extern void efx_farch_filter_table_restore(struct efx_nic *efx);
  368. extern void efx_farch_filter_table_remove(struct efx_nic *efx);
  369. extern void efx_farch_filter_update_rx_scatter(struct efx_nic *efx);
  370. extern s32 efx_farch_filter_insert(struct efx_nic *efx,
  371. struct efx_filter_spec *spec, bool replace);
  372. extern int efx_farch_filter_remove_safe(struct efx_nic *efx,
  373. enum efx_filter_priority priority,
  374. u32 filter_id);
  375. extern int efx_farch_filter_get_safe(struct efx_nic *efx,
  376. enum efx_filter_priority priority,
  377. u32 filter_id, struct efx_filter_spec *);
  378. extern void efx_farch_filter_clear_rx(struct efx_nic *efx,
  379. enum efx_filter_priority priority);
  380. extern u32 efx_farch_filter_count_rx_used(struct efx_nic *efx,
  381. enum efx_filter_priority priority);
  382. extern u32 efx_farch_filter_get_rx_id_limit(struct efx_nic *efx);
  383. extern s32 efx_farch_filter_get_rx_ids(struct efx_nic *efx,
  384. enum efx_filter_priority priority,
  385. u32 *buf, u32 size);
  386. #ifdef CONFIG_RFS_ACCEL
  387. extern s32 efx_farch_filter_rfs_insert(struct efx_nic *efx,
  388. struct efx_filter_spec *spec);
  389. extern bool efx_farch_filter_rfs_expire_one(struct efx_nic *efx, u32 flow_id,
  390. unsigned int index);
  391. #endif
  392. extern bool efx_nic_event_present(struct efx_channel *channel);
  393. /* Some statistics are computed as A - B where A and B each increase
  394. * linearly with some hardware counter(s) and the counters are read
  395. * asynchronously. If the counters contributing to B are always read
  396. * after those contributing to A, the computed value may be lower than
  397. * the true value by some variable amount, and may decrease between
  398. * subsequent computations.
  399. *
  400. * We should never allow statistics to decrease or to exceed the true
  401. * value. Since the computed value will never be greater than the
  402. * true value, we can achieve this by only storing the computed value
  403. * when it increases.
  404. */
  405. static inline void efx_update_diff_stat(u64 *stat, u64 diff)
  406. {
  407. if ((s64)(diff - *stat) > 0)
  408. *stat = diff;
  409. }
  410. /* Interrupts */
  411. extern int efx_nic_init_interrupt(struct efx_nic *efx);
  412. extern void efx_nic_irq_test_start(struct efx_nic *efx);
  413. extern void efx_nic_fini_interrupt(struct efx_nic *efx);
  414. /* Falcon/Siena interrupts */
  415. extern void efx_farch_irq_enable_master(struct efx_nic *efx);
  416. extern void efx_farch_irq_test_generate(struct efx_nic *efx);
  417. extern void efx_farch_irq_disable_master(struct efx_nic *efx);
  418. extern irqreturn_t efx_farch_msi_interrupt(int irq, void *dev_id);
  419. extern irqreturn_t efx_farch_legacy_interrupt(int irq, void *dev_id);
  420. extern irqreturn_t efx_farch_fatal_interrupt(struct efx_nic *efx);
  421. static inline int efx_nic_event_test_irq_cpu(struct efx_channel *channel)
  422. {
  423. return ACCESS_ONCE(channel->event_test_cpu);
  424. }
  425. static inline int efx_nic_irq_test_irq_cpu(struct efx_nic *efx)
  426. {
  427. return ACCESS_ONCE(efx->last_irq_cpu);
  428. }
  429. /* Global Resources */
  430. extern int efx_nic_flush_queues(struct efx_nic *efx);
  431. extern void siena_prepare_flush(struct efx_nic *efx);
  432. extern int efx_farch_fini_dmaq(struct efx_nic *efx);
  433. extern void siena_finish_flush(struct efx_nic *efx);
  434. extern void falcon_start_nic_stats(struct efx_nic *efx);
  435. extern void falcon_stop_nic_stats(struct efx_nic *efx);
  436. extern int falcon_reset_xaui(struct efx_nic *efx);
  437. extern void efx_farch_dimension_resources(struct efx_nic *efx, unsigned sram_lim_qw);
  438. extern void efx_farch_init_common(struct efx_nic *efx);
  439. static inline void efx_nic_push_rx_indir_table(struct efx_nic *efx)
  440. {
  441. efx->type->rx_push_indir_table(efx);
  442. }
  443. extern void efx_farch_rx_push_indir_table(struct efx_nic *efx);
  444. int efx_nic_alloc_buffer(struct efx_nic *efx, struct efx_buffer *buffer,
  445. unsigned int len, gfp_t gfp_flags);
  446. void efx_nic_free_buffer(struct efx_nic *efx, struct efx_buffer *buffer);
  447. /* Tests */
  448. struct efx_farch_register_test {
  449. unsigned address;
  450. efx_oword_t mask;
  451. };
  452. extern int efx_farch_test_registers(struct efx_nic *efx,
  453. const struct efx_farch_register_test *regs,
  454. size_t n_regs);
  455. extern size_t efx_nic_get_regs_len(struct efx_nic *efx);
  456. extern void efx_nic_get_regs(struct efx_nic *efx, void *buf);
  457. #define EFX_MAX_FLUSH_TIME 5000
  458. extern void efx_farch_generate_event(struct efx_nic *efx, unsigned int evq,
  459. efx_qword_t *event);
  460. #endif /* EFX_NIC_H */