Deleted Added
sdiff udiff text old ( 119418 ) new ( 121816 )
full compact
1/*
2 * Copyright (c) 1999 M. Warner Losh <imp@village.org>
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 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 *
25 */
26
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: head/sys/dev/cs/if_cs_pccard.c 121816 2003-10-31 18:32:15Z brooks $");
29
30#include <sys/param.h>
31#include <sys/systm.h>
32#include <sys/kernel.h>
33#include <sys/socket.h>
34
35#include <sys/module.h>
36#include <sys/bus.h>

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

76 cs_release_resources(dev);
77 return (error);
78}
79
80static int
81cs_pccard_attach(device_t dev)
82{
83 struct cs_softc *sc = device_get_softc(dev);
84 int error;
85
86 error = cs_alloc_port(dev, sc->port_rid, CS_89x0_IO_PORTS);
87 if (error != 0)
88 goto bad;
89 error = cs_alloc_irq(dev, sc->irq_rid, 0);
90 if (error != 0)
91 goto bad;
92 error = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_NET,
93 csintr, sc, &sc->irq_handle);
94 if (error != 0)
95 goto bad;
96
97 return (cs_attach(dev));
98bad:
99 cs_release_resources(dev);
100 return (error);
101}
102
103static device_method_t cs_pccard_methods[] = {
104 /* Device interface */
105 DEVMETHOD(device_probe, pccard_compat_probe),

--- 24 unchanged lines hidden ---