if_ep_pccard.c (139749) | if_ep_pccard.c (140522) |
---|---|
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 --- 21 unchanged lines hidden (view full) --- 30 31/* 32 * Pccard support for 3C589 by: 33 * HAMADA Naoki 34 * nao@tom-yam.or.jp 35 */ 36 37#include <sys/cdefs.h> | 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 --- 21 unchanged lines hidden (view full) --- 30 31/* 32 * Pccard support for 3C589 by: 33 * HAMADA Naoki 34 * nao@tom-yam.or.jp 35 */ 36 37#include <sys/cdefs.h> |
38__FBSDID("$FreeBSD: head/sys/dev/ep/if_ep_pccard.c 139749 2005-01-06 01:43:34Z imp $"); | 38__FBSDID("$FreeBSD: head/sys/dev/ep/if_ep_pccard.c 140522 2005-01-20 19:37:22Z imp $"); |
39 40#include <sys/param.h> 41#include <sys/systm.h> 42#include <sys/kernel.h> 43#include <sys/socket.h> 44#include <sys/module.h> 45#include <sys/bus.h> 46 --- 4 unchanged lines hidden (view full) --- 51#include <net/if.h> 52#include <net/if_arp.h> 53#include <net/if_media.h> 54 55#include <dev/ep/if_epreg.h> 56#include <dev/ep/if_epvar.h> 57 58#include <dev/pccard/pccardvar.h> | 39 40#include <sys/param.h> 41#include <sys/systm.h> 42#include <sys/kernel.h> 43#include <sys/socket.h> 44#include <sys/module.h> 45#include <sys/bus.h> 46 --- 4 unchanged lines hidden (view full) --- 51#include <net/if.h> 52#include <net/if_arp.h> 53#include <net/if_media.h> 54 55#include <dev/ep/if_epreg.h> 56#include <dev/ep/if_epvar.h> 57 58#include <dev/pccard/pccardvar.h> |
59#include <dev/pccard/pccard_cis.h> |
|
59 60#include "card_if.h" 61#include "pccarddevs.h" 62 63static const char *ep_pccard_identify(u_short id); 64 65/* 66 * Initialize the device - called from Slot manager. --- 194 unchanged lines hidden (view full) --- 261 PCMCIA_CARD(3COM, 3CXEM556INT, 0), 262 {NULL} 263}; 264 265static int 266ep_pccard_match(device_t dev) 267{ 268 const struct pccard_product *pp; | 60 61#include "card_if.h" 62#include "pccarddevs.h" 63 64static const char *ep_pccard_identify(u_short id); 65 66/* 67 * Initialize the device - called from Slot manager. --- 194 unchanged lines hidden (view full) --- 262 PCMCIA_CARD(3COM, 3CXEM556INT, 0), 263 {NULL} 264}; 265 266static int 267ep_pccard_match(device_t dev) 268{ 269 const struct pccard_product *pp; |
270 int error; 271 uint32_t fcn = PCCARD_FUNCTION_UNSPEC; |
|
269 | 272 |
273 /* Make sure we're a network function */ 274 error = pccard_get_function(dev, &fcn); 275 if (error != 0) 276 return (error); 277 if (fcn != PCCARD_FUNCTION_NETWORK) 278 return (ENXIO); 279 |
|
270 if ((pp = pccard_product_lookup(dev, ep_pccard_products, 271 sizeof(ep_pccard_products[0]), NULL)) != NULL) { 272 if (pp->pp_name != NULL) 273 device_set_desc(dev, pp->pp_name); 274 return 0; 275 } 276 return EIO; 277} --- 24 unchanged lines hidden --- | 280 if ((pp = pccard_product_lookup(dev, ep_pccard_products, 281 sizeof(ep_pccard_products[0]), NULL)) != NULL) { 282 if (pp->pp_name != NULL) 283 device_set_desc(dev, pp->pp_name); 284 return 0; 285 } 286 return EIO; 287} --- 24 unchanged lines hidden --- |