linux/drivers/net/ethernet/broadcom/bnx2.c

/* bnx2.c: QLogic bnx2 network driver.
 *
 * Copyright (c) 2004-2014 Broadcom Corporation
 * Copyright (c) 2014-2015 QLogic Corporation
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation.
 *
 * Written by: Michael Chan  ([email protected])
 */

#define pr_fmt(fmt)

#include <linux/module.h>
#include <linux/moduleparam.h>

#include <linux/stringify.h>
#include <linux/kernel.h>
#include <linux/timer.h>
#include <linux/errno.h>
#include <linux/ioport.h>
#include <linux/slab.h>
#include <linux/vmalloc.h>
#include <linux/interrupt.h>
#include <linux/pci.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/skbuff.h>
#include <linux/dma-mapping.h>
#include <linux/bitops.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <linux/delay.h>
#include <asm/byteorder.h>
#include <asm/page.h>
#include <linux/time.h>
#include <linux/ethtool.h>
#include <linux/mii.h>
#include <linux/if.h>
#include <linux/if_vlan.h>
#include <net/ip.h>
#include <net/tcp.h>
#include <net/checksum.h>
#include <linux/workqueue.h>
#include <linux/crc32.h>
#include <linux/prefetch.h>
#include <linux/cache.h>
#include <linux/firmware.h>
#include <linux/log2.h>
#include <linux/crash_dump.h>

#if IS_ENABLED(CONFIG_CNIC)
#define BCM_CNIC
#include "cnic_if.h"
#endif
#include "bnx2.h"
#include "bnx2_fw.h"

#define DRV_MODULE_NAME
#define FW_MIPS_FILE_06
#define FW_RV2P_FILE_06
#define FW_MIPS_FILE_09
#define FW_RV2P_FILE_09_Ax
#define FW_RV2P_FILE_09

#define RUN_AT(x)

/* Time in jiffies before concluding the transmitter is hung. */
#define TX_TIMEOUT

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();

static int disable_msi =;

module_param(disable_msi, int, 0444);
MODULE_PARM_DESC();

board_t;

/* indexed by board_t, above */
static struct {} board_info[] =;

static const struct pci_device_id bnx2_pci_tbl[] =;

static const struct flash_spec flash_table[] =;

static const struct flash_spec flash_5709 =;

MODULE_DEVICE_TABLE(pci, bnx2_pci_tbl);

static void bnx2_init_napi(struct bnx2 *bp);
static void bnx2_del_napi(struct bnx2 *bp);

static inline u32 bnx2_tx_avail(struct bnx2 *bp, struct bnx2_tx_ring_info *txr)
{}

static u32
bnx2_reg_rd_ind(struct bnx2 *bp, u32 offset)
{}

static void
bnx2_reg_wr_ind(struct bnx2 *bp, u32 offset, u32 val)
{}

static void
bnx2_shmem_wr(struct bnx2 *bp, u32 offset, u32 val)
{}

static u32
bnx2_shmem_rd(struct bnx2 *bp, u32 offset)
{}

static void
bnx2_ctx_wr(struct bnx2 *bp, u32 cid_addr, u32 offset, u32 val)
{}

#ifdef BCM_CNIC
static int
bnx2_drv_ctl(struct net_device *dev, struct drv_ctl_info *info)
{}

static void bnx2_setup_cnic_irq_info(struct bnx2 *bp)
{}

static int bnx2_register_cnic(struct net_device *dev, struct cnic_ops *ops,
			      void *data)
{}

static int bnx2_unregister_cnic(struct net_device *dev)
{}

static struct cnic_eth_dev *bnx2_cnic_probe(struct net_device *dev)
{}

static void
bnx2_cnic_stop(struct bnx2 *bp)
{}

static void
bnx2_cnic_start(struct bnx2 *bp)
{}

#else

static void
bnx2_cnic_stop(struct bnx2 *bp)
{
}

static void
bnx2_cnic_start(struct bnx2 *bp)
{
}

#endif

static int
bnx2_read_phy(struct bnx2 *bp, u32 reg, u32 *val)
{}

static int
bnx2_write_phy(struct bnx2 *bp, u32 reg, u32 val)
{}

static void
bnx2_disable_int(struct bnx2 *bp)
{}

static void
bnx2_enable_int(struct bnx2 *bp)
{}

static void
bnx2_disable_int_sync(struct bnx2 *bp)
{}

static void
bnx2_napi_disable(struct bnx2 *bp)
{}

static void
bnx2_napi_enable(struct bnx2 *bp)
{}

static void
bnx2_netif_stop(struct bnx2 *bp, bool stop_cnic)
{}

static void
bnx2_netif_start(struct bnx2 *bp, bool start_cnic)
{}

static void
bnx2_free_tx_mem(struct bnx2 *bp)
{}

static void
bnx2_free_rx_mem(struct bnx2 *bp)
{}

static int
bnx2_alloc_tx_mem(struct bnx2 *bp)
{}

static int
bnx2_alloc_rx_mem(struct bnx2 *bp)
{}

static void
bnx2_free_stats_blk(struct net_device *dev)
{}

static int
bnx2_alloc_stats_blk(struct net_device *dev)
{}

static void
bnx2_free_mem(struct bnx2 *bp)
{}

static int
bnx2_alloc_mem(struct bnx2 *bp)
{}

static void
bnx2_report_fw_link(struct bnx2 *bp)
{}

static char *
bnx2_xceiver_str(struct bnx2 *bp)
{}

static void
bnx2_report_link(struct bnx2 *bp)
{}

static void
bnx2_resolve_flow_ctrl(struct bnx2 *bp)
{}

static int
bnx2_5709s_linkup(struct bnx2 *bp)
{}

static int
bnx2_5708s_linkup(struct bnx2 *bp)
{}

static int
bnx2_5706s_linkup(struct bnx2 *bp)
{}

static int
bnx2_copper_linkup(struct bnx2 *bp)
{}

static void
bnx2_init_rx_context(struct bnx2 *bp, u32 cid)
{}

static void
bnx2_init_all_rx_contexts(struct bnx2 *bp)
{}

static void
bnx2_set_mac_link(struct bnx2 *bp)
{}

static void
bnx2_enable_bmsr1(struct bnx2 *bp)
{}

static void
bnx2_disable_bmsr1(struct bnx2 *bp)
{}

static int
bnx2_test_and_enable_2g5(struct bnx2 *bp)
{}

static int
bnx2_test_and_disable_2g5(struct bnx2 *bp)
{}

static void
bnx2_enable_forced_2g5(struct bnx2 *bp)
{}

static void
bnx2_disable_forced_2g5(struct bnx2 *bp)
{}

static void
bnx2_5706s_force_link_dn(struct bnx2 *bp, int start)
{}

static int
bnx2_set_link(struct bnx2 *bp)
{}

static int
bnx2_reset_phy(struct bnx2 *bp)
{}

static u32
bnx2_phy_get_pause_adv(struct bnx2 *bp)
{}

static int bnx2_fw_sync(struct bnx2 *, u32, int, int);

static int
bnx2_setup_remote_phy(struct bnx2 *bp, u8 port)
__releases(&bp->phy_lock)
__acquires(&bp->phy_lock)
{}

static int
bnx2_setup_serdes_phy(struct bnx2 *bp, u8 port)
__releases(&bp->phy_lock)
__acquires(&bp->phy_lock)
{}

#define ETHTOOL_ALL_FIBRE_SPEED

#define ETHTOOL_ALL_COPPER_SPEED

#define PHY_ALL_10_100_SPEED

#define PHY_ALL_1000_SPEED

static void
bnx2_set_default_remote_link(struct bnx2 *bp)
{}

static void
bnx2_set_default_link(struct bnx2 *bp)
{}

static void
bnx2_send_heart_beat(struct bnx2 *bp)
{}

static void
bnx2_remote_phy_event(struct bnx2 *bp)
{}

static int
bnx2_set_remote_link(struct bnx2 *bp)
{}

static int
bnx2_setup_copper_phy(struct bnx2 *bp)
__releases(&bp->phy_lock)
__acquires(&bp->phy_lock)
{}

static int
bnx2_setup_phy(struct bnx2 *bp, u8 port)
__releases(&bp->phy_lock)
__acquires(&bp->phy_lock)
{}

static int
bnx2_init_5709s_phy(struct bnx2 *bp, int reset_phy)
{}

static int
bnx2_init_5708s_phy(struct bnx2 *bp, int reset_phy)
{}

static int
bnx2_init_5706s_phy(struct bnx2 *bp, int reset_phy)
{}

static int
bnx2_init_copper_phy(struct bnx2 *bp, int reset_phy)
{}


static int
bnx2_init_phy(struct bnx2 *bp, int reset_phy)
__releases(&bp->phy_lock)
__acquires(&bp->phy_lock)
{}

static int
bnx2_set_mac_loopback(struct bnx2 *bp)
{}

static int bnx2_test_link(struct bnx2 *);

static int
bnx2_set_phy_loopback(struct bnx2 *bp)
{}

static void
bnx2_dump_mcp_state(struct bnx2 *bp)
{}

static int
bnx2_fw_sync(struct bnx2 *bp, u32 msg_data, int ack, int silent)
{}

static int
bnx2_init_5709_context(struct bnx2 *bp)
{}

static void
bnx2_init_context(struct bnx2 *bp)
{}

static int
bnx2_alloc_bad_rbuf(struct bnx2 *bp)
{}

static void
bnx2_set_mac_addr(struct bnx2 *bp, const u8 *mac_addr, u32 pos)
{}

static inline int
bnx2_alloc_rx_page(struct bnx2 *bp, struct bnx2_rx_ring_info *rxr, u16 index, gfp_t gfp)
{}

static void
bnx2_free_rx_page(struct bnx2 *bp, struct bnx2_rx_ring_info *rxr, u16 index)
{}

static inline int
bnx2_alloc_rx_data(struct bnx2 *bp, struct bnx2_rx_ring_info *rxr, u16 index, gfp_t gfp)
{}

static int
bnx2_phy_event_is_set(struct bnx2 *bp, struct bnx2_napi *bnapi, u32 event)
{}

static void
bnx2_phy_int(struct bnx2 *bp, struct bnx2_napi *bnapi)
{}

static inline u16
bnx2_get_hw_tx_cons(struct bnx2_napi *bnapi)
{}

static int
bnx2_tx_int(struct bnx2 *bp, struct bnx2_napi *bnapi, int budget)
{}

static void
bnx2_reuse_rx_skb_pages(struct bnx2 *bp, struct bnx2_rx_ring_info *rxr,
			struct sk_buff *skb, int count)
{}

static inline void
bnx2_reuse_rx_data(struct bnx2 *bp, struct bnx2_rx_ring_info *rxr,
		   u8 *data, u16 cons, u16 prod)
{}

static struct sk_buff *
bnx2_rx_skb(struct bnx2 *bp, struct bnx2_rx_ring_info *rxr, u8 *data,
	    unsigned int len, unsigned int hdr_len, dma_addr_t dma_addr,
	    u32 ring_idx)
{}

static inline u16
bnx2_get_hw_rx_cons(struct bnx2_napi *bnapi)
{}

static int
bnx2_rx_int(struct bnx2 *bp, struct bnx2_napi *bnapi, int budget)
{}

/* MSI ISR - The only difference between this and the INTx ISR
 * is that the MSI interrupt is always serviced.
 */
static irqreturn_t
bnx2_msi(int irq, void *dev_instance)
{}

static irqreturn_t
bnx2_msi_1shot(int irq, void *dev_instance)
{}

static irqreturn_t
bnx2_interrupt(int irq, void *dev_instance)
{}

static inline int
bnx2_has_fast_work(struct bnx2_napi *bnapi)
{}

#define STATUS_ATTN_EVENTS

static inline int
bnx2_has_work(struct bnx2_napi *bnapi)
{}

static void
bnx2_chk_missed_msi(struct bnx2 *bp)
{}

#ifdef BCM_CNIC
static void bnx2_poll_cnic(struct bnx2 *bp, struct bnx2_napi *bnapi)
{}
#endif

static void bnx2_poll_link(struct bnx2 *bp, struct bnx2_napi *bnapi)
{}

static int bnx2_poll_work(struct bnx2 *bp, struct bnx2_napi *bnapi,
			  int work_done, int budget)
{}

static int bnx2_poll_msix(struct napi_struct *napi, int budget)
{}

static int bnx2_poll(struct napi_struct *napi, int budget)
{}

/* Called with rtnl_lock from vlan functions and also netif_tx_lock
 * from set_multicast.
 */
static void
bnx2_set_rx_mode(struct net_device *dev)
{}

static int
check_fw_section(const struct firmware *fw,
		 const struct bnx2_fw_file_section *section,
		 u32 alignment, bool non_empty)
{}

static int
check_mips_fw_entry(const struct firmware *fw,
		    const struct bnx2_mips_fw_file_entry *entry)
{}

static void bnx2_release_firmware(struct bnx2 *bp)
{}

static int bnx2_request_uncached_firmware(struct bnx2 *bp)
{}

static int bnx2_request_firmware(struct bnx2 *bp)
{}

static u32
rv2p_fw_fixup(u32 rv2p_proc, int idx, u32 loc, u32 rv2p_code)
{}

static int
load_rv2p_fw(struct bnx2 *bp, u32 rv2p_proc,
	     const struct bnx2_rv2p_fw_file_entry *fw_entry)
{}

static void
load_cpu_fw(struct bnx2 *bp, const struct cpu_reg *cpu_reg,
	    const struct bnx2_mips_fw_file_entry *fw_entry)
{}

static void
bnx2_init_cpus(struct bnx2 *bp)
{}

static void
bnx2_setup_wol(struct bnx2 *bp)
{}

static int
bnx2_set_power_state(struct bnx2 *bp, pci_power_t state)
{}

static int
bnx2_acquire_nvram_lock(struct bnx2 *bp)
{}

static int
bnx2_release_nvram_lock(struct bnx2 *bp)
{}


static int
bnx2_enable_nvram_write(struct bnx2 *bp)
{}

static void
bnx2_disable_nvram_write(struct bnx2 *bp)
{}


static void
bnx2_enable_nvram_access(struct bnx2 *bp)
{}

static void
bnx2_disable_nvram_access(struct bnx2 *bp)
{}

static int
bnx2_nvram_erase_page(struct bnx2 *bp, u32 offset)
{}

static int
bnx2_nvram_read_dword(struct bnx2 *bp, u32 offset, u8 *ret_val, u32 cmd_flags)
{}


static int
bnx2_nvram_write_dword(struct bnx2 *bp, u32 offset, u8 *val, u32 cmd_flags)
{}

static int
bnx2_init_nvram(struct bnx2 *bp)
{}

static int
bnx2_nvram_read(struct bnx2 *bp, u32 offset, u8 *ret_buf,
		int buf_size)
{}

static int
bnx2_nvram_write(struct bnx2 *bp, u32 offset, u8 *data_buf,
		int buf_size)
{}

static void
bnx2_init_fw_cap(struct bnx2 *bp)
{}

static void
bnx2_setup_msix_tbl(struct bnx2 *bp)
{}

static void
bnx2_wait_dma_complete(struct bnx2 *bp)
{}


static int
bnx2_reset_chip(struct bnx2 *bp, u32 reset_code)
{}

static int
bnx2_init_chip(struct bnx2 *bp)
{}

static void
bnx2_clear_ring_states(struct bnx2 *bp)
{}

static void
bnx2_init_tx_context(struct bnx2 *bp, u32 cid, struct bnx2_tx_ring_info *txr)
{}

static void
bnx2_init_tx_ring(struct bnx2 *bp, int ring_num)
{}

static void
bnx2_init_rxbd_rings(struct bnx2_rx_bd *rx_ring[], dma_addr_t dma[],
		     u32 buf_size, int num_rings)
{}

static void
bnx2_init_rx_ring(struct bnx2 *bp, int ring_num)
{}

static void
bnx2_init_all_rings(struct bnx2 *bp)
{}

static u32 bnx2_find_max_ring(u32 ring_size, u32 max_size)
{}

static void
bnx2_set_rx_ring_size(struct bnx2 *bp, u32 size)
{}

static void
bnx2_free_tx_skbs(struct bnx2 *bp)
{}

static void
bnx2_free_rx_skbs(struct bnx2 *bp)
{}

static void
bnx2_free_skbs(struct bnx2 *bp)
{}

static int
bnx2_reset_nic(struct bnx2 *bp, u32 reset_code)
{}

static int
bnx2_init_nic(struct bnx2 *bp, int reset_phy)
{}

static int
bnx2_shutdown_chip(struct bnx2 *bp)
{}

static int
bnx2_test_registers(struct bnx2 *bp)
{}

static int
bnx2_do_mem_test(struct bnx2 *bp, u32 start, u32 size)
{}

static int
bnx2_test_memory(struct bnx2 *bp)
{}

#define BNX2_MAC_LOOPBACK
#define BNX2_PHY_LOOPBACK

static int
bnx2_run_loopback(struct bnx2 *bp, int loopback_mode)
{}

#define BNX2_MAC_LOOPBACK_FAILED
#define BNX2_PHY_LOOPBACK_FAILED
#define BNX2_LOOPBACK_FAILED

static int
bnx2_test_loopback(struct bnx2 *bp)
{}

#define NVRAM_SIZE
#define CRC32_RESIDUAL

static int
bnx2_test_nvram(struct bnx2 *bp)
{}

static int
bnx2_test_link(struct bnx2 *bp)
{}

static int
bnx2_test_intr(struct bnx2 *bp)
{}

/* Determining link for parallel detection. */
static int
bnx2_5706_serdes_has_link(struct bnx2 *bp)
{}

static void
bnx2_5706_serdes_timer(struct bnx2 *bp)
{}

static void
bnx2_5708_serdes_timer(struct bnx2 *bp)
{}

static void
bnx2_timer(struct timer_list *t)
{}

static int
bnx2_request_irq(struct bnx2 *bp)
{}

static void
__bnx2_free_irq(struct bnx2 *bp)
{}

static void
bnx2_free_irq(struct bnx2 *bp)
{}

static void
bnx2_enable_msix(struct bnx2 *bp, int msix_vecs)
{}

static int
bnx2_setup_int_mode(struct bnx2 *bp, int dis_msi)
{}

/* Called with rtnl_lock */
static int
bnx2_open(struct net_device *dev)
{}

static void
bnx2_reset_task(struct work_struct *work)
{}

#define BNX2_FTQ_ENTRY(ftq)

static void
bnx2_dump_ftq(struct bnx2 *bp)
{}

static void
bnx2_dump_state(struct bnx2 *bp)
{}

static void
bnx2_tx_timeout(struct net_device *dev, unsigned int txqueue)
{}

/* Called with netif_tx_lock.
 * bnx2_tx_int() runs without netif_tx_lock unless it needs to call
 * netif_wake_queue().
 */
static netdev_tx_t
bnx2_start_xmit(struct sk_buff *skb, struct net_device *dev)
{}

/* Called with rtnl_lock */
static int
bnx2_close(struct net_device *dev)
{}

static void
bnx2_save_stats(struct bnx2 *bp)
{}

#define GET_64BIT_NET_STATS64(ctr)

#define GET_64BIT_NET_STATS(ctr)

#define GET_32BIT_NET_STATS(ctr)

static void
bnx2_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *net_stats)
{}

/* All ethtool functions called with rtnl_lock */

static int
bnx2_get_link_ksettings(struct net_device *dev,
			struct ethtool_link_ksettings *cmd)
{}

static int
bnx2_set_link_ksettings(struct net_device *dev,
			const struct ethtool_link_ksettings *cmd)
{}

static void
bnx2_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
{}

#define BNX2_REGDUMP_LEN

static int
bnx2_get_regs_len(struct net_device *dev)
{}

static void
bnx2_get_regs(struct net_device *dev, struct ethtool_regs *regs, void *_p)
{}

static void
bnx2_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
{}

static int
bnx2_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
{}

static int
bnx2_nway_reset(struct net_device *dev)
{}

static u32
bnx2_get_link(struct net_device *dev)
{}

static int
bnx2_get_eeprom_len(struct net_device *dev)
{}

static int
bnx2_get_eeprom(struct net_device *dev, struct ethtool_eeprom *eeprom,
		u8 *eebuf)
{}

static int
bnx2_set_eeprom(struct net_device *dev, struct ethtool_eeprom *eeprom,
		u8 *eebuf)
{}

static int bnx2_get_coalesce(struct net_device *dev,
			     struct ethtool_coalesce *coal,
			     struct kernel_ethtool_coalesce *kernel_coal,
			     struct netlink_ext_ack *extack)
{}

static int bnx2_set_coalesce(struct net_device *dev,
			     struct ethtool_coalesce *coal,
			     struct kernel_ethtool_coalesce *kernel_coal,
			     struct netlink_ext_ack *extack)
{}

static void
bnx2_get_ringparam(struct net_device *dev, struct ethtool_ringparam *ering,
		   struct kernel_ethtool_ringparam *kernel_ering,
		   struct netlink_ext_ack *extack)
{}

static int
bnx2_change_ring_size(struct bnx2 *bp, u32 rx, u32 tx, bool reset_irq)
{}

static int
bnx2_set_ringparam(struct net_device *dev, struct ethtool_ringparam *ering,
		   struct kernel_ethtool_ringparam *kernel_ering,
		   struct netlink_ext_ack *extack)
{}

static void
bnx2_get_pauseparam(struct net_device *dev, struct ethtool_pauseparam *epause)
{}

static int
bnx2_set_pauseparam(struct net_device *dev, struct ethtool_pauseparam *epause)
{}

static struct {} bnx2_stats_str_arr[] =;

#define BNX2_NUM_STATS

#define STATS_OFFSET32(offset_name)

static const unsigned long bnx2_stats_offset_arr[BNX2_NUM_STATS] =;

/* stat_IfHCInBadOctets and stat_Dot3StatsCarrierSenseErrors are
 * skipped because of errata.
 */
static u8 bnx2_5706_stats_len_arr[BNX2_NUM_STATS] =;

static u8 bnx2_5708_stats_len_arr[BNX2_NUM_STATS] =;

#define BNX2_NUM_TESTS

static struct {} bnx2_tests_str_arr[BNX2_NUM_TESTS] =;

static int
bnx2_get_sset_count(struct net_device *dev, int sset)
{}

static void
bnx2_self_test(struct net_device *dev, struct ethtool_test *etest, u64 *buf)
{}

static void
bnx2_get_strings(struct net_device *dev, u32 stringset, u8 *buf)
{}

static void
bnx2_get_ethtool_stats(struct net_device *dev,
		struct ethtool_stats *stats, u64 *buf)
{}

static int
bnx2_set_phys_id(struct net_device *dev, enum ethtool_phys_id_state state)
{}

static int
bnx2_set_features(struct net_device *dev, netdev_features_t features)
{}

static void bnx2_get_channels(struct net_device *dev,
			      struct ethtool_channels *channels)
{}

static int bnx2_set_channels(struct net_device *dev,
			      struct ethtool_channels *channels)
{}

static const struct ethtool_ops bnx2_ethtool_ops =;

/* Called with rtnl_lock */
static int
bnx2_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
{}

/* Called with rtnl_lock */
static int
bnx2_change_mac_addr(struct net_device *dev, void *p)
{}

/* Called with rtnl_lock */
static int
bnx2_change_mtu(struct net_device *dev, int new_mtu)
{}

#ifdef CONFIG_NET_POLL_CONTROLLER
static void
poll_bnx2(struct net_device *dev)
{}
#endif

static void
bnx2_get_5709_media(struct bnx2 *bp)
{}

static void
bnx2_get_pci_speed(struct bnx2 *bp)
{}

static void
bnx2_read_vpd_fw_ver(struct bnx2 *bp)
{}

static int
bnx2_init_board(struct pci_dev *pdev, struct net_device *dev)
{}

static char *
bnx2_bus_string(struct bnx2 *bp, char *str)
{}

static void
bnx2_del_napi(struct bnx2 *bp)
{}

static void
bnx2_init_napi(struct bnx2 *bp)
{}

static const struct net_device_ops bnx2_netdev_ops =;

static int
bnx2_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
{}

static void
bnx2_remove_one(struct pci_dev *pdev)
{}

#ifdef CONFIG_PM_SLEEP
static int
bnx2_suspend(struct device *device)
{}

static int
bnx2_resume(struct device *device)
{}

static SIMPLE_DEV_PM_OPS(bnx2_pm_ops, bnx2_suspend, bnx2_resume);
#define BNX2_PM_OPS

#else

#define BNX2_PM_OPS

#endif /* CONFIG_PM_SLEEP */
/**
 * bnx2_io_error_detected - called when PCI error is detected
 * @pdev: Pointer to PCI device
 * @state: The current pci connection state
 *
 * This function is called after a PCI bus error affecting
 * this device has been detected.
 */
static pci_ers_result_t bnx2_io_error_detected(struct pci_dev *pdev,
					       pci_channel_state_t state)
{}

/**
 * bnx2_io_slot_reset - called after the pci bus has been reset.
 * @pdev: Pointer to PCI device
 *
 * Restart the card from scratch, as if from a cold-boot.
 */
static pci_ers_result_t bnx2_io_slot_reset(struct pci_dev *pdev)
{}

/**
 * bnx2_io_resume - called when traffic can start flowing again.
 * @pdev: Pointer to PCI device
 *
 * This callback is called when the error recovery driver tells us that
 * its OK to resume normal operation.
 */
static void bnx2_io_resume(struct pci_dev *pdev)
{}

static void bnx2_shutdown(struct pci_dev *pdev)
{}

static const struct pci_error_handlers bnx2_err_handler =;

static struct pci_driver bnx2_pci_driver =;

module_pci_driver();