Deleted Added
full compact
if_le_cbus.c (158712) if_le_cbus.c (158829)
1/*-
2 * Copyright (c) 1994-2000
3 * Paul Richards. All rights reserved.
4 *
5 * PC-98 port by Chiharu Shibata & FreeBSD(98) porting team.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 19 unchanged lines hidden (view full) ---

28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 *
32 * from: FreeBSD: src/sys/dev/lnc/if_lnc_cbus.c,v 1.12 2005/11/12 19:14:21
33 */
34
35#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1994-2000
3 * Paul Richards. All rights reserved.
4 *
5 * PC-98 port by Chiharu Shibata & FreeBSD(98) porting team.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 19 unchanged lines hidden (view full) ---

28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 *
32 * from: FreeBSD: src/sys/dev/lnc/if_lnc_cbus.c,v 1.12 2005/11/12 19:14:21
33 */
34
35#include <sys/cdefs.h>
36__FBSDID("$FreeBSD: head/sys/dev/le/if_le_cbus.c 158712 2006-05-17 21:25:23Z marius $");
36__FBSDID("$FreeBSD: head/sys/dev/le/if_le_cbus.c 158829 2006-05-22 13:43:36Z nyan $");
37
38#include <sys/param.h>
39#include <sys/systm.h>
40#include <sys/bus.h>
41#include <sys/endian.h>
42#include <sys/kernel.h>
43#include <sys/lock.h>
44#include <sys/module.h>

--- 54 unchanged lines hidden (view full) ---

99 DEVMETHOD(device_shutdown, le_cbus_suspend),
100 DEVMETHOD(device_suspend, le_cbus_suspend),
101 DEVMETHOD(device_resume, le_cbus_resume),
102
103 { 0, 0 }
104};
105
106DEFINE_CLASS_0(le, le_cbus_driver, le_cbus_methods, sizeof(struct le_cbus_softc));
37
38#include <sys/param.h>
39#include <sys/systm.h>
40#include <sys/bus.h>
41#include <sys/endian.h>
42#include <sys/kernel.h>
43#include <sys/lock.h>
44#include <sys/module.h>

--- 54 unchanged lines hidden (view full) ---

99 DEVMETHOD(device_shutdown, le_cbus_suspend),
100 DEVMETHOD(device_suspend, le_cbus_suspend),
101 DEVMETHOD(device_resume, le_cbus_resume),
102
103 { 0, 0 }
104};
105
106DEFINE_CLASS_0(le, le_cbus_driver, le_cbus_methods, sizeof(struct le_cbus_softc));
107DRIVER_MODULE(le, cbus, le_cbus_driver, le_devclass, 0, 0);
107DRIVER_MODULE(le, isa, le_cbus_driver, le_devclass, 0, 0);
108MODULE_DEPEND(le, ether, 1, 1, 1);
109
110static bus_addr_t le_ioaddr_cnet98s[CNET98S_IOSIZE] = {
111 0x000, 0x001, 0x002, 0x003, 0x004, 0x005, 0x006, 0x007,
112 0x008, 0x009, 0x00a, 0x00b, 0x00c, 0x00d, 0x00e, 0x00f,
113 0x400, 0x401, 0x402, 0x403, 0x404, 0x405, 0x406, 0x407,
114 0x408, 0x409, 0x40a, 0x40b, 0x40c, 0x40d, 0x40e, 0x40f,
115};

--- 96 unchanged lines hidden (view full) ---

212
213static int
214le_cbus_probe(device_t dev)
215{
216 struct le_cbus_softc *lesc;
217 struct lance_softc *sc;
218 int error;
219
108MODULE_DEPEND(le, ether, 1, 1, 1);
109
110static bus_addr_t le_ioaddr_cnet98s[CNET98S_IOSIZE] = {
111 0x000, 0x001, 0x002, 0x003, 0x004, 0x005, 0x006, 0x007,
112 0x008, 0x009, 0x00a, 0x00b, 0x00c, 0x00d, 0x00e, 0x00f,
113 0x400, 0x401, 0x402, 0x403, 0x404, 0x405, 0x406, 0x407,
114 0x408, 0x409, 0x40a, 0x40b, 0x40c, 0x40d, 0x40e, 0x40f,
115};

--- 96 unchanged lines hidden (view full) ---

212
213static int
214le_cbus_probe(device_t dev)
215{
216 struct le_cbus_softc *lesc;
217 struct lance_softc *sc;
218 int error;
219
220 /*
221 * Skip PnP devices as some wedge when trying to probe them as
222 * C-NET(98)S.
223 */
224 if (isa_get_vendorid(dev))
225 return (ENXIO);
226
220 lesc = device_get_softc(dev);
221 sc = &lesc->sc_am7990.lsc;
222
223 lesc->sc_rrid = 0;
224 lesc->sc_rres = isa_alloc_resourcev(dev, SYS_RES_IOPORT, &lesc->sc_rrid,
225 le_ioaddr_cnet98s, CNET98S_IOSIZE, RF_ACTIVE);
226 if (lesc->sc_rres == NULL)
227 return (ENXIO);

--- 217 unchanged lines hidden ---
227 lesc = device_get_softc(dev);
228 sc = &lesc->sc_am7990.lsc;
229
230 lesc->sc_rrid = 0;
231 lesc->sc_rres = isa_alloc_resourcev(dev, SYS_RES_IOPORT, &lesc->sc_rrid,
232 le_ioaddr_cnet98s, CNET98S_IOSIZE, RF_ACTIVE);
233 if (lesc->sc_rres == NULL)
234 return (ENXIO);

--- 217 unchanged lines hidden ---