1/*- 2 * Copyright (c) 1995, David Greenman 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 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * 27 */ 28 29#include <sys/cdefs.h> |
30__FBSDID("$FreeBSD: head/sys/dev/ed/if_ed_isa.c 141932 2005-02-14 23:00:41Z imp $"); |
31 32#include "opt_ed.h" 33 34#include <sys/param.h> 35#include <sys/systm.h> 36#include <sys/socket.h> 37#include <sys/kernel.h> 38 39#include <sys/module.h> 40#include <sys/bus.h> 41#include <machine/bus.h> 42 |
43#include <net/ethernet.h> |
44#include <net/if.h> 45#include <net/if_arp.h> 46#include <net/if_mib.h> 47 48#include <isa/isavar.h> 49 50#include <dev/ed/if_edvar.h> 51 --- 9 unchanged lines hidden (view full) --- 61 { 0x19808c4a, NULL }, /* RTL8019 */ 62 { 0x0090252a, NULL }, /* JQE9000 */ 63 { 0x0020832e, NULL }, /* KTC2000 */ 64 { 0x4cf48906, NULL }, /* ATIf44c */ 65 { 0, NULL } 66}; 67 68static int |
69ed_isa_probe_Novell(device_t dev) |
70{ |
71 struct ed_softc *sc = device_get_softc(dev); |
72 int flags = device_get_flags(dev); |
73 int err; 74 75 err = ed_probe_Novell(dev, 0, flags); 76 if (err) 77 return err; 78 ed_Novell_read_mac(sc); 79 /* 80 * Final sanity check for Gateway Ethernet cards before 81 * believing that they really are Gateway AT. 82 */ 83 if ((ED_FLAGS_GETTYPE(flags) == ED_FLAGS_GWETHER) && 84 (sc->arpcom.ac_enaddr[2] == 0x86)) { 85 sc->type_str = "Gateway AT"; 86 } 87 88 return (0); 89} 90 91static int 92ed_isa_probe(device_t dev) 93{ 94 int flags = device_get_flags(dev); |
95 int error = 0; 96 97 /* Check isapnp ids */ 98 error = ISA_PNP_PROBE(device_get_parent(dev), dev, ed_ids); 99 100 /* If the card had a PnP ID that didn't match any we know about */ |
101 if (error == ENXIO) |
102 goto end; |
103 104 /* If we had some other problem. */ |
105 if (!(error == 0 || error == ENOENT)) |
106 goto end; |
107 108 /* Heuristic probes */ 109 110 error = ed_probe_WD80x3(dev, 0, flags); 111 if (error == 0) 112 goto end; 113 ed_release_resources(dev); 114 --- 5 unchanged lines hidden (view full) --- 120#endif 121 122#ifdef ED_SIC 123 error = ed_probe_SIC(dev, 0, flags); 124 if (error == 0) 125 goto end; 126 ed_release_resources(dev); 127#endif |
128 error = ed_isa_probe_Novell(dev); |
129 if (error == 0) 130 goto end; 131 ed_release_resources(dev); 132 133#ifdef ED_HPP 134 error = ed_probe_HP_pclanp(dev, 0, flags); 135 if (error == 0) 136 goto end; --- 52 unchanged lines hidden --- |