if_ep_pccard.c (67164) | if_ep_pccard.c (70765) |
---|---|
1/* 2 * Copyright (c) 1994 Herb Peyerl <hpeyerl@novatel.ca> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 23 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 24 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 28 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 * | 1/* 2 * Copyright (c) 1994 Herb Peyerl <hpeyerl@novatel.ca> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 23 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 24 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 28 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 * |
30 * $FreeBSD: head/sys/dev/ep/if_ep_pccard.c 67164 2000-10-15 14:19:01Z phk $ | 30 * $FreeBSD: head/sys/dev/ep/if_ep_pccard.c 70765 2001-01-07 21:24:41Z peter $ |
31 */ 32 33/* 34 * Pccard support for 3C589 by: 35 * HAMADA Naoki 36 * nao@tom-yam.or.jp 37 */ 38 --- 14 unchanged lines hidden (view full) --- 53#include <net/if_media.h> 54 55 56#include <dev/ep/if_epreg.h> 57#include <dev/ep/if_epvar.h> 58 59#include "card_if.h" 60#include <dev/pccard/pccardvar.h> | 31 */ 32 33/* 34 * Pccard support for 3C589 by: 35 * HAMADA Naoki 36 * nao@tom-yam.or.jp 37 */ 38 --- 14 unchanged lines hidden (view full) --- 53#include <net/if_media.h> 54 55 56#include <dev/ep/if_epreg.h> 57#include <dev/ep/if_epvar.h> 58 59#include "card_if.h" 60#include <dev/pccard/pccardvar.h> |
61#include <dev/pccard/pccarddevs.h> |
|
61 62static const char *ep_pccard_identify(u_short id); 63 64/* 65 * Initialize the device - called from Slot manager. 66 */ 67static int 68ep_pccard_probe(device_t dev) --- 165 unchanged lines hidden (view full) --- 234 sc->arpcom.ac_if.if_flags &= ~IFF_RUNNING; 235 ether_ifdetach(&sc->arpcom.ac_if, ETHER_BPF_SUPPORTED); 236 sc->gone = 1; 237 bus_teardown_intr(dev, sc->irq, sc->ep_intrhand); 238 ep_free(dev); 239 return (0); 240} 241 | 62 63static const char *ep_pccard_identify(u_short id); 64 65/* 66 * Initialize the device - called from Slot manager. 67 */ 68static int 69ep_pccard_probe(device_t dev) --- 165 unchanged lines hidden (view full) --- 235 sc->arpcom.ac_if.if_flags &= ~IFF_RUNNING; 236 ether_ifdetach(&sc->arpcom.ac_if, ETHER_BPF_SUPPORTED); 237 sc->gone = 1; 238 bus_teardown_intr(dev, sc->irq, sc->ep_intrhand); 239 ep_free(dev); 240 return (0); 241} 242 |
243static const struct pccard_product ep_pccard_products[] = { 244 { PCCARD_STR_3COM_3C574, PCCARD_VENDOR_3COM, 245 PCCARD_PRODUCT_3COM_3C574, 0, NULL, NULL }, 246 { PCCARD_STR_3COM_3C589, PCCARD_VENDOR_3COM, 247 PCCARD_PRODUCT_3COM_3C589, 0, NULL, NULL }, 248 { PCCARD_STR_3COM_3CXEM556, PCCARD_VENDOR_3COM, 249 PCCARD_PRODUCT_3COM_3CXEM556, 0, NULL, NULL }, 250 { PCCARD_STR_3COM_3CXEM556INT, PCCARD_VENDOR_3COM, 251 PCCARD_PRODUCT_3COM_3CXEM556INT, 0, NULL, NULL }, 252 { PCCARD_STR_3COM_3CCFEM556BI, PCCARD_VENDOR_3COM, 253 PCCARD_PRODUCT_3COM_3CCFEM556BI, 0, NULL, NULL }, 254 { NULL } 255}; 256 |
|
242static int 243ep_pccard_match(device_t dev) 244{ | 257static int 258ep_pccard_match(device_t dev) 259{ |
260 const struct pccard_product *pp; 261 262 if ((pp = pccard_product_lookup(dev, ep_pccard_products, 263 sizeof(ep_pccard_products[0]), NULL)) != NULL) { 264 device_set_desc(dev, pp->pp_name); 265 return 0; 266 } |
|
245 return EIO; 246} 247 248static device_method_t ep_pccard_methods[] = { 249 /* Device interface */ 250 DEVMETHOD(device_probe, pccard_compat_probe), 251 DEVMETHOD(device_attach, pccard_compat_attach), 252 DEVMETHOD(device_detach, ep_pccard_detach), --- 18 unchanged lines hidden --- | 267 return EIO; 268} 269 270static device_method_t ep_pccard_methods[] = { 271 /* Device interface */ 272 DEVMETHOD(device_probe, pccard_compat_probe), 273 DEVMETHOD(device_attach, pccard_compat_attach), 274 DEVMETHOD(device_detach, ep_pccard_detach), --- 18 unchanged lines hidden --- |