Deleted Added
sdiff udiff text old ( 111815 ) new ( 114001 )
full compact
1/* $FreeBSD: head/sys/dev/iir/iir_ctrl.c 111815 2003-03-03 12:15:54Z phk $ */
2/*
3 * Copyright (c) 2000-01 Intel Corporation
4 * All Rights Reserved
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 * 1. Redistributions of source code must retain the above copyright

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

41
42#include <sys/param.h>
43#include <sys/systm.h>
44#include <sys/endian.h>
45#include <sys/malloc.h>
46#include <sys/kernel.h>
47#include <sys/uio.h>
48#include <sys/conf.h>
49#include <sys/stat.h>
50#include <sys/ioccom.h>
51#include <machine/bus.h>
52#include <vm/vm.h>
53#include <vm/vm_kern.h>
54#include <vm/vm_extern.h>
55#include <vm/pmap.h>
56
57#include <dev/iir/iir.h>
58

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

73 .d_close = iir_close,
74 .d_read = iir_read,
75 .d_write = iir_write,
76 .d_ioctl = iir_ioctl,
77 .d_name = "iir",
78 .d_maj = CDEV_MAJOR,
79};
80
81#ifndef SDEV_PER_HBA
82static int sdev_made = 0;
83#endif
84extern int gdt_cnt;
85extern char ostype[];
86extern char osrelease[];
87extern gdt_statist_t gdt_stat;
88
89/*
90 * Given a controller number,
91 * make a special device and return the dev_t
92 */
93dev_t
94gdt_make_dev(int unit)
95{
96 dev_t dev;
97
98#ifdef SDEV_PER_HBA
99 dev = make_dev(&iir_cdevsw, hba2minor(unit), UID_ROOT, GID_OPERATOR,
100 S_IRUSR | S_IWUSR | S_IRGRP, "iir%d", unit);
101#else
102 if (sdev_made)
103 return (0);
104 dev = make_dev(&iir_cdevsw, 0, UID_ROOT, GID_OPERATOR,
105 S_IRUSR | S_IWUSR | S_IRGRP, "iir");
106 sdev_made = 1;
107#endif
108 return (dev);
109}
110
111void
112gdt_destroy_dev(dev_t dev)
113{

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

343
344 default:
345 break;
346 }
347
348 --gdt_stat.io_count_act;
349 return (0);
350}