#define pr_fmt(fmt) …
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/ethtool.h>
#include <linux/ks8842.h>
#include <linux/dmaengine.h>
#include <linux/dma-mapping.h>
#include <linux/scatterlist.h>
#define DRV_NAME …
#define REG_TIMB_RST …
#define REG_TIMB_FIFO …
#define REG_TIMB_ISR …
#define REG_TIMB_IER …
#define REG_TIMB_IAR …
#define REQ_TIMB_DMA_RESUME …
#define REG_SELECT_BANK …
#define REG_QRFCR …
#define REG_MARL …
#define REG_MARM …
#define REG_MARH …
#define REG_GRR …
#define REG_TXCR …
#define REG_TXSR …
#define REG_RXCR …
#define REG_TXMIR …
#define REG_RXMIR …
#define REG_TXQCR …
#define REG_RXQCR …
#define REG_TXFDPR …
#define REG_RXFDPR …
#define REG_QMU_DATA_LO …
#define REG_QMU_DATA_HI …
#define REG_IER …
#define IRQ_LINK_CHANGE …
#define IRQ_TX …
#define IRQ_RX …
#define IRQ_RX_OVERRUN …
#define IRQ_TX_STOPPED …
#define IRQ_RX_STOPPED …
#define IRQ_RX_ERROR …
#define ENABLED_IRQS …
#define ENABLED_IRQS_DMA_IP …
#define ENABLED_IRQS_DMA …
#define REG_ISR …
#define REG_RXSR …
#define RXSR_VALID …
#define RXSR_BROADCAST …
#define RXSR_MULTICAST …
#define RXSR_UNICAST …
#define RXSR_FRAMETYPE …
#define RXSR_TOO_LONG …
#define RXSR_RUNT …
#define RXSR_CRC_ERROR …
#define RXSR_ERROR …
#define REG_SW_ID_AND_ENABLE …
#define REG_SGCR1 …
#define REG_SGCR2 …
#define REG_SGCR3 …
#define REG_MACAR1 …
#define REG_MACAR2 …
#define REG_MACAR3 …
#define REG_P1MBCR …
#define REG_P1MBSR …
#define REG_P2MBCR …
#define REG_P2MBSR …
#define REG_P1CR2 …
#define REG_P1CR4 …
#define REG_P1SR …
#define MICREL_KS884X …
#define KS884X_16BIT …
#define DMA_BUFFER_SIZE …
struct ks8842_tx_dma_ctl { … };
struct ks8842_rx_dma_ctl { … };
#define KS8842_USE_DMA(adapter) …
struct ks8842_adapter { … };
static void ks8842_dma_rx_cb(void *data);
static void ks8842_dma_tx_cb(void *data);
static inline void ks8842_resume_dma(struct ks8842_adapter *adapter)
{ … }
static inline void ks8842_select_bank(struct ks8842_adapter *adapter, u16 bank)
{ … }
static inline void ks8842_write8(struct ks8842_adapter *adapter, u16 bank,
u8 value, int offset)
{ … }
static inline void ks8842_write16(struct ks8842_adapter *adapter, u16 bank,
u16 value, int offset)
{ … }
static inline void ks8842_enable_bits(struct ks8842_adapter *adapter, u16 bank,
u16 bits, int offset)
{ … }
static inline void ks8842_clear_bits(struct ks8842_adapter *adapter, u16 bank,
u16 bits, int offset)
{ … }
static inline void ks8842_write32(struct ks8842_adapter *adapter, u16 bank,
u32 value, int offset)
{ … }
static inline u8 ks8842_read8(struct ks8842_adapter *adapter, u16 bank,
int offset)
{ … }
static inline u16 ks8842_read16(struct ks8842_adapter *adapter, u16 bank,
int offset)
{ … }
static inline u32 ks8842_read32(struct ks8842_adapter *adapter, u16 bank,
int offset)
{ … }
static void ks8842_reset(struct ks8842_adapter *adapter)
{ … }
static void ks8842_update_link_status(struct net_device *netdev,
struct ks8842_adapter *adapter)
{ … }
static void ks8842_enable_tx(struct ks8842_adapter *adapter)
{ … }
static void ks8842_disable_tx(struct ks8842_adapter *adapter)
{ … }
static void ks8842_enable_rx(struct ks8842_adapter *adapter)
{ … }
static void ks8842_disable_rx(struct ks8842_adapter *adapter)
{ … }
static void ks8842_reset_hw(struct ks8842_adapter *adapter)
{ … }
static void ks8842_init_mac_addr(struct ks8842_adapter *adapter)
{ … }
static void ks8842_write_mac_addr(struct ks8842_adapter *adapter, const u8 *mac)
{ … }
static inline u16 ks8842_tx_fifo_space(struct ks8842_adapter *adapter)
{ … }
static int ks8842_tx_frame_dma(struct sk_buff *skb, struct net_device *netdev)
{ … }
static int ks8842_tx_frame(struct sk_buff *skb, struct net_device *netdev)
{ … }
static void ks8842_update_rx_err_counters(struct net_device *netdev, u32 status)
{ … }
static void ks8842_update_rx_counters(struct net_device *netdev, u32 status,
int len)
{ … }
static int __ks8842_start_new_rx_dma(struct net_device *netdev)
{ … }
static void ks8842_rx_frame_dma_tasklet(struct tasklet_struct *t)
{ … }
static void ks8842_rx_frame(struct net_device *netdev,
struct ks8842_adapter *adapter)
{ … }
static void ks8842_handle_rx(struct net_device *netdev,
struct ks8842_adapter *adapter)
{ … }
static void ks8842_handle_tx(struct net_device *netdev,
struct ks8842_adapter *adapter)
{ … }
static void ks8842_handle_rx_overrun(struct net_device *netdev,
struct ks8842_adapter *adapter)
{ … }
static void ks8842_tasklet(struct tasklet_struct *t)
{ … }
static irqreturn_t ks8842_irq(int irq, void *devid)
{ … }
static void ks8842_dma_rx_cb(void *data)
{ … }
static void ks8842_dma_tx_cb(void *data)
{ … }
static void ks8842_stop_dma(struct ks8842_adapter *adapter)
{ … }
static void ks8842_dealloc_dma_bufs(struct ks8842_adapter *adapter)
{ … }
static bool ks8842_dma_filter_fn(struct dma_chan *chan, void *filter_param)
{ … }
static int ks8842_alloc_dma_bufs(struct net_device *netdev)
{ … }
static int ks8842_open(struct net_device *netdev)
{ … }
static int ks8842_close(struct net_device *netdev)
{ … }
static netdev_tx_t ks8842_xmit_frame(struct sk_buff *skb,
struct net_device *netdev)
{ … }
static int ks8842_set_mac(struct net_device *netdev, void *p)
{ … }
static void ks8842_tx_timeout_work(struct work_struct *work)
{ … }
static void ks8842_tx_timeout(struct net_device *netdev, unsigned int txqueue)
{ … }
static const struct net_device_ops ks8842_netdev_ops = …;
static const struct ethtool_ops ks8842_ethtool_ops = …;
static int ks8842_probe(struct platform_device *pdev)
{ … }
static void ks8842_remove(struct platform_device *pdev)
{ … }
static struct platform_driver ks8842_platform_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;