if_fe_pccard.c (139972) | if_fe_pccard.c (140041) |
---|---|
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> | 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 139972 2005-01-10 09:29:48Z imp $"); | 25__FBSDID("$FreeBSD: head/sys/dev/fe/if_fe_pccard.c 140041 2005-01-11 06:48:38Z 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> --- 22 unchanged lines hidden (view full) --- 56 */ 57static int fe_pccard_probe(device_t); 58static int fe_pccard_attach(device_t); 59static int fe_pccard_detach(device_t); 60static int fe_pccard_match(device_t); 61 62static const struct fe_pccard_product { 63 struct pccard_product mpp_product; | 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> --- 22 unchanged lines hidden (view full) --- 56 */ 57static int fe_pccard_probe(device_t); 58static int fe_pccard_attach(device_t); 59static int fe_pccard_detach(device_t); 60static int fe_pccard_match(device_t); 61 62static const struct fe_pccard_product { 63 struct pccard_product mpp_product; |
64 u_int32_t mpp_ioalign; /* required alignment */ | 64 uint32_t mpp_ioalign; /* required alignment */ |
65 int mpp_enet_maddr; | 65 int mpp_enet_maddr; |
66 int mpp_flags; 67#define MBH10302 0x1 /* Fujitsu MBH10302 */ |
|
66} fe_pccard_products[] = { | 68} fe_pccard_products[] = { |
69 /* These need to be first */ 70 { PCMCIA_CARD(FUJITSU2, FMV_J181, 0), 0, -1, MBH10302}, 71 { PCMCIA_CARD(FUJITSU2, FMV_J182, 0), 0, 0xf2c}, 72 { PCMCIA_CARD(FUJITSU2, FMV_J182A, 0), 0, 0x1cc}, 73 { PCMCIA_CARD(FUJITSU2, ITCFJ182A, 0), 0, 0x1cc}, 74 /* These need to be second */ |
|
67 { PCMCIA_CARD(TDK, LAK_CD021BX, 0), 0, -1 }, 68 { PCMCIA_CARD(TDK, LAK_CF010, 0), 0, -1 }, 69#if 0 /* XXX 86960-based? */ 70 { PCMCIA_CARD(TDK, LAK_DFL9610, 1), 0, -1 }, 71#endif 72 { PCMCIA_CARD(CONTEC, CNETPC, 0), 0, -1 }, 73 { PCMCIA_CARD(FUJITSU, LA501, 0), 0x20, -1 }, 74 { PCMCIA_CARD(FUJITSU, LA10S, 0), 0, -1 }, | 75 { PCMCIA_CARD(TDK, LAK_CD021BX, 0), 0, -1 }, 76 { PCMCIA_CARD(TDK, LAK_CF010, 0), 0, -1 }, 77#if 0 /* XXX 86960-based? */ 78 { PCMCIA_CARD(TDK, LAK_DFL9610, 1), 0, -1 }, 79#endif 80 { PCMCIA_CARD(CONTEC, CNETPC, 0), 0, -1 }, 81 { PCMCIA_CARD(FUJITSU, LA501, 0), 0x20, -1 }, 82 { PCMCIA_CARD(FUJITSU, LA10S, 0), 0, -1 }, |
75 { PCMCIA_CARD(FUJITSU, NE200T, 0), 0, -1 }, /* Sold by Eagle */ | 83 { PCMCIA_CARD(FUJITSU, NE200T, 0), 0, -1, MBH10302},/* Sold by Eagle */ |
76 { PCMCIA_CARD(RATOC, REX_R280, 0), 0, 0x1fc }, 77 { { NULL } } 78}; 79 80static int 81fe_pccard_match(device_t dev) 82{ 83 const struct pccard_product *pp; --- 75 unchanged lines hidden (view full) --- 159 fe_alloc_port(dev, sc->port_used); 160 fe_alloc_irq(dev, 0); 161 162 return fe_attach(dev); 163} 164 165/* 166 * feunload - unload the driver and clear the table. | 84 { PCMCIA_CARD(RATOC, REX_R280, 0), 0, 0x1fc }, 85 { { NULL } } 86}; 87 88static int 89fe_pccard_match(device_t dev) 90{ 91 const struct pccard_product *pp; --- 75 unchanged lines hidden (view full) --- 167 fe_alloc_port(dev, sc->port_used); 168 fe_alloc_irq(dev, 0); 169 170 return fe_attach(dev); 171} 172 173/* 174 * feunload - unload the driver and clear the table. |
167 * XXX TODO: 168 * This is usually called when the card is ejected, but 169 * can be caused by a modunload of a controller driver. 170 * The idea is to reset the driver's view of the device 171 * and ensure that any driver entry points such as 172 * read and write do not hang. | |
173 */ 174static int 175fe_pccard_detach(device_t dev) 176{ 177 struct fe_softc *sc = device_get_softc(dev); 178 struct ifnet *ifp = &sc->arpcom.ac_if; 179 180 fe_stop(sc); --- 126 unchanged lines hidden --- | 175 */ 176static int 177fe_pccard_detach(device_t dev) 178{ 179 struct fe_softc *sc = device_get_softc(dev); 180 struct ifnet *ifp = &sc->arpcom.ac_if; 181 182 fe_stop(sc); --- 126 unchanged lines hidden --- |