bnx2x: dump FW memory when appropriate msglvl is raised
[deliverable/linux.git] / drivers / net / bnx2x / bnx2x_cmn.h
CommitLineData
9f6c9258
DK
1/* bnx2x_cmn.h: Broadcom Everest network driver.
2 *
5de92408 3 * Copyright (c) 2007-2011 Broadcom Corporation
9f6c9258
DK
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
20#include <linux/types.h>
21#include <linux/netdevice.h>
22
23
24#include "bnx2x.h"
25
d6214d7a 26extern int num_queues;
9f6c9258 27
b3b83c3f
DK
28/************************ Macros ********************************/
29#define BNX2X_PCI_FREE(x, y, size) \
30 do { \
31 if (x) { \
32 dma_free_coherent(&bp->pdev->dev, size, (void *)x, y); \
33 x = NULL; \
34 y = 0; \
35 } \
36 } while (0)
37
38#define BNX2X_FREE(x) \
39 do { \
40 if (x) { \
41 kfree((void *)x); \
42 x = NULL; \
43 } \
44 } while (0)
45
46#define BNX2X_PCI_ALLOC(x, y, size) \
47 do { \
48 x = dma_alloc_coherent(&bp->pdev->dev, size, y, GFP_KERNEL); \
49 if (x == NULL) \
50 goto alloc_mem_err; \
51 memset((void *)x, 0, size); \
52 } while (0)
53
54#define BNX2X_ALLOC(x, size) \
55 do { \
56 x = kzalloc(size, GFP_KERNEL); \
57 if (x == NULL) \
58 goto alloc_mem_err; \
59 } while (0)
60
9f6c9258
DK
61/*********************** Interfaces ****************************
62 * Functions that need to be implemented by each driver version
63 */
64
65/**
e8920674 66 * bnx2x_initial_phy_init - initialize link parameters structure variables.
9f6c9258 67 *
e8920674
DK
68 * @bp: driver handle
69 * @load_mode: current mode
9f6c9258
DK
70 */
71u8 bnx2x_initial_phy_init(struct bnx2x *bp, int load_mode);
72
73/**
e8920674 74 * bnx2x_link_set - configure hw according to link parameters structure.
9f6c9258 75 *
e8920674 76 * @bp: driver handle
9f6c9258
DK
77 */
78void bnx2x_link_set(struct bnx2x *bp);
79
80/**
e8920674 81 * bnx2x_link_test - query link status.
9f6c9258 82 *
e8920674
DK
83 * @bp: driver handle
84 * @is_serdes: bool
9f6c9258 85 *
e8920674 86 * Returns 0 if link is UP.
9f6c9258 87 */
a22f0788 88u8 bnx2x_link_test(struct bnx2x *bp, u8 is_serdes);
9f6c9258
DK
89
90/**
e8920674 91 * bnx2x__link_status_update - handles link status change.
9f6c9258 92 *
e8920674 93 * @bp: driver handle
9f6c9258
DK
94 */
95void bnx2x__link_status_update(struct bnx2x *bp);
96
f85582f8 97/**
e8920674 98 * bnx2x_link_report - report link status to upper layer.
f85582f8 99 *
e8920674 100 * @bp: driver handle
f85582f8
DK
101 */
102void bnx2x_link_report(struct bnx2x *bp);
103
2ae17f66
VZ
104/* None-atomic version of bnx2x_link_report() */
105void __bnx2x_link_report(struct bnx2x *bp);
106
0793f83f 107/**
e8920674 108 * bnx2x_get_mf_speed - calculate MF speed.
0793f83f 109 *
e8920674 110 * @bp: driver handle
0793f83f 111 *
e8920674 112 * Takes into account current linespeed and MF configuration.
0793f83f
DK
113 */
114u16 bnx2x_get_mf_speed(struct bnx2x *bp);
115
9f6c9258 116/**
e8920674 117 * bnx2x_msix_sp_int - MSI-X slowpath interrupt handler
9f6c9258 118 *
e8920674
DK
119 * @irq: irq number
120 * @dev_instance: private instance
9f6c9258
DK
121 */
122irqreturn_t bnx2x_msix_sp_int(int irq, void *dev_instance);
123
124/**
e8920674 125 * bnx2x_interrupt - non MSI-X interrupt handler
9f6c9258 126 *
e8920674
DK
127 * @irq: irq number
128 * @dev_instance: private instance
9f6c9258
DK
129 */
130irqreturn_t bnx2x_interrupt(int irq, void *dev_instance);
131#ifdef BCM_CNIC
132
133/**
e8920674 134 * bnx2x_cnic_notify - send command to cnic driver
9f6c9258 135 *
e8920674
DK
136 * @bp: driver handle
137 * @cmd: command
9f6c9258
DK
138 */
139int bnx2x_cnic_notify(struct bnx2x *bp, int cmd);
140
141/**
e8920674 142 * bnx2x_setup_cnic_irq_info - provides cnic with IRQ information
9f6c9258 143 *
e8920674 144 * @bp: driver handle
9f6c9258
DK
145 */
146void bnx2x_setup_cnic_irq_info(struct bnx2x *bp);
147#endif
148
149/**
e8920674 150 * bnx2x_int_enable - enable HW interrupts.
9f6c9258 151 *
e8920674 152 * @bp: driver handle
9f6c9258
DK
153 */
154void bnx2x_int_enable(struct bnx2x *bp);
155
156/**
e8920674
DK
157 * bnx2x_int_disable_sync - disable interrupts.
158 *
159 * @bp: driver handle
160 * @disable_hw: true, disable HW interrupts.
9f6c9258 161 *
e8920674
DK
162 * This function ensures that there are no
163 * ISRs or SP DPCs (sp_task) are running after it returns.
9f6c9258
DK
164 */
165void bnx2x_int_disable_sync(struct bnx2x *bp, int disable_hw);
166
6891dd25 167/**
e8920674 168 * bnx2x_init_firmware - loads device firmware
6891dd25 169 *
e8920674 170 * @bp: driver handle
6891dd25
DK
171 */
172int bnx2x_init_firmware(struct bnx2x *bp);
173
9f6c9258 174/**
e8920674 175 * bnx2x_init_hw - init HW blocks according to current initialization stage.
9f6c9258 176 *
e8920674
DK
177 * @bp: driver handle
178 * @load_code: COMMON, PORT or FUNCTION
9f6c9258
DK
179 */
180int bnx2x_init_hw(struct bnx2x *bp, u32 load_code);
181
182/**
e8920674
DK
183 * bnx2x_nic_init - init driver internals.
184 *
185 * @bp: driver handle
186 * @load_code: COMMON, PORT or FUNCTION
187 *
188 * Initializes:
9f6c9258
DK
189 * - rings
190 * - status blocks
191 * - etc.
9f6c9258
DK
192 */
193void bnx2x_nic_init(struct bnx2x *bp, u32 load_code);
194
195/**
e8920674 196 * bnx2x_alloc_mem - allocate driver's memory.
9f6c9258 197 *
e8920674 198 * @bp: driver handle
9f6c9258
DK
199 */
200int bnx2x_alloc_mem(struct bnx2x *bp);
201
202/**
e8920674 203 * bnx2x_free_mem - release driver's memory.
9f6c9258 204 *
e8920674 205 * @bp: driver handle
9f6c9258
DK
206 */
207void bnx2x_free_mem(struct bnx2x *bp);
208
209/**
e8920674 210 * bnx2x_setup_client - setup eth client.
9f6c9258 211 *
e8920674
DK
212 * @bp: driver handle
213 * @fp: pointer to fastpath structure
214 * @is_leading: boolean
9f6c9258 215 */
523224a3
DK
216int bnx2x_setup_client(struct bnx2x *bp, struct bnx2x_fastpath *fp,
217 int is_leading);
9f6c9258 218
9f6c9258 219/**
e8920674 220 * bnx2x_set_num_queues - set number of queues according to mode.
9f6c9258 221 *
e8920674 222 * @bp: driver handle
9f6c9258 223 */
d6214d7a 224void bnx2x_set_num_queues(struct bnx2x *bp);
9f6c9258
DK
225
226/**
e8920674
DK
227 * bnx2x_chip_cleanup - cleanup chip internals.
228 *
229 * @bp: driver handle
230 * @unload_mode: COMMON, PORT, FUNCTION
231 *
9f6c9258 232 * - Cleanup MAC configuration.
e8920674 233 * - Closes clients.
9f6c9258 234 * - etc.
9f6c9258
DK
235 */
236void bnx2x_chip_cleanup(struct bnx2x *bp, int unload_mode);
237
238/**
e8920674 239 * bnx2x_acquire_hw_lock - acquire HW lock.
9f6c9258 240 *
e8920674
DK
241 * @bp: driver handle
242 * @resource: resource bit which was locked
9f6c9258
DK
243 */
244int bnx2x_acquire_hw_lock(struct bnx2x *bp, u32 resource);
245
246/**
e8920674 247 * bnx2x_release_hw_lock - release HW lock.
9f6c9258 248 *
e8920674
DK
249 * @bp: driver handle
250 * @resource: resource bit which was locked
9f6c9258
DK
251 */
252int bnx2x_release_hw_lock(struct bnx2x *bp, u32 resource);
253
254/**
e8920674
DK
255 * bnx2x_set_eth_mac - configure eth MAC address in the HW
256 *
257 * @bp: driver handle
258 * @set: set or clear
9f6c9258 259 *
e8920674 260 * Configures according to the value in netdev->dev_addr.
9f6c9258 261 */
523224a3 262void bnx2x_set_eth_mac(struct bnx2x *bp, int set);
9f6c9258 263
ec6ba945
VZ
264#ifdef BCM_CNIC
265/**
e8920674 266 * bnx2x_set_fip_eth_mac_addr - Set/Clear FIP MAC(s)
ec6ba945 267 *
e8920674
DK
268 * @bp: driver handle
269 * @set: set or clear the CAM entry
ec6ba945 270 *
e8920674
DK
271 * Used next enties in the CAM after the ETH MAC(s).
272 * This function will wait until the ramdord completion returns.
273 * Return 0 if cussess, -ENODEV if ramrod doesn't return.
ec6ba945
VZ
274 */
275int bnx2x_set_fip_eth_mac_addr(struct bnx2x *bp, int set);
276
277/**
e8920674 278 * bnx2x_set_all_enode_macs - Set/Clear ALL_ENODE mcast MAC.
ec6ba945 279 *
e8920674
DK
280 * @bp: driver handle
281 * @set: set or clear
ec6ba945
VZ
282 */
283int bnx2x_set_all_enode_macs(struct bnx2x *bp, int set);
284#endif
285
9f6c9258 286/**
e8920674 287 * bnx2x_set_rx_mode - set MAC filtering configurations.
9f6c9258 288 *
e8920674 289 * @dev: netdevice
9f6c9258 290 *
e8920674 291 * called with netif_tx_lock from dev_mcast.c
9f6c9258
DK
292 */
293void bnx2x_set_rx_mode(struct net_device *dev);
294
295/**
e8920674 296 * bnx2x_set_storm_rx_mode - configure MAC filtering rules in a FW.
9f6c9258 297 *
e8920674 298 * @bp: driver handle
9f6c9258
DK
299 */
300void bnx2x_set_storm_rx_mode(struct bnx2x *bp);
301
302/* Parity errors related */
303void bnx2x_inc_load_cnt(struct bnx2x *bp);
304u32 bnx2x_dec_load_cnt(struct bnx2x *bp);
305bool bnx2x_chk_parity_attn(struct bnx2x *bp);
306bool bnx2x_reset_is_done(struct bnx2x *bp);
307void bnx2x_disable_close_the_gate(struct bnx2x *bp);
308
309/**
e8920674 310 * bnx2x_stats_handle - perform statistics handling according to event.
9f6c9258 311 *
e8920674
DK
312 * @bp: driver handle
313 * @event: bnx2x_stats_event
9f6c9258
DK
314 */
315void bnx2x_stats_handle(struct bnx2x *bp, enum bnx2x_stats_event event);
316
9f6c9258 317/**
e8920674 318 * bnx2x_sp_event - handle ramrods completion.
9f6c9258 319 *
e8920674
DK
320 * @fp: fastpath handle for the event
321 * @rr_cqe: eth_rx_cqe
9f6c9258 322 */
f85582f8 323void bnx2x_sp_event(struct bnx2x_fastpath *fp, union eth_rx_cqe *rr_cqe);
9f6c9258 324
523224a3 325/**
e8920674 326 * bnx2x_func_start - init function
523224a3 327 *
e8920674 328 * @bp: driver handle
523224a3 329 *
e8920674 330 * Must be called before sending CLIENT_SETUP for the first client.
523224a3
DK
331 */
332int bnx2x_func_start(struct bnx2x *bp);
523224a3
DK
333
334/**
e8920674 335 * bnx2x_ilt_set_info - prepare ILT configurations.
523224a3 336 *
e8920674 337 * @bp: driver handle
523224a3
DK
338 */
339void bnx2x_ilt_set_info(struct bnx2x *bp);
9f6c9258 340
e4901dde 341/**
e8920674 342 * bnx2x_dcbx_init - initialize dcbx protocol.
e4901dde 343 *
e8920674 344 * @bp: driver handle
e4901dde
VZ
345 */
346void bnx2x_dcbx_init(struct bnx2x *bp);
347
f85582f8 348/**
e8920674 349 * bnx2x_set_power_state - set power state to the requested value.
f85582f8 350 *
e8920674
DK
351 * @bp: driver handle
352 * @state: required state D0 or D3hot
f85582f8 353 *
e8920674 354 * Currently only D0 and D3hot are supported.
f85582f8
DK
355 */
356int bnx2x_set_power_state(struct bnx2x *bp, pci_power_t state);
357
e3835b99 358/**
e8920674 359 * bnx2x_update_max_mf_config - update MAX part of MF configuration in HW.
e3835b99 360 *
e8920674
DK
361 * @bp: driver handle
362 * @value: new value
e3835b99
DK
363 */
364void bnx2x_update_max_mf_config(struct bnx2x *bp, u32 value);
365
7a25cc73
DK
366void bnx2x_fw_dump_lvl(struct bnx2x *bp, const char *lvl);
367
f85582f8
DK
368/* dev_close main block */
369int bnx2x_nic_unload(struct bnx2x *bp, int unload_mode);
370
371/* dev_open main block */
372int bnx2x_nic_load(struct bnx2x *bp, int load_mode);
373
374/* hard_xmit callback */
375netdev_tx_t bnx2x_start_xmit(struct sk_buff *skb, struct net_device *dev);
376
8307fa3e
VZ
377/* select_queue callback */
378u16 bnx2x_select_queue(struct net_device *dev, struct sk_buff *skb);
379
f85582f8
DK
380int bnx2x_change_mac_addr(struct net_device *dev, void *p);
381
382/* NAPI poll Rx part */
383int bnx2x_rx_int(struct bnx2x_fastpath *fp, int budget);
384
385/* NAPI poll Tx part */
386int bnx2x_tx_int(struct bnx2x_fastpath *fp);
387
388/* suspend/resume callbacks */
389int bnx2x_suspend(struct pci_dev *pdev, pm_message_t state);
390int bnx2x_resume(struct pci_dev *pdev);
391
392/* Release IRQ vectors */
393void bnx2x_free_irq(struct bnx2x *bp);
394
b3b83c3f
DK
395void bnx2x_free_fp_mem(struct bnx2x *bp);
396int bnx2x_alloc_fp_mem(struct bnx2x *bp);
397
f85582f8
DK
398void bnx2x_init_rx_rings(struct bnx2x *bp);
399void bnx2x_free_skbs(struct bnx2x *bp);
400void bnx2x_netif_stop(struct bnx2x *bp, int disable_hw);
401void bnx2x_netif_start(struct bnx2x *bp);
402
d6214d7a 403/**
e8920674 404 * bnx2x_enable_msix - set msix configuration.
d6214d7a 405 *
e8920674 406 * @bp: driver handle
d6214d7a 407 *
e8920674
DK
408 * fills msix_table, requests vectors, updates num_queues
409 * according to number of available vectors.
d6214d7a
DK
410 */
411int bnx2x_enable_msix(struct bnx2x *bp);
412
413/**
e8920674 414 * bnx2x_enable_msi - request msi mode from OS, updated internals accordingly
d6214d7a 415 *
e8920674 416 * @bp: driver handle
d6214d7a
DK
417 */
418int bnx2x_enable_msi(struct bnx2x *bp);
419
d6214d7a 420/**
e8920674 421 * bnx2x_poll - NAPI callback
d6214d7a 422 *
e8920674
DK
423 * @napi: napi structure
424 * @budget:
d6214d7a 425 *
d6214d7a
DK
426 */
427int bnx2x_poll(struct napi_struct *napi, int budget);
f85582f8
DK
428
429/**
e8920674 430 * bnx2x_alloc_mem_bp - allocate memories outsize main driver structure
f85582f8 431 *
e8920674 432 * @bp: driver handle
f85582f8
DK
433 */
434int __devinit bnx2x_alloc_mem_bp(struct bnx2x *bp);
e8920674
DK
435
436/**
437 * bnx2x_free_mem_bp - release memories outsize main driver structure
438 *
439 * @bp: driver handle
440 */
f85582f8
DK
441void bnx2x_free_mem_bp(struct bnx2x *bp);
442
443/**
e8920674 444 * bnx2x_change_mtu - change mtu netdev callback
f85582f8 445 *
e8920674
DK
446 * @dev: net device
447 * @new_mtu: requested mtu
f85582f8 448 *
f85582f8
DK
449 */
450int bnx2x_change_mtu(struct net_device *dev, int new_mtu);
451
66371c44
MM
452u32 bnx2x_fix_features(struct net_device *dev, u32 features);
453int bnx2x_set_features(struct net_device *dev, u32 features);
454
f85582f8 455/**
e8920674 456 * bnx2x_tx_timeout - tx timeout netdev callback
f85582f8 457 *
e8920674 458 * @dev: net device
f85582f8
DK
459 */
460void bnx2x_tx_timeout(struct net_device *dev);
461
9f6c9258
DK
462static inline void bnx2x_update_fpsb_idx(struct bnx2x_fastpath *fp)
463{
9f6c9258 464 barrier(); /* status block is written to by the chip */
523224a3 465 fp->fp_hc_idx = fp->sb_running_index[SM_RX_ID];
9f6c9258
DK
466}
467
468static inline void bnx2x_update_rx_prod(struct bnx2x *bp,
469 struct bnx2x_fastpath *fp,
470 u16 bd_prod, u16 rx_comp_prod,
471 u16 rx_sge_prod)
472{
473 struct ustorm_eth_rx_producers rx_prods = {0};
474 int i;
475
476 /* Update producers */
477 rx_prods.bd_prod = bd_prod;
478 rx_prods.cqe_prod = rx_comp_prod;
479 rx_prods.sge_prod = rx_sge_prod;
480
481 /*
482 * Make sure that the BD and SGE data is updated before updating the
483 * producers since FW might read the BD/SGE right after the producer
484 * is updated.
485 * This is only applicable for weak-ordered memory model archs such
486 * as IA-64. The following barrier is also mandatory since FW will
487 * assumes BDs must have buffers.
488 */
489 wmb();
490
491 for (i = 0; i < sizeof(struct ustorm_eth_rx_producers)/4; i++)
523224a3
DK
492 REG_WR(bp,
493 BAR_USTRORM_INTMEM + fp->ustorm_rx_prods_offset + i*4,
9f6c9258
DK
494 ((u32 *)&rx_prods)[i]);
495
496 mmiowb(); /* keep prod updates ordered */
497
498 DP(NETIF_MSG_RX_STATUS,
499 "queue[%d]: wrote bd_prod %u cqe_prod %u sge_prod %u\n",
500 fp->index, bd_prod, rx_comp_prod, rx_sge_prod);
501}
502
f2e0899f
DK
503static inline void bnx2x_igu_ack_sb_gen(struct bnx2x *bp, u8 igu_sb_id,
504 u8 segment, u16 index, u8 op,
505 u8 update, u32 igu_addr)
506{
507 struct igu_regular cmd_data = {0};
508
509 cmd_data.sb_id_and_flags =
510 ((index << IGU_REGULAR_SB_INDEX_SHIFT) |
511 (segment << IGU_REGULAR_SEGMENT_ACCESS_SHIFT) |
512 (update << IGU_REGULAR_BUPDATE_SHIFT) |
513 (op << IGU_REGULAR_ENABLE_INT_SHIFT));
514
515 DP(NETIF_MSG_HW, "write 0x%08x to IGU addr 0x%x\n",
516 cmd_data.sb_id_and_flags, igu_addr);
517 REG_WR(bp, igu_addr, cmd_data.sb_id_and_flags);
518
519 /* Make sure that ACK is written */
520 mmiowb();
521 barrier();
522}
523
524static inline void bnx2x_igu_clear_sb_gen(struct bnx2x *bp,
525 u8 idu_sb_id, bool is_Pf)
526{
527 u32 data, ctl, cnt = 100;
528 u32 igu_addr_data = IGU_REG_COMMAND_REG_32LSB_DATA;
529 u32 igu_addr_ctl = IGU_REG_COMMAND_REG_CTRL;
530 u32 igu_addr_ack = IGU_REG_CSTORM_TYPE_0_SB_CLEANUP + (idu_sb_id/32)*4;
531 u32 sb_bit = 1 << (idu_sb_id%32);
532 u32 func_encode = BP_FUNC(bp) |
533 ((is_Pf == true ? 1 : 0) << IGU_FID_ENCODE_IS_PF_SHIFT);
534 u32 addr_encode = IGU_CMD_E2_PROD_UPD_BASE + idu_sb_id;
535
536 /* Not supported in BC mode */
537 if (CHIP_INT_MODE_IS_BC(bp))
538 return;
539
540 data = (IGU_USE_REGISTER_cstorm_type_0_sb_cleanup
541 << IGU_REGULAR_CLEANUP_TYPE_SHIFT) |
542 IGU_REGULAR_CLEANUP_SET |
543 IGU_REGULAR_BCLEANUP;
544
545 ctl = addr_encode << IGU_CTRL_REG_ADDRESS_SHIFT |
546 func_encode << IGU_CTRL_REG_FID_SHIFT |
547 IGU_CTRL_CMD_TYPE_WR << IGU_CTRL_REG_TYPE_SHIFT;
9f6c9258 548
f2e0899f
DK
549 DP(NETIF_MSG_HW, "write 0x%08x to IGU(via GRC) addr 0x%x\n",
550 data, igu_addr_data);
551 REG_WR(bp, igu_addr_data, data);
552 mmiowb();
553 barrier();
554 DP(NETIF_MSG_HW, "write 0x%08x to IGU(via GRC) addr 0x%x\n",
555 ctl, igu_addr_ctl);
556 REG_WR(bp, igu_addr_ctl, ctl);
557 mmiowb();
558 barrier();
9f6c9258 559
f2e0899f
DK
560 /* wait for clean up to finish */
561 while (!(REG_RD(bp, igu_addr_ack) & sb_bit) && --cnt)
562 msleep(20);
563
564
565 if (!(REG_RD(bp, igu_addr_ack) & sb_bit)) {
566 DP(NETIF_MSG_HW, "Unable to finish IGU cleanup: "
567 "idu_sb_id %d offset %d bit %d (cnt %d)\n",
568 idu_sb_id, idu_sb_id/32, idu_sb_id%32, cnt);
569 }
570}
571
572static inline void bnx2x_hc_ack_sb(struct bnx2x *bp, u8 sb_id,
573 u8 storm, u16 index, u8 op, u8 update)
9f6c9258
DK
574{
575 u32 hc_addr = (HC_REG_COMMAND_REG + BP_PORT(bp)*32 +
576 COMMAND_REG_INT_ACK);
577 struct igu_ack_register igu_ack;
578
579 igu_ack.status_block_index = index;
580 igu_ack.sb_id_and_flags =
581 ((sb_id << IGU_ACK_REGISTER_STATUS_BLOCK_ID_SHIFT) |
582 (storm << IGU_ACK_REGISTER_STORM_ID_SHIFT) |
583 (update << IGU_ACK_REGISTER_UPDATE_INDEX_SHIFT) |
584 (op << IGU_ACK_REGISTER_INTERRUPT_MODE_SHIFT));
585
586 DP(BNX2X_MSG_OFF, "write 0x%08x to HC addr 0x%x\n",
587 (*(u32 *)&igu_ack), hc_addr);
588 REG_WR(bp, hc_addr, (*(u32 *)&igu_ack));
589
590 /* Make sure that ACK is written */
591 mmiowb();
592 barrier();
593}
f2e0899f
DK
594
595static inline void bnx2x_igu_ack_sb(struct bnx2x *bp, u8 igu_sb_id, u8 segment,
596 u16 index, u8 op, u8 update)
597{
598 u32 igu_addr = BAR_IGU_INTMEM + (IGU_CMD_INT_ACK_BASE + igu_sb_id)*8;
599
600 bnx2x_igu_ack_sb_gen(bp, igu_sb_id, segment, index, op, update,
601 igu_addr);
602}
603
604static inline void bnx2x_ack_sb(struct bnx2x *bp, u8 igu_sb_id, u8 storm,
605 u16 index, u8 op, u8 update)
606{
607 if (bp->common.int_block == INT_BLOCK_HC)
608 bnx2x_hc_ack_sb(bp, igu_sb_id, storm, index, op, update);
609 else {
610 u8 segment;
611
612 if (CHIP_INT_MODE_IS_BC(bp))
613 segment = storm;
614 else if (igu_sb_id != bp->igu_dsb_id)
615 segment = IGU_SEG_ACCESS_DEF;
616 else if (storm == ATTENTION_ID)
617 segment = IGU_SEG_ACCESS_ATTN;
618 else
619 segment = IGU_SEG_ACCESS_DEF;
620 bnx2x_igu_ack_sb(bp, igu_sb_id, segment, index, op, update);
621 }
622}
623
624static inline u16 bnx2x_hc_ack_int(struct bnx2x *bp)
9f6c9258
DK
625{
626 u32 hc_addr = (HC_REG_COMMAND_REG + BP_PORT(bp)*32 +
627 COMMAND_REG_SIMD_MASK);
628 u32 result = REG_RD(bp, hc_addr);
629
630 DP(BNX2X_MSG_OFF, "read 0x%08x from HC addr 0x%x\n",
631 result, hc_addr);
632
f2e0899f 633 barrier();
9f6c9258
DK
634 return result;
635}
636
f2e0899f
DK
637static inline u16 bnx2x_igu_ack_int(struct bnx2x *bp)
638{
639 u32 igu_addr = (BAR_IGU_INTMEM + IGU_REG_SISR_MDPC_WMASK_LSB_UPPER*8);
640 u32 result = REG_RD(bp, igu_addr);
641
642 DP(NETIF_MSG_HW, "read 0x%08x from IGU addr 0x%x\n",
643 result, igu_addr);
644
645 barrier();
646 return result;
647}
648
649static inline u16 bnx2x_ack_int(struct bnx2x *bp)
650{
651 barrier();
652 if (bp->common.int_block == INT_BLOCK_HC)
653 return bnx2x_hc_ack_int(bp);
654 else
655 return bnx2x_igu_ack_int(bp);
656}
657
9f6c9258
DK
658static inline int bnx2x_has_tx_work_unload(struct bnx2x_fastpath *fp)
659{
660 /* Tell compiler that consumer and producer can change */
661 barrier();
807540ba 662 return fp->tx_pkt_prod != fp->tx_pkt_cons;
9f6c9258
DK
663}
664
665static inline u16 bnx2x_tx_avail(struct bnx2x_fastpath *fp)
666{
667 s16 used;
668 u16 prod;
669 u16 cons;
670
671 prod = fp->tx_bd_prod;
672 cons = fp->tx_bd_cons;
673
674 /* NUM_TX_RINGS = number of "next-page" entries
675 It will be used as a threshold */
676 used = SUB_S16(prod, cons) + (s16)NUM_TX_RINGS;
677
678#ifdef BNX2X_STOP_ON_ERROR
679 WARN_ON(used < 0);
680 WARN_ON(used > fp->bp->tx_ring_size);
681 WARN_ON((fp->bp->tx_ring_size - used) > MAX_TX_AVAIL);
682#endif
683
684 return (s16)(fp->bp->tx_ring_size) - used;
685}
686
687static inline int bnx2x_has_tx_work(struct bnx2x_fastpath *fp)
688{
689 u16 hw_cons;
690
691 /* Tell compiler that status block fields can change */
692 barrier();
693 hw_cons = le16_to_cpu(*fp->tx_cons_sb);
694 return hw_cons != fp->tx_pkt_cons;
695}
696
523224a3
DK
697static inline int bnx2x_has_rx_work(struct bnx2x_fastpath *fp)
698{
699 u16 rx_cons_sb;
700
701 /* Tell compiler that status block fields can change */
702 barrier();
703 rx_cons_sb = le16_to_cpu(*fp->rx_cons_sb);
704 if ((rx_cons_sb & MAX_RCQ_DESC_CNT) == MAX_RCQ_DESC_CNT)
705 rx_cons_sb++;
706 return (fp->rx_comp_cons != rx_cons_sb);
707}
f85582f8 708
f2e0899f
DK
709/**
710 * disables tx from stack point of view
711 *
e8920674 712 * @bp: driver handle
f2e0899f
DK
713 */
714static inline void bnx2x_tx_disable(struct bnx2x *bp)
715{
716 netif_tx_disable(bp->dev);
717 netif_carrier_off(bp->dev);
718}
719
9f6c9258
DK
720static inline void bnx2x_free_rx_sge(struct bnx2x *bp,
721 struct bnx2x_fastpath *fp, u16 index)
722{
723 struct sw_rx_page *sw_buf = &fp->rx_page_ring[index];
724 struct page *page = sw_buf->page;
725 struct eth_rx_sge *sge = &fp->rx_sge_ring[index];
726
727 /* Skip "next page" elements */
728 if (!page)
729 return;
730
731 dma_unmap_page(&bp->pdev->dev, dma_unmap_addr(sw_buf, mapping),
4bca60f4 732 SGE_PAGE_SIZE*PAGES_PER_SGE, DMA_FROM_DEVICE);
9f6c9258
DK
733 __free_pages(page, PAGES_PER_SGE_SHIFT);
734
735 sw_buf->page = NULL;
736 sge->addr_hi = 0;
737 sge->addr_lo = 0;
738}
739
d6214d7a
DK
740static inline void bnx2x_add_all_napi(struct bnx2x *bp)
741{
742 int i;
523224a3 743
d6214d7a 744 /* Add NAPI objects */
ec6ba945 745 for_each_napi_queue(bp, i)
d6214d7a
DK
746 netif_napi_add(bp->dev, &bnx2x_fp(bp, i, napi),
747 bnx2x_poll, BNX2X_NAPI_WEIGHT);
748}
523224a3 749
d6214d7a
DK
750static inline void bnx2x_del_all_napi(struct bnx2x *bp)
751{
752 int i;
753
ec6ba945 754 for_each_napi_queue(bp, i)
d6214d7a
DK
755 netif_napi_del(&bnx2x_fp(bp, i, napi));
756}
523224a3 757
d6214d7a
DK
758static inline void bnx2x_disable_msi(struct bnx2x *bp)
759{
760 if (bp->flags & USING_MSIX_FLAG) {
761 pci_disable_msix(bp->pdev);
762 bp->flags &= ~USING_MSIX_FLAG;
763 } else if (bp->flags & USING_MSI_FLAG) {
764 pci_disable_msi(bp->pdev);
765 bp->flags &= ~USING_MSI_FLAG;
766 }
767}
768
769static inline int bnx2x_calc_num_queues(struct bnx2x *bp)
770{
771 return num_queues ?
772 min_t(int, num_queues, BNX2X_MAX_QUEUES(bp)) :
773 min_t(int, num_online_cpus(), BNX2X_MAX_QUEUES(bp));
774}
523224a3
DK
775
776static inline void bnx2x_clear_sge_mask_next_elems(struct bnx2x_fastpath *fp)
9f6c9258 777{
523224a3 778 int i, j;
9f6c9258 779
523224a3
DK
780 for (i = 1; i <= NUM_RX_SGE_PAGES; i++) {
781 int idx = RX_SGE_CNT * i - 1;
782
783 for (j = 0; j < 2; j++) {
784 SGE_MASK_CLEAR_BIT(fp, idx);
785 idx--;
786 }
787 }
788}
789
790static inline void bnx2x_init_sge_ring_bit_mask(struct bnx2x_fastpath *fp)
791{
792 /* Set the mask to all 1-s: it's faster to compare to 0 than to 0xf-s */
793 memset(fp->sge_mask, 0xff,
794 (NUM_RX_SGE >> RX_SGE_MASK_ELEM_SHIFT)*sizeof(u64));
795
796 /* Clear the two last indices in the page to 1:
797 these are the indices that correspond to the "next" element,
798 hence will never be indicated and should be removed from
799 the calculations. */
800 bnx2x_clear_sge_mask_next_elems(fp);
9f6c9258
DK
801}
802
803static inline int bnx2x_alloc_rx_sge(struct bnx2x *bp,
804 struct bnx2x_fastpath *fp, u16 index)
805{
806 struct page *page = alloc_pages(GFP_ATOMIC, PAGES_PER_SGE_SHIFT);
807 struct sw_rx_page *sw_buf = &fp->rx_page_ring[index];
808 struct eth_rx_sge *sge = &fp->rx_sge_ring[index];
809 dma_addr_t mapping;
810
811 if (unlikely(page == NULL))
812 return -ENOMEM;
813
814 mapping = dma_map_page(&bp->pdev->dev, page, 0,
815 SGE_PAGE_SIZE*PAGES_PER_SGE, DMA_FROM_DEVICE);
816 if (unlikely(dma_mapping_error(&bp->pdev->dev, mapping))) {
817 __free_pages(page, PAGES_PER_SGE_SHIFT);
818 return -ENOMEM;
819 }
820
821 sw_buf->page = page;
822 dma_unmap_addr_set(sw_buf, mapping, mapping);
823
824 sge->addr_hi = cpu_to_le32(U64_HI(mapping));
825 sge->addr_lo = cpu_to_le32(U64_LO(mapping));
826
827 return 0;
828}
f85582f8 829
9f6c9258
DK
830static inline int bnx2x_alloc_rx_skb(struct bnx2x *bp,
831 struct bnx2x_fastpath *fp, u16 index)
832{
833 struct sk_buff *skb;
834 struct sw_rx_bd *rx_buf = &fp->rx_buf_ring[index];
835 struct eth_rx_bd *rx_bd = &fp->rx_desc_ring[index];
836 dma_addr_t mapping;
837
a8c94b91 838 skb = netdev_alloc_skb(bp->dev, fp->rx_buf_size);
9f6c9258
DK
839 if (unlikely(skb == NULL))
840 return -ENOMEM;
841
a8c94b91 842 mapping = dma_map_single(&bp->pdev->dev, skb->data, fp->rx_buf_size,
9f6c9258
DK
843 DMA_FROM_DEVICE);
844 if (unlikely(dma_mapping_error(&bp->pdev->dev, mapping))) {
40955532 845 dev_kfree_skb_any(skb);
9f6c9258
DK
846 return -ENOMEM;
847 }
848
849 rx_buf->skb = skb;
850 dma_unmap_addr_set(rx_buf, mapping, mapping);
851
852 rx_bd->addr_hi = cpu_to_le32(U64_HI(mapping));
853 rx_bd->addr_lo = cpu_to_le32(U64_LO(mapping));
854
855 return 0;
856}
857
858/* note that we are not allocating a new skb,
859 * we are just moving one from cons to prod
860 * we are not creating a new mapping,
861 * so there is no need to check for dma_mapping_error().
862 */
863static inline void bnx2x_reuse_rx_skb(struct bnx2x_fastpath *fp,
749a8503 864 u16 cons, u16 prod)
9f6c9258
DK
865{
866 struct bnx2x *bp = fp->bp;
867 struct sw_rx_bd *cons_rx_buf = &fp->rx_buf_ring[cons];
868 struct sw_rx_bd *prod_rx_buf = &fp->rx_buf_ring[prod];
869 struct eth_rx_bd *cons_bd = &fp->rx_desc_ring[cons];
870 struct eth_rx_bd *prod_bd = &fp->rx_desc_ring[prod];
871
872 dma_sync_single_for_device(&bp->pdev->dev,
873 dma_unmap_addr(cons_rx_buf, mapping),
874 RX_COPY_THRESH, DMA_FROM_DEVICE);
875
876 prod_rx_buf->skb = cons_rx_buf->skb;
877 dma_unmap_addr_set(prod_rx_buf, mapping,
878 dma_unmap_addr(cons_rx_buf, mapping));
879 *prod_bd = *cons_bd;
880}
f85582f8 881
523224a3
DK
882static inline void bnx2x_free_rx_sge_range(struct bnx2x *bp,
883 struct bnx2x_fastpath *fp, int last)
9f6c9258 884{
523224a3 885 int i;
9f6c9258 886
b3b83c3f
DK
887 if (fp->disable_tpa)
888 return;
889
523224a3
DK
890 for (i = 0; i < last; i++)
891 bnx2x_free_rx_sge(bp, fp, i);
9f6c9258
DK
892}
893
9f6c9258
DK
894static inline void bnx2x_free_tpa_pool(struct bnx2x *bp,
895 struct bnx2x_fastpath *fp, int last)
896{
897 int i;
898
899 for (i = 0; i < last; i++) {
900 struct sw_rx_bd *rx_buf = &(fp->tpa_pool[i]);
901 struct sk_buff *skb = rx_buf->skb;
902
903 if (skb == NULL) {
904 DP(NETIF_MSG_IFDOWN, "tpa bin %d empty on free\n", i);
905 continue;
906 }
907
908 if (fp->tpa_state[i] == BNX2X_TPA_START)
909 dma_unmap_single(&bp->pdev->dev,
910 dma_unmap_addr(rx_buf, mapping),
a8c94b91 911 fp->rx_buf_size, DMA_FROM_DEVICE);
9f6c9258
DK
912
913 dev_kfree_skb(skb);
914 rx_buf->skb = NULL;
915 }
916}
917
b3b83c3f 918static inline void bnx2x_init_tx_ring_one(struct bnx2x_fastpath *fp)
9f6c9258 919{
b3b83c3f 920 int i;
9f6c9258 921
b3b83c3f
DK
922 for (i = 1; i <= NUM_TX_RINGS; i++) {
923 struct eth_tx_next_bd *tx_next_bd =
924 &fp->tx_desc_ring[TX_DESC_CNT * i - 1].next_bd;
9f6c9258 925
b3b83c3f
DK
926 tx_next_bd->addr_hi =
927 cpu_to_le32(U64_HI(fp->tx_desc_mapping +
928 BCM_PAGE_SIZE*(i % NUM_TX_RINGS)));
929 tx_next_bd->addr_lo =
930 cpu_to_le32(U64_LO(fp->tx_desc_mapping +
931 BCM_PAGE_SIZE*(i % NUM_TX_RINGS)));
932 }
9f6c9258 933
b3b83c3f
DK
934 SET_FLAG(fp->tx_db.data.header.header, DOORBELL_HDR_DB_TYPE, 1);
935 fp->tx_db.data.zero_fill1 = 0;
936 fp->tx_db.data.prod = 0;
9f6c9258 937
b3b83c3f
DK
938 fp->tx_pkt_prod = 0;
939 fp->tx_pkt_cons = 0;
940 fp->tx_bd_prod = 0;
941 fp->tx_bd_cons = 0;
942 fp->tx_pkt = 0;
943}
9f6c9258 944
b3b83c3f
DK
945static inline void bnx2x_init_tx_rings(struct bnx2x *bp)
946{
947 int i;
948
949 for_each_tx_queue(bp, i)
950 bnx2x_init_tx_ring_one(&bp->fp[i]);
9f6c9258 951}
f85582f8 952
523224a3 953static inline void bnx2x_set_next_page_rx_bd(struct bnx2x_fastpath *fp)
9f6c9258 954{
523224a3 955 int i;
9f6c9258 956
523224a3
DK
957 for (i = 1; i <= NUM_RX_RINGS; i++) {
958 struct eth_rx_bd *rx_bd;
959
960 rx_bd = &fp->rx_desc_ring[RX_DESC_CNT * i - 2];
961 rx_bd->addr_hi =
962 cpu_to_le32(U64_HI(fp->rx_desc_mapping +
963 BCM_PAGE_SIZE*(i % NUM_RX_RINGS)));
964 rx_bd->addr_lo =
965 cpu_to_le32(U64_LO(fp->rx_desc_mapping +
966 BCM_PAGE_SIZE*(i % NUM_RX_RINGS)));
967 }
9f6c9258
DK
968}
969
523224a3
DK
970static inline void bnx2x_set_next_page_sgl(struct bnx2x_fastpath *fp)
971{
972 int i;
973
974 for (i = 1; i <= NUM_RX_SGE_PAGES; i++) {
975 struct eth_rx_sge *sge;
976
977 sge = &fp->rx_sge_ring[RX_SGE_CNT * i - 2];
978 sge->addr_hi =
979 cpu_to_le32(U64_HI(fp->rx_sge_mapping +
980 BCM_PAGE_SIZE*(i % NUM_RX_SGE_PAGES)));
981
982 sge->addr_lo =
983 cpu_to_le32(U64_LO(fp->rx_sge_mapping +
984 BCM_PAGE_SIZE*(i % NUM_RX_SGE_PAGES)));
985 }
986}
987
988static inline void bnx2x_set_next_page_rx_cq(struct bnx2x_fastpath *fp)
989{
990 int i;
991 for (i = 1; i <= NUM_RCQ_RINGS; i++) {
992 struct eth_rx_cqe_next_page *nextpg;
993
994 nextpg = (struct eth_rx_cqe_next_page *)
995 &fp->rx_comp_ring[RCQ_DESC_CNT * i - 1];
996 nextpg->addr_hi =
997 cpu_to_le32(U64_HI(fp->rx_comp_mapping +
998 BCM_PAGE_SIZE*(i % NUM_RCQ_RINGS)));
999 nextpg->addr_lo =
1000 cpu_to_le32(U64_LO(fp->rx_comp_mapping +
1001 BCM_PAGE_SIZE*(i % NUM_RCQ_RINGS)));
1002 }
1003}
1004
b3b83c3f
DK
1005/* Returns the number of actually allocated BDs */
1006static inline int bnx2x_alloc_rx_bds(struct bnx2x_fastpath *fp,
1007 int rx_ring_size)
1008{
1009 struct bnx2x *bp = fp->bp;
1010 u16 ring_prod, cqe_ring_prod;
1011 int i;
1012
1013 fp->rx_comp_cons = 0;
1014 cqe_ring_prod = ring_prod = 0;
1015
1016 /* This routine is called only during fo init so
1017 * fp->eth_q_stats.rx_skb_alloc_failed = 0
1018 */
1019 for (i = 0; i < rx_ring_size; i++) {
1020 if (bnx2x_alloc_rx_skb(bp, fp, ring_prod) < 0) {
1021 fp->eth_q_stats.rx_skb_alloc_failed++;
1022 continue;
1023 }
1024 ring_prod = NEXT_RX_IDX(ring_prod);
1025 cqe_ring_prod = NEXT_RCQ_IDX(cqe_ring_prod);
1026 WARN_ON(ring_prod <= (i - fp->eth_q_stats.rx_skb_alloc_failed));
1027 }
1028
1029 if (fp->eth_q_stats.rx_skb_alloc_failed)
1030 BNX2X_ERR("was only able to allocate "
1031 "%d rx skbs on queue[%d]\n",
1032 (i - fp->eth_q_stats.rx_skb_alloc_failed), fp->index);
1033
1034 fp->rx_bd_prod = ring_prod;
1035 /* Limit the CQE producer by the CQE ring size */
1036 fp->rx_comp_prod = min_t(u16, NUM_RCQ_RINGS*RCQ_DESC_CNT,
1037 cqe_ring_prod);
1038 fp->rx_pkt = fp->rx_calls = 0;
1039
1040 return i - fp->eth_q_stats.rx_skb_alloc_failed;
1041}
1042
ec6ba945
VZ
1043#ifdef BCM_CNIC
1044static inline void bnx2x_init_fcoe_fp(struct bnx2x *bp)
1045{
1046 bnx2x_fcoe(bp, cl_id) = BNX2X_FCOE_ETH_CL_ID +
1047 BP_E1HVN(bp) * NONE_ETH_CONTEXT_USE;
1048 bnx2x_fcoe(bp, cid) = BNX2X_FCOE_ETH_CID;
1049 bnx2x_fcoe(bp, fw_sb_id) = DEF_SB_ID;
1050 bnx2x_fcoe(bp, igu_sb_id) = bp->igu_dsb_id;
1051 bnx2x_fcoe(bp, bp) = bp;
1052 bnx2x_fcoe(bp, state) = BNX2X_FP_STATE_CLOSED;
1053 bnx2x_fcoe(bp, index) = FCOE_IDX;
1054 bnx2x_fcoe(bp, rx_cons_sb) = BNX2X_FCOE_L2_RX_INDEX;
1055 bnx2x_fcoe(bp, tx_cons_sb) = BNX2X_FCOE_L2_TX_INDEX;
1056 /* qZone id equals to FW (per path) client id */
1057 bnx2x_fcoe(bp, cl_qzone_id) = bnx2x_fcoe(bp, cl_id) +
1058 BP_PORT(bp)*(CHIP_IS_E2(bp) ? ETH_MAX_RX_CLIENTS_E2 :
1059 ETH_MAX_RX_CLIENTS_E1H);
1060 /* init shortcut */
1061 bnx2x_fcoe(bp, ustorm_rx_prods_offset) = CHIP_IS_E2(bp) ?
1062 USTORM_RX_PRODS_E2_OFFSET(bnx2x_fcoe(bp, cl_qzone_id)) :
1063 USTORM_RX_PRODS_E1X_OFFSET(BP_PORT(bp), bnx2x_fcoe_fp(bp)->cl_id);
523224a3 1064
ec6ba945
VZ
1065}
1066#endif
523224a3 1067
1ac9e428
YR
1068int bnx2x_get_link_cfg_idx(struct bnx2x *bp);
1069
523224a3
DK
1070static inline void __storm_memset_struct(struct bnx2x *bp,
1071 u32 addr, size_t size, u32 *data)
1072{
1073 int i;
1074 for (i = 0; i < size/4; i++)
1075 REG_WR(bp, addr + (i * 4), data[i]);
1076}
1077
1078static inline void storm_memset_mac_filters(struct bnx2x *bp,
1079 struct tstorm_eth_mac_filter_config *mac_filters,
1080 u16 abs_fid)
1081{
1082 size_t size = sizeof(struct tstorm_eth_mac_filter_config);
1083
1084 u32 addr = BAR_TSTRORM_INTMEM +
1085 TSTORM_MAC_FILTER_CONFIG_OFFSET(abs_fid);
1086
1087 __storm_memset_struct(bp, addr, size, (u32 *)mac_filters);
1088}
1089
1090static inline void storm_memset_cmng(struct bnx2x *bp,
1091 struct cmng_struct_per_port *cmng,
1092 u8 port)
1093{
3b7f817e
DK
1094 size_t size =
1095 sizeof(struct rate_shaping_vars_per_port) +
1096 sizeof(struct fairness_vars_per_port) +
1097 sizeof(struct safc_struct_per_port) +
1098 sizeof(struct pfc_struct_per_port);
523224a3
DK
1099
1100 u32 addr = BAR_XSTRORM_INTMEM +
1101 XSTORM_CMNG_PER_PORT_VARS_OFFSET(port);
1102
1103 __storm_memset_struct(bp, addr, size, (u32 *)cmng);
3b7f817e
DK
1104
1105 addr += size + 4 /* SKIP DCB+LLFC */;
1106 size = sizeof(struct cmng_struct_per_port) -
1107 size /* written */ - 4 /*skipped*/;
1108
1109 __storm_memset_struct(bp, addr, size,
1110 (u32 *)(cmng->traffic_type_to_priority_cos));
523224a3 1111}
f85582f8 1112
9f6c9258
DK
1113/* HW Lock for shared dual port PHYs */
1114void bnx2x_acquire_phy_lock(struct bnx2x *bp);
1115void bnx2x_release_phy_lock(struct bnx2x *bp);
1116
faa6fcbb 1117/**
e8920674 1118 * bnx2x_extract_max_cfg - extract MAX BW part from MF configuration.
faa6fcbb 1119 *
e8920674
DK
1120 * @bp: driver handle
1121 * @mf_cfg: MF configuration
faa6fcbb 1122 *
faa6fcbb
DK
1123 */
1124static inline u16 bnx2x_extract_max_cfg(struct bnx2x *bp, u32 mf_cfg)
1125{
1126 u16 max_cfg = (mf_cfg & FUNC_MF_CFG_MAX_BW_MASK) >>
1127 FUNC_MF_CFG_MAX_BW_SHIFT;
1128 if (!max_cfg) {
1129 BNX2X_ERR("Illegal configuration detected for Max BW - "
1130 "using 100 instead\n");
1131 max_cfg = 100;
1132 }
1133 return max_cfg;
1134}
1135
9f6c9258 1136#endif /* BNX2X_CMN_H */
This page took 0.320115 seconds and 5 git commands to generate.