#include <linux/platform_device.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/phy.h>
#include <linux/slab.h>
#include <linux/interrupt.h>
#include <linux/of_mdio.h>
#include <linux/of_net.h>
#include <linux/if_ether.h>
#include <linux/if_vlan.h>
#include <net/dst.h>
#include "octeon-ethernet.h"
#include "ethernet-defines.h"
#include "ethernet-mem.h"
#include "ethernet-rx.h"
#include "ethernet-tx.h"
#include "ethernet-mdio.h"
#include "ethernet-util.h"
#define OCTEON_MAX_MTU …
static int num_packet_buffers = …;
module_param(num_packet_buffers, int, 0444);
MODULE_PARM_DESC(…) …;
static int pow_receive_group = …;
module_param(pow_receive_group, int, 0444);
MODULE_PARM_DESC(…) …;
static int receive_group_order;
module_param(receive_group_order, int, 0444);
MODULE_PARM_DESC(…) …;
int pow_send_group = …;
module_param(pow_send_group, int, 0644);
MODULE_PARM_DESC(…) …;
int always_use_pow;
module_param(always_use_pow, int, 0444);
MODULE_PARM_DESC(…) …;
char pow_send_list[128] = …;
module_param_string(…);
MODULE_PARM_DESC(…) …;
int rx_napi_weight = …;
module_param(rx_napi_weight, int, 0444);
MODULE_PARM_DESC(…) …;
int pow_receive_groups;
atomic_t cvm_oct_poll_queue_stopping = …;
struct net_device *cvm_oct_device[TOTAL_NUMBER_OF_PORTS];
u64 cvm_oct_tx_poll_interval;
static void cvm_oct_rx_refill_worker(struct work_struct *work);
static DECLARE_DELAYED_WORK(cvm_oct_rx_refill_work, cvm_oct_rx_refill_worker);
static void cvm_oct_rx_refill_worker(struct work_struct *work)
{ … }
static void cvm_oct_periodic_worker(struct work_struct *work)
{ … }
static void cvm_oct_configure_common_hw(void)
{ … }
int cvm_oct_free_work(void *work_queue_entry)
{ … }
EXPORT_SYMBOL(…);
static struct net_device_stats *cvm_oct_common_get_stats(struct net_device *dev)
{ … }
static int cvm_oct_common_change_mtu(struct net_device *dev, int new_mtu)
{ … }
static void cvm_oct_common_set_multicast_list(struct net_device *dev)
{ … }
static int cvm_oct_set_mac_filter(struct net_device *dev)
{ … }
static int cvm_oct_common_set_mac_address(struct net_device *dev, void *addr)
{ … }
int cvm_oct_common_init(struct net_device *dev)
{ … }
void cvm_oct_common_uninit(struct net_device *dev)
{ … }
int cvm_oct_common_open(struct net_device *dev,
void (*link_poll)(struct net_device *))
{ … }
void cvm_oct_link_poll(struct net_device *dev)
{ … }
static int cvm_oct_xaui_open(struct net_device *dev)
{ … }
static const struct net_device_ops cvm_oct_npi_netdev_ops = …;
static const struct net_device_ops cvm_oct_xaui_netdev_ops = …;
static const struct net_device_ops cvm_oct_sgmii_netdev_ops = …;
static const struct net_device_ops cvm_oct_spi_netdev_ops = …;
static const struct net_device_ops cvm_oct_rgmii_netdev_ops = …;
static const struct net_device_ops cvm_oct_pow_netdev_ops = …;
static struct device_node *cvm_oct_of_get_child
(const struct device_node *parent, int reg_val)
{ … }
static struct device_node *cvm_oct_node_for_port(struct device_node *pip,
int interface, int port)
{ … }
static void cvm_set_rgmii_delay(struct octeon_ethernet *priv, int iface,
int port)
{ … }
static int cvm_oct_probe(struct platform_device *pdev)
{ … }
static void cvm_oct_remove(struct platform_device *pdev)
{ … }
static const struct of_device_id cvm_oct_match[] = …;
MODULE_DEVICE_TABLE(of, cvm_oct_match);
static struct platform_driver cvm_oct_driver = …;
module_platform_driver(…) …;
MODULE_SOFTDEP(…) …;
MODULE_LICENSE(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;