Deleted Added
full compact
iir_ctrl.c (119418) iir_ctrl.c (120477)
1/*
1/*
2 * Copyright (c) 2000-01 Intel Corporation
2 * Copyright (c) 2000-03 ICP vortex GmbH
3 * Copyright (c) 2002-03 Intel Corporation
4 * Copyright (c) 2003 Adaptec Inc.
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
9 * notice, this list of conditions, and the following disclaimer,
10 * without modification, immediately at the beginning of the file.

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

25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29
30/*
31 * iir_ctrl.c: Control functions and /dev entry points for /dev/iir*
32 *
5 * All Rights Reserved
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions, and the following disclaimer,
12 * without modification, immediately at the beginning of the file.

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

27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 * SUCH DAMAGE.
30 */
31
32/*
33 * iir_ctrl.c: Control functions and /dev entry points for /dev/iir*
34 *
33 * Written by: Achim Leubner <achim.leubner@intel.com>
35 * Written by: Achim Leubner <achim_leubner@adaptec.com>
34 * Fixes/Additions: Boji Tony Kannanthanam <boji.t.kannanthanam@intel.com>
35 *
36 * Fixes/Additions: Boji Tony Kannanthanam <boji.t.kannanthanam@intel.com>
37 *
36 * TODO:
38 * $Id: iir_ctrl.c 1.3 2003/08/26 12:31:15 achim Exp $"
37 */
38
39 */
40
39#ident "$Id: iir_ctrl.c 1.2 2001/07/18 11:17:22 achim Exp $"
40#include <sys/cdefs.h>
41#include <sys/cdefs.h>
41__FBSDID("$FreeBSD: head/sys/dev/iir/iir_ctrl.c 119418 2003-08-24 17:55:58Z obrien $");
42__FBSDID("$FreeBSD: head/sys/dev/iir/iir_ctrl.c 120477 2003-09-26 15:36:47Z scottl $");
42
43#include <sys/param.h>
44#include <sys/systm.h>
45#include <sys/endian.h>
46#include <sys/malloc.h>
47#include <sys/kernel.h>
48#include <sys/uio.h>
49#include <sys/conf.h>

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

269 {
270 gdt_ctrt_t *p;
271 struct gdt_softc *gdt;
272
273 p = (gdt_ctrt_t *)cmdarg;
274 gdt = gdt_minor2softc(p->io_node);
275 if (gdt == NULL)
276 return (ENXIO);
43
44#include <sys/param.h>
45#include <sys/systm.h>
46#include <sys/endian.h>
47#include <sys/malloc.h>
48#include <sys/kernel.h>
49#include <sys/uio.h>
50#include <sys/conf.h>

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

270 {
271 gdt_ctrt_t *p;
272 struct gdt_softc *gdt;
273
274 p = (gdt_ctrt_t *)cmdarg;
275 gdt = gdt_minor2softc(p->io_node);
276 if (gdt == NULL)
277 return (ENXIO);
277 p->oem_id = 0x8000;
278 p->type = 0xfd;
278 /* only RP controllers */
279 p->ext_type = 0x6000 | gdt->sc_device;
280 if (gdt->sc_vendor == INTEL_VENDOR_ID) {
281 p->oem_id = OEM_ID_INTEL;
282 p->type = 0xfd;
283 /* new -> subdevice into ext_type */
284 if (gdt->sc_device >= 0x600)
285 p->ext_type = 0x6000 | gdt->sc_subdevice;
286 } else {
287 p->oem_id = OEM_ID_ICP;
288 p->type = 0xfe;
289 /* new -> subdevice into ext_type */
290 if (gdt->sc_device >= 0x300)
291 p->ext_type = 0x6000 | gdt->sc_subdevice;
292 }
279 p->info = (gdt->sc_bus << 8) | (gdt->sc_slot << 3);
293 p->info = (gdt->sc_bus << 8) | (gdt->sc_slot << 3);
280 p->ext_type = 0x6000 | gdt->sc_subdevice;
281 p->device_id = gdt->sc_device;
282 p->sub_device_id = gdt->sc_subdevice;
283 break;
284 }
285
286 case GDT_IOCTL_OSVERS:
287 {
288 gdt_osv_t *p;

--- 82 unchanged lines hidden ---
294 p->device_id = gdt->sc_device;
295 p->sub_device_id = gdt->sc_subdevice;
296 break;
297 }
298
299 case GDT_IOCTL_OSVERS:
300 {
301 gdt_osv_t *p;

--- 82 unchanged lines hidden ---