Deleted Added
full compact
if_ep_mca.c (140523) if_ep_mca.c (147717)
1/*-
2 * Copyright (c) 1999 Matthew N. Dodd <winter@jurai.net>
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

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

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1999 Matthew N. Dodd <winter@jurai.net>
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

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

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: head/sys/dev/ep/if_ep_mca.c 140523 2005-01-20 19:39:33Z imp $");
28__FBSDID("$FreeBSD: head/sys/dev/ep/if_ep_mca.c 147717 2005-07-01 05:31:23Z imp $");
29
30#include <sys/param.h>
31#include <sys/kernel.h>
32#include <sys/socket.h>
33#include <sys/module.h>
34#include <sys/bus.h>
35
36#include <machine/bus.h>

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

112}
113
114static int
115ep_mca_attach(device_t dev)
116{
117 struct ep_softc *sc = device_get_softc(dev);
118 int error = 0;
119
29
30#include <sys/param.h>
31#include <sys/kernel.h>
32#include <sys/socket.h>
33#include <sys/module.h>
34#include <sys/bus.h>
35
36#include <machine/bus.h>

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

112}
113
114static int
115ep_mca_attach(device_t dev)
116{
117 struct ep_softc *sc = device_get_softc(dev);
118 int error = 0;
119
120 if ((error = ep_alloc(dev))) {
121 device_printf(dev, "ep_alloc() failed! (%d)\n", error);
120 if ((error = ep_alloc(dev)))
122 goto bad;
121 goto bad;
123 }
124 sc->stat = F_ACCESS_32_BITS;
125
126 ep_get_media(sc);
127
128 GO_WINDOW(sc, 0);
129 SET_IRQ(sc, rman_get_start(sc->irq));
130
122 sc->stat = F_ACCESS_32_BITS;
123
124 ep_get_media(sc);
125
126 GO_WINDOW(sc, 0);
127 SET_IRQ(sc, rman_get_start(sc->irq));
128
131 if ((error = ep_attach(sc))) {
132 device_printf(dev, "ep_attach() failed! (%d)\n", error);
129 if ((error = ep_attach(sc)))
133 goto bad;
130 goto bad;
134 }
135 if ((error = bus_setup_intr(dev, sc->irq, INTR_TYPE_NET | INTR_MPSAFE, ep_intr,
136 sc, &sc->ep_intrhand))) {
137 device_printf(dev, "bus_setup_intr() failed! (%d)\n", error);
138 goto bad;
139 }
140 return (0);
141bad:
142 ep_free(dev);

--- 21 unchanged lines hidden ---
131 if ((error = bus_setup_intr(dev, sc->irq, INTR_TYPE_NET | INTR_MPSAFE, ep_intr,
132 sc, &sc->ep_intrhand))) {
133 device_printf(dev, "bus_setup_intr() failed! (%d)\n", error);
134 goto bad;
135 }
136 return (0);
137bad:
138 ep_free(dev);

--- 21 unchanged lines hidden ---