Deleted Added
full compact
asr.c (163896) asr.c (164033)
1/*-
2 * Copyright (c) 1996-2000 Distributed Processing Technology Corporation
3 * Copyright (c) 2000-2001 Adaptec Corporation
4 * All rights reserved.
5 *
6 * TERMS AND CONDITIONS OF USE
7 *
8 * Redistribution and use in source form, with or without modification, are

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

112#include <sys/cdefs.h>
113#include <sys/param.h> /* TRUE=1 and FALSE=0 defined here */
114#include <sys/kernel.h>
115#include <sys/module.h>
116#include <sys/systm.h>
117#include <sys/malloc.h>
118#include <sys/conf.h>
119#include <sys/ioccom.h>
1/*-
2 * Copyright (c) 1996-2000 Distributed Processing Technology Corporation
3 * Copyright (c) 2000-2001 Adaptec Corporation
4 * All rights reserved.
5 *
6 * TERMS AND CONDITIONS OF USE
7 *
8 * Redistribution and use in source form, with or without modification, are

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

112#include <sys/cdefs.h>
113#include <sys/param.h> /* TRUE=1 and FALSE=0 defined here */
114#include <sys/kernel.h>
115#include <sys/module.h>
116#include <sys/systm.h>
117#include <sys/malloc.h>
118#include <sys/conf.h>
119#include <sys/ioccom.h>
120#include <sys/priv.h>
120#include <sys/proc.h>
121#include <sys/bus.h>
122#include <machine/resource.h>
123#include <machine/bus.h>
124#include <sys/rman.h>
125#include <sys/stat.h>
126#include <sys/bus_dma.h>
127

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

157#include <dev/asr/dptalign.h>
158#include <dev/asr/i2oexec.h>
159#include <dev/asr/i2obscsi.h>
160#include <dev/asr/i2odpt.h>
161#include <dev/asr/i2oadptr.h>
162
163#include <dev/asr/sys_info.h>
164
121#include <sys/proc.h>
122#include <sys/bus.h>
123#include <machine/resource.h>
124#include <machine/bus.h>
125#include <sys/rman.h>
126#include <sys/stat.h>
127#include <sys/bus_dma.h>
128

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

158#include <dev/asr/dptalign.h>
159#include <dev/asr/i2oexec.h>
160#include <dev/asr/i2obscsi.h>
161#include <dev/asr/i2odpt.h>
162#include <dev/asr/i2oadptr.h>
163
164#include <dev/asr/sys_info.h>
165
165__FBSDID("$FreeBSD: head/sys/dev/asr/asr.c 163896 2006-11-02 00:54:38Z mjacob $");
166__FBSDID("$FreeBSD: head/sys/dev/asr/asr.c 164033 2006-11-06 13:42:10Z rwatson $");
166
167#define ASR_VERSION 1
168#define ASR_REVISION '1'
169#define ASR_SUBREVISION '0'
170#define ASR_MONTH 5
171#define ASR_DAY 5
172#define ASR_YEAR (2004 - 1980)
173

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

3120 int error;
3121
3122 if (dev->si_drv1 == NULL) {
3123 return (ENODEV);
3124 }
3125 s = splcam ();
3126 if (ASR_ctlr_held) {
3127 error = EBUSY;
167
168#define ASR_VERSION 1
169#define ASR_REVISION '1'
170#define ASR_SUBREVISION '0'
171#define ASR_MONTH 5
172#define ASR_DAY 5
173#define ASR_YEAR (2004 - 1980)
174

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

3121 int error;
3122
3123 if (dev->si_drv1 == NULL) {
3124 return (ENODEV);
3125 }
3126 s = splcam ();
3127 if (ASR_ctlr_held) {
3128 error = EBUSY;
3128 } else if ((error = suser(td)) == 0) {
3129 } else if ((error = priv_check(td, PRIV_DRIVER)) == 0) {
3129 ++ASR_ctlr_held;
3130 }
3131 splx(s);
3132 return (error);
3133} /* asr_open */
3134
3135static int
3136asr_close(struct cdev *dev, int flags, int ifmt, struct thread *td)

--- 687 unchanged lines hidden ---
3130 ++ASR_ctlr_held;
3131 }
3132 splx(s);
3133 return (error);
3134} /* asr_open */
3135
3136static int
3137asr_close(struct cdev *dev, int flags, int ifmt, struct thread *td)

--- 687 unchanged lines hidden ---