pccard.c (82415) | pccard.c (82781) |
---|---|
1/* $NetBSD: pcmcia.c,v 1.23 2000/07/28 19:17:02 drochner Exp $ */ | 1/* $NetBSD: pcmcia.c,v 1.23 2000/07/28 19:17:02 drochner Exp $ */ |
2/* $FreeBSD: head/sys/dev/pccard/pccard.c 82415 2001-08-27 11:28:00Z jon $ */ | 2/* $FreeBSD: head/sys/dev/pccard/pccard.c 82781 2001-09-02 06:37:41Z shiba $ */ |
3 4/* 5 * Copyright (c) 1997 Marc Horowitz. All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions 9 * are met: 10 * 1. Redistributions of source code must retain the above copyright --- 27 unchanged lines hidden (view full) --- 38#include <sys/queue.h> 39#include <sys/types.h> 40 41#include <sys/bus.h> 42#include <machine/bus.h> 43#include <sys/rman.h> 44#include <machine/resource.h> 45 | 3 4/* 5 * Copyright (c) 1997 Marc Horowitz. All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions 9 * are met: 10 * 1. Redistributions of source code must retain the above copyright --- 27 unchanged lines hidden (view full) --- 38#include <sys/queue.h> 39#include <sys/types.h> 40 41#include <sys/bus.h> 42#include <machine/bus.h> 43#include <sys/rman.h> 44#include <machine/resource.h> 45 |
46#include <net/ethernet.h> 47 |
|
46#include <dev/pccard/pccardreg.h> 47#include <dev/pccard/pccardvar.h> 48 49#include "power_if.h" 50#include "card_if.h" 51 52#define PCCARDDEBUG 53 --- 333 unchanged lines hidden (view full) --- 387 resource_list_add(rl, SYS_RES_IOPORT, cfe->iorid[i], 388 rman_get_start(r), rman_get_end(r), 389 cfe->iospace[i].length); 390 rle = resource_list_find(rl, SYS_RES_IOPORT, 391 cfe->iorid[i]); 392 rle->res = r; 393 } 394 if (cfe->num_memspace > 0) { | 48#include <dev/pccard/pccardreg.h> 49#include <dev/pccard/pccardvar.h> 50 51#include "power_if.h" 52#include "card_if.h" 53 54#define PCCARDDEBUG 55 --- 333 unchanged lines hidden (view full) --- 389 resource_list_add(rl, SYS_RES_IOPORT, cfe->iorid[i], 390 rman_get_start(r), rman_get_end(r), 391 cfe->iospace[i].length); 392 rle = resource_list_find(rl, SYS_RES_IOPORT, 393 cfe->iorid[i]); 394 rle->res = r; 395 } 396 if (cfe->num_memspace > 0) { |
395 goto not_this_one; | 397 /* 398 * Not implement yet, Fix me. 399 */ |
396 } 397 if (cfe->irqmask) { 398 cfe->irqrid = 0; 399 r = cfe->irqres = bus_alloc_resource(bus, SYS_RES_IRQ, 400 &cfe->irqrid, 0, ~0, 1, 0); 401 if (cfe->irqres == NULL) 402 goto not_this_one; 403 resource_list_add(rl, SYS_RES_IRQ, cfe->irqrid, --- 525 unchanged lines hidden (view full) --- 929 struct pccard_ivar *devi = PCCARD_IVAR(child); 930 struct pccard_function *func = devi->fcn; 931 struct pccard_softc *sc = PCCARD_SOFTC(bus); 932 933 /* PCCARD_IVAR_ETHADDR unhandled from oldcard */ 934 switch (which) { 935 default: 936 case PCCARD_IVAR_ETHADDR: | 400 } 401 if (cfe->irqmask) { 402 cfe->irqrid = 0; 403 r = cfe->irqres = bus_alloc_resource(bus, SYS_RES_IRQ, 404 &cfe->irqrid, 0, ~0, 1, 0); 405 if (cfe->irqres == NULL) 406 goto not_this_one; 407 resource_list_add(rl, SYS_RES_IRQ, cfe->irqrid, --- 525 unchanged lines hidden (view full) --- 933 struct pccard_ivar *devi = PCCARD_IVAR(child); 934 struct pccard_function *func = devi->fcn; 935 struct pccard_softc *sc = PCCARD_SOFTC(bus); 936 937 /* PCCARD_IVAR_ETHADDR unhandled from oldcard */ 938 switch (which) { 939 default: 940 case PCCARD_IVAR_ETHADDR: |
937 return (ENOENT); | 941 bcopy(func->pf_funce_lan_nid, result, ETHER_ADDR_LEN); |
938 break; 939 case PCCARD_IVAR_VENDOR: 940 *(u_int32_t *) result = sc->card.manufacturer; 941 break; 942 case PCCARD_IVAR_PRODUCT: 943 *(u_int32_t *) result = sc->card.product; 944 break; 945 case PCCARD_IVAR_FUNCTION: --- 285 unchanged lines hidden --- | 942 break; 943 case PCCARD_IVAR_VENDOR: 944 *(u_int32_t *) result = sc->card.manufacturer; 945 break; 946 case PCCARD_IVAR_PRODUCT: 947 *(u_int32_t *) result = sc->card.product; 948 break; 949 case PCCARD_IVAR_FUNCTION: --- 285 unchanged lines hidden --- |