/* * Linux ARCnet driver - COM20020 PCMCIA support * * Written 1994-1999 by Avery Pennarun, * based on an ISA version by David Woodhouse. * Derived from ibmtr_cs.c by Steve Kipisz (pcmcia-cs 3.1.4) * which was derived from pcnet_cs.c by David Hinds. * Some additional portions derived from skeleton.c by Donald Becker. * * Special thanks to Contemporary Controls, Inc. (www.ccontrols.com) * for sponsoring the further development of this driver. * * ********************** * * The original copyright of skeleton.c was as follows: * * skeleton.c Written 1993 by Donald Becker. * Copyright 1993 United States Government as represented by the * Director, National Security Agency. This software may only be used * and distributed according to the terms of the GNU General Public License as * modified by SRC, incorporated herein by reference. * * ********************** * Changes: * Arnaldo Carvalho de Melo <[email protected]> - 08/08/2000 * - reorganize kmallocs in com20020_attach, checking all for failure * and releasing the previous allocations if one fails * ********************** * * For more details, see drivers/net/arcnet.c * * ********************** */ #define pr_fmt(fmt) … #include <linux/kernel.h> #include <linux/ptrace.h> #include <linux/slab.h> #include <linux/string.h> #include <linux/timer.h> #include <linux/delay.h> #include <linux/module.h> #include <linux/netdevice.h> #include <linux/io.h> #include <pcmcia/cistpl.h> #include <pcmcia/ds.h> #include "arcdevice.h" #include "com20020.h" static void regdump(struct net_device *dev) { … } /*====================================================================*/ /* Parameters that can be set with 'insmod' */ static int node; static int timeout = …; static int backplane; static int clockp; static int clockm; module_param(node, int, 0); module_param(timeout, int, 0); module_param(backplane, int, 0); module_param(clockp, int, 0); module_param(clockm, int, 0); MODULE_DESCRIPTION(…) …; MODULE_LICENSE(…) …; /*====================================================================*/ static int com20020_config(struct pcmcia_device *link); static void com20020_release(struct pcmcia_device *link); static void com20020_detach(struct pcmcia_device *p_dev); /*====================================================================*/ static int com20020_probe(struct pcmcia_device *p_dev) { … } /* com20020_attach */ static void com20020_detach(struct pcmcia_device *link) { … } /* com20020_detach */ static int com20020_config(struct pcmcia_device *link) { … } /* com20020_config */ static void com20020_release(struct pcmcia_device *link) { … } static int com20020_suspend(struct pcmcia_device *link) { … } static int com20020_resume(struct pcmcia_device *link) { … } static const struct pcmcia_device_id com20020_ids[] = …; MODULE_DEVICE_TABLE(pcmcia, com20020_ids); static struct pcmcia_driver com20020_cs_driver = …; module_pcmcia_driver(…);