#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/pci.h>
#include <linux/errno.h>
#include <linux/atm.h>
#include <linux/atmdev.h>
#include <linux/sonet.h>
#include <linux/skbuff.h>
#include <linux/time.h>
#include <linux/delay.h>
#include <linux/uio.h>
#include <linux/init.h>
#include <linux/atm_eni.h>
#include <linux/bitops.h>
#include <linux/slab.h>
#include <asm/io.h>
#include <linux/atomic.h>
#include <linux/uaccess.h>
#include <asm/string.h>
#include <asm/byteorder.h>
#include "tonga.h"
#include "midway.h"
#include "suni.h"
#include "eni.h"
#if 0
#define DPRINTK …
#else
#define DPRINTK(format,args...) …
#endif
#ifndef CONFIG_ATM_ENI_TUNE_BURST
#define CONFIG_ATM_ENI_BURST_TX_8W
#define CONFIG_ATM_ENI_BURST_RX_4W
#endif
#ifndef CONFIG_ATM_ENI_DEBUG
#define NULLCHECK …
#define EVENT …
static void event_dump(void)
{
}
#else
#define NULLCHECK(x) …
#define EV …
static const char *ev[EV];
static unsigned long ev_a[EV],ev_b[EV];
static int ec = …;
static void EVENT(const char *s,unsigned long a,unsigned long b)
{ … }
static void event_dump(void)
{ … }
#endif
#define NEPJOK(a0,a1,b) …
#define EEPJOK(a0,a1,b) …
#define NEPMOK(a0,d,b,c) …
#define EEPMOK(a0,d,b,c) …
static int tx_complete = …,dma_complete = …,queued = …,requeued = …,
backlogged = …,rx_enqueued = …,rx_dequeued = …,pushed = …,submitted = …,
putting = …;
static struct atm_dev *eni_boards = …;
#define eni_in(r) …
#define eni_out(v,r) …
static void dump_mem(struct eni_dev *eni_dev)
{ … }
static void dump(struct atm_dev *dev)
{ … }
static void eni_put_free(struct eni_dev *eni_dev, void __iomem *start,
unsigned long size)
{ … }
static void __iomem *eni_alloc_mem(struct eni_dev *eni_dev, unsigned long *size)
{ … }
static void eni_free_mem(struct eni_dev *eni_dev, void __iomem *start,
unsigned long size)
{ … }
#define ENI_VCC_NOS …
static void rx_ident_err(struct atm_vcc *vcc)
{ … }
static int do_rx_dma(struct atm_vcc *vcc,struct sk_buff *skb,
unsigned long skip,unsigned long size,unsigned long eff)
{ … }
static void discard(struct atm_vcc *vcc,unsigned long size)
{ … }
static int rx_aal0(struct atm_vcc *vcc)
{ … }
static int rx_aal5(struct atm_vcc *vcc)
{ … }
static inline int rx_vcc(struct atm_vcc *vcc)
{ … }
static void poll_rx(struct atm_dev *dev)
{ … }
static void get_service(struct atm_dev *dev)
{ … }
static void dequeue_rx(struct atm_dev *dev)
{ … }
static int open_rx_first(struct atm_vcc *vcc)
{ … }
static int open_rx_second(struct atm_vcc *vcc)
{ … }
static void close_rx(struct atm_vcc *vcc)
{ … }
static int start_rx(struct atm_dev *dev)
{ … }
enum enq_res { … };
static inline void put_dma(int chan,u32 *dma,int *j,dma_addr_t paddr,
u32 size)
{ … }
static enum enq_res do_tx(struct sk_buff *skb)
{ … }
static void poll_tx(struct atm_dev *dev)
{ … }
static void dequeue_tx(struct atm_dev *dev)
{ … }
static struct eni_tx *alloc_tx(struct eni_dev *eni_dev,int ubr)
{ … }
static int comp_tx(struct eni_dev *eni_dev,int *pcr,int reserved,int *pre,
int *res,int unlimited)
{ … }
static int reserve_or_set_tx(struct atm_vcc *vcc,struct atm_trafprm *txtp,
int set_rsv,int set_shp)
{ … }
static int open_tx_first(struct atm_vcc *vcc)
{ … }
static int open_tx_second(struct atm_vcc *vcc)
{ … }
static void close_tx(struct atm_vcc *vcc)
{ … }
static int start_tx(struct atm_dev *dev)
{ … }
#if 0
static void foo(void)
{
printk(KERN_INFO
"tx_complete=%d,dma_complete=%d,queued=%d,requeued=%d,sub=%d,\n"
"backlogged=%d,rx_enqueued=%d,rx_dequeued=%d,putting=%d,pushed=%d\n",
tx_complete,dma_complete,queued,requeued,submitted,backlogged,
rx_enqueued,rx_dequeued,putting,pushed);
if (eni_boards) printk(KERN_INFO "loss: %ld\n",ENI_DEV(eni_boards)->lost);
}
#endif
static void bug_int(struct atm_dev *dev,unsigned long reason)
{ … }
static irqreturn_t eni_int(int irq,void *dev_id)
{ … }
static void eni_tasklet(unsigned long data)
{ … }
static char * const media_name[] = …;
#define SET_SEPROM …
#define GET_SEPROM …
static int get_esi_asic(struct atm_dev *dev)
{ … }
#undef SET_SEPROM
#undef GET_SEPROM
static int get_esi_fpga(struct atm_dev *dev, void __iomem *base)
{ … }
static int eni_do_init(struct atm_dev *dev)
{ … }
static void eni_do_release(struct atm_dev *dev)
{ … }
static int eni_start(struct atm_dev *dev)
{ … }
static void eni_close(struct atm_vcc *vcc)
{ … }
static int eni_open(struct atm_vcc *vcc)
{ … }
static int eni_change_qos(struct atm_vcc *vcc,struct atm_qos *qos,int flgs)
{ … }
static int eni_ioctl(struct atm_dev *dev,unsigned int cmd,void __user *arg)
{ … }
static int eni_send(struct atm_vcc *vcc,struct sk_buff *skb)
{ … }
static void eni_phy_put(struct atm_dev *dev,unsigned char value,
unsigned long addr)
{ … }
static unsigned char eni_phy_get(struct atm_dev *dev,unsigned long addr)
{ … }
static int eni_proc_read(struct atm_dev *dev,loff_t *pos,char *page)
{ … }
static const struct atmdev_ops ops = …;
static int eni_init_one(struct pci_dev *pci_dev,
const struct pci_device_id *ent)
{ … }
static const struct pci_device_id eni_pci_tbl[] = …;
MODULE_DEVICE_TABLE(pci,eni_pci_tbl);
static void eni_remove_one(struct pci_dev *pdev)
{ … }
static struct pci_driver eni_driver = …;
static int __init eni_init(void)
{ … }
module_init(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;