Deleted Added
full compact
sio_pci.c (111014) sio_pci.c (111620)
1/*
2 * Copyright (c) 2001 M. Warner Losh. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.

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

16 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
17 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 *
1/*
2 * Copyright (c) 2001 M. Warner Losh. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.

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

16 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
17 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 *
24 * $FreeBSD: head/sys/dev/sio/sio_pci.c 111014 2003-02-16 18:05:54Z imp $
24 * $FreeBSD: head/sys/dev/sio/sio_pci.c 111620 2003-02-27 14:09:36Z phk $
25 */
26
27#include <sys/param.h>
28#include <sys/systm.h>
29#include <sys/bus.h>
30#include <sys/conf.h>
31#include <sys/kernel.h>
32#include <sys/lock.h>

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

89};
90
91static int
92sio_pci_attach(dev)
93 device_t dev;
94{
95 u_int32_t type;
96 struct pci_ids *id;
25 */
26
27#include <sys/param.h>
28#include <sys/systm.h>
29#include <sys/bus.h>
30#include <sys/conf.h>
31#include <sys/kernel.h>
32#include <sys/lock.h>

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

89};
90
91static int
92sio_pci_attach(dev)
93 device_t dev;
94{
95 u_int32_t type;
96 struct pci_ids *id;
97 int flags;
97
98 type = pci_get_devid(dev);
99 id = pci_ids;
100 while (id->type && id->type != type)
101 id++;
102 if (id->desc == NULL)
103 return (ENXIO);
104 sio_pci_kludge_unit(dev);
98
99 type = pci_get_devid(dev);
100 id = pci_ids;
101 while (id->type && id->type != type)
102 id++;
103 if (id->desc == NULL)
104 return (ENXIO);
105 sio_pci_kludge_unit(dev);
106 if (resource_int_value("sio", device_get_unit(dev), "flags", &flags)
107 == 0)
108 device_set_flags(dev, flags);
105 return (sioattach(dev, id->rid, 0UL));
106}
107
108/*
109 * Don't cut and paste this to other drivers. It is a horrible kludge
110 * which will fail to work and also be unnecessary in future versions.
111 */
112static void

--- 46 unchanged lines hidden ---
109 return (sioattach(dev, id->rid, 0UL));
110}
111
112/*
113 * Don't cut and paste this to other drivers. It is a horrible kludge
114 * which will fail to work and also be unnecessary in future versions.
115 */
116static void

--- 46 unchanged lines hidden ---