Deleted Added
full compact
if_ep_eisa.c (92739) if_ep_eisa.c (112822)
1/*
2 * Product specific probe and attach routines for:
3 * 3COM 3C579 and 3C509(in eisa config mode) ethernet controllers
4 *
5 * Copyright (c) 1996 Justin T. Gibbs
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in the
16 * documentation and/or other materials provided with the distribution.
17 * 3. Absolutely no warranty of function or purpose is made by the author
18 * Justin T. Gibbs.
19 * 4. Modifications may be freely made to this file if the above conditions
20 * are met.
21 *
1/*
2 * Product specific probe and attach routines for:
3 * 3COM 3C579 and 3C509(in eisa config mode) ethernet controllers
4 *
5 * Copyright (c) 1996 Justin T. Gibbs
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in the
16 * documentation and/or other materials provided with the distribution.
17 * 3. Absolutely no warranty of function or purpose is made by the author
18 * Justin T. Gibbs.
19 * 4. Modifications may be freely made to this file if the above conditions
20 * are met.
21 *
22 * $FreeBSD: head/sys/dev/ep/if_ep_eisa.c 92739 2002-03-20 02:08:01Z alfred $
22 * $FreeBSD: head/sys/dev/ep/if_ep_eisa.c 112822 2003-03-29 21:44:46Z mdodd $
23 */
24
25#include <sys/param.h>
26#include <sys/systm.h>
27#include <sys/kernel.h>
28#include <sys/socket.h>
29
30#include <sys/module.h>
31#include <sys/bus.h>
32
33#include <machine/bus.h>
34#include <machine/resource.h>
35#include <sys/rman.h>
36
37#include <net/if.h>
38#include <net/if_arp.h>
39#include <net/if_media.h>
40
23 */
24
25#include <sys/param.h>
26#include <sys/systm.h>
27#include <sys/kernel.h>
28#include <sys/socket.h>
29
30#include <sys/module.h>
31#include <sys/bus.h>
32
33#include <machine/bus.h>
34#include <machine/resource.h>
35#include <sys/rman.h>
36
37#include <net/if.h>
38#include <net/if_arp.h>
39#include <net/if_media.h>
40
41#include <dev/eisa/eisa_busreg.h>
42#include <dev/eisa/eisa_busvar.h>
41
43
42#include <dev/eisa/eisaconf.h>
43
44#include <dev/ep/if_epreg.h>
45#include <dev/ep/if_epvar.h>
46
47#define EISA_DEVICE_ID_3COM_3C509_TP 0x506d5090
48#define EISA_DEVICE_ID_3COM_3C509_BNC 0x506d5091
49#define EISA_DEVICE_ID_3COM_3C579_TP 0x506d5092
50#define EISA_DEVICE_ID_3COM_3C579_BNC 0x506d5093
51#define EISA_DEVICE_ID_3COM_3C509_COMBO 0x506d5094

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

117
118 port = (eisa_get_slot(dev) * EISA_SLOT_SIZE);
119 iobase = port + EP_EISA_SLOT_OFFSET;
120
121 /* We must be in EISA configuration mode */
122 if ((inw(iobase + EP_W0_ADDRESS_CFG) & 0x1f) != 0x1f)
123 return ENXIO;
124
44#include <dev/ep/if_epreg.h>
45#include <dev/ep/if_epvar.h>
46
47#define EISA_DEVICE_ID_3COM_3C509_TP 0x506d5090
48#define EISA_DEVICE_ID_3COM_3C509_BNC 0x506d5091
49#define EISA_DEVICE_ID_3COM_3C579_TP 0x506d5092
50#define EISA_DEVICE_ID_3COM_3C579_BNC 0x506d5093
51#define EISA_DEVICE_ID_3COM_3C509_COMBO 0x506d5094

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

117
118 port = (eisa_get_slot(dev) * EISA_SLOT_SIZE);
119 iobase = port + EP_EISA_SLOT_OFFSET;
120
121 /* We must be in EISA configuration mode */
122 if ((inw(iobase + EP_W0_ADDRESS_CFG) & 0x1f) != 0x1f)
123 return ENXIO;
124
125 eisa_add_iospace(dev, iobase, EP_EISA_IOSIZE, RESVADDR_NONE);
126 eisa_add_iospace(dev, port, EP_IOSIZE, RESVADDR_NONE);
125 eisa_add_iospace(dev, iobase, EP_EISA_IOSIZE);
126 eisa_add_iospace(dev, port, EP_IOSIZE);
127
128 conf = inw(iobase + EISA_IOCONF);
129 /* Determine our IRQ */
130 switch (conf & IRQ_CHANNEL) {
131 case INT_3:
132 irq = 3;
133 break;
134 case INT_5:

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

166 case EISA_DEVICE_ID_3COM_3C579_TP:
167 int_trig = EISA_TRIGGER_LEVEL;
168 break;
169 default:
170 int_trig = EISA_TRIGGER_EDGE;
171 break;
172 }
173
127
128 conf = inw(iobase + EISA_IOCONF);
129 /* Determine our IRQ */
130 switch (conf & IRQ_CHANNEL) {
131 case INT_3:
132 irq = 3;
133 break;
134 case INT_5:

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

166 case EISA_DEVICE_ID_3COM_3C579_TP:
167 int_trig = EISA_TRIGGER_LEVEL;
168 break;
169 default:
170 int_trig = EISA_TRIGGER_EDGE;
171 break;
172 }
173
174 eisa_add_intr(dev, irq, int_trig);
174 eisa_add_irq(dev, irq, int_trig);
175
176 return 0;
177}
178
179static int
180ep_eisa_attach(device_t dev)
181{
182 struct ep_softc * sc = device_get_softc(dev);

--- 83 unchanged lines hidden ---
175
176 return 0;
177}
178
179static int
180ep_eisa_attach(device_t dev)
181{
182 struct ep_softc * sc = device_get_softc(dev);

--- 83 unchanged lines hidden ---