Linux Kernel
3.7.1
|
#include <linux/types.h>
#include <linux/pci.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include "bnx2x.h"
Go to the source code of this file.
Macros | |
#define | BNX2X_PCI_FREE(x, y, size) |
#define | BNX2X_FREE(x) |
#define | BNX2X_PCI_ALLOC(x, y, size) |
#define | BNX2X_ALLOC(x, size) |
Variables | |
int | load_count [2][3] |
int | num_queues |
int | int_mode |
Definition at line 60 of file bnx2x_cmn.h.
#define BNX2X_FREE | ( | x | ) |
Definition at line 44 of file bnx2x_cmn.h.
Definition at line 52 of file bnx2x_cmn.h.
__bnx2x_link_report - report link status to OS.
: driver handle
None atomic inmlementation. Should be called under the phy_lock.
Definition at line 1048 of file bnx2x_cmn.c.
bnx2x__init_func_obj - init function object
: driver handle
Initializes the Function Object with the appropriate parameters which include a function slow path driver interface.
Definition at line 11735 of file bnx2x_main.c.
bnx2x__link_status_update - handles link status change.
: driver handle
Definition at line 2445 of file bnx2x_main.c.
bnx2x_acquire_hw_lock - acquire HW lock.
: driver handle : resource bit which was locked
Definition at line 1773 of file bnx2x_main.c.
Definition at line 947 of file bnx2x_cmn.c.
Definition at line 3644 of file bnx2x_cmn.c.
bnx2x_alloc_mem - allocate driver's memory.
: driver handle
Definition at line 7449 of file bnx2x_main.c.
bnx2x_alloc_mem_bp - allocate memories outsize main driver structure
: driver handle
Definition at line 3708 of file bnx2x_cmn.c.
int bnx2x_change_mac_addr | ( | struct net_device * | dev, |
void * | p | ||
) |
Definition at line 3331 of file bnx2x_cmn.c.
int bnx2x_change_mtu | ( | struct net_device * | dev, |
int | new_mtu | ||
) |
bnx2x_change_mtu - change mtu netdev callback
: net device : requested mtu
Definition at line 3866 of file bnx2x_cmn.c.
bnx2x_chip_cleanup - cleanup chip internals.
: driver handle : COMMON, PORT, FUNCTION : true iff link should be kept up.
Definition at line 8329 of file bnx2x_main.c.
bnx2x_chk_parity_attn - checks for parity attentions.
: driver handle : true if there was a global attention : show parity attention in syslog
Definition at line 4349 of file bnx2x_main.c.
bnx2x_clear_pf_load - clear pf load mark
: driver handle
Should be run under rtnl lock. Decrements the load counter for the current engine. Returns whether other functions are still loaded
Definition at line 3992 of file bnx2x_main.c.
int bnx2x_config_rss_pf | ( | struct bnx2x * | bp, |
struct bnx2x_rss_config_obj * | rss_obj, | ||
bool | config_hash | ||
) |
bnx2x_config_rss_pf - configure RSS parameters in a PF.
: driver handle : RSS object to use : indirection table to configure : re-configure RSS hash keys configuration
Definition at line 1740 of file bnx2x_cmn.c.
bnx2x_dcbx_init - initialize dcbx protocol.
: driver handle
Definition at line 971 of file bnx2x_dcb.c.
Definition at line 8454 of file bnx2x_main.c.
bnx2x_drv_pulse - write driver pulse to shmem
: driver handle
writes the value in bp->fw_drv_pulse_wr_seq to drv_pulse mbox in the shmem.
Definition at line 5072 of file bnx2x_main.c.
bnx2x_enable_msi - request msi mode from OS, updated internals accordingly
: driver handle
Definition at line 1497 of file bnx2x_cmn.c.
bnx2x_enable_msix - set msix configuration.
: driver handle
fills msix_table, requests vectors, updates num_queues according to number of available vectors.
Definition at line 1376 of file bnx2x_cmn.c.
netdev_features_t bnx2x_fix_features | ( | struct net_device * | dev, |
netdev_features_t | features | ||
) |
Definition at line 3890 of file bnx2x_cmn.c.
bnx2x_force_link_reset - Forces link reset, and put the PHY in reset as well.
: driver handle
Definition at line 2187 of file bnx2x_main.c.
Definition at line 3434 of file bnx2x_cmn.c.
Definition at line 1366 of file bnx2x_cmn.c.
bnx2x_free_mem - release driver's memory.
: driver handle
Definition at line 7346 of file bnx2x_main.c.
bnx2x_free_mem_bp - release memories outsize main driver structure
: driver handle
Definition at line 3697 of file bnx2x_cmn.c.
Definition at line 1311 of file bnx2x_cmn.c.
bnx2x_fw_command - send the MCP a request
: driver handle : request
request's parameter |
block until there is a reply
Definition at line 2689 of file bnx2x_main.c.
Definition at line 643 of file bnx2x_main.c.
Definition at line 3822 of file bnx2x_cmn.c.
bnx2x_get_mf_speed - calculate MF speed.
: driver handle
Takes into account current linespeed and MF configuration.
Definition at line 964 of file bnx2x_cmn.c.
bnx2x_igu_ack_sb - update IGU with current SB value
: driver handle : SB id : SB segment : SB index : SB operation : is HW update required
Definition at line 4559 of file bnx2x_main.c.
bnx2x_ilt_set_info - prepare ILT configurations.
: driver handle
Definition at line 7666 of file bnx2x_main.c.
Definition at line 1155 of file bnx2x_cmn.c.
bnx2x_initial_phy_init - initialize link parameters structure variables.
: driver handle : current mode
Definition at line 2109 of file bnx2x_main.c.
bnx2x_int_disable_sync - disable interrupts.
: driver handle : true, disable HW interrupts.
This function ensures that there are no ISRs or SP DPCs (sp_task) are running after it returns.
Definition at line 1494 of file bnx2x_main.c.
bnx2x_int_enable - enable HW interrupts.
: driver handle
Definition at line 1421 of file bnx2x_main.c.
irqreturn_t bnx2x_interrupt | ( | int | irq, |
void * | dev_instance | ||
) |
bnx2x_interrupt - non MSI-X interrupt handler
: irq number : private instance
Definition at line 1700 of file bnx2x_main.c.
bnx2x_link_report - report link status to upper layer.
: driver handle
bnx2x_link_report - report link status to OS.
: driver handle
Calls the __bnx2x_link_report() under the same locking scheme as a link/PHY state managing code to ensure a consistent link reporting.
Definition at line 1033 of file bnx2x_cmn.c.
bnx2x_link_set - configure hw according to link parameters structure.
: driver handle
Definition at line 2165 of file bnx2x_main.c.
bnx2x_link_test - query link status.
: driver handle : bool
Returns 0 if link is UP.
Definition at line 2194 of file bnx2x_main.c.
irqreturn_t bnx2x_msix_sp_int | ( | int | irq, |
void * | dev_instance | ||
) |
bnx2x_msix_sp_int - MSI-X slowpath interrupt handler
: irq number : private instance
Definition at line 5040 of file bnx2x_main.c.
Definition at line 1575 of file bnx2x_cmn.c.
Definition at line 1585 of file bnx2x_cmn.c.
bnx2x_nic_init - init driver internals.
: driver handle : COMMON, PORT or FUNCTION
Initializes:
Definition at line 5733 of file bnx2x_main.c.
Definition at line 1992 of file bnx2x_cmn.c.
Definition at line 2336 of file bnx2x_cmn.c.
Definition at line 704 of file bnx2x_main.c.
Definition at line 6246 of file bnx2x_main.c.
int bnx2x_poll | ( | struct napi_struct * | napi, |
int | budget | ||
) |
bnx2x_release_hw_lock - release HW lock.
: driver handle : resource bit which was locked
Definition at line 1822 of file bnx2x_main.c.
bnx2x_release_leader_lock - release recovery leader lock
: driver handle
Definition at line 1817 of file bnx2x_main.c.
Definition at line 955 of file bnx2x_cmn.c.
int bnx2x_reload_if_running | ( | struct net_device * | dev | ) |
Definition at line 3781 of file bnx2x_cmn.c.
Definition at line 3939 of file bnx2x_main.c.
Definition at line 3994 of file bnx2x_cmn.c.
int bnx2x_rx_int | ( | struct bnx2x_fastpath * | fp, |
int | budget | ||
) |
Definition at line 684 of file bnx2x_cmn.c.
u16 bnx2x_select_queue | ( | struct net_device * | dev, |
struct sk_buff * | skb | ||
) |
Definition at line 1591 of file bnx2x_cmn.c.
bnx2x_send_unload_done - send UNLOAD_DONE command to the MCP.
: driver handle : true iff link should be kept up
Definition at line 8254 of file bnx2x_main.c.
bnx2x_send_unload_req - request unload mode from the MCP.
: driver handle : requested function's unload mode
Return unload mode returned by the MCP: COMMON, PORT or FUNC.
Definition at line 8183 of file bnx2x_main.c.
bnx2x_set_ctx_validation - set CDU context validation values
: driver handle : context of the connection on the host memory : SW CID of the connection to be configured
Definition at line 4031 of file bnx2x_cmn.c.
bnx2x_set_eth_mac - configure eth MAC address in the HW
: driver handle : set or clear
Configures according to the value in netdev->dev_addr.
Definition at line 7595 of file bnx2x_main.c.
int bnx2x_set_features | ( | struct net_device * | dev, |
netdev_features_t | features | ||
) |
Definition at line 3904 of file bnx2x_cmn.c.
bnx2x_set_int_mode - configure interrupt mode
: driver handle
In case of MSI-X it will also try to enable MSI-X.
Definition at line 7628 of file bnx2x_main.c.
bnx2x_set_num_queues - set number of queues according to mode.
: driver handle
Definition at line 1618 of file bnx2x_cmn.c.
Definition at line 3954 of file bnx2x_main.c.
int bnx2x_set_power_state | ( | struct bnx2x * | bp, |
pci_power_t | state | ||
) |
bnx2x_set_power_state - set power state to the requested value.
: driver handle : required state D0 or D3hot
Currently only D0 and D3hot are supported.
Definition at line 2466 of file bnx2x_cmn.c.
void bnx2x_set_q_rx_mode | ( | struct bnx2x * | bp, |
u8 | cl_id, | ||
unsigned long | rx_mode_flags, | ||
unsigned long | rx_accept_flags, | ||
unsigned long | tx_accept_flags, | ||
unsigned long | ramrod_flags | ||
) |
bnx2x_set_q_rx_mode - configures rx_mode for a single queue.
: driver handle : client id : rx mode configuration : rx accept configuration : tx accept configuration (tx switch) : ramrod configuration
Definition at line 5457 of file bnx2x_main.c.
Definition at line 3860 of file bnx2x_main.c.
Definition at line 3921 of file bnx2x_main.c.
void bnx2x_set_rx_mode | ( | struct net_device * | dev | ) |
bnx2x_set_rx_mode - set MAC filtering configurations.
: netdevice
called with netif_tx_lock from dev_mcast.c If bp->state is OPEN, should be called with netif_addr_lock_bh()
Definition at line 11143 of file bnx2x_main.c.
bnx2x_set_storm_rx_mode - configure MAC filtering rules in a FW.
: driver handle
If bp->state is OPEN, should be called with netif_addr_lock_bh().
Definition at line 5496 of file bnx2x_main.c.
bnx2x_setup_leading - bring up a leading eth queue.
: driver handle
Definition at line 7616 of file bnx2x_main.c.
bnx2x_setup_queue - setup eth queue.
: driver handle : pointer to the fastpath structure : boolean
bnx2x_setup_queue - setup queue
: driver handle : pointer to fastpath : is leading
This function performs 2 steps in a Queue state machine actually: 1) RESET->INIT 2) INIT->SETUP
Definition at line 7870 of file bnx2x_main.c.
int bnx2x_setup_tc | ( | struct net_device * | dev, |
u8 | num_tc | ||
) |
bnx2x_setup_tc - routine to configure net_device for multi tc
: net device to configure : number of traffic classes to enable
callback connected to the ndo_setup_tc function pointer
Definition at line 3271 of file bnx2x_cmn.c.
void bnx2x_sp_event | ( | struct bnx2x_fastpath * | fp, |
union eth_rx_cqe * | rr_cqe | ||
) |
bnx2x_sp_event - handle ramrods completion.
: fastpath handle for the event : eth_rx_cqe
Definition at line 1595 of file bnx2x_main.c.
netdev_tx_t bnx2x_start_xmit | ( | struct sk_buff * | skb, |
struct net_device * | dev | ||
) |
Definition at line 2913 of file bnx2x_cmn.c.
int bnx2x_suspend | ( | struct pci_dev * | pdev, |
pm_message_t | state | ||
) |
Definition at line 3963 of file bnx2x_cmn.c.
Definition at line 1871 of file bnx2x_cmn.c.
int bnx2x_tx_int | ( | struct bnx2x * | bp, |
struct bnx2x_fp_txdata * | txdata | ||
) |
Definition at line 163 of file bnx2x_cmn.c.
void bnx2x_tx_timeout | ( | struct net_device * | dev | ) |
bnx2x_tx_timeout - tx timeout netdev callback
: net device
Definition at line 3946 of file bnx2x_cmn.c.
void bnx2x_update_coalesce_sb_index | ( | struct bnx2x * | bp, |
u8 | fw_sb_id, | ||
u8 | sb_index, | ||
u8 | disable, | ||
u16 | usec | ||
) |
Definition at line 4074 of file bnx2x_cmn.c.
bnx2x_update_max_mf_config - update MAX part of MF configuration in HW.
: driver handle : new value
Definition at line 1317 of file bnx2x_cmn.c.
void bnx2x_update_rx_prod | ( | struct bnx2x * | bp, |
struct bnx2x_fastpath * | fp, | ||
u16 | bd_prod, | ||
u16 | rx_comp_prod, | ||
u16 | rx_sge_prod | ||
) |
Definition at line 1691 of file bnx2x_main.c.
int int_mode |
Definition at line 109 of file bnx2x_main.c.
int load_count[2][3] |
Definition at line 89 of file bnx2x_cmn.c.
int num_queues |
Definition at line 98 of file bnx2x_main.c.