#include <linux/bitops.h>
#include <linux/netdevice.h>
#include <linux/skbuff.h>
#include <linux/etherdevice.h>
#include <linux/in.h>
#include <linux/ethtool.h>
#include <linux/if_vlan.h>
#include <linux/if_ether.h>
#include <linux/ip.h>
#include <linux/prefetch.h>
#include <linux/module.h>
#include "bnad.h"
#include "bna.h"
#include "cna.h"
static DEFINE_MUTEX(bnad_fwimg_mutex);
static uint bnad_msix_disable;
module_param(bnad_msix_disable, uint, 0444);
MODULE_PARM_DESC(…) …;
static uint bnad_ioc_auto_recover = …;
module_param(bnad_ioc_auto_recover, uint, 0444);
MODULE_PARM_DESC(…) …;
static uint bna_debugfs_enable = …;
module_param(bna_debugfs_enable, uint, 0644);
MODULE_PARM_DESC(…) …;
static u32 bnad_rxqs_per_cq = …;
static atomic_t bna_id;
static const u8 bnad_bcast_addr[] __aligned(2) = …;
#define BNAD_GET_MBOX_IRQ(_bnad) …
#define BNAD_FILL_UNMAPQ_MEM_REQ(_res_info, _num, _size) …
static void
bnad_cq_cleanup(struct bnad *bnad, struct bna_ccb *ccb)
{ … }
static u32
bnad_tx_buff_unmap(struct bnad *bnad,
struct bnad_tx_unmap *unmap_q,
u32 q_depth, u32 index)
{ … }
static void
bnad_txq_cleanup(struct bnad *bnad, struct bna_tcb *tcb)
{ … }
static u32
bnad_txcmpl_process(struct bnad *bnad, struct bna_tcb *tcb)
{ … }
static u32
bnad_tx_complete(struct bnad *bnad, struct bna_tcb *tcb)
{ … }
static irqreturn_t
bnad_msix_tx(int irq, void *data)
{ … }
static inline void
bnad_rxq_alloc_uninit(struct bnad *bnad, struct bna_rcb *rcb)
{ … }
static int
bnad_rxq_alloc_init(struct bnad *bnad, struct bna_rcb *rcb)
{ … }
static inline void
bnad_rxq_cleanup_page(struct bnad *bnad, struct bnad_rx_unmap *unmap)
{ … }
static inline void
bnad_rxq_cleanup_skb(struct bnad *bnad, struct bnad_rx_unmap *unmap)
{ … }
static void
bnad_rxq_cleanup(struct bnad *bnad, struct bna_rcb *rcb)
{ … }
static u32
bnad_rxq_refill_page(struct bnad *bnad, struct bna_rcb *rcb, u32 nalloc)
{ … }
static u32
bnad_rxq_refill_skb(struct bnad *bnad, struct bna_rcb *rcb, u32 nalloc)
{ … }
static inline void
bnad_rxq_post(struct bnad *bnad, struct bna_rcb *rcb)
{ … }
#define flags_cksum_prot_mask …
#define flags_tcp4 …
#define flags_tcp6 …
#define flags_udp4 …
#define flags_udp6 …
static void
bnad_cq_drop_packet(struct bnad *bnad, struct bna_rcb *rcb,
u32 sop_ci, u32 nvecs)
{ … }
static void
bnad_cq_setup_skb_frags(struct bna_ccb *ccb, struct sk_buff *skb, u32 nvecs)
{ … }
static inline void
bnad_cq_setup_skb(struct bnad *bnad, struct sk_buff *skb,
struct bnad_rx_unmap *unmap, u32 len)
{ … }
static u32
bnad_cq_process(struct bnad *bnad, struct bna_ccb *ccb, int budget)
{ … }
static void
bnad_netif_rx_schedule_poll(struct bnad *bnad, struct bna_ccb *ccb)
{ … }
static irqreturn_t
bnad_msix_rx(int irq, void *data)
{ … }
static irqreturn_t
bnad_msix_mbox_handler(int irq, void *data)
{ … }
static irqreturn_t
bnad_isr(int irq, void *data)
{ … }
static void
bnad_enable_mbox_irq(struct bnad *bnad)
{ … }
static void
bnad_disable_mbox_irq(struct bnad *bnad)
{ … }
static void
bnad_set_netdev_perm_addr(struct bnad *bnad)
{ … }
void
bnad_cb_mbox_intr_enable(struct bnad *bnad)
{ … }
void
bnad_cb_mbox_intr_disable(struct bnad *bnad)
{ … }
void
bnad_cb_ioceth_ready(struct bnad *bnad)
{ … }
void
bnad_cb_ioceth_failed(struct bnad *bnad)
{ … }
void
bnad_cb_ioceth_disabled(struct bnad *bnad)
{ … }
static void
bnad_cb_enet_disabled(void *arg)
{ … }
void
bnad_cb_ethport_link_status(struct bnad *bnad,
enum bna_link_status link_status)
{ … }
static void
bnad_cb_tx_disabled(void *arg, struct bna_tx *tx)
{ … }
static void
bnad_cb_tcb_setup(struct bnad *bnad, struct bna_tcb *tcb)
{ … }
static void
bnad_cb_tcb_destroy(struct bnad *bnad, struct bna_tcb *tcb)
{ … }
static void
bnad_cb_ccb_setup(struct bnad *bnad, struct bna_ccb *ccb)
{ … }
static void
bnad_cb_ccb_destroy(struct bnad *bnad, struct bna_ccb *ccb)
{ … }
static void
bnad_cb_tx_stall(struct bnad *bnad, struct bna_tx *tx)
{ … }
static void
bnad_cb_tx_resume(struct bnad *bnad, struct bna_tx *tx)
{ … }
static void
bnad_tx_cleanup(struct work_struct *work)
{ … }
static void
bnad_cb_tx_cleanup(struct bnad *bnad, struct bna_tx *tx)
{ … }
static void
bnad_cb_rx_stall(struct bnad *bnad, struct bna_rx *rx)
{ … }
static void
bnad_rx_cleanup(struct work_struct *work)
{ … }
static void
bnad_cb_rx_cleanup(struct bnad *bnad, struct bna_rx *rx)
{ … }
static void
bnad_cb_rx_post(struct bnad *bnad, struct bna_rx *rx)
{ … }
static void
bnad_cb_rx_disabled(void *arg, struct bna_rx *rx)
{ … }
static void
bnad_cb_rx_mcast_add(struct bnad *bnad, struct bna_rx *rx)
{ … }
void
bnad_cb_stats_get(struct bnad *bnad, enum bna_cb_status status,
struct bna_stats *stats)
{ … }
static void
bnad_cb_enet_mtu_set(struct bnad *bnad)
{ … }
void
bnad_cb_completion(void *arg, enum bfa_status status)
{ … }
static void
bnad_mem_free(struct bnad *bnad,
struct bna_mem_info *mem_info)
{ … }
static int
bnad_mem_alloc(struct bnad *bnad,
struct bna_mem_info *mem_info)
{ … }
static void
bnad_mbox_irq_free(struct bnad *bnad)
{ … }
static int
bnad_mbox_irq_alloc(struct bnad *bnad)
{ … }
static void
bnad_txrx_irq_free(struct bnad *bnad, struct bna_intr_info *intr_info)
{ … }
static int
bnad_txrx_irq_alloc(struct bnad *bnad, enum bnad_intr_source src,
u32 txrx_id, struct bna_intr_info *intr_info)
{ … }
static void
bnad_tx_msix_unregister(struct bnad *bnad, struct bnad_tx_info *tx_info,
int num_txqs)
{ … }
static int
bnad_tx_msix_register(struct bnad *bnad, struct bnad_tx_info *tx_info,
u32 tx_id, int num_txqs)
{ … }
static void
bnad_rx_msix_unregister(struct bnad *bnad, struct bnad_rx_info *rx_info,
int num_rxps)
{ … }
static int
bnad_rx_msix_register(struct bnad *bnad, struct bnad_rx_info *rx_info,
u32 rx_id, int num_rxps)
{ … }
static void
bnad_tx_res_free(struct bnad *bnad, struct bna_res_info *res_info)
{ … }
static int
bnad_tx_res_alloc(struct bnad *bnad, struct bna_res_info *res_info,
u32 tx_id)
{ … }
static void
bnad_rx_res_free(struct bnad *bnad, struct bna_res_info *res_info)
{ … }
static int
bnad_rx_res_alloc(struct bnad *bnad, struct bna_res_info *res_info,
uint rx_id)
{ … }
static void
bnad_ioc_timeout(struct timer_list *t)
{ … }
static void
bnad_ioc_hb_check(struct timer_list *t)
{ … }
static void
bnad_iocpf_timeout(struct timer_list *t)
{ … }
static void
bnad_iocpf_sem_timeout(struct timer_list *t)
{ … }
static void
bnad_dim_timeout(struct timer_list *t)
{ … }
static void
bnad_stats_timeout(struct timer_list *t)
{ … }
void
bnad_dim_timer_start(struct bnad *bnad)
{ … }
static void
bnad_stats_timer_start(struct bnad *bnad)
{ … }
static void
bnad_stats_timer_stop(struct bnad *bnad)
{ … }
static void
bnad_netdev_mc_list_get(struct net_device *netdev, u8 *mc_list)
{ … }
static int
bnad_napi_poll_rx(struct napi_struct *napi, int budget)
{ … }
static void
bnad_napi_add(struct bnad *bnad, u32 rx_id)
{ … }
static void
bnad_napi_delete(struct bnad *bnad, u32 rx_id)
{ … }
void
bnad_destroy_tx(struct bnad *bnad, u32 tx_id)
{ … }
int
bnad_setup_tx(struct bnad *bnad, u32 tx_id)
{ … }
static void
bnad_init_rx_config(struct bnad *bnad, struct bna_rx_config *rx_config)
{ … }
static void
bnad_rx_ctrl_init(struct bnad *bnad, u32 rx_id)
{ … }
static u32
bnad_reinit_rx(struct bnad *bnad)
{ … }
void
bnad_destroy_rx(struct bnad *bnad, u32 rx_id)
{ … }
int
bnad_setup_rx(struct bnad *bnad, u32 rx_id)
{ … }
void
bnad_tx_coalescing_timeo_set(struct bnad *bnad)
{ … }
void
bnad_rx_coalescing_timeo_set(struct bnad *bnad)
{ … }
int
bnad_mac_addr_set_locked(struct bnad *bnad, const u8 *mac_addr)
{ … }
int
bnad_enable_default_bcast(struct bnad *bnad)
{ … }
void
bnad_restore_vlans(struct bnad *bnad, u32 rx_id)
{ … }
void
bnad_netdev_qstats_fill(struct bnad *bnad, struct rtnl_link_stats64 *stats)
{ … }
void
bnad_netdev_hwstats_fill(struct bnad *bnad, struct rtnl_link_stats64 *stats)
{ … }
static void
bnad_mbox_irq_sync(struct bnad *bnad)
{ … }
static int
bnad_tso_prepare(struct bnad *bnad, struct sk_buff *skb)
{ … }
static void
bnad_q_num_init(struct bnad *bnad)
{ … }
static void
bnad_q_num_adjust(struct bnad *bnad, int msix_vectors, int temp)
{ … }
static int
bnad_ioceth_disable(struct bnad *bnad)
{ … }
static int
bnad_ioceth_enable(struct bnad *bnad)
{ … }
static void
bnad_res_free(struct bnad *bnad, struct bna_res_info *res_info,
u32 res_val_max)
{ … }
static int
bnad_res_alloc(struct bnad *bnad, struct bna_res_info *res_info,
u32 res_val_max)
{ … }
static void
bnad_enable_msix(struct bnad *bnad)
{ … }
static void
bnad_disable_msix(struct bnad *bnad)
{ … }
static int
bnad_open(struct net_device *netdev)
{ … }
static int
bnad_stop(struct net_device *netdev)
{ … }
static int
bnad_txq_wi_prepare(struct bnad *bnad, struct bna_tcb *tcb,
struct sk_buff *skb, struct bna_txq_entry *txqent)
{ … }
static netdev_tx_t
bnad_start_xmit(struct sk_buff *skb, struct net_device *netdev)
{ … }
static void
bnad_get_stats64(struct net_device *netdev, struct rtnl_link_stats64 *stats)
{ … }
static void
bnad_set_rx_ucast_fltr(struct bnad *bnad)
{ … }
static void
bnad_set_rx_mcast_fltr(struct bnad *bnad)
{ … }
void
bnad_set_rx_mode(struct net_device *netdev)
{ … }
static int
bnad_set_mac_address(struct net_device *netdev, void *addr)
{ … }
static int
bnad_mtu_set(struct bnad *bnad, int frame_size)
{ … }
static int
bnad_change_mtu(struct net_device *netdev, int new_mtu)
{ … }
static int
bnad_vlan_rx_add_vid(struct net_device *netdev, __be16 proto, u16 vid)
{ … }
static int
bnad_vlan_rx_kill_vid(struct net_device *netdev, __be16 proto, u16 vid)
{ … }
static int bnad_set_features(struct net_device *dev, netdev_features_t features)
{ … }
#ifdef CONFIG_NET_POLL_CONTROLLER
static void
bnad_netpoll(struct net_device *netdev)
{ … }
#endif
static const struct net_device_ops bnad_netdev_ops = …;
static void
bnad_netdev_init(struct bnad *bnad)
{ … }
static int
bnad_init(struct bnad *bnad,
struct pci_dev *pdev, struct net_device *netdev)
{ … }
static void
bnad_uninit(struct bnad *bnad)
{ … }
static void
bnad_lock_init(struct bnad *bnad)
{ … }
static void
bnad_lock_uninit(struct bnad *bnad)
{ … }
static int
bnad_pci_init(struct bnad *bnad, struct pci_dev *pdev)
{ … }
static void
bnad_pci_uninit(struct pci_dev *pdev)
{ … }
static int
bnad_pci_probe(struct pci_dev *pdev,
const struct pci_device_id *pcidev_id)
{ … }
static void
bnad_pci_remove(struct pci_dev *pdev)
{ … }
static const struct pci_device_id bnad_pci_id_table[] = …;
MODULE_DEVICE_TABLE(pci, bnad_pci_id_table);
static struct pci_driver bnad_pci_driver = …;
static int __init
bnad_module_init(void)
{ … }
static void __exit
bnad_module_exit(void)
{ … }
module_init(…) …;
module_exit(bnad_module_exit);
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);