#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/skbuff.h>
#include <linux/pci.h>
#include <linux/errno.h>
#include <linux/types.h>
#include <linux/string.h>
#include <linux/delay.h>
#include <linux/init.h>
#include <linux/mm.h>
#include <linux/sched.h>
#include <linux/timer.h>
#include <linux/interrupt.h>
#include <linux/dma-mapping.h>
#include <linux/bitmap.h>
#include <linux/slab.h>
#include <asm/io.h>
#include <asm/byteorder.h>
#include <linux/uaccess.h>
#include <linux/atmdev.h>
#include <linux/atm.h>
#include <linux/sonet.h>
#undef USE_SCATTERGATHER
#undef USE_CHECKSUM_HW
#include "he.h"
#include "suni.h"
#include <linux/atm_he.h>
#define hprintk(fmt,args...) …
#ifdef HE_DEBUG
#define HPRINTK …
#else
#define HPRINTK(fmt,args...) …
#endif
static int he_open(struct atm_vcc *vcc);
static void he_close(struct atm_vcc *vcc);
static int he_send(struct atm_vcc *vcc, struct sk_buff *skb);
static int he_ioctl(struct atm_dev *dev, unsigned int cmd, void __user *arg);
static irqreturn_t he_irq_handler(int irq, void *dev_id);
static void he_tasklet(unsigned long data);
static int he_proc_read(struct atm_dev *dev,loff_t *pos,char *page);
static int he_start(struct atm_dev *dev);
static void he_stop(struct he_dev *dev);
static void he_phy_put(struct atm_dev *, unsigned char, unsigned long);
static unsigned char he_phy_get(struct atm_dev *, unsigned long);
static u8 read_prom_byte(struct he_dev *he_dev, int addr);
static struct he_dev *he_devs;
static bool disable64;
static short nvpibits = …;
static short nvcibits = …;
static short rx_skb_reserve = …;
static bool irq_coalesce = …;
static bool sdh;
static unsigned int readtab[] = …;
static unsigned int clocktab[] = …;
static const struct atmdev_ops he_ops = …;
#define he_writel(dev, val, reg) …
#define he_readl(dev, reg) …
static __inline__ void
he_writel_internal(struct he_dev *he_dev, unsigned val, unsigned addr,
unsigned flags)
{ … }
#define he_writel_rcm(dev, val, reg) …
#define he_writel_tcm(dev, val, reg) …
#define he_writel_mbox(dev, val, reg) …
static unsigned
he_readl_internal(struct he_dev *he_dev, unsigned addr, unsigned flags)
{ … }
#define he_readl_rcm(dev, reg) …
#define he_readl_tcm(dev, reg) …
#define he_readl_mbox(dev, reg) …
#define he_mkcid(dev, vpi, vci) …
#define he_writel_tsr0(dev, val, cid) …
#define he_readl_tsr0(dev, cid) …
#define he_writel_tsr1(dev, val, cid) …
#define he_writel_tsr2(dev, val, cid) …
#define he_writel_tsr3(dev, val, cid) …
#define he_writel_tsr4(dev, val, cid) …
#define he_writel_tsr4_upper(dev, val, cid) …
#define he_readl_tsr4(dev, cid) …
#define he_writel_tsr5(dev, val, cid) …
#define he_writel_tsr6(dev, val, cid) …
#define he_writel_tsr7(dev, val, cid) …
#define he_writel_tsr8(dev, val, cid) …
#define he_writel_tsr9(dev, val, cid) …
#define he_writel_tsr10(dev, val, cid) …
#define he_writel_tsr11(dev, val, cid) …
#define he_writel_tsr12(dev, val, cid) …
#define he_writel_tsr13(dev, val, cid) …
#define he_writel_tsr14(dev, val, cid) …
#define he_writel_tsr14_upper(dev, val, cid) …
#define he_writel_rsr0(dev, val, cid) …
#define he_readl_rsr0(dev, cid) …
#define he_writel_rsr1(dev, val, cid) …
#define he_writel_rsr2(dev, val, cid) …
#define he_writel_rsr3(dev, val, cid) …
#define he_writel_rsr4(dev, val, cid) …
#define he_writel_rsr5(dev, val, cid) …
#define he_writel_rsr6(dev, val, cid) …
#define he_writel_rsr7(dev, val, cid) …
static __inline__ struct atm_vcc*
__find_vcc(struct he_dev *he_dev, unsigned cid)
{ … }
static int he_init_one(struct pci_dev *pci_dev,
const struct pci_device_id *pci_ent)
{ … }
static void he_remove_one(struct pci_dev *pci_dev)
{ … }
static unsigned
rate_to_atmf(unsigned rate)
{ … }
static void he_init_rx_lbfp0(struct he_dev *he_dev)
{ … }
static void he_init_rx_lbfp1(struct he_dev *he_dev)
{ … }
static void he_init_tx_lbfp(struct he_dev *he_dev)
{ … }
static int he_init_tpdrq(struct he_dev *he_dev)
{ … }
static void he_init_cs_block(struct he_dev *he_dev)
{ … }
static int he_init_cs_block_rcm(struct he_dev *he_dev)
{ … }
static int he_init_group(struct he_dev *he_dev, int group)
{ … }
static int he_init_irq(struct he_dev *he_dev)
{ … }
static int he_start(struct atm_dev *dev)
{ … }
static void
he_stop(struct he_dev *he_dev)
{ … }
static struct he_tpd *
__alloc_tpd(struct he_dev *he_dev)
{ … }
#define AAL5_LEN(buf,len) …
#define TCP_CKSUM(buf,len) …
static int
he_service_rbrq(struct he_dev *he_dev, int group)
{ … }
static void
he_service_tbrq(struct he_dev *he_dev, int group)
{ … }
static void
he_service_rbpl(struct he_dev *he_dev, int group)
{ … }
static void
he_tasklet(unsigned long data)
{ … }
static irqreturn_t
he_irq_handler(int irq, void *dev_id)
{ … }
static __inline__ void
__enqueue_tpd(struct he_dev *he_dev, struct he_tpd *tpd, unsigned cid)
{ … }
static int
he_open(struct atm_vcc *vcc)
{ … }
static void
he_close(struct atm_vcc *vcc)
{ … }
static int
he_send(struct atm_vcc *vcc, struct sk_buff *skb)
{ … }
static int
he_ioctl(struct atm_dev *atm_dev, unsigned int cmd, void __user *arg)
{ … }
static void
he_phy_put(struct atm_dev *atm_dev, unsigned char val, unsigned long addr)
{ … }
static unsigned char
he_phy_get(struct atm_dev *atm_dev, unsigned long addr)
{ … }
static int
he_proc_read(struct atm_dev *dev, loff_t *pos, char *page)
{ … }
static u8 read_prom_byte(struct he_dev *he_dev, int addr)
{ … }
MODULE_LICENSE(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
module_param(disable64, bool, 0);
MODULE_PARM_DESC(…) …;
module_param(nvpibits, short, 0);
MODULE_PARM_DESC(…) …;
module_param(nvcibits, short, 0);
MODULE_PARM_DESC(…) …;
module_param(rx_skb_reserve, short, 0);
MODULE_PARM_DESC(…) …;
module_param(irq_coalesce, bool, 0);
MODULE_PARM_DESC(…) …;
module_param(sdh, bool, 0);
MODULE_PARM_DESC(…) …;
static const struct pci_device_id he_pci_tbl[] = …;
MODULE_DEVICE_TABLE(pci, he_pci_tbl);
static struct pci_driver he_driver = …;
module_pci_driver(…) …;