#define DRV_NAME …
#define TX_TIMEOUT …
#include <linux/module.h>
#include <linux/isa.h>
#include <linux/pnp.h>
#include <linux/string.h>
#include <linux/interrupt.h>
#include <linux/errno.h>
#include <linux/in.h>
#include <linux/ioport.h>
#include <linux/init.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/pm.h>
#include <linux/skbuff.h>
#include <linux/delay.h>
#include <linux/spinlock.h>
#include <linux/ethtool.h>
#include <linux/device.h>
#include <linux/eisa.h>
#include <linux/bitops.h>
#include <linux/uaccess.h>
#include <asm/io.h>
#include <asm/irq.h>
#ifdef EL3_DEBUG
static int el3_debug = EL3_DEBUG;
#else
static int el3_debug = …;
#endif
static int el3_cards = …;
#define EL3_MAX_CARDS …
#define EL3_DATA …
#define EL3_CMD …
#define EL3_STATUS …
#define EEPROM_READ …
#define EL3_IO_EXTENT …
#define EL3WINDOW(win_num) …
enum c509cmd { … };
enum c509status { … };
enum RxFilter { … };
#define TX_FIFO …
#define RX_FIFO …
#define RX_STATUS …
#define TX_STATUS …
#define TX_FREE …
#define WN0_CONF_CTRL …
#define WN0_ADDR_CONF …
#define WN0_IRQ …
#define WN4_MEDIA …
#define MEDIA_TP …
#define WN4_NETDIAG …
#define FD_ENABLE …
#define SKB_QUEUE_SIZE …
enum el3_cardtype { … };
struct el3_private { … };
static int id_port;
static int current_tag;
static struct net_device *el3_devs[EL3_MAX_CARDS];
static int debug = …;
static int irq[] = …;
static int max_interrupt_work = …;
#ifdef CONFIG_PNP
static int nopnp;
#endif
static int el3_common_init(struct net_device *dev);
static void el3_common_remove(struct net_device *dev);
static ushort id_read_eeprom(int index);
static ushort read_eeprom(int ioaddr, int index);
static int el3_open(struct net_device *dev);
static netdev_tx_t el3_start_xmit(struct sk_buff *skb, struct net_device *dev);
static irqreturn_t el3_interrupt(int irq, void *dev_id);
static void update_stats(struct net_device *dev);
static struct net_device_stats *el3_get_stats(struct net_device *dev);
static int el3_rx(struct net_device *dev);
static int el3_close(struct net_device *dev);
static void set_multicast_list(struct net_device *dev);
static void el3_tx_timeout (struct net_device *dev, unsigned int txqueue);
static void el3_down(struct net_device *dev);
static void el3_up(struct net_device *dev);
static const struct ethtool_ops ethtool_ops;
#ifdef CONFIG_PM
static int el3_suspend(struct device *, pm_message_t);
static int el3_resume(struct device *);
#else
#define el3_suspend …
#define el3_resume …
#endif
static int el3_device_remove (struct device *device);
#ifdef CONFIG_NET_POLL_CONTROLLER
static void el3_poll_controller(struct net_device *dev);
#endif
static int el3_isa_id_sequence(__be16 *phys_addr)
{ … }
static void el3_dev_fill(struct net_device *dev, __be16 *phys_addr, int ioaddr,
int irq, int if_port, enum el3_cardtype type)
{ … }
static int el3_isa_match(struct device *pdev, unsigned int ndev)
{ … }
static void el3_isa_remove(struct device *pdev,
unsigned int ndev)
{ … }
#ifdef CONFIG_PM
static int el3_isa_suspend(struct device *dev, unsigned int n,
pm_message_t state)
{ … }
static int el3_isa_resume(struct device *dev, unsigned int n)
{ … }
#endif
static struct isa_driver el3_isa_driver = …;
static int isa_registered;
#ifdef CONFIG_PNP
static const struct pnp_device_id el3_pnp_ids[] = …;
MODULE_DEVICE_TABLE(pnp, el3_pnp_ids);
static int el3_pnp_probe(struct pnp_dev *pdev, const struct pnp_device_id *id)
{ … }
static void el3_pnp_remove(struct pnp_dev *pdev)
{ … }
#ifdef CONFIG_PM
static int el3_pnp_suspend(struct pnp_dev *pdev, pm_message_t state)
{ … }
static int el3_pnp_resume(struct pnp_dev *pdev)
{ … }
#endif
static struct pnp_driver el3_pnp_driver = …;
static int pnp_registered;
#endif
#ifdef CONFIG_EISA
static const struct eisa_device_id el3_eisa_ids[] = …;
MODULE_DEVICE_TABLE(eisa, el3_eisa_ids);
static int el3_eisa_probe (struct device *device);
static struct eisa_driver el3_eisa_driver = …;
static int eisa_registered;
#endif
static const struct net_device_ops netdev_ops = …;
static int el3_common_init(struct net_device *dev)
{ … }
static void el3_common_remove (struct net_device *dev)
{ … }
#ifdef CONFIG_EISA
static int el3_eisa_probe(struct device *device)
{ … }
#endif
static int el3_device_remove(struct device *device)
{ … }
static ushort read_eeprom(int ioaddr, int index)
{ … }
static ushort id_read_eeprom(int index)
{ … }
static int
el3_open(struct net_device *dev)
{ … }
static void
el3_tx_timeout (struct net_device *dev, unsigned int txqueue)
{ … }
static netdev_tx_t
el3_start_xmit(struct sk_buff *skb, struct net_device *dev)
{ … }
static irqreturn_t
el3_interrupt(int irq, void *dev_id)
{ … }
#ifdef CONFIG_NET_POLL_CONTROLLER
static void el3_poll_controller(struct net_device *dev)
{ … }
#endif
static struct net_device_stats *
el3_get_stats(struct net_device *dev)
{ … }
static void update_stats(struct net_device *dev)
{ … }
static int
el3_rx(struct net_device *dev)
{ … }
static void
set_multicast_list(struct net_device *dev)
{ … }
static int
el3_close(struct net_device *dev)
{ … }
static int
el3_link_ok(struct net_device *dev)
{ … }
static void
el3_netdev_get_ecmd(struct net_device *dev, struct ethtool_link_ksettings *cmd)
{ … }
static int
el3_netdev_set_ecmd(struct net_device *dev,
const struct ethtool_link_ksettings *cmd)
{ … }
static void el3_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
{ … }
static int el3_get_link_ksettings(struct net_device *dev,
struct ethtool_link_ksettings *cmd)
{ … }
static int el3_set_link_ksettings(struct net_device *dev,
const struct ethtool_link_ksettings *cmd)
{ … }
static u32 el3_get_link(struct net_device *dev)
{ … }
static u32 el3_get_msglevel(struct net_device *dev)
{ … }
static void el3_set_msglevel(struct net_device *dev, u32 v)
{ … }
static const struct ethtool_ops ethtool_ops = …;
static void
el3_down(struct net_device *dev)
{ … }
static void
el3_up(struct net_device *dev)
{ … }
#ifdef CONFIG_PM
static int
el3_suspend(struct device *pdev, pm_message_t state)
{ … }
static int
el3_resume(struct device *pdev)
{ … }
#endif
module_param(debug,int, 0);
module_param_hw_array(irq, int, irq, NULL, 0);
module_param(max_interrupt_work, int, 0);
MODULE_PARM_DESC(…) …;
MODULE_PARM_DESC(…) …;
MODULE_PARM_DESC(…) …;
#ifdef CONFIG_PNP
module_param(nopnp, int, 0);
MODULE_PARM_DESC(…) …;
#endif
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
static int __init el3_init_module(void)
{ … }
static void __exit el3_cleanup_module(void)
{ … }
module_init(…) …;
module_exit (el3_cleanup_module);