Deleted Added
full compact
sio_pci.c (86909) sio_pci.c (89986)
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 86909 2001-11-26 07:39:51Z imp $
24 * $FreeBSD: head/sys/dev/sio/sio_pci.c 89986 2002-01-30 17:22:04Z jhay $
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>

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

87
88 type = pci_get_devid(dev);
89 id = pci_ids;
90 while (id->type && id->type != type)
91 id++;
92 if (id->desc == NULL)
93 return (ENXIO);
94 sio_pci_kludge_unit(dev);
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>

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

87
88 type = pci_get_devid(dev);
89 id = pci_ids;
90 while (id->type && id->type != type)
91 id++;
92 if (id->desc == NULL)
93 return (ENXIO);
94 sio_pci_kludge_unit(dev);
95 return (sioattach(dev, id->rid));
95 return (sioattach(dev, id->rid, 0UL));
96}
97
98/*
99 * Don't cut and paste this to other drivers. It is a horrible kludge
100 * which will fail to work and also be unnecessary in future versions.
101 */
102static void
103sio_pci_kludge_unit(dev)

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

133
134 type = pci_get_devid(dev);
135 id = pci_ids;
136 while (id->type && id->type != type)
137 id++;
138 if (id->desc == NULL)
139 return (ENXIO);
140 device_set_desc(dev, id->desc);
96}
97
98/*
99 * Don't cut and paste this to other drivers. It is a horrible kludge
100 * which will fail to work and also be unnecessary in future versions.
101 */
102static void
103sio_pci_kludge_unit(dev)

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

133
134 type = pci_get_devid(dev);
135 id = pci_ids;
136 while (id->type && id->type != type)
137 id++;
138 if (id->desc == NULL)
139 return (ENXIO);
140 device_set_desc(dev, id->desc);
141 return (sioprobe(dev, id->rid, 0));
141 return (sioprobe(dev, id->rid, 0UL, 0));
142}
143
144DRIVER_MODULE(sio, pci, sio_pci_driver, sio_devclass, 0, 0);
145DRIVER_MODULE(sio, cardbus, sio_pci_driver, sio_devclass, 0, 0);
142}
143
144DRIVER_MODULE(sio, pci, sio_pci_driver, sio_devclass, 0, 0);
145DRIVER_MODULE(sio, cardbus, sio_pci_driver, sio_devclass, 0, 0);