linux/drivers/net/ethernet/alacritech/slicoss.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Driver for Gigabit Ethernet adapters based on the Session Layer
 * Interface (SLIC) technology by Alacritech. The driver does not
 * support the hardware acceleration features provided by these cards.
 *
 * Copyright (C) 2016 Lino Sanfilippo <[email protected]>
 */

#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/if_ether.h>
#include <linux/crc32.h>
#include <linux/dma-mapping.h>
#include <linux/ethtool.h>
#include <linux/mii.h>
#include <linux/interrupt.h>
#include <linux/delay.h>
#include <linux/firmware.h>
#include <linux/list.h>
#include <linux/u64_stats_sync.h>

#include "slic.h"

#define DRV_NAME

static const struct pci_device_id slic_id_tbl[] =;

static const char slic_stats_strings[][ETH_GSTRING_LEN] =;

static inline int slic_next_queue_idx(unsigned int idx, unsigned int qlen)
{}

static inline int slic_get_free_queue_descs(unsigned int put_idx,
					    unsigned int done_idx,
					    unsigned int qlen)
{}

static unsigned int slic_next_compl_idx(struct slic_device *sdev)
{}

static unsigned int slic_get_free_tx_descs(struct slic_tx_queue *txq)
{}

static unsigned int slic_get_free_rx_descs(struct slic_rx_queue *rxq)
{}

static void slic_clear_upr_list(struct slic_upr_list *upr_list)
{}

static void slic_start_upr(struct slic_device *sdev, struct slic_upr *upr)
{}

static void slic_queue_upr(struct slic_device *sdev, struct slic_upr *upr)
{}

static struct slic_upr *slic_dequeue_upr(struct slic_device *sdev)
{}

static int slic_new_upr(struct slic_device *sdev, unsigned int type,
			dma_addr_t paddr)
{}

static void slic_set_mcast_bit(u64 *mcmask, unsigned char const *addr)
{}

/* must be called with link_lock held */
static void slic_configure_rcv(struct slic_device *sdev)
{}

/* must be called with link_lock held */
static void slic_configure_xmt(struct slic_device *sdev)
{}

/* must be called with link_lock held */
static void slic_configure_mac(struct slic_device *sdev)
{}

static void slic_configure_link_locked(struct slic_device *sdev, int speed,
				       unsigned int duplex)
{}

static void slic_configure_link(struct slic_device *sdev, int speed,
				unsigned int duplex)
{}

static void slic_set_rx_mode(struct net_device *dev)
{}

static void slic_xmit_complete(struct slic_device *sdev)
{}

static void slic_refill_rx_queue(struct slic_device *sdev, gfp_t gfp)
{}

static void slic_handle_frame_error(struct slic_device *sdev,
				    struct sk_buff *skb)
{}

static void slic_handle_receive(struct slic_device *sdev, unsigned int todo,
				unsigned int *done)
{}

static void slic_handle_link_irq(struct slic_device *sdev)
{}

static void slic_handle_upr_irq(struct slic_device *sdev, u32 irqs)
{}

static int slic_handle_link_change(struct slic_device *sdev)
{}

static void slic_handle_err_irq(struct slic_device *sdev, u32 isr)
{}

static void slic_handle_irq(struct slic_device *sdev, u32 isr,
			    unsigned int todo, unsigned int *done)
{}

static int slic_poll(struct napi_struct *napi, int todo)
{}

static irqreturn_t slic_irq(int irq, void *dev_id)
{}

static void slic_card_reset(struct slic_device *sdev)
{}

static int slic_init_stat_queue(struct slic_device *sdev)
{}

static void slic_free_stat_queue(struct slic_device *sdev)
{}

static int slic_init_tx_queue(struct slic_device *sdev)
{}

static void slic_free_tx_queue(struct slic_device *sdev)
{}

static int slic_init_rx_queue(struct slic_device *sdev)
{}

static void slic_free_rx_queue(struct slic_device *sdev)
{}

static void slic_set_link_autoneg(struct slic_device *sdev)
{}

static void slic_set_mac_address(struct slic_device *sdev)
{}

static u32 slic_read_dword_from_firmware(const struct firmware *fw, int *offset)
{}

MODULE_FIRMWARE();
MODULE_FIRMWARE();

static int slic_load_rcvseq_firmware(struct slic_device *sdev)
{}

MODULE_FIRMWARE();
MODULE_FIRMWARE();

static int slic_load_firmware(struct slic_device *sdev)
{}

static int slic_init_shmem(struct slic_device *sdev)
{}

static void slic_free_shmem(struct slic_device *sdev)
{}

static int slic_init_iface(struct slic_device *sdev)
{}

static int slic_open(struct net_device *dev)
{}

static int slic_close(struct net_device *dev)
{}

static netdev_tx_t slic_xmit(struct sk_buff *skb, struct net_device *dev)
{}

static void slic_get_stats(struct net_device *dev,
			   struct rtnl_link_stats64 *lst)
{}

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

static void slic_get_ethtool_stats(struct net_device *dev,
				   struct ethtool_stats *eth_stats, u64 *data)
{}

static void slic_get_strings(struct net_device *dev, u32 stringset, u8 *data)
{}

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

static const struct ethtool_ops slic_ethtool_ops =;

static const struct net_device_ops slic_netdev_ops =;

static u16 slic_eeprom_csum(unsigned char *eeprom, unsigned int len)
{}

/* check eeprom size, magic and checksum */
static bool slic_eeprom_valid(unsigned char *eeprom, unsigned int size)
{}

static int slic_read_eeprom(struct slic_device *sdev)
{}

static int slic_init(struct slic_device *sdev)
{}

static bool slic_is_fiber(unsigned short subdev)
{}

static void slic_configure_pci(struct pci_dev *pdev)
{}

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

static void slic_remove(struct pci_dev *pdev)
{}

static struct pci_driver slic_driver =;

module_pci_driver();

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