#define pr_fmt(fmt) …
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/ioport.h>
#include <linux/delay.h>
#include <linux/netdevice.h>
#include <linux/memblock.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include "arcdevice.h"
#include "com9026.h"
static int com90io_found(struct net_device *dev);
static void com90io_command(struct net_device *dev, int command);
static int com90io_status(struct net_device *dev);
static void com90io_setmask(struct net_device *dev, int mask);
static int com90io_reset(struct net_device *dev, int really_reset);
static void com90io_copy_to_card(struct net_device *dev, int bufnum, int offset,
void *buf, int count);
static void com90io_copy_from_card(struct net_device *dev, int bufnum,
int offset, void *buf, int count);
#define ARCNET_TOTAL_SIZE …
#undef ONE_AT_A_TIME_TX
#undef ONE_AT_A_TIME_RX
static u_char get_buffer_byte(struct net_device *dev, unsigned offset)
{ … }
#ifdef ONE_AT_A_TIME_TX
static void put_buffer_byte(struct net_device *dev, unsigned offset,
u_char datum)
{
int ioaddr = dev->base_addr;
arcnet_outb(offset >> 8, ioaddr, COM9026_REG_W_ADDR_HI);
arcnet_outb(offset & 0xff, ioaddr, COM9026_REG_W_ADDR_LO);
arcnet_outb(datum, ioaddr, COM9026_REG_RW_MEMDATA);
}
#endif
static void get_whole_buffer(struct net_device *dev, unsigned offset,
unsigned length, char *dest)
{ … }
static void put_whole_buffer(struct net_device *dev, unsigned offset,
unsigned length, char *dest)
{ … }
static int __init com90io_probe(struct net_device *dev)
{ … }
static int __init com90io_found(struct net_device *dev)
{ … }
static int com90io_reset(struct net_device *dev, int really_reset)
{ … }
static void com90io_command(struct net_device *dev, int cmd)
{ … }
static int com90io_status(struct net_device *dev)
{ … }
static void com90io_setmask(struct net_device *dev, int mask)
{ … }
static void com90io_copy_to_card(struct net_device *dev, int bufnum,
int offset, void *buf, int count)
{ … }
static void com90io_copy_from_card(struct net_device *dev, int bufnum,
int offset, void *buf, int count)
{ … }
static int io;
static int irq;
static char device[9];
module_param_hw(io, int, ioport, 0);
module_param_hw(irq, int, irq, 0);
module_param_string(…);
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
#ifndef MODULE
static int __init com90io_setup(char *s)
{ … }
__setup(…);
#endif
static struct net_device *my_dev;
static int __init com90io_init(void)
{ … }
static void __exit com90io_exit(void)
{ … }
module_init(…) …
module_exit(…)