2 * Copyright (c) 1999 M. Warner Losh <imp@village.org>
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
14 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
15 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
16 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
17 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
18 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 * $FreeBSD: src/sys/dev/cs/if_cs_pccard.c,v 1.1.2.1 2001/01/25 20:13:48 imp Exp $
26 * $DragonFly: src/sys/dev/netif/cs/if_cs_pccard.c,v 1.8 2006/10/25 20:55:56 dillon Exp $
29 #include <sys/param.h>
30 #include <sys/systm.h>
31 #include <sys/kernel.h>
32 #include <sys/socket.h>
33 #include <sys/module.h>
36 #include <net/ethernet.h>
38 #include <net/if_arp.h>
41 #include <bus/pccard/pccardvar.h>
42 #include <bus/pccard/pccarddevs.h>
46 static const struct pccard_product cs_pccard_products[] = {
47 PCMCIA_CARD(IBM, ETHERJET, 0),
51 cs_pccard_match(device_t dev)
53 const struct pccard_product *pp;
55 if ((pp = pccard_product_lookup(dev, cs_pccard_products,
56 sizeof(cs_pccard_products[0]), NULL)) != NULL) {
57 if (pp->pp_name != NULL)
58 device_set_desc(dev, pp->pp_name);
65 cs_pccard_probe(device_t dev)
69 error = cs_cs89x0_probe(dev);
70 cs_release_resources(dev);
74 static device_method_t cs_pccard_methods[] = {
75 /* Device interface */
76 DEVMETHOD(device_probe, pccard_compat_probe),
77 DEVMETHOD(device_attach, pccard_compat_attach),
78 DEVMETHOD(device_detach, cs_detach),
81 DEVMETHOD(card_compat_match, cs_pccard_match),
82 DEVMETHOD(card_compat_probe, cs_pccard_probe),
83 DEVMETHOD(card_compat_attach, cs_attach),
88 static driver_t cs_pccard_driver = {
91 sizeof(struct cs_softc),
94 extern devclass_t cs_devclass;
96 DRIVER_MODULE(if_cs, pccard, cs_pccard_driver, cs_devclass, 0, 0);
97 MODULE_DEPEND(if_cs, pccard, 1, 1, 1);