1/*- 2 * All Rights Reserved, Copyright (C) Fujitsu Limited 1995 3 * 4 * This software may be used, modified, copied, distributed, and sold, in 5 * both source and binary form provided that the above copyright, these 6 * terms and the following disclaimer are retained. The name of the author 7 * and/or the contributor may not be used to endorse or promote products 8 * derived from this software without specific prior written permission. --- 8 unchanged lines hidden (view full) --- 17 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 18 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 19 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 20 * SUCH DAMAGE. 21 * 22 */ 23 24#include <sys/cdefs.h> |
25__FBSDID("$FreeBSD: head/sys/dev/fe/if_fe_pccard.c 140528 2005-01-20 20:08:18Z imp $"); |
26 27#include <sys/param.h> 28#include <sys/kernel.h> 29#include <sys/socket.h> 30#include <sys/systm.h> 31#include <sys/module.h> 32 33#include <sys/bus.h> --- 8 unchanged lines hidden (view full) --- 42#include <netinet/in.h> 43#include <netinet/if_ether.h> 44 45#include <i386/isa/ic/mb86960.h> 46#include <dev/fe/if_fereg.h> 47#include <dev/fe/if_fevar.h> 48 49#include <dev/pccard/pccardvar.h> |
50#include <dev/pccard/pccard_cis.h> |
51 52#include "card_if.h" 53#include "pccarddevs.h" 54 55/* 56 * PC-Card (PCMCIA) specific code. 57 */ 58static int fe_pccard_probe(device_t); --- 26 unchanged lines hidden (view full) --- 85 { PCMCIA_CARD(RATOC, REX_R280, 0), 0, 0x1fc }, 86 { { NULL } } 87}; 88 89static int 90fe_pccard_match(device_t dev) 91{ 92 const struct pccard_product *pp; |
93 int error; 94 uint32_t fcn = PCCARD_FUNCTION_UNSPEC; |
95 |
96 /* Make sure we're a network function */ 97 error = pccard_get_function(dev, &fcn); 98 if (error != 0) 99 return (error); 100 if (fcn != PCCARD_FUNCTION_NETWORK) 101 return (ENXIO); 102 |
103 if ((pp = pccard_product_lookup(dev, 104 (const struct pccard_product *)fe_pccard_products, 105 sizeof(fe_pccard_products[0]), NULL)) != NULL) { 106 if (pp->pp_name != NULL) 107 device_set_desc(dev, pp->pp_name); 108 return 0; 109 } 110 return EIO; --- 207 unchanged lines hidden --- |