bnx2x_cmn.h 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652
  1. /* bnx2x_cmn.h: Broadcom Everest network driver.
  2. *
  3. * Copyright (c) 2007-2010 Broadcom Corporation
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation.
  8. *
  9. * Maintained by: Eilon Greenstein <eilong@broadcom.com>
  10. * Written by: Eliezer Tamir
  11. * Based on code from Michael Chan's bnx2 driver
  12. * UDP CSUM errata workaround by Arik Gendelman
  13. * Slowpath and fastpath rework by Vladislav Zolotarov
  14. * Statistics and Link management by Yitchak Gertner
  15. *
  16. */
  17. #ifndef BNX2X_CMN_H
  18. #define BNX2X_CMN_H
  19. #include <linux/types.h>
  20. #include <linux/netdevice.h>
  21. #include "bnx2x.h"
  22. /*********************** Interfaces ****************************
  23. * Functions that need to be implemented by each driver version
  24. */
  25. /**
  26. * Initialize link parameters structure variables.
  27. *
  28. * @param bp
  29. * @param load_mode
  30. *
  31. * @return u8
  32. */
  33. u8 bnx2x_initial_phy_init(struct bnx2x *bp, int load_mode);
  34. /**
  35. * Configure hw according to link parameters structure.
  36. *
  37. * @param bp
  38. */
  39. void bnx2x_link_set(struct bnx2x *bp);
  40. /**
  41. * Query link status
  42. *
  43. * @param bp
  44. *
  45. * @return 0 - link is UP
  46. */
  47. u8 bnx2x_link_test(struct bnx2x *bp);
  48. /**
  49. * Handles link status change
  50. *
  51. * @param bp
  52. */
  53. void bnx2x__link_status_update(struct bnx2x *bp);
  54. /**
  55. * MSI-X slowpath interrupt handler
  56. *
  57. * @param irq
  58. * @param dev_instance
  59. *
  60. * @return irqreturn_t
  61. */
  62. irqreturn_t bnx2x_msix_sp_int(int irq, void *dev_instance);
  63. /**
  64. * non MSI-X interrupt handler
  65. *
  66. * @param irq
  67. * @param dev_instance
  68. *
  69. * @return irqreturn_t
  70. */
  71. irqreturn_t bnx2x_interrupt(int irq, void *dev_instance);
  72. #ifdef BCM_CNIC
  73. /**
  74. * Send command to cnic driver
  75. *
  76. * @param bp
  77. * @param cmd
  78. */
  79. int bnx2x_cnic_notify(struct bnx2x *bp, int cmd);
  80. /**
  81. * Provides cnic information for proper interrupt handling
  82. *
  83. * @param bp
  84. */
  85. void bnx2x_setup_cnic_irq_info(struct bnx2x *bp);
  86. #endif
  87. /**
  88. * Enable HW interrupts.
  89. *
  90. * @param bp
  91. */
  92. void bnx2x_int_enable(struct bnx2x *bp);
  93. /**
  94. * Disable interrupts. This function ensures that there are no
  95. * ISRs or SP DPCs (sp_task) are running after it returns.
  96. *
  97. * @param bp
  98. * @param disable_hw if true, disable HW interrupts.
  99. */
  100. void bnx2x_int_disable_sync(struct bnx2x *bp, int disable_hw);
  101. /**
  102. * Init HW blocks according to current initialization stage:
  103. * COMMON, PORT or FUNCTION.
  104. *
  105. * @param bp
  106. * @param load_code: COMMON, PORT or FUNCTION
  107. *
  108. * @return int
  109. */
  110. int bnx2x_init_hw(struct bnx2x *bp, u32 load_code);
  111. /**
  112. * Init driver internals:
  113. * - rings
  114. * - status blocks
  115. * - etc.
  116. *
  117. * @param bp
  118. * @param load_code COMMON, PORT or FUNCTION
  119. */
  120. void bnx2x_nic_init(struct bnx2x *bp, u32 load_code);
  121. /**
  122. * Allocate driver's memory.
  123. *
  124. * @param bp
  125. *
  126. * @return int
  127. */
  128. int bnx2x_alloc_mem(struct bnx2x *bp);
  129. /**
  130. * Release driver's memory.
  131. *
  132. * @param bp
  133. */
  134. void bnx2x_free_mem(struct bnx2x *bp);
  135. /**
  136. * Bring up a leading (the first) eth Client.
  137. *
  138. * @param bp
  139. *
  140. * @return int
  141. */
  142. int bnx2x_setup_leading(struct bnx2x *bp);
  143. /**
  144. * Setup non-leading eth Client.
  145. *
  146. * @param bp
  147. * @param fp
  148. *
  149. * @return int
  150. */
  151. int bnx2x_setup_multi(struct bnx2x *bp, int index);
  152. /**
  153. * Set number of quueus according to mode and number of available
  154. * msi-x vectors
  155. *
  156. * @param bp
  157. *
  158. */
  159. void bnx2x_set_num_queues_msix(struct bnx2x *bp);
  160. /**
  161. * Cleanup chip internals:
  162. * - Cleanup MAC configuration.
  163. * - Close clients.
  164. * - etc.
  165. *
  166. * @param bp
  167. * @param unload_mode
  168. */
  169. void bnx2x_chip_cleanup(struct bnx2x *bp, int unload_mode);
  170. /**
  171. * Acquire HW lock.
  172. *
  173. * @param bp
  174. * @param resource Resource bit which was locked
  175. *
  176. * @return int
  177. */
  178. int bnx2x_acquire_hw_lock(struct bnx2x *bp, u32 resource);
  179. /**
  180. * Release HW lock.
  181. *
  182. * @param bp driver handle
  183. * @param resource Resource bit which was locked
  184. *
  185. * @return int
  186. */
  187. int bnx2x_release_hw_lock(struct bnx2x *bp, u32 resource);
  188. /**
  189. * Configure eth MAC address in the HW according to the value in
  190. * netdev->dev_addr for 57711
  191. *
  192. * @param bp driver handle
  193. * @param set
  194. */
  195. void bnx2x_set_eth_mac_addr_e1h(struct bnx2x *bp, int set);
  196. /**
  197. * Configure eth MAC address in the HW according to the value in
  198. * netdev->dev_addr for 57710
  199. *
  200. * @param bp driver handle
  201. * @param set
  202. */
  203. void bnx2x_set_eth_mac_addr_e1(struct bnx2x *bp, int set);
  204. #ifdef BCM_CNIC
  205. /**
  206. * Set iSCSI MAC(s) at the next enties in the CAM after the ETH
  207. * MAC(s). The function will wait until the ramrod completion
  208. * returns.
  209. *
  210. * @param bp driver handle
  211. * @param set set or clear the CAM entry
  212. *
  213. * @return 0 if cussess, -ENODEV if ramrod doesn't return.
  214. */
  215. int bnx2x_set_iscsi_eth_mac_addr(struct bnx2x *bp, int set);
  216. #endif
  217. /**
  218. * Initialize status block in FW and HW
  219. *
  220. * @param bp driver handle
  221. * @param sb host_status_block
  222. * @param dma_addr_t mapping
  223. * @param int sb_id
  224. */
  225. void bnx2x_init_sb(struct bnx2x *bp, struct host_status_block *sb,
  226. dma_addr_t mapping, int sb_id);
  227. /**
  228. * Reconfigure FW/HW according to dev->flags rx mode
  229. *
  230. * @param dev net_device
  231. *
  232. */
  233. void bnx2x_set_rx_mode(struct net_device *dev);
  234. /**
  235. * Configure MAC filtering rules in a FW.
  236. *
  237. * @param bp driver handle
  238. */
  239. void bnx2x_set_storm_rx_mode(struct bnx2x *bp);
  240. /* Parity errors related */
  241. void bnx2x_inc_load_cnt(struct bnx2x *bp);
  242. u32 bnx2x_dec_load_cnt(struct bnx2x *bp);
  243. bool bnx2x_chk_parity_attn(struct bnx2x *bp);
  244. bool bnx2x_reset_is_done(struct bnx2x *bp);
  245. void bnx2x_disable_close_the_gate(struct bnx2x *bp);
  246. /**
  247. * Perform statistics handling according to event
  248. *
  249. * @param bp driver handle
  250. * @param even tbnx2x_stats_event
  251. */
  252. void bnx2x_stats_handle(struct bnx2x *bp, enum bnx2x_stats_event event);
  253. /**
  254. * Configures FW with client paramteres (like HW VLAN removal)
  255. * for each active client.
  256. *
  257. * @param bp
  258. */
  259. void bnx2x_set_client_config(struct bnx2x *bp);
  260. /**
  261. * Handle sp events
  262. *
  263. * @param fp fastpath handle for the event
  264. * @param rr_cqe eth_rx_cqe
  265. */
  266. void bnx2x_sp_event(struct bnx2x_fastpath *fp, union eth_rx_cqe *rr_cqe);
  267. static inline void bnx2x_update_fpsb_idx(struct bnx2x_fastpath *fp)
  268. {
  269. struct host_status_block *fpsb = fp->status_blk;
  270. barrier(); /* status block is written to by the chip */
  271. fp->fp_c_idx = fpsb->c_status_block.status_block_index;
  272. fp->fp_u_idx = fpsb->u_status_block.status_block_index;
  273. }
  274. static inline void bnx2x_update_rx_prod(struct bnx2x *bp,
  275. struct bnx2x_fastpath *fp,
  276. u16 bd_prod, u16 rx_comp_prod,
  277. u16 rx_sge_prod)
  278. {
  279. struct ustorm_eth_rx_producers rx_prods = {0};
  280. int i;
  281. /* Update producers */
  282. rx_prods.bd_prod = bd_prod;
  283. rx_prods.cqe_prod = rx_comp_prod;
  284. rx_prods.sge_prod = rx_sge_prod;
  285. /*
  286. * Make sure that the BD and SGE data is updated before updating the
  287. * producers since FW might read the BD/SGE right after the producer
  288. * is updated.
  289. * This is only applicable for weak-ordered memory model archs such
  290. * as IA-64. The following barrier is also mandatory since FW will
  291. * assumes BDs must have buffers.
  292. */
  293. wmb();
  294. for (i = 0; i < sizeof(struct ustorm_eth_rx_producers)/4; i++)
  295. REG_WR(bp, BAR_USTRORM_INTMEM +
  296. USTORM_RX_PRODS_OFFSET(BP_PORT(bp), fp->cl_id) + i*4,
  297. ((u32 *)&rx_prods)[i]);
  298. mmiowb(); /* keep prod updates ordered */
  299. DP(NETIF_MSG_RX_STATUS,
  300. "queue[%d]: wrote bd_prod %u cqe_prod %u sge_prod %u\n",
  301. fp->index, bd_prod, rx_comp_prod, rx_sge_prod);
  302. }
  303. static inline void bnx2x_ack_sb(struct bnx2x *bp, u8 sb_id,
  304. u8 storm, u16 index, u8 op, u8 update)
  305. {
  306. u32 hc_addr = (HC_REG_COMMAND_REG + BP_PORT(bp)*32 +
  307. COMMAND_REG_INT_ACK);
  308. struct igu_ack_register igu_ack;
  309. igu_ack.status_block_index = index;
  310. igu_ack.sb_id_and_flags =
  311. ((sb_id << IGU_ACK_REGISTER_STATUS_BLOCK_ID_SHIFT) |
  312. (storm << IGU_ACK_REGISTER_STORM_ID_SHIFT) |
  313. (update << IGU_ACK_REGISTER_UPDATE_INDEX_SHIFT) |
  314. (op << IGU_ACK_REGISTER_INTERRUPT_MODE_SHIFT));
  315. DP(BNX2X_MSG_OFF, "write 0x%08x to HC addr 0x%x\n",
  316. (*(u32 *)&igu_ack), hc_addr);
  317. REG_WR(bp, hc_addr, (*(u32 *)&igu_ack));
  318. /* Make sure that ACK is written */
  319. mmiowb();
  320. barrier();
  321. }
  322. static inline u16 bnx2x_ack_int(struct bnx2x *bp)
  323. {
  324. u32 hc_addr = (HC_REG_COMMAND_REG + BP_PORT(bp)*32 +
  325. COMMAND_REG_SIMD_MASK);
  326. u32 result = REG_RD(bp, hc_addr);
  327. DP(BNX2X_MSG_OFF, "read 0x%08x from HC addr 0x%x\n",
  328. result, hc_addr);
  329. return result;
  330. }
  331. /*
  332. * fast path service functions
  333. */
  334. static inline int bnx2x_has_tx_work_unload(struct bnx2x_fastpath *fp)
  335. {
  336. /* Tell compiler that consumer and producer can change */
  337. barrier();
  338. return (fp->tx_pkt_prod != fp->tx_pkt_cons);
  339. }
  340. static inline u16 bnx2x_tx_avail(struct bnx2x_fastpath *fp)
  341. {
  342. s16 used;
  343. u16 prod;
  344. u16 cons;
  345. prod = fp->tx_bd_prod;
  346. cons = fp->tx_bd_cons;
  347. /* NUM_TX_RINGS = number of "next-page" entries
  348. It will be used as a threshold */
  349. used = SUB_S16(prod, cons) + (s16)NUM_TX_RINGS;
  350. #ifdef BNX2X_STOP_ON_ERROR
  351. WARN_ON(used < 0);
  352. WARN_ON(used > fp->bp->tx_ring_size);
  353. WARN_ON((fp->bp->tx_ring_size - used) > MAX_TX_AVAIL);
  354. #endif
  355. return (s16)(fp->bp->tx_ring_size) - used;
  356. }
  357. static inline int bnx2x_has_tx_work(struct bnx2x_fastpath *fp)
  358. {
  359. u16 hw_cons;
  360. /* Tell compiler that status block fields can change */
  361. barrier();
  362. hw_cons = le16_to_cpu(*fp->tx_cons_sb);
  363. return hw_cons != fp->tx_pkt_cons;
  364. }
  365. static inline void bnx2x_free_rx_sge(struct bnx2x *bp,
  366. struct bnx2x_fastpath *fp, u16 index)
  367. {
  368. struct sw_rx_page *sw_buf = &fp->rx_page_ring[index];
  369. struct page *page = sw_buf->page;
  370. struct eth_rx_sge *sge = &fp->rx_sge_ring[index];
  371. /* Skip "next page" elements */
  372. if (!page)
  373. return;
  374. dma_unmap_page(&bp->pdev->dev, dma_unmap_addr(sw_buf, mapping),
  375. SGE_PAGE_SIZE*PAGES_PER_SGE, PCI_DMA_FROMDEVICE);
  376. __free_pages(page, PAGES_PER_SGE_SHIFT);
  377. sw_buf->page = NULL;
  378. sge->addr_hi = 0;
  379. sge->addr_lo = 0;
  380. }
  381. static inline void bnx2x_free_rx_sge_range(struct bnx2x *bp,
  382. struct bnx2x_fastpath *fp, int last)
  383. {
  384. int i;
  385. for (i = 0; i < last; i++)
  386. bnx2x_free_rx_sge(bp, fp, i);
  387. }
  388. static inline int bnx2x_alloc_rx_sge(struct bnx2x *bp,
  389. struct bnx2x_fastpath *fp, u16 index)
  390. {
  391. struct page *page = alloc_pages(GFP_ATOMIC, PAGES_PER_SGE_SHIFT);
  392. struct sw_rx_page *sw_buf = &fp->rx_page_ring[index];
  393. struct eth_rx_sge *sge = &fp->rx_sge_ring[index];
  394. dma_addr_t mapping;
  395. if (unlikely(page == NULL))
  396. return -ENOMEM;
  397. mapping = dma_map_page(&bp->pdev->dev, page, 0,
  398. SGE_PAGE_SIZE*PAGES_PER_SGE, DMA_FROM_DEVICE);
  399. if (unlikely(dma_mapping_error(&bp->pdev->dev, mapping))) {
  400. __free_pages(page, PAGES_PER_SGE_SHIFT);
  401. return -ENOMEM;
  402. }
  403. sw_buf->page = page;
  404. dma_unmap_addr_set(sw_buf, mapping, mapping);
  405. sge->addr_hi = cpu_to_le32(U64_HI(mapping));
  406. sge->addr_lo = cpu_to_le32(U64_LO(mapping));
  407. return 0;
  408. }
  409. static inline int bnx2x_alloc_rx_skb(struct bnx2x *bp,
  410. struct bnx2x_fastpath *fp, u16 index)
  411. {
  412. struct sk_buff *skb;
  413. struct sw_rx_bd *rx_buf = &fp->rx_buf_ring[index];
  414. struct eth_rx_bd *rx_bd = &fp->rx_desc_ring[index];
  415. dma_addr_t mapping;
  416. skb = netdev_alloc_skb(bp->dev, bp->rx_buf_size);
  417. if (unlikely(skb == NULL))
  418. return -ENOMEM;
  419. mapping = dma_map_single(&bp->pdev->dev, skb->data, bp->rx_buf_size,
  420. DMA_FROM_DEVICE);
  421. if (unlikely(dma_mapping_error(&bp->pdev->dev, mapping))) {
  422. dev_kfree_skb(skb);
  423. return -ENOMEM;
  424. }
  425. rx_buf->skb = skb;
  426. dma_unmap_addr_set(rx_buf, mapping, mapping);
  427. rx_bd->addr_hi = cpu_to_le32(U64_HI(mapping));
  428. rx_bd->addr_lo = cpu_to_le32(U64_LO(mapping));
  429. return 0;
  430. }
  431. /* note that we are not allocating a new skb,
  432. * we are just moving one from cons to prod
  433. * we are not creating a new mapping,
  434. * so there is no need to check for dma_mapping_error().
  435. */
  436. static inline void bnx2x_reuse_rx_skb(struct bnx2x_fastpath *fp,
  437. struct sk_buff *skb, u16 cons, u16 prod)
  438. {
  439. struct bnx2x *bp = fp->bp;
  440. struct sw_rx_bd *cons_rx_buf = &fp->rx_buf_ring[cons];
  441. struct sw_rx_bd *prod_rx_buf = &fp->rx_buf_ring[prod];
  442. struct eth_rx_bd *cons_bd = &fp->rx_desc_ring[cons];
  443. struct eth_rx_bd *prod_bd = &fp->rx_desc_ring[prod];
  444. dma_sync_single_for_device(&bp->pdev->dev,
  445. dma_unmap_addr(cons_rx_buf, mapping),
  446. RX_COPY_THRESH, DMA_FROM_DEVICE);
  447. prod_rx_buf->skb = cons_rx_buf->skb;
  448. dma_unmap_addr_set(prod_rx_buf, mapping,
  449. dma_unmap_addr(cons_rx_buf, mapping));
  450. *prod_bd = *cons_bd;
  451. }
  452. static inline void bnx2x_clear_sge_mask_next_elems(struct bnx2x_fastpath *fp)
  453. {
  454. int i, j;
  455. for (i = 1; i <= NUM_RX_SGE_PAGES; i++) {
  456. int idx = RX_SGE_CNT * i - 1;
  457. for (j = 0; j < 2; j++) {
  458. SGE_MASK_CLEAR_BIT(fp, idx);
  459. idx--;
  460. }
  461. }
  462. }
  463. static inline void bnx2x_init_sge_ring_bit_mask(struct bnx2x_fastpath *fp)
  464. {
  465. /* Set the mask to all 1-s: it's faster to compare to 0 than to 0xf-s */
  466. memset(fp->sge_mask, 0xff,
  467. (NUM_RX_SGE >> RX_SGE_MASK_ELEM_SHIFT)*sizeof(u64));
  468. /* Clear the two last indices in the page to 1:
  469. these are the indices that correspond to the "next" element,
  470. hence will never be indicated and should be removed from
  471. the calculations. */
  472. bnx2x_clear_sge_mask_next_elems(fp);
  473. }
  474. static inline void bnx2x_free_tpa_pool(struct bnx2x *bp,
  475. struct bnx2x_fastpath *fp, int last)
  476. {
  477. int i;
  478. for (i = 0; i < last; i++) {
  479. struct sw_rx_bd *rx_buf = &(fp->tpa_pool[i]);
  480. struct sk_buff *skb = rx_buf->skb;
  481. if (skb == NULL) {
  482. DP(NETIF_MSG_IFDOWN, "tpa bin %d empty on free\n", i);
  483. continue;
  484. }
  485. if (fp->tpa_state[i] == BNX2X_TPA_START)
  486. dma_unmap_single(&bp->pdev->dev,
  487. dma_unmap_addr(rx_buf, mapping),
  488. bp->rx_buf_size, DMA_FROM_DEVICE);
  489. dev_kfree_skb(skb);
  490. rx_buf->skb = NULL;
  491. }
  492. }
  493. static inline void bnx2x_init_tx_ring(struct bnx2x *bp)
  494. {
  495. int i, j;
  496. for_each_queue(bp, j) {
  497. struct bnx2x_fastpath *fp = &bp->fp[j];
  498. for (i = 1; i <= NUM_TX_RINGS; i++) {
  499. struct eth_tx_next_bd *tx_next_bd =
  500. &fp->tx_desc_ring[TX_DESC_CNT * i - 1].next_bd;
  501. tx_next_bd->addr_hi =
  502. cpu_to_le32(U64_HI(fp->tx_desc_mapping +
  503. BCM_PAGE_SIZE*(i % NUM_TX_RINGS)));
  504. tx_next_bd->addr_lo =
  505. cpu_to_le32(U64_LO(fp->tx_desc_mapping +
  506. BCM_PAGE_SIZE*(i % NUM_TX_RINGS)));
  507. }
  508. fp->tx_db.data.header.header = DOORBELL_HDR_DB_TYPE;
  509. fp->tx_db.data.zero_fill1 = 0;
  510. fp->tx_db.data.prod = 0;
  511. fp->tx_pkt_prod = 0;
  512. fp->tx_pkt_cons = 0;
  513. fp->tx_bd_prod = 0;
  514. fp->tx_bd_cons = 0;
  515. fp->tx_cons_sb = BNX2X_TX_SB_INDEX;
  516. fp->tx_pkt = 0;
  517. }
  518. }
  519. static inline int bnx2x_has_rx_work(struct bnx2x_fastpath *fp)
  520. {
  521. u16 rx_cons_sb;
  522. /* Tell compiler that status block fields can change */
  523. barrier();
  524. rx_cons_sb = le16_to_cpu(*fp->rx_cons_sb);
  525. if ((rx_cons_sb & MAX_RCQ_DESC_CNT) == MAX_RCQ_DESC_CNT)
  526. rx_cons_sb++;
  527. return (fp->rx_comp_cons != rx_cons_sb);
  528. }
  529. /* HW Lock for shared dual port PHYs */
  530. void bnx2x_acquire_phy_lock(struct bnx2x *bp);
  531. void bnx2x_release_phy_lock(struct bnx2x *bp);
  532. void bnx2x_link_report(struct bnx2x *bp);
  533. int bnx2x_rx_int(struct bnx2x_fastpath *fp, int budget);
  534. int bnx2x_tx_int(struct bnx2x_fastpath *fp);
  535. void bnx2x_init_rx_rings(struct bnx2x *bp);
  536. netdev_tx_t bnx2x_start_xmit(struct sk_buff *skb, struct net_device *dev);
  537. int bnx2x_change_mac_addr(struct net_device *dev, void *p);
  538. void bnx2x_tx_timeout(struct net_device *dev);
  539. void bnx2x_vlan_rx_register(struct net_device *dev, struct vlan_group *vlgrp);
  540. void bnx2x_netif_start(struct bnx2x *bp);
  541. void bnx2x_netif_stop(struct bnx2x *bp, int disable_hw);
  542. void bnx2x_free_irq(struct bnx2x *bp, bool disable_only);
  543. int bnx2x_suspend(struct pci_dev *pdev, pm_message_t state);
  544. int bnx2x_resume(struct pci_dev *pdev);
  545. void bnx2x_free_skbs(struct bnx2x *bp);
  546. int bnx2x_change_mtu(struct net_device *dev, int new_mtu);
  547. int bnx2x_nic_unload(struct bnx2x *bp, int unload_mode);
  548. int bnx2x_nic_load(struct bnx2x *bp, int load_mode);
  549. int bnx2x_set_power_state(struct bnx2x *bp, pci_power_t state);
  550. #endif /* BNX2X_CMN_H */