Do the dreaded s/dev_t/struct cdev */
Bump __FreeBSD_version accordingly.
This commit is contained in:
parent
d420fcda27
commit
89c9c53da0
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=130585
@ -67,9 +67,9 @@ __FBSDID("$FreeBSD$");
|
|||||||
#include <vm/pmap.h>
|
#include <vm/pmap.h>
|
||||||
#include <vm/vm_extern.h>
|
#include <vm/vm_extern.h>
|
||||||
|
|
||||||
static dev_t memdev, kmemdev;
|
static struct cdev *memdev, *kmemdev;
|
||||||
#ifdef PERFMON
|
#ifdef PERFMON
|
||||||
static dev_t perfdev;
|
static struct cdev *perfdev;
|
||||||
#endif /* PERFMON */
|
#endif /* PERFMON */
|
||||||
|
|
||||||
static d_open_t mmopen;
|
static d_open_t mmopen;
|
||||||
@ -95,7 +95,7 @@ static struct cdevsw mem_cdevsw = {
|
|||||||
struct mem_range_softc mem_range_softc;
|
struct mem_range_softc mem_range_softc;
|
||||||
|
|
||||||
static int
|
static int
|
||||||
mmclose(dev_t dev, int flags, int fmt, struct thread *td)
|
mmclose(struct cdev *dev, int flags, int fmt, struct thread *td)
|
||||||
{
|
{
|
||||||
switch (minor(dev)) {
|
switch (minor(dev)) {
|
||||||
#ifdef PERFMON
|
#ifdef PERFMON
|
||||||
@ -109,7 +109,7 @@ mmclose(dev_t dev, int flags, int fmt, struct thread *td)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
mmopen(dev_t dev, int flags, int fmt, struct thread *td)
|
mmopen(struct cdev *dev, int flags, int fmt, struct thread *td)
|
||||||
{
|
{
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
@ -136,7 +136,7 @@ mmopen(dev_t dev, int flags, int fmt, struct thread *td)
|
|||||||
|
|
||||||
/*ARGSUSED*/
|
/*ARGSUSED*/
|
||||||
static int
|
static int
|
||||||
mmrw(dev_t dev, struct uio *uio, int flags)
|
mmrw(struct cdev *dev, struct uio *uio, int flags)
|
||||||
{
|
{
|
||||||
vm_offset_t o, v;
|
vm_offset_t o, v;
|
||||||
int c = 0;
|
int c = 0;
|
||||||
@ -219,7 +219,7 @@ mmrw(dev_t dev, struct uio *uio, int flags)
|
|||||||
* instead of going through read/write *
|
* instead of going through read/write *
|
||||||
\*******************************************************/
|
\*******************************************************/
|
||||||
static int
|
static int
|
||||||
memmmap(dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int prot)
|
memmmap(struct cdev *dev, vm_offset_t offset, vm_paddr_t *paddr, int prot)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* /dev/mem is the only one that makes sense through this
|
* /dev/mem is the only one that makes sense through this
|
||||||
@ -240,7 +240,7 @@ memmmap(dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int prot)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
mmioctl(dev_t dev, u_long cmd, caddr_t cmdarg, int flags, struct thread *td)
|
mmioctl(struct cdev *dev, u_long cmd, caddr_t cmdarg, int flags, struct thread *td)
|
||||||
{
|
{
|
||||||
switch(minor(dev)) {
|
switch(minor(dev)) {
|
||||||
#ifdef PERFMON
|
#ifdef PERFMON
|
||||||
|
@ -86,7 +86,7 @@ void promcons_delayed_makedev(void);
|
|||||||
|
|
||||||
int
|
int
|
||||||
promopen(dev, flag, mode, td)
|
promopen(dev, flag, mode, td)
|
||||||
dev_t dev;
|
struct cdev *dev;
|
||||||
int flag, mode;
|
int flag, mode;
|
||||||
struct thread *td;
|
struct thread *td;
|
||||||
{
|
{
|
||||||
@ -137,7 +137,7 @@ promopen(dev, flag, mode, td)
|
|||||||
|
|
||||||
int
|
int
|
||||||
promclose(dev, flag, mode, td)
|
promclose(dev, flag, mode, td)
|
||||||
dev_t dev;
|
struct cdev *dev;
|
||||||
int flag, mode;
|
int flag, mode;
|
||||||
struct thread *td;
|
struct thread *td;
|
||||||
{
|
{
|
||||||
|
@ -66,7 +66,7 @@ struct clockframe {
|
|||||||
/*
|
/*
|
||||||
* CTL_MACHDEP definitions.
|
* CTL_MACHDEP definitions.
|
||||||
*/
|
*/
|
||||||
#define CPU_CONSDEV 1 /* dev_t: console terminal device */
|
#define CPU_CONSDEV 1 /* struct cdev *: console terminal device */
|
||||||
#define CPU_ROOT_DEVICE 2 /* string: root device name */
|
#define CPU_ROOT_DEVICE 2 /* string: root device name */
|
||||||
#define CPU_UNALIGNED_PRINT 3 /* int: print unaligned accesses */
|
#define CPU_UNALIGNED_PRINT 3 /* int: print unaligned accesses */
|
||||||
#define CPU_UNALIGNED_FIX 4 /* int: fix unaligned accesses */
|
#define CPU_UNALIGNED_FIX 4 /* int: fix unaligned accesses */
|
||||||
|
@ -258,7 +258,7 @@ zs_cnputc(struct consdev *cp, int c)
|
|||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
zsopen(dev_t dev, int flag, int mode, struct thread *td)
|
zsopen(struct cdev *dev, int flag, int mode, struct thread *td)
|
||||||
{
|
{
|
||||||
struct zs_softc *sc = ZS_SOFTC(minor(dev));
|
struct zs_softc *sc = ZS_SOFTC(minor(dev));
|
||||||
struct tty *tp;
|
struct tty *tp;
|
||||||
@ -305,7 +305,7 @@ zsopen(dev_t dev, int flag, int mode, struct thread *td)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
zsclose(dev_t dev, int flag, int mode, struct thread *td)
|
zsclose(struct cdev *dev, int flag, int mode, struct thread *td)
|
||||||
{
|
{
|
||||||
struct zs_softc *sc = ZS_SOFTC(minor(dev));
|
struct zs_softc *sc = ZS_SOFTC(minor(dev));
|
||||||
struct tty *tp;
|
struct tty *tp;
|
||||||
|
@ -68,7 +68,7 @@ __FBSDID("$FreeBSD$");
|
|||||||
#include <vm/pmap.h>
|
#include <vm/pmap.h>
|
||||||
#include <vm/vm_extern.h>
|
#include <vm/vm_extern.h>
|
||||||
|
|
||||||
static dev_t memdev, kmemdev, iodev;
|
static struct cdev *memdev, *kmemdev, *iodev;
|
||||||
|
|
||||||
static d_open_t mmopen;
|
static d_open_t mmopen;
|
||||||
static d_close_t mmclose;
|
static d_close_t mmclose;
|
||||||
@ -95,7 +95,7 @@ MALLOC_DEFINE(M_MEMDESC, "memdesc", "memory range descriptors");
|
|||||||
struct mem_range_softc mem_range_softc;
|
struct mem_range_softc mem_range_softc;
|
||||||
|
|
||||||
static int
|
static int
|
||||||
mmclose(dev_t dev, int flags, int fmt, struct thread *td)
|
mmclose(struct cdev *dev, int flags, int fmt, struct thread *td)
|
||||||
{
|
{
|
||||||
switch (minor(dev)) {
|
switch (minor(dev)) {
|
||||||
case 14:
|
case 14:
|
||||||
@ -105,7 +105,7 @@ mmclose(dev_t dev, int flags, int fmt, struct thread *td)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
mmopen(dev_t dev, int flags, int fmt, struct thread *td)
|
mmopen(struct cdev *dev, int flags, int fmt, struct thread *td)
|
||||||
{
|
{
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
@ -133,7 +133,7 @@ mmopen(dev_t dev, int flags, int fmt, struct thread *td)
|
|||||||
|
|
||||||
/*ARGSUSED*/
|
/*ARGSUSED*/
|
||||||
static int
|
static int
|
||||||
mmrw(dev_t dev, struct uio *uio, int flags)
|
mmrw(struct cdev *dev, struct uio *uio, int flags)
|
||||||
{
|
{
|
||||||
int o;
|
int o;
|
||||||
u_long c = 0, v;
|
u_long c = 0, v;
|
||||||
@ -214,7 +214,7 @@ mmrw(dev_t dev, struct uio *uio, int flags)
|
|||||||
* instead of going through read/write *
|
* instead of going through read/write *
|
||||||
\*******************************************************/
|
\*******************************************************/
|
||||||
static int
|
static int
|
||||||
memmmap(dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int prot)
|
memmmap(struct cdev *dev, vm_offset_t offset, vm_paddr_t *paddr, int prot)
|
||||||
{
|
{
|
||||||
switch (minor(dev))
|
switch (minor(dev))
|
||||||
{
|
{
|
||||||
@ -242,7 +242,7 @@ memmmap(dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int prot)
|
|||||||
* and mem_range_attr_set.
|
* and mem_range_attr_set.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
mmioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct thread *td)
|
mmioctl(struct cdev *dev, u_long cmd, caddr_t data, int flags, struct thread *td)
|
||||||
{
|
{
|
||||||
int nd, error = 0;
|
int nd, error = 0;
|
||||||
struct mem_range_op *mo = (struct mem_range_op *)data;
|
struct mem_range_op *mo = (struct mem_range_op *)data;
|
||||||
|
@ -65,7 +65,7 @@
|
|||||||
/*
|
/*
|
||||||
* CTL_MACHDEP definitions.
|
* CTL_MACHDEP definitions.
|
||||||
*/
|
*/
|
||||||
#define CPU_CONSDEV 1 /* dev_t: console terminal device */
|
#define CPU_CONSDEV 1 /* struct cdev *: console terminal device */
|
||||||
#define CPU_ADJKERNTZ 2 /* int: timezone offset (seconds) */
|
#define CPU_ADJKERNTZ 2 /* int: timezone offset (seconds) */
|
||||||
#define CPU_DISRTCSET 3 /* int: disable resettodr() call */
|
#define CPU_DISRTCSET 3 /* int: disable resettodr() call */
|
||||||
#define CPU_WALLCLOCK 5 /* int: indicates wall CMOS clock */
|
#define CPU_WALLCLOCK 5 /* int: indicates wall CMOS clock */
|
||||||
|
@ -190,7 +190,7 @@ nexus_bs_subregion(t, bsh, offset, size, nbshp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
nexus_bs_mmap(dev_t dev, vm_offset_t off, vm_paddr_t *addr, int prot)
|
nexus_bs_mmap(struct cdev *dev, vm_offset_t off, vm_paddr_t *addr, int prot)
|
||||||
{
|
{
|
||||||
*addr = off;
|
*addr = off;
|
||||||
return (0);
|
return (0);
|
||||||
|
@ -118,7 +118,7 @@ struct bus_space {
|
|||||||
void * (*bs_vaddr) (void *, bus_space_handle_t);
|
void * (*bs_vaddr) (void *, bus_space_handle_t);
|
||||||
|
|
||||||
/* mmap bus space for user */
|
/* mmap bus space for user */
|
||||||
int (*bs_mmap) (dev_t, vm_offset_t, vm_paddr_t *, int);
|
int (*bs_mmap) (struct cdev *, vm_offset_t, vm_paddr_t *, int);
|
||||||
|
|
||||||
/* barrier */
|
/* barrier */
|
||||||
void (*bs_barrier) (void *, bus_space_handle_t,
|
void (*bs_barrier) (void *, bus_space_handle_t,
|
||||||
@ -411,7 +411,7 @@ void __bs_c(f,_bs_free) (void *t, bus_space_handle_t bsh, \
|
|||||||
void * __bs_c(f,_bs_vaddr) (void *t, bus_space_handle_t bsh);
|
void * __bs_c(f,_bs_vaddr) (void *t, bus_space_handle_t bsh);
|
||||||
|
|
||||||
#define bs_mmap_proto(f) \
|
#define bs_mmap_proto(f) \
|
||||||
int __bs_c(f,_bs_mmap) (dev_t, vm_offset_t, vm_paddr_t *, int);
|
int __bs_c(f,_bs_mmap) (struct cdev *, vm_offset_t, vm_paddr_t *, int);
|
||||||
|
|
||||||
#define bs_barrier_proto(f) \
|
#define bs_barrier_proto(f) \
|
||||||
void __bs_c(f,_bs_barrier) (void *t, bus_space_handle_t bsh, \
|
void __bs_c(f,_bs_barrier) (void *t, bus_space_handle_t bsh, \
|
||||||
|
@ -225,7 +225,7 @@ sa11x0_bs_subregion(t, bsh, offset, size, nbshp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
sa11x0_bs_mmap(dev_t t, vm_offset_t offset, vm_paddr_t *paddr, int nprot)
|
sa11x0_bs_mmap(struct cdev *t, vm_offset_t offset, vm_paddr_t *paddr, int nprot)
|
||||||
{
|
{
|
||||||
*paddr = offset;
|
*paddr = offset;
|
||||||
return (0);
|
return (0);
|
||||||
|
@ -325,7 +325,7 @@ bc_read(int unit, daddr_t dblk, int blks, caddr_t dest)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Return a suitable dev_t value for (dev).
|
* Return a suitable struct cdev *value for (dev).
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
bc_getdev(struct i386_devdesc *dev)
|
bc_getdev(struct i386_devdesc *dev)
|
||||||
@ -344,7 +344,7 @@ bc_getdev(struct i386_devdesc *dev)
|
|||||||
* XXX: Need to examine device spec here to figure out if SCSI or
|
* XXX: Need to examine device spec here to figure out if SCSI or
|
||||||
* ATAPI. No idea on how to figure out device number. All we can
|
* ATAPI. No idea on how to figure out device number. All we can
|
||||||
* really pass to the kernel is what bus and device on which bus we
|
* really pass to the kernel is what bus and device on which bus we
|
||||||
* were booted from, which dev_t isn't well suited to since those
|
* were booted from, which struct cdev *isn't well suited to since those
|
||||||
* number don't match to unit numbers very well. We may just need
|
* number don't match to unit numbers very well. We may just need
|
||||||
* to engage in a hack where we pass -C to the boot args if we are
|
* to engage in a hack where we pass -C to the boot args if we are
|
||||||
* the boot device.
|
* the boot device.
|
||||||
|
@ -1165,7 +1165,7 @@ bd_getbigeom(int bunit)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Return a suitable dev_t value for (dev).
|
* Return a suitable struct cdev *value for (dev).
|
||||||
*
|
*
|
||||||
* In the case where it looks like (dev) is a SCSI disk, we allow the number of
|
* In the case where it looks like (dev) is a SCSI disk, we allow the number of
|
||||||
* IDE disks to be specified in $num_ide_disks. There should be a Better Way.
|
* IDE disks to be specified in $num_ide_disks. There should be a Better Way.
|
||||||
|
@ -72,13 +72,13 @@ extern struct devsw pxedisk;
|
|||||||
extern struct fs_ops pxe_fsops;
|
extern struct fs_ops pxe_fsops;
|
||||||
|
|
||||||
int bc_add(int biosdev); /* Register CD booted from. */
|
int bc_add(int biosdev); /* Register CD booted from. */
|
||||||
int bc_getdev(struct i386_devdesc *dev); /* return dev_t for (dev) */
|
int bc_getdev(struct i386_devdesc *dev); /* return struct cdev *for (dev) */
|
||||||
int bc_bios2unit(int biosdev); /* xlate BIOS device -> bioscd unit */
|
int bc_bios2unit(int biosdev); /* xlate BIOS device -> bioscd unit */
|
||||||
int bc_unit2bios(int unit); /* xlate bioscd unit -> BIOS device */
|
int bc_unit2bios(int unit); /* xlate bioscd unit -> BIOS device */
|
||||||
u_int32_t bd_getbigeom(int bunit); /* return geometry in bootinfo format */
|
u_int32_t bd_getbigeom(int bunit); /* return geometry in bootinfo format */
|
||||||
int bd_bios2unit(int biosdev); /* xlate BIOS device -> biosdisk unit */
|
int bd_bios2unit(int biosdev); /* xlate BIOS device -> biosdisk unit */
|
||||||
int bd_unit2bios(int unit); /* xlate biosdisk unit -> BIOS device */
|
int bd_unit2bios(int unit); /* xlate biosdisk unit -> BIOS device */
|
||||||
int bd_getdev(struct i386_devdesc *dev); /* return dev_t for (dev) */
|
int bd_getdev(struct i386_devdesc *dev); /* return struct cdev *for (dev) */
|
||||||
|
|
||||||
ssize_t i386_copyin(const void *src, vm_offset_t dest, const size_t len);
|
ssize_t i386_copyin(const void *src, vm_offset_t dest, const size_t len);
|
||||||
ssize_t i386_copyout(const vm_offset_t src, void *dest, const size_t len);
|
ssize_t i386_copyout(const vm_offset_t src, void *dest, const size_t len);
|
||||||
|
@ -94,7 +94,7 @@ struct dinode {
|
|||||||
* The di_db fields may be overlaid with other information for
|
* The di_db fields may be overlaid with other information for
|
||||||
* file types that do not have associated disk storage. Block
|
* file types that do not have associated disk storage. Block
|
||||||
* and character devices overlay the first data block with their
|
* and character devices overlay the first data block with their
|
||||||
* dev_t value. Short symbolic links place their path in the
|
* struct cdev *value. Short symbolic links place their path in the
|
||||||
* di_db area.
|
* di_db area.
|
||||||
*/
|
*/
|
||||||
#define di_inumber di_u.inumber
|
#define di_inumber di_u.inumber
|
||||||
|
@ -69,7 +69,7 @@ struct inode {
|
|||||||
struct vnode *i_vnode;/* Vnode associated with this inode. */
|
struct vnode *i_vnode;/* Vnode associated with this inode. */
|
||||||
struct vnode *i_devvp;/* Vnode for block I/O. */
|
struct vnode *i_devvp;/* Vnode for block I/O. */
|
||||||
u_int32_t i_flag; /* flags, see below */
|
u_int32_t i_flag; /* flags, see below */
|
||||||
dev_t i_dev; /* Device associated with the inode. */
|
struct cdev *i_dev; /* Device associated with the inode. */
|
||||||
ino_t i_number; /* The identity of the inode. */
|
ino_t i_number; /* The identity of the inode. */
|
||||||
int i_effnlink; /* i_nlink when I/O completes */
|
int i_effnlink; /* i_nlink when I/O completes */
|
||||||
|
|
||||||
|
@ -1481,7 +1481,7 @@ bd_getbigeom(int bunit)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Return a suitable dev_t value for (dev).
|
* Return a suitable struct cdev *value for (dev).
|
||||||
*
|
*
|
||||||
* In the case where it looks like (dev) is a SCSI disk, we allow the number of
|
* In the case where it looks like (dev) is a SCSI disk, we allow the number of
|
||||||
* IDE disks to be specified in $num_ide_disks. There should be a Better Way.
|
* IDE disks to be specified in $num_ide_disks. There should be a Better Way.
|
||||||
|
@ -936,7 +936,7 @@ xptdone(struct cam_periph *periph, union ccb *done_ccb)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
xptopen(dev_t dev, int flags, int fmt, struct thread *td)
|
xptopen(struct cdev *dev, int flags, int fmt, struct thread *td)
|
||||||
{
|
{
|
||||||
int unit;
|
int unit;
|
||||||
|
|
||||||
@ -973,7 +973,7 @@ xptopen(dev_t dev, int flags, int fmt, struct thread *td)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
xptclose(dev_t dev, int flag, int fmt, struct thread *td)
|
xptclose(struct cdev *dev, int flag, int fmt, struct thread *td)
|
||||||
{
|
{
|
||||||
int unit;
|
int unit;
|
||||||
|
|
||||||
@ -996,7 +996,7 @@ xptclose(dev_t dev, int flag, int fmt, struct thread *td)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
xptioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
|
xptioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
|
||||||
{
|
{
|
||||||
int unit, error;
|
int unit, error;
|
||||||
|
|
||||||
|
@ -145,7 +145,7 @@ struct ch_softc {
|
|||||||
ch_quirks quirks;
|
ch_quirks quirks;
|
||||||
union ccb saved_ccb;
|
union ccb saved_ccb;
|
||||||
struct devstat *device_stats;
|
struct devstat *device_stats;
|
||||||
dev_t dev;
|
struct cdev *dev;
|
||||||
|
|
||||||
int sc_picker; /* current picker */
|
int sc_picker; /* current picker */
|
||||||
|
|
||||||
@ -405,7 +405,7 @@ chregister(struct cam_periph *periph, void *arg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
chopen(dev_t dev, int flags, int fmt, struct thread *td)
|
chopen(struct cdev *dev, int flags, int fmt, struct thread *td)
|
||||||
{
|
{
|
||||||
struct cam_periph *periph;
|
struct cam_periph *periph;
|
||||||
struct ch_softc *softc;
|
struct ch_softc *softc;
|
||||||
@ -453,7 +453,7 @@ chopen(dev_t dev, int flags, int fmt, struct thread *td)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
chclose(dev_t dev, int flag, int fmt, struct thread *td)
|
chclose(struct cdev *dev, int flag, int fmt, struct thread *td)
|
||||||
{
|
{
|
||||||
struct cam_periph *periph;
|
struct cam_periph *periph;
|
||||||
struct ch_softc *softc;
|
struct ch_softc *softc;
|
||||||
@ -702,7 +702,7 @@ cherror(union ccb *ccb, u_int32_t cam_flags, u_int32_t sense_flags)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
chioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
|
chioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
|
||||||
{
|
{
|
||||||
struct cam_periph *periph;
|
struct cam_periph *periph;
|
||||||
struct ch_softc *softc;
|
struct ch_softc *softc;
|
||||||
|
@ -74,7 +74,7 @@ struct pass_softc {
|
|||||||
u_int8_t pd_type;
|
u_int8_t pd_type;
|
||||||
union ccb saved_ccb;
|
union ccb saved_ccb;
|
||||||
struct devstat *device_stats;
|
struct devstat *device_stats;
|
||||||
dev_t dev;
|
struct cdev *dev;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -317,7 +317,7 @@ passregister(struct cam_periph *periph, void *arg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
passopen(dev_t dev, int flags, int fmt, struct thread *td)
|
passopen(struct cdev *dev, int flags, int fmt, struct thread *td)
|
||||||
{
|
{
|
||||||
struct cam_periph *periph;
|
struct cam_periph *periph;
|
||||||
struct pass_softc *softc;
|
struct pass_softc *softc;
|
||||||
@ -384,7 +384,7 @@ passopen(dev_t dev, int flags, int fmt, struct thread *td)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
passclose(dev_t dev, int flag, int fmt, struct thread *td)
|
passclose(struct cdev *dev, int flag, int fmt, struct thread *td)
|
||||||
{
|
{
|
||||||
struct cam_periph *periph;
|
struct cam_periph *periph;
|
||||||
struct pass_softc *softc;
|
struct pass_softc *softc;
|
||||||
@ -446,7 +446,7 @@ passdone(struct cam_periph *periph, union ccb *done_ccb)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
passioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
|
passioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
|
||||||
{
|
{
|
||||||
struct cam_periph *periph;
|
struct cam_periph *periph;
|
||||||
struct pass_softc *softc;
|
struct pass_softc *softc;
|
||||||
|
@ -83,7 +83,7 @@ struct pt_softc {
|
|||||||
pt_flags flags;
|
pt_flags flags;
|
||||||
union ccb saved_ccb;
|
union ccb saved_ccb;
|
||||||
int io_timeout;
|
int io_timeout;
|
||||||
dev_t dev;
|
struct cdev *dev;
|
||||||
};
|
};
|
||||||
|
|
||||||
static d_open_t ptopen;
|
static d_open_t ptopen;
|
||||||
@ -134,7 +134,7 @@ static struct cdevsw pt_cdevsw = {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ptopen(dev_t dev, int flags, int fmt, struct thread *td)
|
ptopen(struct cdev *dev, int flags, int fmt, struct thread *td)
|
||||||
{
|
{
|
||||||
struct cam_periph *periph;
|
struct cam_periph *periph;
|
||||||
struct pt_softc *softc;
|
struct pt_softc *softc;
|
||||||
@ -178,7 +178,7 @@ ptopen(dev_t dev, int flags, int fmt, struct thread *td)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ptclose(dev_t dev, int flag, int fmt, struct thread *td)
|
ptclose(struct cdev *dev, int flag, int fmt, struct thread *td)
|
||||||
{
|
{
|
||||||
struct cam_periph *periph;
|
struct cam_periph *periph;
|
||||||
struct pt_softc *softc;
|
struct pt_softc *softc;
|
||||||
@ -645,7 +645,7 @@ pterror(union ccb *ccb, u_int32_t cam_flags, u_int32_t sense_flags)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ptioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
|
ptioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
|
||||||
{
|
{
|
||||||
struct cam_periph *periph;
|
struct cam_periph *periph;
|
||||||
struct pt_softc *softc;
|
struct pt_softc *softc;
|
||||||
|
@ -192,11 +192,11 @@ typedef enum {
|
|||||||
|
|
||||||
#define SA_NUM_MODES 4
|
#define SA_NUM_MODES 4
|
||||||
struct sa_devs {
|
struct sa_devs {
|
||||||
dev_t ctl_dev;
|
struct cdev *ctl_dev;
|
||||||
struct sa_mode_devs {
|
struct sa_mode_devs {
|
||||||
dev_t r_dev;
|
struct cdev *r_dev;
|
||||||
dev_t nr_dev;
|
struct cdev *nr_dev;
|
||||||
dev_t er_dev;
|
struct cdev *er_dev;
|
||||||
} mode_devs[SA_NUM_MODES];
|
} mode_devs[SA_NUM_MODES];
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -398,7 +398,7 @@ static void saprevent(struct cam_periph *periph, int action);
|
|||||||
static int sarewind(struct cam_periph *periph);
|
static int sarewind(struct cam_periph *periph);
|
||||||
static int saspace(struct cam_periph *periph, int count,
|
static int saspace(struct cam_periph *periph, int count,
|
||||||
scsi_space_code code);
|
scsi_space_code code);
|
||||||
static int samount(struct cam_periph *, int, dev_t);
|
static int samount(struct cam_periph *, int, struct cdev *);
|
||||||
static int saretension(struct cam_periph *periph);
|
static int saretension(struct cam_periph *periph);
|
||||||
static int sareservereleaseunit(struct cam_periph *periph,
|
static int sareservereleaseunit(struct cam_periph *periph,
|
||||||
int reserve);
|
int reserve);
|
||||||
@ -437,7 +437,7 @@ static struct cdevsw sa_cdevsw = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static int
|
static int
|
||||||
saopen(dev_t dev, int flags, int fmt, struct thread *td)
|
saopen(struct cdev *dev, int flags, int fmt, struct thread *td)
|
||||||
{
|
{
|
||||||
struct cam_periph *periph;
|
struct cam_periph *periph;
|
||||||
struct sa_softc *softc;
|
struct sa_softc *softc;
|
||||||
@ -497,7 +497,7 @@ saopen(dev_t dev, int flags, int fmt, struct thread *td)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
saclose(dev_t dev, int flag, int fmt, struct thread *td)
|
saclose(struct cdev *dev, int flag, int fmt, struct thread *td)
|
||||||
{
|
{
|
||||||
struct cam_periph *periph;
|
struct cam_periph *periph;
|
||||||
struct sa_softc *softc;
|
struct sa_softc *softc;
|
||||||
@ -756,7 +756,7 @@ sastrategy(struct bio *bp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
saioctl(dev_t dev, u_long cmd, caddr_t arg, int flag, struct thread *td)
|
saioctl(struct cdev *dev, u_long cmd, caddr_t arg, int flag, struct thread *td)
|
||||||
{
|
{
|
||||||
struct cam_periph *periph;
|
struct cam_periph *periph;
|
||||||
struct sa_softc *softc;
|
struct sa_softc *softc;
|
||||||
@ -1473,7 +1473,7 @@ saregister(struct cam_periph *periph, void *arg)
|
|||||||
* Make the (well known) aliases for the first mode.
|
* Make the (well known) aliases for the first mode.
|
||||||
*/
|
*/
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
dev_t alias;
|
struct cdev *alias;
|
||||||
|
|
||||||
alias = make_dev_alias(softc->devs.mode_devs[i].r_dev,
|
alias = make_dev_alias(softc->devs.mode_devs[i].r_dev,
|
||||||
"%s%d", periph->periph_name, periph->unit_number);
|
"%s%d", periph->periph_name, periph->unit_number);
|
||||||
@ -1777,7 +1777,7 @@ sadone(struct cam_periph *periph, union ccb *done_ccb)
|
|||||||
* Mount the tape (make sure it's ready for I/O).
|
* Mount the tape (make sure it's ready for I/O).
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
samount(struct cam_periph *periph, int oflags, dev_t dev)
|
samount(struct cam_periph *periph, int oflags, struct cdev *dev)
|
||||||
{
|
{
|
||||||
struct sa_softc *softc;
|
struct sa_softc *softc;
|
||||||
union ccb *ccb;
|
union ccb *ccb;
|
||||||
|
@ -145,7 +145,7 @@ struct ses_softc {
|
|||||||
ses_encstat ses_encstat; /* overall status */
|
ses_encstat ses_encstat; /* overall status */
|
||||||
u_int8_t ses_flags;
|
u_int8_t ses_flags;
|
||||||
union ccb ses_saved_ccb;
|
union ccb ses_saved_ccb;
|
||||||
dev_t ses_dev;
|
struct cdev *ses_dev;
|
||||||
struct cam_periph *periph;
|
struct cam_periph *periph;
|
||||||
};
|
};
|
||||||
#define SES_FLAG_INVALID 0x01
|
#define SES_FLAG_INVALID 0x01
|
||||||
@ -405,7 +405,7 @@ sesregister(struct cam_periph *periph, void *arg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
sesopen(dev_t dev, int flags, int fmt, struct thread *td)
|
sesopen(struct cdev *dev, int flags, int fmt, struct thread *td)
|
||||||
{
|
{
|
||||||
struct cam_periph *periph;
|
struct cam_periph *periph;
|
||||||
struct ses_softc *softc;
|
struct ses_softc *softc;
|
||||||
@ -461,7 +461,7 @@ sesopen(dev_t dev, int flags, int fmt, struct thread *td)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
sesclose(dev_t dev, int flag, int fmt, struct thread *td)
|
sesclose(struct cdev *dev, int flag, int fmt, struct thread *td)
|
||||||
{
|
{
|
||||||
struct cam_periph *periph;
|
struct cam_periph *periph;
|
||||||
struct ses_softc *softc;
|
struct ses_softc *softc;
|
||||||
@ -517,7 +517,7 @@ seserror(union ccb *ccb, u_int32_t cflags, u_int32_t sflags)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
sesioctl(dev_t dev, u_long cmd, caddr_t arg_addr, int flag, struct thread *td)
|
sesioctl(struct cdev *dev, u_long cmd, caddr_t arg_addr, int flag, struct thread *td)
|
||||||
{
|
{
|
||||||
struct cam_periph *periph;
|
struct cam_periph *periph;
|
||||||
ses_encstat tmp;
|
ses_encstat tmp;
|
||||||
|
@ -142,7 +142,7 @@ static struct targ_cmd_descr *
|
|||||||
targgetdescr(struct targ_softc *softc);
|
targgetdescr(struct targ_softc *softc);
|
||||||
static periph_init_t targinit;
|
static periph_init_t targinit;
|
||||||
static void targclone(void *arg, char *name, int namelen,
|
static void targclone(void *arg, char *name, int namelen,
|
||||||
dev_t *dev);
|
struct cdev **dev);
|
||||||
static void targasync(void *callback_arg, u_int32_t code,
|
static void targasync(void *callback_arg, u_int32_t code,
|
||||||
struct cam_path *path, void *arg);
|
struct cam_path *path, void *arg);
|
||||||
static void abort_all_pending(struct targ_softc *softc);
|
static void abort_all_pending(struct targ_softc *softc);
|
||||||
@ -165,7 +165,7 @@ static MALLOC_DEFINE(M_TARG, "TARG", "TARG data");
|
|||||||
|
|
||||||
/* Create softc and initialize it. Only one proc can open each targ device. */
|
/* Create softc and initialize it. Only one proc can open each targ device. */
|
||||||
static int
|
static int
|
||||||
targopen(dev_t dev, int flags, int fmt, struct thread *td)
|
targopen(struct cdev *dev, int flags, int fmt, struct thread *td)
|
||||||
{
|
{
|
||||||
struct targ_softc *softc;
|
struct targ_softc *softc;
|
||||||
|
|
||||||
@ -202,7 +202,7 @@ targopen(dev_t dev, int flags, int fmt, struct thread *td)
|
|||||||
|
|
||||||
/* Disable LUN if enabled and teardown softc */
|
/* Disable LUN if enabled and teardown softc */
|
||||||
static int
|
static int
|
||||||
targclose(dev_t dev, int flag, int fmt, struct thread *td)
|
targclose(struct cdev *dev, int flag, int fmt, struct thread *td)
|
||||||
{
|
{
|
||||||
struct targ_softc *softc;
|
struct targ_softc *softc;
|
||||||
int error;
|
int error;
|
||||||
@ -230,7 +230,7 @@ targclose(dev_t dev, int flag, int fmt, struct thread *td)
|
|||||||
|
|
||||||
/* Enable/disable LUNs, set debugging level */
|
/* Enable/disable LUNs, set debugging level */
|
||||||
static int
|
static int
|
||||||
targioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
|
targioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
|
||||||
{
|
{
|
||||||
struct targ_softc *softc;
|
struct targ_softc *softc;
|
||||||
cam_status status;
|
cam_status status;
|
||||||
@ -303,7 +303,7 @@ targioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
|
|||||||
|
|
||||||
/* Writes are always ready, reads wait for user_ccb_queue or abort_queue */
|
/* Writes are always ready, reads wait for user_ccb_queue or abort_queue */
|
||||||
static int
|
static int
|
||||||
targpoll(dev_t dev, int poll_events, struct thread *td)
|
targpoll(struct cdev *dev, int poll_events, struct thread *td)
|
||||||
{
|
{
|
||||||
struct targ_softc *softc;
|
struct targ_softc *softc;
|
||||||
int revents;
|
int revents;
|
||||||
@ -329,7 +329,7 @@ targpoll(dev_t dev, int poll_events, struct thread *td)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
targkqfilter(dev_t dev, struct knote *kn)
|
targkqfilter(struct cdev *dev, struct knote *kn)
|
||||||
{
|
{
|
||||||
struct targ_softc *softc;
|
struct targ_softc *softc;
|
||||||
|
|
||||||
@ -534,7 +534,7 @@ targdtor(struct cam_periph *periph)
|
|||||||
|
|
||||||
/* Receive CCBs from user mode proc and send them to the HBA */
|
/* Receive CCBs from user mode proc and send them to the HBA */
|
||||||
static int
|
static int
|
||||||
targwrite(dev_t dev, struct uio *uio, int ioflag)
|
targwrite(struct cdev *dev, struct uio *uio, int ioflag)
|
||||||
{
|
{
|
||||||
union ccb *user_ccb;
|
union ccb *user_ccb;
|
||||||
struct targ_softc *softc;
|
struct targ_softc *softc;
|
||||||
@ -835,7 +835,7 @@ targdone(struct cam_periph *periph, union ccb *done_ccb)
|
|||||||
|
|
||||||
/* Return CCBs to the user from the user queue and abort queue */
|
/* Return CCBs to the user from the user queue and abort queue */
|
||||||
static int
|
static int
|
||||||
targread(dev_t dev, struct uio *uio, int ioflag)
|
targread(struct cdev *dev, struct uio *uio, int ioflag)
|
||||||
{
|
{
|
||||||
struct descr_queue *abort_queue;
|
struct descr_queue *abort_queue;
|
||||||
struct targ_cmd_descr *user_descr;
|
struct targ_cmd_descr *user_descr;
|
||||||
@ -1031,7 +1031,7 @@ targinit(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
targclone(void *arg, char *name, int namelen, dev_t *dev)
|
targclone(void *arg, char *name, int namelen, struct cdev **dev)
|
||||||
{
|
{
|
||||||
int u;
|
int u;
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ struct cnode {
|
|||||||
struct vattr c_vattr; /* attributes */
|
struct vattr c_vattr; /* attributes */
|
||||||
char *c_symlink; /* pointer to symbolic link */
|
char *c_symlink; /* pointer to symbolic link */
|
||||||
u_short c_symlen; /* length of symbolic link */
|
u_short c_symlen; /* length of symbolic link */
|
||||||
dev_t c_device; /* associated vnode device */
|
struct cdev *c_device; /* associated vnode device */
|
||||||
ino_t c_inode; /* associated vnode inode */
|
ino_t c_inode; /* associated vnode inode */
|
||||||
struct cnode *c_next; /* links if on NetBSD machine */
|
struct cnode *c_next; /* links if on NetBSD machine */
|
||||||
};
|
};
|
||||||
@ -153,7 +153,7 @@ struct coda_mntinfo {
|
|||||||
struct vnode *mi_rootvp;
|
struct vnode *mi_rootvp;
|
||||||
struct mount *mi_vfsp;
|
struct mount *mi_vfsp;
|
||||||
struct vcomm mi_vcomm;
|
struct vcomm mi_vcomm;
|
||||||
dev_t dev;
|
struct cdev *dev;
|
||||||
int mi_started;
|
int mi_started;
|
||||||
};
|
};
|
||||||
extern struct coda_mntinfo coda_mnttbl[]; /* indexed by minor device number */
|
extern struct coda_mntinfo coda_mnttbl[]; /* indexed by minor device number */
|
||||||
@ -201,7 +201,7 @@ extern struct cnode *make_coda_node(CodaFid *fid, struct mount *vfsp, short type
|
|||||||
extern int coda_vnodeopstats_init(void);
|
extern int coda_vnodeopstats_init(void);
|
||||||
|
|
||||||
/* coda_vfsops.h */
|
/* coda_vfsops.h */
|
||||||
extern struct mount *devtomp(dev_t dev);
|
extern struct mount *devtomp(struct cdev *dev);
|
||||||
|
|
||||||
/* sigh */
|
/* sigh */
|
||||||
#define CODA_RDWR ((u_long) 31)
|
#define CODA_RDWR ((u_long) 31)
|
||||||
|
@ -58,7 +58,7 @@ typedef unsigned long u_long;
|
|||||||
typedef unsigned int u_int;
|
typedef unsigned int u_int;
|
||||||
typedef unsigned short u_short;
|
typedef unsigned short u_short;
|
||||||
typedef u_long ino_t;
|
typedef u_long ino_t;
|
||||||
typedef u_long dev_t;
|
typedef u_long struct cdev *;
|
||||||
typedef void * caddr_t;
|
typedef void * caddr_t;
|
||||||
#ifdef DOS
|
#ifdef DOS
|
||||||
typedef unsigned __int64 u_quad_t;
|
typedef unsigned __int64 u_quad_t;
|
||||||
|
@ -174,7 +174,7 @@ printf("error = %d\n", error);
|
|||||||
/* for DEVFS, using bpf & tun drivers as examples*/
|
/* for DEVFS, using bpf & tun drivers as examples*/
|
||||||
static void coda_fbsd_drvinit(void *unused);
|
static void coda_fbsd_drvinit(void *unused);
|
||||||
static void coda_fbsd_drvuninit(void *unused);
|
static void coda_fbsd_drvuninit(void *unused);
|
||||||
static void coda_fbsd_clone(void *arg, char *name, int namelen, dev_t *dev);
|
static void coda_fbsd_clone(void *arg, char *name, int namelen, struct cdev **dev);
|
||||||
|
|
||||||
static eventhandler_tag clonetag;
|
static eventhandler_tag clonetag;
|
||||||
|
|
||||||
@ -182,7 +182,7 @@ static void coda_fbsd_clone(arg, name, namelen, dev)
|
|||||||
void *arg;
|
void *arg;
|
||||||
char *name;
|
char *name;
|
||||||
int namelen;
|
int namelen;
|
||||||
dev_t *dev;
|
struct cdev **dev;
|
||||||
{
|
{
|
||||||
int u;
|
int u;
|
||||||
|
|
||||||
|
@ -117,7 +117,7 @@ vcodaattach(n)
|
|||||||
|
|
||||||
int
|
int
|
||||||
vc_nb_open(dev, flag, mode, td)
|
vc_nb_open(dev, flag, mode, td)
|
||||||
dev_t dev;
|
struct cdev *dev;
|
||||||
int flag;
|
int flag;
|
||||||
int mode;
|
int mode;
|
||||||
struct thread *td; /* NetBSD only */
|
struct thread *td; /* NetBSD only */
|
||||||
@ -149,7 +149,7 @@ vc_nb_open(dev, flag, mode, td)
|
|||||||
|
|
||||||
int
|
int
|
||||||
vc_nb_close (dev, flag, mode, td)
|
vc_nb_close (dev, flag, mode, td)
|
||||||
dev_t dev;
|
struct cdev *dev;
|
||||||
int flag;
|
int flag;
|
||||||
int mode;
|
int mode;
|
||||||
struct thread *td;
|
struct thread *td;
|
||||||
@ -233,7 +233,7 @@ vc_nb_close (dev, flag, mode, td)
|
|||||||
|
|
||||||
int
|
int
|
||||||
vc_nb_read(dev, uiop, flag)
|
vc_nb_read(dev, uiop, flag)
|
||||||
dev_t dev;
|
struct cdev *dev;
|
||||||
struct uio *uiop;
|
struct uio *uiop;
|
||||||
int flag;
|
int flag;
|
||||||
{
|
{
|
||||||
@ -287,7 +287,7 @@ vc_nb_read(dev, uiop, flag)
|
|||||||
|
|
||||||
int
|
int
|
||||||
vc_nb_write(dev, uiop, flag)
|
vc_nb_write(dev, uiop, flag)
|
||||||
dev_t dev;
|
struct cdev *dev;
|
||||||
struct uio *uiop;
|
struct uio *uiop;
|
||||||
int flag;
|
int flag;
|
||||||
{
|
{
|
||||||
@ -387,7 +387,7 @@ vc_nb_write(dev, uiop, flag)
|
|||||||
|
|
||||||
int
|
int
|
||||||
vc_nb_ioctl(dev, cmd, addr, flag, td)
|
vc_nb_ioctl(dev, cmd, addr, flag, td)
|
||||||
dev_t dev;
|
struct cdev *dev;
|
||||||
u_long cmd;
|
u_long cmd;
|
||||||
caddr_t addr;
|
caddr_t addr;
|
||||||
int flag;
|
int flag;
|
||||||
@ -441,7 +441,7 @@ vc_nb_ioctl(dev, cmd, addr, flag, td)
|
|||||||
|
|
||||||
int
|
int
|
||||||
vc_nb_poll(dev, events, td)
|
vc_nb_poll(dev, events, td)
|
||||||
dev_t dev;
|
struct cdev *dev;
|
||||||
int events;
|
int events;
|
||||||
struct thread *td;
|
struct thread *td;
|
||||||
{
|
{
|
||||||
|
@ -31,9 +31,9 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int vc_nb_open(dev_t dev, int flag, int mode, struct thread *p);
|
int vc_nb_open(struct cdev *dev, int flag, int mode, struct thread *p);
|
||||||
int vc_nb_close (dev_t dev, int flag, int mode, struct thread *p);
|
int vc_nb_close (struct cdev *dev, int flag, int mode, struct thread *p);
|
||||||
int vc_nb_read(dev_t dev, struct uio *uiop, int flag);
|
int vc_nb_read(struct cdev *dev, struct uio *uiop, int flag);
|
||||||
int vc_nb_write(dev_t dev, struct uio *uiop, int flag);
|
int vc_nb_write(struct cdev *dev, struct uio *uiop, int flag);
|
||||||
int vc_nb_ioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *p);
|
int vc_nb_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *p);
|
||||||
int vc_nb_poll(dev_t dev, int events, struct thread *p);
|
int vc_nb_poll(struct cdev *dev, int events, struct thread *p);
|
||||||
|
@ -198,7 +198,7 @@ venus_root(void *mdp,
|
|||||||
int
|
int
|
||||||
venus_open(void *mdp, CodaFid *fid, int flag,
|
venus_open(void *mdp, CodaFid *fid, int flag,
|
||||||
struct ucred *cred, struct proc *p,
|
struct ucred *cred, struct proc *p,
|
||||||
/*out*/ dev_t *dev, ino_t *inode)
|
/*out*/ struct cdev **dev, ino_t *inode)
|
||||||
{
|
{
|
||||||
int cflag;
|
int cflag;
|
||||||
DECL(coda_open); /* sets Isize & Osize */
|
DECL(coda_open); /* sets Isize & Osize */
|
||||||
|
@ -39,7 +39,7 @@ venus_root(void *mdp,
|
|||||||
int
|
int
|
||||||
venus_open(void *mdp, CodaFid *fid, int flag,
|
venus_open(void *mdp, CodaFid *fid, int flag,
|
||||||
struct ucred *cred, struct proc *p,
|
struct ucred *cred, struct proc *p,
|
||||||
/*out*/ dev_t *dev, ino_t *inode);
|
/*out*/ struct cdev **dev, ino_t *inode);
|
||||||
|
|
||||||
int
|
int
|
||||||
venus_close(void *mdp, CodaFid *fid, int flag,
|
venus_close(void *mdp, CodaFid *fid, int flag,
|
||||||
|
@ -81,7 +81,7 @@ struct coda_op_stats coda_vfsopstats[CODA_VFSOPS_SIZE];
|
|||||||
#define MRAK_INT_GEN(op) (coda_vfsopstats[op].gen_intrn++)
|
#define MRAK_INT_GEN(op) (coda_vfsopstats[op].gen_intrn++)
|
||||||
|
|
||||||
extern int coda_nc_initialized; /* Set if cache has been initialized */
|
extern int coda_nc_initialized; /* Set if cache has been initialized */
|
||||||
extern int vc_nb_open(dev_t, int, int, struct thread *);
|
extern int vc_nb_open(struct cdev *, int, int, struct thread *);
|
||||||
|
|
||||||
int
|
int
|
||||||
coda_vfsopstats_init(void)
|
coda_vfsopstats_init(void)
|
||||||
@ -114,7 +114,7 @@ coda_mount(vfsp, path, data, ndp, td)
|
|||||||
{
|
{
|
||||||
struct vnode *dvp;
|
struct vnode *dvp;
|
||||||
struct cnode *cp;
|
struct cnode *cp;
|
||||||
dev_t dev;
|
struct cdev *dev;
|
||||||
struct coda_mntinfo *mi;
|
struct coda_mntinfo *mi;
|
||||||
struct vnode *rootvp;
|
struct vnode *rootvp;
|
||||||
CodaFid rootfid = INVAL_FID;
|
CodaFid rootfid = INVAL_FID;
|
||||||
@ -528,7 +528,7 @@ getNewVnode(vpp)
|
|||||||
* device corresponds to a UFS. Return NULL if no device is found.
|
* device corresponds to a UFS. Return NULL if no device is found.
|
||||||
*/
|
*/
|
||||||
struct mount *devtomp(dev)
|
struct mount *devtomp(dev)
|
||||||
dev_t dev;
|
struct cdev *dev;
|
||||||
{
|
{
|
||||||
struct mount *mp;
|
struct mount *mp;
|
||||||
|
|
||||||
|
@ -238,7 +238,7 @@ coda_open(v)
|
|||||||
/* locals */
|
/* locals */
|
||||||
int error;
|
int error;
|
||||||
struct vnode *vp;
|
struct vnode *vp;
|
||||||
dev_t dev;
|
struct cdev *dev;
|
||||||
ino_t inode;
|
ino_t inode;
|
||||||
|
|
||||||
MARK_ENTRY(CODA_OPEN_STATS);
|
MARK_ENTRY(CODA_OPEN_STATS);
|
||||||
@ -1806,7 +1806,7 @@ coda_islocked(v)
|
|||||||
|
|
||||||
/* How one looks up a vnode given a device/inode pair: */
|
/* How one looks up a vnode given a device/inode pair: */
|
||||||
int
|
int
|
||||||
coda_grab_vnode(dev_t dev, ino_t ino, struct vnode **vpp)
|
coda_grab_vnode(struct cdev *dev, ino_t ino, struct vnode **vpp)
|
||||||
{
|
{
|
||||||
/* This is like VFS_VGET() or igetinode()! */
|
/* This is like VFS_VGET() or igetinode()! */
|
||||||
int error;
|
int error;
|
||||||
|
@ -82,6 +82,6 @@ int coda_pathconf(void *);
|
|||||||
|
|
||||||
int coda_rdwr(struct vnode *vp, struct uio *uiop, enum uio_rw rw,
|
int coda_rdwr(struct vnode *vp, struct uio *uiop, enum uio_rw rw,
|
||||||
int ioflag, struct ucred *cred, struct thread *td);
|
int ioflag, struct ucred *cred, struct thread *td);
|
||||||
int coda_grab_vnode(dev_t dev, ino_t ino, struct vnode **vpp);
|
int coda_grab_vnode(struct cdev *dev, ino_t ino, struct vnode **vpp);
|
||||||
void print_vattr(struct vattr *attr);
|
void print_vattr(struct vattr *attr);
|
||||||
void print_cred(struct ucred *cred);
|
void print_cred(struct ucred *cred);
|
||||||
|
@ -55,7 +55,7 @@ newstat_copyout(struct stat *buf, void *ubuf)
|
|||||||
{
|
{
|
||||||
struct l_newstat tbuf;
|
struct l_newstat tbuf;
|
||||||
struct cdevsw *cdevsw;
|
struct cdevsw *cdevsw;
|
||||||
dev_t dev;
|
struct cdev *dev;
|
||||||
|
|
||||||
bzero(&tbuf, sizeof(tbuf));
|
bzero(&tbuf, sizeof(tbuf));
|
||||||
tbuf.st_dev = uminor(buf->st_dev) | (umajor(buf->st_dev) << 8);
|
tbuf.st_dev = uminor(buf->st_dev) | (umajor(buf->st_dev) << 8);
|
||||||
@ -342,7 +342,7 @@ int
|
|||||||
linux_ustat(struct thread *td, struct linux_ustat_args *args)
|
linux_ustat(struct thread *td, struct linux_ustat_args *args)
|
||||||
{
|
{
|
||||||
struct l_ustat lu;
|
struct l_ustat lu;
|
||||||
dev_t dev;
|
struct cdev *dev;
|
||||||
struct vnode *vp;
|
struct vnode *vp;
|
||||||
struct statfs *stat;
|
struct statfs *stat;
|
||||||
int error;
|
int error;
|
||||||
@ -360,9 +360,9 @@ linux_ustat(struct thread *td, struct linux_ustat_args *args)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* XXX - Don't return an error if we can't find a vnode for the
|
* XXX - Don't return an error if we can't find a vnode for the
|
||||||
* device. Our dev_t is 32-bits whereas Linux only has a 16-bits
|
* device. Our struct cdev *is 32-bits whereas Linux only has a 16-bits
|
||||||
* dev_t. The dev_t that is used now may as well be a truncated
|
* struct cdev *. The struct cdev *that is used now may as well be a truncated
|
||||||
* dev_t returned from previous syscalls. Just return a bzeroed
|
* struct cdev *returned from previous syscalls. Just return a bzeroed
|
||||||
* ustat in that case.
|
* ustat in that case.
|
||||||
*/
|
*/
|
||||||
dev = udev2dev(makeudev(args->dev >> 8, args->dev & 0xFF));
|
dev = udev2dev(makeudev(args->dev >> 8, args->dev & 0xFF));
|
||||||
@ -393,7 +393,7 @@ stat64_copyout(struct stat *buf, void *ubuf)
|
|||||||
{
|
{
|
||||||
struct l_stat64 lbuf;
|
struct l_stat64 lbuf;
|
||||||
struct cdevsw *cdevsw;
|
struct cdevsw *cdevsw;
|
||||||
dev_t dev;
|
struct cdev *dev;
|
||||||
|
|
||||||
bzero(&lbuf, sizeof(lbuf));
|
bzero(&lbuf, sizeof(lbuf));
|
||||||
lbuf.st_dev = uminor(buf->st_dev) | (umajor(buf->st_dev) << 8);
|
lbuf.st_dev = uminor(buf->st_dev) | (umajor(buf->st_dev) << 8);
|
||||||
|
@ -79,7 +79,7 @@ static struct fla_s {
|
|||||||
struct doc2k_stat ds;
|
struct doc2k_stat ds;
|
||||||
struct bio_queue_head bio_queue;
|
struct bio_queue_head bio_queue;
|
||||||
struct disk *disk;
|
struct disk *disk;
|
||||||
dev_t dev;
|
struct cdev *dev;
|
||||||
} softc[8];
|
} softc[8];
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
@ -665,7 +665,11 @@ struct thread *td;
|
|||||||
# else
|
# else
|
||||||
)
|
)
|
||||||
# endif
|
# endif
|
||||||
|
#ifdef _KERNEL
|
||||||
|
struct cdev *dev;
|
||||||
|
#else
|
||||||
dev_t dev;
|
dev_t dev;
|
||||||
|
#endif
|
||||||
# if defined(__NetBSD__) || defined(__OpenBSD__) || \
|
# if defined(__NetBSD__) || defined(__OpenBSD__) || \
|
||||||
(_BSDI_VERSION >= 199701) || (__FreeBSD_version >= 300000)
|
(_BSDI_VERSION >= 199701) || (__FreeBSD_version >= 300000)
|
||||||
u_long cmd;
|
u_long cmd;
|
||||||
@ -1135,7 +1139,7 @@ struct thread *td;
|
|||||||
# else
|
# else
|
||||||
)
|
)
|
||||||
# endif
|
# endif
|
||||||
dev_t dev;
|
struct cdev *dev;
|
||||||
int flags;
|
int flags;
|
||||||
# endif /* __sgi */
|
# endif /* __sgi */
|
||||||
{
|
{
|
||||||
@ -1165,7 +1169,7 @@ struct thread *td;
|
|||||||
# else
|
# else
|
||||||
)
|
)
|
||||||
# endif
|
# endif
|
||||||
dev_t dev;
|
struct cdev *dev;
|
||||||
int flags;
|
int flags;
|
||||||
# endif /* __sgi */
|
# endif /* __sgi */
|
||||||
{
|
{
|
||||||
@ -1193,7 +1197,7 @@ int ioflag;
|
|||||||
# else
|
# else
|
||||||
int IPL_EXTERN(read)(dev, uio)
|
int IPL_EXTERN(read)(dev, uio)
|
||||||
# endif
|
# endif
|
||||||
dev_t dev;
|
struct cdev *dev;
|
||||||
register struct uio *uio;
|
register struct uio *uio;
|
||||||
# endif /* __sgi */
|
# endif /* __sgi */
|
||||||
{
|
{
|
||||||
|
@ -574,12 +574,12 @@ extern int iplidentify __P((char *));
|
|||||||
(NetBSD >= 199511) || defined(__OpenBSD__)
|
(NetBSD >= 199511) || defined(__OpenBSD__)
|
||||||
# if defined(__NetBSD__) || (_BSDI_VERSION >= 199701) || \
|
# if defined(__NetBSD__) || (_BSDI_VERSION >= 199701) || \
|
||||||
defined(__OpenBSD__) || (__FreeBSD_version >= 300000)
|
defined(__OpenBSD__) || (__FreeBSD_version >= 300000)
|
||||||
extern int iplioctl __P((dev_t, u_long, caddr_t, int, struct thread *));
|
extern int iplioctl __P((struct cdev *, u_long, caddr_t, int, struct thread *));
|
||||||
# else
|
# else
|
||||||
extern int iplioctl __P((dev_t, int, caddr_t, int, struct thread *));
|
extern int iplioctl __P((dev_t, int, caddr_t, int, struct thread *));
|
||||||
# endif
|
# endif
|
||||||
extern int iplopen __P((dev_t, int, int, struct thread *));
|
extern int iplopen __P((struct cdev *, int, int, struct thread *));
|
||||||
extern int iplclose __P((dev_t, int, int, struct thread *));
|
extern int iplclose __P((struct cdev *, int, int, struct thread *));
|
||||||
# else
|
# else
|
||||||
# ifndef linux
|
# ifndef linux
|
||||||
extern int iplopen __P((dev_t, int));
|
extern int iplopen __P((dev_t, int));
|
||||||
@ -592,7 +592,7 @@ extern void iplclose __P((struct inode *, struct file *));
|
|||||||
# endif /* !linux */
|
# endif /* !linux */
|
||||||
# endif /* (_BSDI_VERSION >= 199510) */
|
# endif /* (_BSDI_VERSION >= 199510) */
|
||||||
# if BSD >= 199306
|
# if BSD >= 199306
|
||||||
extern int iplread __P((dev_t, struct uio *, int));
|
extern int iplread __P((struct cdev *, struct uio *, int));
|
||||||
# else
|
# else
|
||||||
# ifndef linux
|
# ifndef linux
|
||||||
extern int iplread __P((dev_t, struct uio *));
|
extern int iplread __P((dev_t, struct uio *));
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
#include <netinet/ip_frag.h>
|
#include <netinet/ip_frag.h>
|
||||||
#include <netinet/ip_proxy.h>
|
#include <netinet/ip_proxy.h>
|
||||||
|
|
||||||
static dev_t ipf_devs[IPL_LOGMAX + 1];
|
static struct cdev *ipf_devs[IPL_LOGMAX + 1];
|
||||||
|
|
||||||
SYSCTL_DECL(_net_inet);
|
SYSCTL_DECL(_net_inet);
|
||||||
SYSCTL_NODE(_net_inet, OID_AUTO, ipf, CTLFLAG_RW, 0, "IPF");
|
SYSCTL_NODE(_net_inet, OID_AUTO, ipf, CTLFLAG_RW, 0, "IPF");
|
||||||
|
@ -103,8 +103,8 @@ void cleanup_pf_zone(void);
|
|||||||
int pfattach(void);
|
int pfattach(void);
|
||||||
#else
|
#else
|
||||||
void pfattach(int);
|
void pfattach(int);
|
||||||
int pfopen(dev_t, int, int, struct proc *);
|
int pfopen(struct cdev *, int, int, struct proc *);
|
||||||
int pfclose(dev_t, int, int, struct proc *);
|
int pfclose(struct cdev *, int, int, struct proc *);
|
||||||
#endif
|
#endif
|
||||||
struct pf_pool *pf_get_pool(char *, char *, u_int32_t,
|
struct pf_pool *pf_get_pool(char *, char *, u_int32_t,
|
||||||
u_int8_t, u_int32_t, u_int8_t, u_int8_t, u_int8_t);
|
u_int8_t, u_int32_t, u_int8_t, u_int8_t, u_int8_t);
|
||||||
@ -113,9 +113,9 @@ void pf_init_ruleset(struct pf_ruleset *);
|
|||||||
void pf_mv_pool(struct pf_palist *, struct pf_palist *);
|
void pf_mv_pool(struct pf_palist *, struct pf_palist *);
|
||||||
void pf_empty_pool(struct pf_palist *);
|
void pf_empty_pool(struct pf_palist *);
|
||||||
#ifdef __FreeBSD__
|
#ifdef __FreeBSD__
|
||||||
int pfioctl(dev_t, u_long, caddr_t, int, struct thread *);
|
int pfioctl(struct cdev *, u_long, caddr_t, int, struct thread *);
|
||||||
#else
|
#else
|
||||||
int pfioctl(dev_t, u_long, caddr_t, int, struct proc *);
|
int pfioctl(struct cdev *, u_long, caddr_t, int, struct proc *);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __FreeBSD__
|
#ifdef __FreeBSD__
|
||||||
@ -139,7 +139,7 @@ TAILQ_HEAD(pf_tags, pf_tagname) pf_tags = TAILQ_HEAD_INITIALIZER(pf_tags);
|
|||||||
|
|
||||||
|
|
||||||
#ifdef __FreeBSD__
|
#ifdef __FreeBSD__
|
||||||
static dev_t pf_dev;
|
static struct cdev *pf_dev;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* XXX - These are new and need to be checked when moveing to a new version
|
* XXX - These are new and need to be checked when moveing to a new version
|
||||||
@ -421,7 +421,7 @@ pfattach(int num)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
pfopen(dev_t dev, int flags, int fmt, struct proc *p)
|
pfopen(struct cdev *dev, int flags, int fmt, struct proc *p)
|
||||||
{
|
{
|
||||||
if (minor(dev) >= 1)
|
if (minor(dev) >= 1)
|
||||||
return (ENXIO);
|
return (ENXIO);
|
||||||
@ -429,7 +429,7 @@ pfopen(dev_t dev, int flags, int fmt, struct proc *p)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
pfclose(dev_t dev, int flags, int fmt, struct proc *p)
|
pfclose(struct cdev *dev, int flags, int fmt, struct proc *p)
|
||||||
{
|
{
|
||||||
if (minor(dev) >= 1)
|
if (minor(dev) >= 1)
|
||||||
return (ENXIO);
|
return (ENXIO);
|
||||||
@ -771,10 +771,10 @@ pf_tag_unref(u_int16_t tag)
|
|||||||
|
|
||||||
#ifdef __FreeBSD__
|
#ifdef __FreeBSD__
|
||||||
int
|
int
|
||||||
pfioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct thread *td)
|
pfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td)
|
||||||
#else
|
#else
|
||||||
int
|
int
|
||||||
pfioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct proc *p)
|
pfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct proc *p)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
struct pf_pooladdr *pa = NULL;
|
struct pf_pooladdr *pa = NULL;
|
||||||
|
@ -2301,7 +2301,7 @@ aac_describe_code(struct aac_code_lookup *table, u_int32_t code)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
static int
|
static int
|
||||||
aac_open(dev_t dev, int flags, int fmt, d_thread_t *td)
|
aac_open(struct cdev *dev, int flags, int fmt, d_thread_t *td)
|
||||||
{
|
{
|
||||||
struct aac_softc *sc;
|
struct aac_softc *sc;
|
||||||
|
|
||||||
@ -2319,7 +2319,7 @@ aac_open(dev_t dev, int flags, int fmt, d_thread_t *td)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
aac_close(dev_t dev, int flags, int fmt, d_thread_t *td)
|
aac_close(struct cdev *dev, int flags, int fmt, d_thread_t *td)
|
||||||
{
|
{
|
||||||
struct aac_softc *sc;
|
struct aac_softc *sc;
|
||||||
|
|
||||||
@ -2334,7 +2334,7 @@ aac_close(dev_t dev, int flags, int fmt, d_thread_t *td)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
aac_ioctl(dev_t dev, u_long cmd, caddr_t arg, int flag, d_thread_t *td)
|
aac_ioctl(struct cdev *dev, u_long cmd, caddr_t arg, int flag, d_thread_t *td)
|
||||||
{
|
{
|
||||||
union aac_statrequest *as;
|
union aac_statrequest *as;
|
||||||
struct aac_softc *sc;
|
struct aac_softc *sc;
|
||||||
@ -2433,7 +2433,7 @@ aac_ioctl(dev_t dev, u_long cmd, caddr_t arg, int flag, d_thread_t *td)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
aac_poll(dev_t dev, int poll_events, d_thread_t *td)
|
aac_poll(struct cdev *dev, int poll_events, d_thread_t *td)
|
||||||
{
|
{
|
||||||
struct aac_softc *sc;
|
struct aac_softc *sc;
|
||||||
int revents;
|
int revents;
|
||||||
|
@ -344,7 +344,7 @@ struct aac_softc
|
|||||||
struct intr_config_hook aac_ich;
|
struct intr_config_hook aac_ich;
|
||||||
|
|
||||||
/* management interface */
|
/* management interface */
|
||||||
dev_t aac_dev_t;
|
struct cdev *aac_dev_t;
|
||||||
aac_lock_t aac_aifq_lock;
|
aac_lock_t aac_aifq_lock;
|
||||||
struct aac_aif_command aac_aifq[AAC_AIFQ_LENGTH];
|
struct aac_aif_command aac_aifq[AAC_AIFQ_LENGTH];
|
||||||
int aac_aifq_head;
|
int aac_aifq_head;
|
||||||
|
@ -83,9 +83,9 @@ struct acpi_asus_softc {
|
|||||||
struct sysctl_ctx_list sysctl_ctx;
|
struct sysctl_ctx_list sysctl_ctx;
|
||||||
struct sysctl_oid *sysctl_tree;
|
struct sysctl_oid *sysctl_tree;
|
||||||
|
|
||||||
dev_t s_mled;
|
struct cdev *s_mled;
|
||||||
dev_t s_tled;
|
struct cdev *s_tled;
|
||||||
dev_t s_wled;
|
struct cdev *s_wled;
|
||||||
|
|
||||||
int s_brn;
|
int s_brn;
|
||||||
int s_disp;
|
int s_disp;
|
||||||
|
@ -2455,19 +2455,19 @@ acpi_deregister_ioctl(u_long cmd, acpi_ioctl_fn fn)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
acpiopen(dev_t dev, int flag, int fmt, d_thread_t *td)
|
acpiopen(struct cdev *dev, int flag, int fmt, d_thread_t *td)
|
||||||
{
|
{
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
acpiclose(dev_t dev, int flag, int fmt, d_thread_t *td)
|
acpiclose(struct cdev *dev, int flag, int fmt, d_thread_t *td)
|
||||||
{
|
{
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
acpiioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, d_thread_t *td)
|
acpiioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, d_thread_t *td)
|
||||||
{
|
{
|
||||||
struct acpi_softc *sc;
|
struct acpi_softc *sc;
|
||||||
struct acpi_ioctl_hook *hp;
|
struct acpi_ioctl_hook *hp;
|
||||||
|
@ -45,7 +45,7 @@ typedef vm_offset_t vm_paddr_t;
|
|||||||
|
|
||||||
struct acpi_softc {
|
struct acpi_softc {
|
||||||
device_t acpi_dev;
|
device_t acpi_dev;
|
||||||
dev_t acpi_dev_t;
|
struct cdev *acpi_dev_t;
|
||||||
|
|
||||||
struct resource *acpi_irq;
|
struct resource *acpi_irq;
|
||||||
int acpi_irq_rid;
|
int acpi_irq_rid;
|
||||||
|
@ -104,7 +104,7 @@ struct softc {
|
|||||||
struct resource *r0, *r1, *ri;
|
struct resource *r0, *r1, *ri;
|
||||||
bus_space_tag_t t0, t1;
|
bus_space_tag_t t0, t1;
|
||||||
bus_space_handle_t h0, h1;
|
bus_space_handle_t h0, h1;
|
||||||
dev_t dev;
|
struct cdev *dev;
|
||||||
off_t mapvir;
|
off_t mapvir;
|
||||||
|
|
||||||
struct proc *procp;
|
struct proc *procp;
|
||||||
@ -241,7 +241,7 @@ adlink_loran(void *arg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
adlink_open(dev_t dev, int oflags, int devtype, struct thread *td)
|
adlink_open(struct cdev *dev, int oflags, int devtype, struct thread *td)
|
||||||
{
|
{
|
||||||
static int once;
|
static int once;
|
||||||
struct softc *sc;
|
struct softc *sc;
|
||||||
@ -307,7 +307,7 @@ adlink_open(dev_t dev, int oflags, int devtype, struct thread *td)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
adlink_ioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct thread *td)
|
adlink_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag, struct thread *td)
|
||||||
{
|
{
|
||||||
struct softc *sc;
|
struct softc *sc;
|
||||||
struct wave *wp;
|
struct wave *wp;
|
||||||
@ -341,7 +341,7 @@ adlink_ioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct thread *td)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
adlink_mmap(dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot)
|
adlink_mmap(struct cdev *dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot)
|
||||||
{
|
{
|
||||||
struct softc *sc;
|
struct softc *sc;
|
||||||
struct wave *wp;
|
struct wave *wp;
|
||||||
|
@ -762,7 +762,7 @@ agp_unbind_user(device_t dev, agp_unbind *unbind)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
agp_open(dev_t kdev, int oflags, int devtype, struct thread *td)
|
agp_open(struct cdev *kdev, int oflags, int devtype, struct thread *td)
|
||||||
{
|
{
|
||||||
device_t dev = KDEV2DEV(kdev);
|
device_t dev = KDEV2DEV(kdev);
|
||||||
struct agp_softc *sc = device_get_softc(dev);
|
struct agp_softc *sc = device_get_softc(dev);
|
||||||
@ -776,7 +776,7 @@ agp_open(dev_t kdev, int oflags, int devtype, struct thread *td)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
agp_close(dev_t kdev, int fflag, int devtype, struct thread *td)
|
agp_close(struct cdev *kdev, int fflag, int devtype, struct thread *td)
|
||||||
{
|
{
|
||||||
device_t dev = KDEV2DEV(kdev);
|
device_t dev = KDEV2DEV(kdev);
|
||||||
struct agp_softc *sc = device_get_softc(dev);
|
struct agp_softc *sc = device_get_softc(dev);
|
||||||
@ -799,7 +799,7 @@ agp_close(dev_t kdev, int fflag, int devtype, struct thread *td)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
agp_ioctl(dev_t kdev, u_long cmd, caddr_t data, int fflag, struct thread *td)
|
agp_ioctl(struct cdev *kdev, u_long cmd, caddr_t data, int fflag, struct thread *td)
|
||||||
{
|
{
|
||||||
device_t dev = KDEV2DEV(kdev);
|
device_t dev = KDEV2DEV(kdev);
|
||||||
|
|
||||||
@ -834,7 +834,7 @@ agp_ioctl(dev_t kdev, u_long cmd, caddr_t data, int fflag, struct thread *td)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
agp_mmap(dev_t kdev, vm_offset_t offset, vm_paddr_t *paddr, int prot)
|
agp_mmap(struct cdev *kdev, vm_offset_t offset, vm_paddr_t *paddr, int prot)
|
||||||
{
|
{
|
||||||
device_t dev = KDEV2DEV(kdev);
|
device_t dev = KDEV2DEV(kdev);
|
||||||
struct agp_softc *sc = device_get_softc(dev);
|
struct agp_softc *sc = device_get_softc(dev);
|
||||||
|
@ -75,7 +75,7 @@ struct agp_softc {
|
|||||||
struct agp_memory_list as_memory; /* list of allocated memory */
|
struct agp_memory_list as_memory; /* list of allocated memory */
|
||||||
int as_nextid; /* next memory block id */
|
int as_nextid; /* next memory block id */
|
||||||
int as_isopen; /* user device is open */
|
int as_isopen; /* user device is open */
|
||||||
dev_t as_devnode; /* from make_dev */
|
struct cdev *as_devnode; /* from make_dev */
|
||||||
struct mtx as_lock; /* lock for access to GATT */
|
struct mtx as_lock; /* lock for access to GATT */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -343,7 +343,7 @@ amr_free(struct amr_softc *sc)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* destroy control device */
|
/* destroy control device */
|
||||||
if( sc->amr_dev_t != (dev_t)NULL)
|
if( sc->amr_dev_t != (struct cdev *)NULL)
|
||||||
destroy_dev(sc->amr_dev_t);
|
destroy_dev(sc->amr_dev_t);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -365,7 +365,7 @@ amr_submit_bio(struct amr_softc *sc, struct bio *bio)
|
|||||||
* Accept an open operation on the control device.
|
* Accept an open operation on the control device.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
amr_open(dev_t dev, int flags, int fmt, d_thread_t *td)
|
amr_open(struct cdev *dev, int flags, int fmt, d_thread_t *td)
|
||||||
{
|
{
|
||||||
int unit = minor(dev);
|
int unit = minor(dev);
|
||||||
struct amr_softc *sc = devclass_get_softc(devclass_find("amr"), unit);
|
struct amr_softc *sc = devclass_get_softc(devclass_find("amr"), unit);
|
||||||
@ -380,7 +380,7 @@ amr_open(dev_t dev, int flags, int fmt, d_thread_t *td)
|
|||||||
* Accept the last close on the control device.
|
* Accept the last close on the control device.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
amr_close(dev_t dev, int flags, int fmt, d_thread_t *td)
|
amr_close(struct cdev *dev, int flags, int fmt, d_thread_t *td)
|
||||||
{
|
{
|
||||||
int unit = minor(dev);
|
int unit = minor(dev);
|
||||||
struct amr_softc *sc = devclass_get_softc(devclass_find("amr"), unit);
|
struct amr_softc *sc = devclass_get_softc(devclass_find("amr"), unit);
|
||||||
@ -395,7 +395,7 @@ amr_close(dev_t dev, int flags, int fmt, d_thread_t *td)
|
|||||||
* Handle controller-specific control operations.
|
* Handle controller-specific control operations.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
amr_ioctl(dev_t dev, u_long cmd, caddr_t addr, int32_t flag, d_thread_t *td)
|
amr_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int32_t flag, d_thread_t *td)
|
||||||
{
|
{
|
||||||
struct amr_softc *sc = (struct amr_softc *)dev->si_drv1;
|
struct amr_softc *sc = (struct amr_softc *)dev->si_drv1;
|
||||||
int *arg = (int *)addr;
|
int *arg = (int *)addr;
|
||||||
|
@ -202,7 +202,7 @@ struct amr_softc
|
|||||||
TAILQ_HEAD(, ccb_hdr) amr_cam_ccbq;
|
TAILQ_HEAD(, ccb_hdr) amr_cam_ccbq;
|
||||||
|
|
||||||
/* control device */
|
/* control device */
|
||||||
dev_t amr_dev_t;
|
struct cdev *amr_dev_t;
|
||||||
|
|
||||||
/* controller type-specific support */
|
/* controller type-specific support */
|
||||||
int amr_type;
|
int amr_type;
|
||||||
|
@ -358,7 +358,7 @@ typedef struct Asr_softc {
|
|||||||
|
|
||||||
/* Links into other parents and HBAs */
|
/* Links into other parents and HBAs */
|
||||||
struct Asr_softc * ha_next; /* HBA list */
|
struct Asr_softc * ha_next; /* HBA list */
|
||||||
dev_t ha_devt;
|
struct cdev *ha_devt;
|
||||||
} Asr_softc_t;
|
} Asr_softc_t;
|
||||||
|
|
||||||
static Asr_softc_t * Asr_softc;
|
static Asr_softc_t * Asr_softc;
|
||||||
@ -371,11 +371,11 @@ static Asr_softc_t * Asr_softc;
|
|||||||
static int asr_probe(device_t tag);
|
static int asr_probe(device_t tag);
|
||||||
static int asr_attach(device_t tag);
|
static int asr_attach(device_t tag);
|
||||||
|
|
||||||
static int asr_ioctl(dev_t dev, u_long cmd, caddr_t data, int flag,
|
static int asr_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag,
|
||||||
struct thread *td);
|
struct thread *td);
|
||||||
static int asr_open(dev_t dev, int32_t flags, int32_t ifmt,
|
static int asr_open(struct cdev *dev, int32_t flags, int32_t ifmt,
|
||||||
struct thread *td);
|
struct thread *td);
|
||||||
static int asr_close(dev_t dev, int flags, int ifmt, struct thread *td);
|
static int asr_close(struct cdev *dev, int flags, int ifmt, struct thread *td);
|
||||||
static int asr_intr(Asr_softc_t *sc);
|
static int asr_intr(Asr_softc_t *sc);
|
||||||
static void asr_timeout(void *arg);
|
static void asr_timeout(void *arg);
|
||||||
static int ASR_init(Asr_softc_t *sc);
|
static int ASR_init(Asr_softc_t *sc);
|
||||||
@ -2999,7 +2999,7 @@ typedef U32 DPT_RTN_T;
|
|||||||
static u_int8_t ASR_ctlr_held;
|
static u_int8_t ASR_ctlr_held;
|
||||||
|
|
||||||
static int
|
static int
|
||||||
asr_open(dev_t dev, int32_t flags, int32_t ifmt, struct thread *td)
|
asr_open(struct cdev *dev, int32_t flags, int32_t ifmt, struct thread *td)
|
||||||
{
|
{
|
||||||
int s;
|
int s;
|
||||||
int error;
|
int error;
|
||||||
@ -3018,7 +3018,7 @@ asr_open(dev_t dev, int32_t flags, int32_t ifmt, struct thread *td)
|
|||||||
} /* asr_open */
|
} /* asr_open */
|
||||||
|
|
||||||
static int
|
static int
|
||||||
asr_close(dev_t dev, int flags, int ifmt, struct thread *td)
|
asr_close(struct cdev *dev, int flags, int ifmt, struct thread *td)
|
||||||
{
|
{
|
||||||
|
|
||||||
ASR_ctlr_held = 0;
|
ASR_ctlr_held = 0;
|
||||||
@ -3495,7 +3495,7 @@ ASR_queue_i(Asr_softc_t *sc, PI2O_MESSAGE_FRAME Packet)
|
|||||||
/*----------------------------------------------------------------------*/
|
/*----------------------------------------------------------------------*/
|
||||||
|
|
||||||
static int
|
static int
|
||||||
asr_ioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td)
|
asr_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td)
|
||||||
{
|
{
|
||||||
Asr_softc_t *sc = dev->si_drv1;
|
Asr_softc_t *sc = dev->si_drv1;
|
||||||
int i, error = 0;
|
int i, error = 0;
|
||||||
|
@ -359,7 +359,7 @@ ata_shutdown(void *arg, int howto)
|
|||||||
* device related interfaces
|
* device related interfaces
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
ata_ioctl(dev_t dev, u_long cmd, caddr_t addr, int32_t flag, struct thread *td)
|
ata_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int32_t flag, struct thread *td)
|
||||||
{
|
{
|
||||||
struct ata_cmd *iocmd = (struct ata_cmd *)addr;
|
struct ata_cmd *iocmd = (struct ata_cmd *)addr;
|
||||||
device_t device = devclass_get_device(ata_devclass, iocmd->channel);
|
device_t device = devclass_get_device(ata_devclass, iocmd->channel);
|
||||||
|
@ -94,7 +94,7 @@ ast_attach(struct ata_device *atadev)
|
|||||||
{
|
{
|
||||||
struct ast_softc *stp;
|
struct ast_softc *stp;
|
||||||
struct ast_readposition position;
|
struct ast_readposition position;
|
||||||
dev_t dev;
|
struct cdev *dev;
|
||||||
|
|
||||||
stp = malloc(sizeof(struct ast_softc), M_AST, M_NOWAIT | M_ZERO);
|
stp = malloc(sizeof(struct ast_softc), M_AST, M_NOWAIT | M_ZERO);
|
||||||
if (!stp) {
|
if (!stp) {
|
||||||
@ -265,7 +265,7 @@ ast_describe(struct ast_softc *stp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ast_open(dev_t dev, int flags, int fmt, struct thread *td)
|
ast_open(struct cdev *dev, int flags, int fmt, struct thread *td)
|
||||||
{
|
{
|
||||||
struct ast_softc *stp = dev->si_drv1;
|
struct ast_softc *stp = dev->si_drv1;
|
||||||
|
|
||||||
@ -290,7 +290,7 @@ ast_open(dev_t dev, int flags, int fmt, struct thread *td)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ast_close(dev_t dev, int flags, int fmt, struct thread *td)
|
ast_close(struct cdev *dev, int flags, int fmt, struct thread *td)
|
||||||
{
|
{
|
||||||
struct ast_softc *stp = dev->si_drv1;
|
struct ast_softc *stp = dev->si_drv1;
|
||||||
|
|
||||||
@ -319,7 +319,7 @@ ast_close(dev_t dev, int flags, int fmt, struct thread *td)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ast_ioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
|
ast_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
|
||||||
{
|
{
|
||||||
struct ast_softc *stp = dev->si_drv1;
|
struct ast_softc *stp = dev->si_drv1;
|
||||||
int error = 0;
|
int error = 0;
|
||||||
|
@ -159,5 +159,5 @@ struct ast_softc {
|
|||||||
struct atapi_params *param; /* drive parameters table */
|
struct atapi_params *param; /* drive parameters table */
|
||||||
struct ast_cappage cap; /* capabilities page info */
|
struct ast_cappage cap; /* capabilities page info */
|
||||||
struct devstat *stats; /* devstat entry */
|
struct devstat *stats; /* devstat entry */
|
||||||
dev_t dev1, dev2; /* device place holders */
|
struct cdev *dev1, *dev2; /* device place holders */
|
||||||
};
|
};
|
||||||
|
@ -176,8 +176,8 @@ struct psm_softc { /* Driver status information */
|
|||||||
int watchdog; /* watchdog timer flag */
|
int watchdog; /* watchdog timer flag */
|
||||||
struct callout_handle callout; /* watchdog timer call out */
|
struct callout_handle callout; /* watchdog timer call out */
|
||||||
struct callout_handle softcallout; /* buffer timer call out */
|
struct callout_handle softcallout; /* buffer timer call out */
|
||||||
dev_t dev;
|
struct cdev *dev;
|
||||||
dev_t bdev;
|
struct cdev *bdev;
|
||||||
int lasterr;
|
int lasterr;
|
||||||
int cmdcount;
|
int cmdcount;
|
||||||
};
|
};
|
||||||
@ -1307,7 +1307,7 @@ psmdetach(device_t dev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
psmopen(dev_t dev, int flag, int fmt, struct thread *td)
|
psmopen(struct cdev *dev, int flag, int fmt, struct thread *td)
|
||||||
{
|
{
|
||||||
int unit = PSM_UNIT(dev);
|
int unit = PSM_UNIT(dev);
|
||||||
struct psm_softc *sc;
|
struct psm_softc *sc;
|
||||||
@ -1391,7 +1391,7 @@ psmopen(dev_t dev, int flag, int fmt, struct thread *td)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
psmclose(dev_t dev, int flag, int fmt, struct thread *td)
|
psmclose(struct cdev *dev, int flag, int fmt, struct thread *td)
|
||||||
{
|
{
|
||||||
int unit = PSM_UNIT(dev);
|
int unit = PSM_UNIT(dev);
|
||||||
struct psm_softc *sc = PSM_SOFTC(unit);
|
struct psm_softc *sc = PSM_SOFTC(unit);
|
||||||
@ -1533,7 +1533,7 @@ tame_mouse(struct psm_softc *sc, packetbuf_t *pb, mousestatus_t *status, unsigne
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
psmread(dev_t dev, struct uio *uio, int flag)
|
psmread(struct cdev *dev, struct uio *uio, int flag)
|
||||||
{
|
{
|
||||||
register struct psm_softc *sc = PSM_SOFTC(PSM_UNIT(dev));
|
register struct psm_softc *sc = PSM_SOFTC(PSM_UNIT(dev));
|
||||||
unsigned char buf[PSM_SMALLBUFSIZE];
|
unsigned char buf[PSM_SMALLBUFSIZE];
|
||||||
@ -1681,7 +1681,7 @@ unblock_mouse_data(struct psm_softc *sc, int c)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
psmioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
|
psmioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
|
||||||
{
|
{
|
||||||
struct psm_softc *sc = PSM_SOFTC(PSM_UNIT(dev));
|
struct psm_softc *sc = PSM_SOFTC(PSM_UNIT(dev));
|
||||||
mousemode_t mode;
|
mousemode_t mode;
|
||||||
@ -2506,7 +2506,7 @@ psmsoftintr(void *arg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
psmpoll(dev_t dev, int events, struct thread *td)
|
psmpoll(struct cdev *dev, int events, struct thread *td)
|
||||||
{
|
{
|
||||||
struct psm_softc *sc = PSM_SOFTC(PSM_UNIT(dev));
|
struct psm_softc *sc = PSM_SOFTC(PSM_UNIT(dev));
|
||||||
int s;
|
int s;
|
||||||
|
@ -1191,7 +1191,7 @@ vbi_close( bktr_ptr_t bktr )
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
video_read(bktr_ptr_t bktr, int unit, dev_t dev, struct uio *uio)
|
video_read(bktr_ptr_t bktr, int unit, struct cdev *dev, struct uio *uio)
|
||||||
{
|
{
|
||||||
int status;
|
int status;
|
||||||
int count;
|
int count;
|
||||||
|
@ -80,7 +80,7 @@ int common_bktr_intr( void *arg );
|
|||||||
/* Prototypes for open, close, read, mmap and ioctl calls */
|
/* Prototypes for open, close, read, mmap and ioctl calls */
|
||||||
int video_open( bktr_ptr_t bktr );
|
int video_open( bktr_ptr_t bktr );
|
||||||
int video_close( bktr_ptr_t bktr );
|
int video_close( bktr_ptr_t bktr );
|
||||||
int video_read( bktr_ptr_t bktr, int unit, dev_t dev, struct uio *uio );
|
int video_read( bktr_ptr_t bktr, int unit, struct cdev *dev, struct uio *uio );
|
||||||
int video_ioctl( bktr_ptr_t bktr, int unit,
|
int video_ioctl( bktr_ptr_t bktr, int unit,
|
||||||
ioctl_cmd_t cmd, caddr_t arg, struct thread* pr );
|
ioctl_cmd_t cmd, caddr_t arg, struct thread* pr );
|
||||||
|
|
||||||
|
@ -580,7 +580,7 @@ get_bktr_mem( int unit, unsigned size )
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
bktr_open( dev_t dev, int flags, int fmt, struct thread *td )
|
bktr_open( struct cdev *dev, int flags, int fmt, struct thread *td )
|
||||||
{
|
{
|
||||||
bktr_ptr_t bktr;
|
bktr_ptr_t bktr;
|
||||||
int unit;
|
int unit;
|
||||||
@ -680,7 +680,7 @@ bktr_open( dev_t dev, int flags, int fmt, struct thread *td )
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
bktr_close( dev_t dev, int flags, int fmt, struct thread *td )
|
bktr_close( struct cdev *dev, int flags, int fmt, struct thread *td )
|
||||||
{
|
{
|
||||||
bktr_ptr_t bktr;
|
bktr_ptr_t bktr;
|
||||||
int unit;
|
int unit;
|
||||||
@ -719,7 +719,7 @@ bktr_close( dev_t dev, int flags, int fmt, struct thread *td )
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
bktr_read( dev_t dev, struct uio *uio, int ioflag )
|
bktr_read( struct cdev *dev, struct uio *uio, int ioflag )
|
||||||
{
|
{
|
||||||
bktr_ptr_t bktr;
|
bktr_ptr_t bktr;
|
||||||
int unit;
|
int unit;
|
||||||
@ -747,7 +747,7 @@ bktr_read( dev_t dev, struct uio *uio, int ioflag )
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
bktr_write( dev_t dev, struct uio *uio, int ioflag )
|
bktr_write( struct cdev *dev, struct uio *uio, int ioflag )
|
||||||
{
|
{
|
||||||
return( EINVAL ); /* XXX or ENXIO ? */
|
return( EINVAL ); /* XXX or ENXIO ? */
|
||||||
}
|
}
|
||||||
@ -757,7 +757,7 @@ bktr_write( dev_t dev, struct uio *uio, int ioflag )
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
bktr_ioctl( dev_t dev, ioctl_cmd_t cmd, caddr_t arg, int flag, struct thread *td )
|
bktr_ioctl( struct cdev *dev, ioctl_cmd_t cmd, caddr_t arg, int flag, struct thread *td )
|
||||||
{
|
{
|
||||||
bktr_ptr_t bktr;
|
bktr_ptr_t bktr;
|
||||||
int unit;
|
int unit;
|
||||||
@ -789,7 +789,7 @@ bktr_ioctl( dev_t dev, ioctl_cmd_t cmd, caddr_t arg, int flag, struct thread *td
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
bktr_mmap( dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot )
|
bktr_mmap( struct cdev *dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot )
|
||||||
{
|
{
|
||||||
int unit;
|
int unit;
|
||||||
bktr_ptr_t bktr;
|
bktr_ptr_t bktr;
|
||||||
@ -820,7 +820,7 @@ bktr_mmap( dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot )
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
bktr_poll( dev_t dev, int events, struct thread *td)
|
bktr_poll( struct cdev *dev, int events, struct thread *td)
|
||||||
{
|
{
|
||||||
int unit;
|
int unit;
|
||||||
bktr_ptr_t bktr;
|
bktr_ptr_t bktr;
|
||||||
|
@ -535,12 +535,12 @@ struct bktr_softc {
|
|||||||
int irq_rid; /* 4.x resource id */
|
int irq_rid; /* 4.x resource id */
|
||||||
struct resource *res_irq; /* 4.x resource descriptor for interrupt */
|
struct resource *res_irq; /* 4.x resource descriptor for interrupt */
|
||||||
void *res_ih; /* 4.x newbus interrupt handler cookie */
|
void *res_ih; /* 4.x newbus interrupt handler cookie */
|
||||||
dev_t bktrdev; /* 4.x device entry for /dev/bktrN */
|
struct cdev *bktrdev; /* 4.x device entry for /dev/bktrN */
|
||||||
dev_t tunerdev; /* 4.x device entry for /dev/tunerN */
|
struct cdev *tunerdev; /* 4.x device entry for /dev/tunerN */
|
||||||
dev_t vbidev; /* 4.x device entry for /dev/vbiN */
|
struct cdev *vbidev; /* 4.x device entry for /dev/vbiN */
|
||||||
dev_t bktrdev_alias; /* alias /dev/bktr to /dev/bktr0 */
|
struct cdev *bktrdev_alias; /* alias /dev/bktr to /dev/bktr0 */
|
||||||
dev_t tunerdev_alias; /* alias /dev/tuner to /dev/tuner0 */
|
struct cdev *tunerdev_alias; /* alias /dev/tuner to /dev/tuner0 */
|
||||||
dev_t vbidev_alias; /* alias /dev/vbi to /dev/vbi0 */
|
struct cdev *vbidev_alias; /* alias /dev/vbi to /dev/vbi0 */
|
||||||
#endif
|
#endif
|
||||||
#if (__FreeBSD_version >= 500000)
|
#if (__FreeBSD_version >= 500000)
|
||||||
struct mtx vbimutex; /* Mutex protecting vbi buffer */
|
struct mtx vbimutex; /* Mutex protecting vbi buffer */
|
||||||
|
@ -3738,7 +3738,7 @@ ciss_name_command_status(int status)
|
|||||||
* Handle an open on the control device.
|
* Handle an open on the control device.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
ciss_open(dev_t dev, int flags, int fmt, d_thread_t *p)
|
ciss_open(struct cdev *dev, int flags, int fmt, d_thread_t *p)
|
||||||
{
|
{
|
||||||
struct ciss_softc *sc;
|
struct ciss_softc *sc;
|
||||||
|
|
||||||
@ -3756,7 +3756,7 @@ ciss_open(dev_t dev, int flags, int fmt, d_thread_t *p)
|
|||||||
* Handle the last close on the control device.
|
* Handle the last close on the control device.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
ciss_close(dev_t dev, int flags, int fmt, d_thread_t *p)
|
ciss_close(struct cdev *dev, int flags, int fmt, d_thread_t *p)
|
||||||
{
|
{
|
||||||
struct ciss_softc *sc;
|
struct ciss_softc *sc;
|
||||||
|
|
||||||
@ -3775,7 +3775,7 @@ ciss_close(dev_t dev, int flags, int fmt, d_thread_t *p)
|
|||||||
* simplify the porting of Compaq's userland tools.
|
* simplify the porting of Compaq's userland tools.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
ciss_ioctl(dev_t dev, u_long cmd, caddr_t addr, int32_t flag, d_thread_t *p)
|
ciss_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int32_t flag, d_thread_t *p)
|
||||||
{
|
{
|
||||||
struct ciss_softc *sc;
|
struct ciss_softc *sc;
|
||||||
int error;
|
int error;
|
||||||
|
@ -173,7 +173,7 @@ struct ciss_softc
|
|||||||
{
|
{
|
||||||
/* bus connections */
|
/* bus connections */
|
||||||
device_t ciss_dev; /* bus attachment */
|
device_t ciss_dev; /* bus attachment */
|
||||||
dev_t ciss_dev_t; /* control device */
|
struct cdev *ciss_dev_t; /* control device */
|
||||||
|
|
||||||
struct resource *ciss_regs_resource; /* register interface window */
|
struct resource *ciss_regs_resource; /* register interface window */
|
||||||
int ciss_regs_rid; /* resource ID */
|
int ciss_regs_rid; /* resource ID */
|
||||||
|
@ -161,7 +161,7 @@ typedef struct _drv_t {
|
|||||||
struct sppp pp;
|
struct sppp pp;
|
||||||
#endif
|
#endif
|
||||||
#if __FreeBSD_version >= 400000
|
#if __FreeBSD_version >= 400000
|
||||||
dev_t devt;
|
struct cdev *devt;
|
||||||
#endif
|
#endif
|
||||||
} drv_t;
|
} drv_t;
|
||||||
|
|
||||||
@ -967,7 +967,7 @@ static void cp_error (cp_chan_t *c, int data)
|
|||||||
#if __FreeBSD_version < 500000
|
#if __FreeBSD_version < 500000
|
||||||
static int cp_open (dev_t dev, int oflags, int devtype, struct proc *p)
|
static int cp_open (dev_t dev, int oflags, int devtype, struct proc *p)
|
||||||
#else
|
#else
|
||||||
static int cp_open (dev_t dev, int oflags, int devtype, struct thread *td)
|
static int cp_open (struct cdev *dev, int oflags, int devtype, struct thread *td)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
int unit = minor (dev);
|
int unit = minor (dev);
|
||||||
@ -985,7 +985,7 @@ static int cp_open (dev_t dev, int oflags, int devtype, struct thread *td)
|
|||||||
#if __FreeBSD_version < 500000
|
#if __FreeBSD_version < 500000
|
||||||
static int cp_close (dev_t dev, int fflag, int devtype, struct proc *p)
|
static int cp_close (dev_t dev, int fflag, int devtype, struct proc *p)
|
||||||
#else
|
#else
|
||||||
static int cp_close (dev_t dev, int fflag, int devtype, struct thread *td)
|
static int cp_close (struct cdev *dev, int fflag, int devtype, struct thread *td)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
drv_t *d = channel [minor (dev)];
|
drv_t *d = channel [minor (dev)];
|
||||||
@ -1013,7 +1013,7 @@ static int cp_modem_status (cp_chan_t *c)
|
|||||||
#if __FreeBSD_version < 500000
|
#if __FreeBSD_version < 500000
|
||||||
static int cp_ioctl (dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
|
static int cp_ioctl (dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
|
||||||
#else
|
#else
|
||||||
static int cp_ioctl (dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td)
|
static int cp_ioctl (struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
drv_t *d = channel [minor (dev)];
|
drv_t *d = channel [minor (dev)];
|
||||||
@ -2652,7 +2652,7 @@ static int cp_modevent (module_t mod, int type, void *unused)
|
|||||||
#else /* __FreeBSD_version >= 400000 */
|
#else /* __FreeBSD_version >= 400000 */
|
||||||
static int cp_modevent (module_t mod, int type, void *unused)
|
static int cp_modevent (module_t mod, int type, void *unused)
|
||||||
{
|
{
|
||||||
dev_t dev;
|
struct cdev *dev;
|
||||||
static int load_count = 0;
|
static int load_count = 0;
|
||||||
struct cdevsw *cdsw;
|
struct cdevsw *cdsw;
|
||||||
|
|
||||||
|
@ -172,7 +172,7 @@ typedef struct _drv_t {
|
|||||||
struct sppp pp;
|
struct sppp pp;
|
||||||
#endif
|
#endif
|
||||||
#if __FreeBSD_version >= 400000
|
#if __FreeBSD_version >= 400000
|
||||||
dev_t devt;
|
struct cdev *devt;
|
||||||
#endif
|
#endif
|
||||||
} drv_t;
|
} drv_t;
|
||||||
|
|
||||||
@ -1261,7 +1261,7 @@ static void ct_error (ct_chan_t *c, int data)
|
|||||||
#if __FreeBSD_version < 500000
|
#if __FreeBSD_version < 500000
|
||||||
static int ct_open (dev_t dev, int oflags, int devtype, struct proc *p)
|
static int ct_open (dev_t dev, int oflags, int devtype, struct proc *p)
|
||||||
#else
|
#else
|
||||||
static int ct_open (dev_t dev, int oflags, int devtype, struct thread *td)
|
static int ct_open (struct cdev *dev, int oflags, int devtype, struct thread *td)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
drv_t *d;
|
drv_t *d;
|
||||||
@ -1276,7 +1276,7 @@ static int ct_open (dev_t dev, int oflags, int devtype, struct thread *td)
|
|||||||
#if __FreeBSD_version < 500000
|
#if __FreeBSD_version < 500000
|
||||||
static int ct_close (dev_t dev, int fflag, int devtype, struct proc *p)
|
static int ct_close (dev_t dev, int fflag, int devtype, struct proc *p)
|
||||||
#else
|
#else
|
||||||
static int ct_close (dev_t dev, int fflag, int devtype, struct thread *td)
|
static int ct_close (struct cdev *dev, int fflag, int devtype, struct thread *td)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
drv_t *d = channel [minor(dev)];
|
drv_t *d = channel [minor(dev)];
|
||||||
@ -1313,7 +1313,7 @@ static int ct_modem_status (ct_chan_t *c)
|
|||||||
#if __FreeBSD_version < 500000
|
#if __FreeBSD_version < 500000
|
||||||
static int ct_ioctl (dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
|
static int ct_ioctl (dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
|
||||||
#else
|
#else
|
||||||
static int ct_ioctl (dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td)
|
static int ct_ioctl (struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
drv_t *d = channel [minor (dev)];
|
drv_t *d = channel [minor (dev)];
|
||||||
@ -2624,7 +2624,7 @@ static int ct_modevent (module_t mod, int type, void *unused)
|
|||||||
#else /* __FreeBSD_version >= 400000 */
|
#else /* __FreeBSD_version >= 400000 */
|
||||||
static int ct_modevent (module_t mod, int type, void *unused)
|
static int ct_modevent (module_t mod, int type, void *unused)
|
||||||
{
|
{
|
||||||
dev_t dev;
|
struct cdev *dev;
|
||||||
static int load_count = 0;
|
static int load_count = 0;
|
||||||
struct cdevsw *cdsw;
|
struct cdevsw *cdsw;
|
||||||
|
|
||||||
|
@ -212,7 +212,7 @@ typedef struct _drv_t {
|
|||||||
struct sppp pp;
|
struct sppp pp;
|
||||||
#endif
|
#endif
|
||||||
#if __FreeBSD_version >= 400000
|
#if __FreeBSD_version >= 400000
|
||||||
dev_t devt[3];
|
struct cdev *devt[3];
|
||||||
#endif
|
#endif
|
||||||
async_q aqueue;
|
async_q aqueue;
|
||||||
#define CX_READ 1
|
#define CX_READ 1
|
||||||
@ -1570,7 +1570,7 @@ static void cx_error (cx_chan_t *c, int data)
|
|||||||
#if __FreeBSD_version < 500000
|
#if __FreeBSD_version < 500000
|
||||||
static int cx_open (dev_t dev, int flag, int mode, struct proc *p)
|
static int cx_open (dev_t dev, int flag, int mode, struct proc *p)
|
||||||
#else
|
#else
|
||||||
static int cx_open (dev_t dev, int flag, int mode, struct thread *td)
|
static int cx_open (struct cdev *dev, int flag, int mode, struct thread *td)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
int unit = UNIT (dev);
|
int unit = UNIT (dev);
|
||||||
@ -1710,7 +1710,7 @@ failed: if (! (d->tty->t_state & TS_ISOPEN)) {
|
|||||||
#if __FreeBSD_version < 500000
|
#if __FreeBSD_version < 500000
|
||||||
static int cx_close (dev_t dev, int flag, int mode, struct proc *p)
|
static int cx_close (dev_t dev, int flag, int mode, struct proc *p)
|
||||||
#else
|
#else
|
||||||
static int cx_close (dev_t dev, int flag, int mode, struct thread *td)
|
static int cx_close (struct cdev *dev, int flag, int mode, struct thread *td)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
drv_t *d = channel [UNIT (dev)];
|
drv_t *d = channel [UNIT (dev)];
|
||||||
@ -1756,7 +1756,7 @@ static int cx_close (dev_t dev, int flag, int mode, struct thread *td)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int cx_read (dev_t dev, struct uio *uio, int flag)
|
static int cx_read (struct cdev *dev, struct uio *uio, int flag)
|
||||||
{
|
{
|
||||||
drv_t *d = channel [UNIT (dev)];
|
drv_t *d = channel [UNIT (dev)];
|
||||||
|
|
||||||
@ -1767,7 +1767,7 @@ static int cx_read (dev_t dev, struct uio *uio, int flag)
|
|||||||
return ttyld_read (d->tty, uio, flag);
|
return ttyld_read (d->tty, uio, flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int cx_write (dev_t dev, struct uio *uio, int flag)
|
static int cx_write (struct cdev *dev, struct uio *uio, int flag)
|
||||||
{
|
{
|
||||||
drv_t *d = channel [UNIT (dev)];
|
drv_t *d = channel [UNIT (dev)];
|
||||||
|
|
||||||
@ -1798,7 +1798,7 @@ static int cx_modem_status (drv_t *d)
|
|||||||
#if __FreeBSD_version < 500000
|
#if __FreeBSD_version < 500000
|
||||||
static int cx_ioctl (dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
|
static int cx_ioctl (dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
|
||||||
#else
|
#else
|
||||||
static int cx_ioctl (dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td)
|
static int cx_ioctl (struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
drv_t *d = channel [UNIT (dev)];
|
drv_t *d = channel [UNIT (dev)];
|
||||||
@ -3172,7 +3172,7 @@ static int cx_modevent (module_t mod, int type, void *unused)
|
|||||||
#else /* __FreeBSD_version >= 400000 */
|
#else /* __FreeBSD_version >= 400000 */
|
||||||
static int cx_modevent (module_t mod, int type, void *unused)
|
static int cx_modevent (module_t mod, int type, void *unused)
|
||||||
{
|
{
|
||||||
dev_t dev;
|
struct cdev *dev;
|
||||||
static int load_count = 0;
|
static int load_count = 0;
|
||||||
struct cdevsw *cdsw;
|
struct cdevsw *cdsw;
|
||||||
|
|
||||||
|
@ -592,7 +592,7 @@ cyattach_common(cy_iobase, cy_align)
|
|||||||
|
|
||||||
static int
|
static int
|
||||||
sioopen(dev, flag, mode, td)
|
sioopen(dev, flag, mode, td)
|
||||||
dev_t dev;
|
struct cdev *dev;
|
||||||
int flag;
|
int flag;
|
||||||
int mode;
|
int mode;
|
||||||
struct thread *td;
|
struct thread *td;
|
||||||
@ -776,7 +776,7 @@ sioopen(dev, flag, mode, td)
|
|||||||
|
|
||||||
static int
|
static int
|
||||||
sioclose(dev, flag, mode, td)
|
sioclose(dev, flag, mode, td)
|
||||||
dev_t dev;
|
struct cdev *dev;
|
||||||
int flag;
|
int flag;
|
||||||
int mode;
|
int mode;
|
||||||
struct thread *td;
|
struct thread *td;
|
||||||
@ -891,7 +891,7 @@ comhardclose(com)
|
|||||||
|
|
||||||
static int
|
static int
|
||||||
siowrite(dev, uio, flag)
|
siowrite(dev, uio, flag)
|
||||||
dev_t dev;
|
struct cdev *dev;
|
||||||
struct uio *uio;
|
struct uio *uio;
|
||||||
int flag;
|
int flag;
|
||||||
{
|
{
|
||||||
@ -1528,7 +1528,7 @@ siointr1(vcom)
|
|||||||
|
|
||||||
static int
|
static int
|
||||||
sioioctl(dev, cmd, data, flag, td)
|
sioioctl(dev, cmd, data, flag, td)
|
||||||
dev_t dev;
|
struct cdev *dev;
|
||||||
u_long cmd;
|
u_long cmd;
|
||||||
caddr_t data;
|
caddr_t data;
|
||||||
int flag;
|
int flag;
|
||||||
|
@ -129,7 +129,7 @@ struct dcons_buf *dcons_buf; /* for local dconschat */
|
|||||||
|
|
||||||
/* per device data */
|
/* per device data */
|
||||||
static struct dcons_softc {
|
static struct dcons_softc {
|
||||||
dev_t dev;
|
struct cdev *dev;
|
||||||
struct dcons_ch o, i;
|
struct dcons_ch o, i;
|
||||||
int brk_state;
|
int brk_state;
|
||||||
#define DC_GDB 1
|
#define DC_GDB 1
|
||||||
@ -159,7 +159,7 @@ CONS_DRIVER(dcons, dcons_cnprobe, dcons_cninit, NULL, dcons_cngetc,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int
|
static int
|
||||||
dcons_open(dev_t dev, int flag, int mode, struct THREAD *td)
|
dcons_open(struct cdev *dev, int flag, int mode, struct THREAD *td)
|
||||||
{
|
{
|
||||||
struct tty *tp;
|
struct tty *tp;
|
||||||
int unit, error, s;
|
int unit, error, s;
|
||||||
@ -198,7 +198,7 @@ dcons_open(dev_t dev, int flag, int mode, struct THREAD *td)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
dcons_close(dev_t dev, int flag, int mode, struct THREAD *td)
|
dcons_close(struct cdev *dev, int flag, int mode, struct THREAD *td)
|
||||||
{
|
{
|
||||||
int unit;
|
int unit;
|
||||||
struct tty *tp;
|
struct tty *tp;
|
||||||
@ -312,17 +312,17 @@ dcons_cnputc(struct consdev *cp, int c)
|
|||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
static int
|
static int
|
||||||
dcons_cngetc(dev_t dev)
|
dcons_cngetc(struct cdev *dev)
|
||||||
{
|
{
|
||||||
return(dcons_getc((struct dcons_softc *)dev->si_drv1));
|
return(dcons_getc((struct dcons_softc *)dev->si_drv1));
|
||||||
}
|
}
|
||||||
static int
|
static int
|
||||||
dcons_cncheckc(dev_t dev)
|
dcons_cncheckc(struct cdev *dev)
|
||||||
{
|
{
|
||||||
return(dcons_checkc((struct dcons_softc *)dev->si_drv1));
|
return(dcons_checkc((struct dcons_softc *)dev->si_drv1));
|
||||||
}
|
}
|
||||||
static void
|
static void
|
||||||
dcons_cnputc(dev_t dev, int c)
|
dcons_cnputc(struct cdev *dev, int c)
|
||||||
{
|
{
|
||||||
dcons_putc((struct dcons_softc *)dev->si_drv1, c);
|
dcons_putc((struct dcons_softc *)dev->si_drv1, c);
|
||||||
}
|
}
|
||||||
|
@ -694,7 +694,7 @@ digimctl(struct digi_p *port, int bits, int how)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
digiopen(dev_t dev, int flag, int mode, struct thread *td)
|
digiopen(struct cdev *dev, int flag, int mode, struct thread *td)
|
||||||
{
|
{
|
||||||
struct digi_softc *sc;
|
struct digi_softc *sc;
|
||||||
struct tty *tp;
|
struct tty *tp;
|
||||||
@ -859,7 +859,7 @@ digiopen(dev_t dev, int flag, int mode, struct thread *td)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
digiclose(dev_t dev, int flag, int mode, struct thread *td)
|
digiclose(struct cdev *dev, int flag, int mode, struct thread *td)
|
||||||
{
|
{
|
||||||
int mynor;
|
int mynor;
|
||||||
struct tty *tp;
|
struct tty *tp;
|
||||||
@ -938,7 +938,7 @@ digihardclose(struct digi_p *port)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
digiread(dev_t dev, struct uio *uio, int flag)
|
digiread(struct cdev *dev, struct uio *uio, int flag)
|
||||||
{
|
{
|
||||||
int mynor;
|
int mynor;
|
||||||
struct tty *tp;
|
struct tty *tp;
|
||||||
@ -964,7 +964,7 @@ digiread(dev_t dev, struct uio *uio, int flag)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
digiwrite(dev_t dev, struct uio *uio, int flag)
|
digiwrite(struct cdev *dev, struct uio *uio, int flag)
|
||||||
{
|
{
|
||||||
int mynor;
|
int mynor;
|
||||||
struct tty *tp;
|
struct tty *tp;
|
||||||
@ -1066,7 +1066,7 @@ digi_loadmoduledata(struct digi_softc *sc)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
digiioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td)
|
digiioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td)
|
||||||
{
|
{
|
||||||
int unit, pnum, mynor, error, s;
|
int unit, pnum, mynor, error, s;
|
||||||
struct digi_softc *sc;
|
struct digi_softc *sc;
|
||||||
|
@ -72,7 +72,7 @@ struct digi_p {
|
|||||||
volatile struct board_chan *bc;
|
volatile struct board_chan *bc;
|
||||||
struct tty *tp;
|
struct tty *tp;
|
||||||
|
|
||||||
dev_t dev[6];
|
struct cdev *dev[6];
|
||||||
|
|
||||||
u_char *txbuf;
|
u_char *txbuf;
|
||||||
u_char *rxbuf;
|
u_char *rxbuf;
|
||||||
@ -164,7 +164,7 @@ struct digi_softc {
|
|||||||
int iorid;
|
int iorid;
|
||||||
void *irqHandler;
|
void *irqHandler;
|
||||||
int unit;
|
int unit;
|
||||||
dev_t ctldev;
|
struct cdev *ctldev;
|
||||||
} res;
|
} res;
|
||||||
|
|
||||||
u_char *vmem; /* virtual memory address */
|
u_char *vmem; /* virtual memory address */
|
||||||
|
@ -313,7 +313,7 @@ struct drm_device {
|
|||||||
#ifdef __FreeBSD__
|
#ifdef __FreeBSD__
|
||||||
device_t device; /* Device instance from newbus */
|
device_t device; /* Device instance from newbus */
|
||||||
#endif
|
#endif
|
||||||
dev_t devnode; /* Device number for mknod */
|
struct cdev *devnode; /* Device number for mknod */
|
||||||
int if_version; /* Highest interface version set */
|
int if_version; /* Highest interface version set */
|
||||||
|
|
||||||
int flags; /* Flags to open(2) */
|
int flags; /* Flags to open(2) */
|
||||||
|
@ -808,7 +808,7 @@ int DRM(version)( DRM_IOCTL_ARGS )
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int DRM(open)(dev_t kdev, int flags, int fmt, DRM_STRUCTPROC *p)
|
int DRM(open)(struct cdev *kdev, int flags, int fmt, DRM_STRUCTPROC *p)
|
||||||
{
|
{
|
||||||
drm_device_t *dev = NULL;
|
drm_device_t *dev = NULL;
|
||||||
int retcode = 0;
|
int retcode = 0;
|
||||||
@ -833,7 +833,7 @@ int DRM(open)(dev_t kdev, int flags, int fmt, DRM_STRUCTPROC *p)
|
|||||||
return retcode;
|
return retcode;
|
||||||
}
|
}
|
||||||
|
|
||||||
int DRM(close)(dev_t kdev, int flags, int fmt, DRM_STRUCTPROC *p)
|
int DRM(close)(struct cdev *kdev, int flags, int fmt, DRM_STRUCTPROC *p)
|
||||||
{
|
{
|
||||||
drm_file_t *priv;
|
drm_file_t *priv;
|
||||||
DRM_DEVICE;
|
DRM_DEVICE;
|
||||||
@ -951,7 +951,7 @@ int DRM(close)(dev_t kdev, int flags, int fmt, DRM_STRUCTPROC *p)
|
|||||||
|
|
||||||
/* DRM(ioctl) is called whenever a process performs an ioctl on /dev/drm.
|
/* DRM(ioctl) is called whenever a process performs an ioctl on /dev/drm.
|
||||||
*/
|
*/
|
||||||
int DRM(ioctl)(dev_t kdev, u_long cmd, caddr_t data, int flags,
|
int DRM(ioctl)(struct cdev *kdev, u_long cmd, caddr_t data, int flags,
|
||||||
DRM_STRUCTPROC *p)
|
DRM_STRUCTPROC *p)
|
||||||
{
|
{
|
||||||
DRM_DEVICE;
|
DRM_DEVICE;
|
||||||
|
@ -54,7 +54,7 @@ drm_file_t *DRM(find_file_by_proc)(drm_device_t *dev, DRM_STRUCTPROC *p)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* DRM(open_helper) is called whenever a process opens /dev/drm. */
|
/* DRM(open_helper) is called whenever a process opens /dev/drm. */
|
||||||
int DRM(open_helper)(dev_t kdev, int flags, int fmt, DRM_STRUCTPROC *p,
|
int DRM(open_helper)(struct cdev *kdev, int flags, int fmt, DRM_STRUCTPROC *p,
|
||||||
drm_device_t *dev)
|
drm_device_t *dev)
|
||||||
{
|
{
|
||||||
int m = minor(kdev);
|
int m = minor(kdev);
|
||||||
@ -106,12 +106,12 @@ int DRM(open_helper)(dev_t kdev, int flags, int fmt, DRM_STRUCTPROC *p,
|
|||||||
/* The DRM(read) and DRM(poll) are stubs to prevent spurious errors
|
/* The DRM(read) and DRM(poll) are stubs to prevent spurious errors
|
||||||
* on older X Servers (4.3.0 and earlier) */
|
* on older X Servers (4.3.0 and earlier) */
|
||||||
|
|
||||||
int DRM(read)(dev_t kdev, struct uio *uio, int ioflag)
|
int DRM(read)(struct cdev *kdev, struct uio *uio, int ioflag)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int DRM(poll)(dev_t kdev, int events, DRM_STRUCTPROC *p)
|
int DRM(poll)(struct cdev *kdev, int events, DRM_STRUCTPROC *p)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -151,7 +151,7 @@
|
|||||||
* of the current process. It should be a per-open unique pointer, but
|
* of the current process. It should be a per-open unique pointer, but
|
||||||
* code for that is not yet written */
|
* code for that is not yet written */
|
||||||
#define DRMFILE void *
|
#define DRMFILE void *
|
||||||
#define DRM_IOCTL_ARGS dev_t kdev, u_long cmd, caddr_t data, int flags, DRM_STRUCTPROC *p, DRMFILE filp
|
#define DRM_IOCTL_ARGS struct cdev *kdev, u_long cmd, caddr_t data, int flags, DRM_STRUCTPROC *p, DRMFILE filp
|
||||||
#define DRM_SUSER(p) suser(p)
|
#define DRM_SUSER(p) suser(p)
|
||||||
#define DRM_TASKQUEUE_ARGS void *arg, int pending
|
#define DRM_TASKQUEUE_ARGS void *arg, int pending
|
||||||
#define DRM_IRQ_ARGS void *arg
|
#define DRM_IRQ_ARGS void *arg
|
||||||
@ -473,7 +473,7 @@ extern d_close_t DRM(close);
|
|||||||
extern d_read_t DRM(read);
|
extern d_read_t DRM(read);
|
||||||
extern d_poll_t DRM(poll);
|
extern d_poll_t DRM(poll);
|
||||||
extern d_mmap_t DRM(mmap);
|
extern d_mmap_t DRM(mmap);
|
||||||
extern int DRM(open_helper)(dev_t kdev, int flags, int fmt,
|
extern int DRM(open_helper)(struct cdev *kdev, int flags, int fmt,
|
||||||
DRM_STRUCTPROC *p, drm_device_t *dev);
|
DRM_STRUCTPROC *p, drm_device_t *dev);
|
||||||
extern drm_file_t *DRM(find_file_by_proc)(drm_device_t *dev,
|
extern drm_file_t *DRM(find_file_by_proc)(drm_device_t *dev,
|
||||||
DRM_STRUCTPROC *p);
|
DRM_STRUCTPROC *p);
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(__FreeBSD__) && __FreeBSD_version >= 500102
|
#if defined(__FreeBSD__) && __FreeBSD_version >= 500102
|
||||||
static int DRM(dma_mmap)(dev_t kdev, vm_offset_t offset, vm_paddr_t *paddr,
|
static int DRM(dma_mmap)(struct cdev *kdev, vm_offset_t offset, vm_paddr_t *paddr,
|
||||||
int prot)
|
int prot)
|
||||||
#elif defined(__FreeBSD__)
|
#elif defined(__FreeBSD__)
|
||||||
static int DRM(dma_mmap)(dev_t kdev, vm_offset_t offset, int prot)
|
static int DRM(dma_mmap)(dev_t kdev, vm_offset_t offset, int prot)
|
||||||
@ -55,7 +55,7 @@ static paddr_t DRM(dma_mmap)(dev_t kdev, vm_offset_t offset, int prot)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(__FreeBSD__) && __FreeBSD_version >= 500102
|
#if defined(__FreeBSD__) && __FreeBSD_version >= 500102
|
||||||
int DRM(mmap)(dev_t kdev, vm_offset_t offset, vm_paddr_t *paddr,
|
int DRM(mmap)(struct cdev *kdev, vm_offset_t offset, vm_paddr_t *paddr,
|
||||||
int prot)
|
int prot)
|
||||||
#elif defined(__FreeBSD__)
|
#elif defined(__FreeBSD__)
|
||||||
int DRM(mmap)(dev_t kdev, vm_offset_t offset, int prot)
|
int DRM(mmap)(dev_t kdev, vm_offset_t offset, int prot)
|
||||||
|
@ -142,7 +142,7 @@
|
|||||||
struct creator_softc {
|
struct creator_softc {
|
||||||
video_adapter_t sc_va; /* XXX must be first */
|
video_adapter_t sc_va; /* XXX must be first */
|
||||||
|
|
||||||
dev_t sc_si;
|
struct cdev *sc_si;
|
||||||
|
|
||||||
struct resource *sc_reg[FFB_NREG];
|
struct resource *sc_reg[FFB_NREG];
|
||||||
bus_space_tag_t sc_bt[FFB_NREG];
|
bus_space_tag_t sc_bt[FFB_NREG];
|
||||||
|
@ -166,7 +166,7 @@ typedef struct gfb_softc {
|
|||||||
int type;
|
int type;
|
||||||
int model;
|
int model;
|
||||||
struct cdevsw *cdevsw;
|
struct cdevsw *cdevsw;
|
||||||
dev_t devt;
|
struct cdev *devt;
|
||||||
} *gfb_softc_t;
|
} *gfb_softc_t;
|
||||||
|
|
||||||
#endif /* _FB_GFB_H_ */
|
#endif /* _FB_GFB_H_ */
|
||||||
|
@ -109,7 +109,7 @@ vga_attach_unit(int unit, vga_softc_t *sc, int flags)
|
|||||||
#ifdef FB_INSTALL_CDEV
|
#ifdef FB_INSTALL_CDEV
|
||||||
|
|
||||||
int
|
int
|
||||||
vga_open(dev_t dev, vga_softc_t *sc, int flag, int mode, struct thread *td)
|
vga_open(struct cdev *dev, vga_softc_t *sc, int flag, int mode, struct thread *td)
|
||||||
{
|
{
|
||||||
if (sc == NULL)
|
if (sc == NULL)
|
||||||
return ENXIO;
|
return ENXIO;
|
||||||
@ -120,32 +120,32 @@ vga_open(dev_t dev, vga_softc_t *sc, int flag, int mode, struct thread *td)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
vga_close(dev_t dev, vga_softc_t *sc, int flag, int mode, struct thread *td)
|
vga_close(struct cdev *dev, vga_softc_t *sc, int flag, int mode, struct thread *td)
|
||||||
{
|
{
|
||||||
return genfbclose(&sc->gensc, sc->adp, flag, mode, td);
|
return genfbclose(&sc->gensc, sc->adp, flag, mode, td);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
vga_read(dev_t dev, vga_softc_t *sc, struct uio *uio, int flag)
|
vga_read(struct cdev *dev, vga_softc_t *sc, struct uio *uio, int flag)
|
||||||
{
|
{
|
||||||
return genfbread(&sc->gensc, sc->adp, uio, flag);
|
return genfbread(&sc->gensc, sc->adp, uio, flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
vga_write(dev_t dev, vga_softc_t *sc, struct uio *uio, int flag)
|
vga_write(struct cdev *dev, vga_softc_t *sc, struct uio *uio, int flag)
|
||||||
{
|
{
|
||||||
return genfbread(&sc->gensc, sc->adp, uio, flag);
|
return genfbread(&sc->gensc, sc->adp, uio, flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
vga_ioctl(dev_t dev, vga_softc_t *sc, u_long cmd, caddr_t arg, int flag,
|
vga_ioctl(struct cdev *dev, vga_softc_t *sc, u_long cmd, caddr_t arg, int flag,
|
||||||
struct thread *td)
|
struct thread *td)
|
||||||
{
|
{
|
||||||
return genfbioctl(&sc->gensc, sc->adp, cmd, arg, flag, td);
|
return genfbioctl(&sc->gensc, sc->adp, cmd, arg, flag, td);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
vga_mmap(dev_t dev, vga_softc_t *sc, vm_offset_t offset, vm_offset_t *paddr,
|
vga_mmap(struct cdev *dev, vga_softc_t *sc, vm_offset_t offset, vm_offset_t *paddr,
|
||||||
int prot)
|
int prot)
|
||||||
{
|
{
|
||||||
return genfbmmap(&sc->gensc, sc->adp, offset, paddr, prot);
|
return genfbmmap(&sc->gensc, sc->adp, offset, paddr, prot);
|
||||||
|
@ -78,15 +78,15 @@ int vga_probe_unit(int unit, struct video_adapter *adp, int flags);
|
|||||||
int vga_attach_unit(int unit, vga_softc_t *sc, int flags);
|
int vga_attach_unit(int unit, vga_softc_t *sc, int flags);
|
||||||
|
|
||||||
#ifdef FB_INSTALL_CDEV
|
#ifdef FB_INSTALL_CDEV
|
||||||
int vga_open(dev_t dev, vga_softc_t *sc, int flag, int mode,
|
int vga_open(struct cdev *dev, vga_softc_t *sc, int flag, int mode,
|
||||||
struct thread *td);
|
struct thread *td);
|
||||||
int vga_close(dev_t dev, vga_softc_t *sc, int flag, int mode,
|
int vga_close(struct cdev *dev, vga_softc_t *sc, int flag, int mode,
|
||||||
struct thread *td);
|
struct thread *td);
|
||||||
int vga_read(dev_t dev, vga_softc_t *sc, struct uio *uio, int flag);
|
int vga_read(struct cdev *dev, vga_softc_t *sc, struct uio *uio, int flag);
|
||||||
int vga_write(dev_t dev, vga_softc_t *sc, struct uio *uio, int flag);
|
int vga_write(struct cdev *dev, vga_softc_t *sc, struct uio *uio, int flag);
|
||||||
int vga_ioctl(dev_t dev, vga_softc_t *sc, u_long cmd, caddr_t arg,
|
int vga_ioctl(struct cdev *dev, vga_softc_t *sc, u_long cmd, caddr_t arg,
|
||||||
int flag, struct thread *td);
|
int flag, struct thread *td);
|
||||||
int vga_mmap(dev_t dev, vga_softc_t *sc, vm_offset_t offset,
|
int vga_mmap(struct cdev *dev, vga_softc_t *sc, vm_offset_t offset,
|
||||||
vm_offset_t *paddr, int prot);
|
vm_offset_t *paddr, int prot);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -301,7 +301,7 @@ struct fd_data {
|
|||||||
struct callout_handle toffhandle;
|
struct callout_handle toffhandle;
|
||||||
struct callout_handle tohandle;
|
struct callout_handle tohandle;
|
||||||
struct devstat *device_stats;
|
struct devstat *device_stats;
|
||||||
dev_t masterdev;
|
struct cdev *masterdev;
|
||||||
device_t dev;
|
device_t dev;
|
||||||
fdu_t fdu;
|
fdu_t fdu;
|
||||||
};
|
};
|
||||||
@ -393,11 +393,11 @@ static timeout_t fd_iotimeout;
|
|||||||
static timeout_t fd_pseudointr;
|
static timeout_t fd_pseudointr;
|
||||||
static driver_intr_t fdc_intr;
|
static driver_intr_t fdc_intr;
|
||||||
static int fdcpio(fdc_p, long, caddr_t, u_int);
|
static int fdcpio(fdc_p, long, caddr_t, u_int);
|
||||||
static int fdautoselect(dev_t);
|
static int fdautoselect(struct cdev *);
|
||||||
static int fdstate(struct fdc_data *);
|
static int fdstate(struct fdc_data *);
|
||||||
static int retrier(struct fdc_data *);
|
static int retrier(struct fdc_data *);
|
||||||
static void fdbiodone(struct bio *);
|
static void fdbiodone(struct bio *);
|
||||||
static int fdmisccmd(dev_t, u_int, void *);
|
static int fdmisccmd(struct cdev *, u_int, void *);
|
||||||
static d_ioctl_t fdioctl;
|
static d_ioctl_t fdioctl;
|
||||||
|
|
||||||
static int fifo_threshold = 8; /* XXX: should be accessible via sysctl */
|
static int fifo_threshold = 8; /* XXX: should be accessible via sysctl */
|
||||||
@ -1496,7 +1496,7 @@ out_fdc(struct fdc_data *fdc, int x)
|
|||||||
* auxiliary functions).
|
* auxiliary functions).
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
fdopen(dev_t dev, int flags, int mode, struct thread *td)
|
fdopen(struct cdev *dev, int flags, int mode, struct thread *td)
|
||||||
{
|
{
|
||||||
fd_p fd;
|
fd_p fd;
|
||||||
fdc_p fdc;
|
fdc_p fdc;
|
||||||
@ -1591,7 +1591,7 @@ fdopen(dev_t dev, int flags, int mode, struct thread *td)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
fdclose(dev_t dev, int flags, int mode, struct thread *td)
|
fdclose(struct cdev *dev, int flags, int mode, struct thread *td)
|
||||||
{
|
{
|
||||||
struct fd_data *fd;
|
struct fd_data *fd;
|
||||||
|
|
||||||
@ -1795,7 +1795,7 @@ fdcpio(fdc_p fdc, long flags, caddr_t addr, u_int count)
|
|||||||
* Try figuring out the density of the media present in our device.
|
* Try figuring out the density of the media present in our device.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
fdautoselect(dev_t dev)
|
fdautoselect(struct cdev *dev)
|
||||||
{
|
{
|
||||||
fd_p fd;
|
fd_p fd;
|
||||||
struct fd_type *fdtp;
|
struct fd_type *fdtp;
|
||||||
@ -2492,7 +2492,7 @@ fdbiodone(struct bio *bp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
fdmisccmd(dev_t dev, u_int cmd, void *data)
|
fdmisccmd(struct cdev *dev, u_int cmd, void *data)
|
||||||
{
|
{
|
||||||
fdu_t fdu;
|
fdu_t fdu;
|
||||||
fd_p fd;
|
fd_p fd;
|
||||||
@ -2543,7 +2543,7 @@ fdmisccmd(dev_t dev, u_int cmd, void *data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
fdioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
|
fdioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
|
||||||
{
|
{
|
||||||
fdu_t fdu;
|
fdu_t fdu;
|
||||||
fd_p fd;
|
fd_p fd;
|
||||||
|
@ -72,7 +72,7 @@ struct fw_device{
|
|||||||
|
|
||||||
struct firewire_softc {
|
struct firewire_softc {
|
||||||
#if defined(__FreeBSD__) && __FreeBSD_version >= 500000
|
#if defined(__FreeBSD__) && __FreeBSD_version >= 500000
|
||||||
dev_t dev;
|
struct cdev *dev;
|
||||||
#endif
|
#endif
|
||||||
struct firewire_comm *fc;
|
struct firewire_comm *fc;
|
||||||
};
|
};
|
||||||
@ -156,7 +156,7 @@ struct firewire_comm{
|
|||||||
uint32_t (*cyctimer) (struct firewire_comm *);
|
uint32_t (*cyctimer) (struct firewire_comm *);
|
||||||
void (*ibr) (struct firewire_comm *);
|
void (*ibr) (struct firewire_comm *);
|
||||||
uint32_t (*set_bmr) (struct firewire_comm *, uint32_t);
|
uint32_t (*set_bmr) (struct firewire_comm *, uint32_t);
|
||||||
int (*ioctl) (dev_t, u_long, caddr_t, int, fw_proc *);
|
int (*ioctl) (struct cdev *, u_long, caddr_t, int, fw_proc *);
|
||||||
int (*irx_enable) (struct firewire_comm *, int);
|
int (*irx_enable) (struct firewire_comm *, int);
|
||||||
int (*irx_disable) (struct firewire_comm *, int);
|
int (*irx_disable) (struct firewire_comm *, int);
|
||||||
int (*itx_enable) (struct firewire_comm *, int);
|
int (*itx_enable) (struct firewire_comm *, int);
|
||||||
@ -303,7 +303,7 @@ struct fw_bind *fw_bindlookup (struct firewire_comm *, uint16_t, uint32_t);
|
|||||||
void fw_drain_txq (struct firewire_comm *);
|
void fw_drain_txq (struct firewire_comm *);
|
||||||
int fwdev_makedev (struct firewire_softc *);
|
int fwdev_makedev (struct firewire_softc *);
|
||||||
int fwdev_destroydev (struct firewire_softc *);
|
int fwdev_destroydev (struct firewire_softc *);
|
||||||
void fwdev_clone (void *, char *, int, dev_t *);
|
void fwdev_clone (void *, char *, int, struct cdev **);
|
||||||
|
|
||||||
extern int firewire_debug;
|
extern int firewire_debug;
|
||||||
extern devclass_t firewire_devclass;
|
extern devclass_t firewire_devclass;
|
||||||
|
@ -178,7 +178,7 @@ fwdev_freebuf(struct fw_xferq *q)
|
|||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
fw_open (dev_t dev, int flags, int fmt, fw_proc *td)
|
fw_open (struct cdev *dev, int flags, int fmt, fw_proc *td)
|
||||||
{
|
{
|
||||||
int err = 0;
|
int err = 0;
|
||||||
|
|
||||||
@ -205,7 +205,7 @@ fw_open (dev_t dev, int flags, int fmt, fw_proc *td)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
fw_close (dev_t dev, int flags, int fmt, fw_proc *td)
|
fw_close (struct cdev *dev, int flags, int fmt, fw_proc *td)
|
||||||
{
|
{
|
||||||
struct firewire_softc *sc;
|
struct firewire_softc *sc;
|
||||||
struct firewire_comm *fc;
|
struct firewire_comm *fc;
|
||||||
@ -279,7 +279,7 @@ fw_close (dev_t dev, int flags, int fmt, fw_proc *td)
|
|||||||
* read request.
|
* read request.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
fw_read (dev_t dev, struct uio *uio, int ioflag)
|
fw_read (struct cdev *dev, struct uio *uio, int ioflag)
|
||||||
{
|
{
|
||||||
struct firewire_softc *sc;
|
struct firewire_softc *sc;
|
||||||
struct fw_xferq *ir;
|
struct fw_xferq *ir;
|
||||||
@ -365,7 +365,7 @@ fw_read (dev_t dev, struct uio *uio, int ioflag)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
fw_write (dev_t dev, struct uio *uio, int ioflag)
|
fw_write (struct cdev *dev, struct uio *uio, int ioflag)
|
||||||
{
|
{
|
||||||
int err = 0;
|
int err = 0;
|
||||||
struct firewire_softc *sc;
|
struct firewire_softc *sc;
|
||||||
@ -428,7 +428,7 @@ fw_write (dev_t dev, struct uio *uio, int ioflag)
|
|||||||
* ioctl support.
|
* ioctl support.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
fw_ioctl (dev_t dev, u_long cmd, caddr_t data, int flag, fw_proc *td)
|
fw_ioctl (struct cdev *dev, u_long cmd, caddr_t data, int flag, fw_proc *td)
|
||||||
{
|
{
|
||||||
struct firewire_softc *sc;
|
struct firewire_softc *sc;
|
||||||
struct firewire_comm *fc;
|
struct firewire_comm *fc;
|
||||||
@ -728,7 +728,7 @@ fw_ioctl (dev_t dev, u_long cmd, caddr_t data, int flag, fw_proc *td)
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
int
|
int
|
||||||
fw_poll(dev_t dev, int events, fw_proc *td)
|
fw_poll(struct cdev *dev, int events, fw_proc *td)
|
||||||
{
|
{
|
||||||
struct firewire_softc *sc;
|
struct firewire_softc *sc;
|
||||||
struct fw_xferq *ir;
|
struct fw_xferq *ir;
|
||||||
@ -760,9 +760,9 @@ fw_poll(dev_t dev, int events, fw_proc *td)
|
|||||||
|
|
||||||
static int
|
static int
|
||||||
#if defined(__DragonFly__) || __FreeBSD_version < 500102
|
#if defined(__DragonFly__) || __FreeBSD_version < 500102
|
||||||
fw_mmap (dev_t dev, vm_offset_t offset, int nproto)
|
fw_mmap (struct cdev *dev, vm_offset_t offset, int nproto)
|
||||||
#else
|
#else
|
||||||
fw_mmap (dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int nproto)
|
fw_mmap (struct cdev *dev, vm_offset_t offset, vm_paddr_t *paddr, int nproto)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
struct firewire_softc *sc;
|
struct firewire_softc *sc;
|
||||||
@ -783,7 +783,7 @@ fw_mmap (dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int nproto)
|
|||||||
static void
|
static void
|
||||||
fw_strategy(struct bio *bp)
|
fw_strategy(struct bio *bp)
|
||||||
{
|
{
|
||||||
dev_t dev;
|
struct cdev *dev;
|
||||||
|
|
||||||
dev = bp->bio_dev;
|
dev = bp->bio_dev;
|
||||||
if (DEV_FWMEM(dev)) {
|
if (DEV_FWMEM(dev)) {
|
||||||
@ -805,7 +805,7 @@ fwdev_makedev(struct firewire_softc *sc)
|
|||||||
#if defined(__DragonFly__) || __FreeBSD_version < 500000
|
#if defined(__DragonFly__) || __FreeBSD_version < 500000
|
||||||
cdevsw_add(&firewire_cdevsw);
|
cdevsw_add(&firewire_cdevsw);
|
||||||
#else
|
#else
|
||||||
dev_t d;
|
struct cdev *d;
|
||||||
int unit;
|
int unit;
|
||||||
|
|
||||||
unit = device_get_unit(sc->fc->bdev);
|
unit = device_get_unit(sc->fc->bdev);
|
||||||
@ -840,7 +840,7 @@ fwdev_destroydev(struct firewire_softc *sc)
|
|||||||
#if defined(__FreeBSD__) && __FreeBSD_version >= 500000
|
#if defined(__FreeBSD__) && __FreeBSD_version >= 500000
|
||||||
#define NDEVTYPE 2
|
#define NDEVTYPE 2
|
||||||
void
|
void
|
||||||
fwdev_clone(void *arg, char *name, int namelen, dev_t *dev)
|
fwdev_clone(void *arg, char *name, int namelen, struct cdev **dev)
|
||||||
{
|
{
|
||||||
struct firewire_softc *sc;
|
struct firewire_softc *sc;
|
||||||
char *devnames[NDEVTYPE] = {"fw", "fwmem"};
|
char *devnames[NDEVTYPE] = {"fw", "fwmem"};
|
||||||
|
@ -274,7 +274,7 @@ fwmem_write_block(
|
|||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
fwmem_open (dev_t dev, int flags, int fmt, fw_proc *td)
|
fwmem_open (struct cdev *dev, int flags, int fmt, fw_proc *td)
|
||||||
{
|
{
|
||||||
struct fwmem_softc *fms;
|
struct fwmem_softc *fms;
|
||||||
|
|
||||||
@ -300,7 +300,7 @@ fwmem_open (dev_t dev, int flags, int fmt, fw_proc *td)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
fwmem_close (dev_t dev, int flags, int fmt, fw_proc *td)
|
fwmem_close (struct cdev *dev, int flags, int fmt, fw_proc *td)
|
||||||
{
|
{
|
||||||
struct fwmem_softc *fms;
|
struct fwmem_softc *fms;
|
||||||
|
|
||||||
@ -343,7 +343,7 @@ fwmem_strategy(struct bio *bp)
|
|||||||
struct fwmem_softc *fms;
|
struct fwmem_softc *fms;
|
||||||
struct fw_device *fwdev;
|
struct fw_device *fwdev;
|
||||||
struct fw_xfer *xfer;
|
struct fw_xfer *xfer;
|
||||||
dev_t dev;
|
struct cdev *dev;
|
||||||
int unit, err=0, s, iolen;
|
int unit, err=0, s, iolen;
|
||||||
|
|
||||||
dev = bp->bio_dev;
|
dev = bp->bio_dev;
|
||||||
@ -406,7 +406,7 @@ fwmem_strategy(struct bio *bp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
fwmem_ioctl (dev_t dev, u_long cmd, caddr_t data, int flag, fw_proc *td)
|
fwmem_ioctl (struct cdev *dev, u_long cmd, caddr_t data, int flag, fw_proc *td)
|
||||||
{
|
{
|
||||||
struct fwmem_softc *fms;
|
struct fwmem_softc *fms;
|
||||||
int err = 0;
|
int err = 0;
|
||||||
@ -425,15 +425,15 @@ fwmem_ioctl (dev_t dev, u_long cmd, caddr_t data, int flag, fw_proc *td)
|
|||||||
return(err);
|
return(err);
|
||||||
}
|
}
|
||||||
int
|
int
|
||||||
fwmem_poll (dev_t dev, int events, fw_proc *td)
|
fwmem_poll (struct cdev *dev, int events, fw_proc *td)
|
||||||
{
|
{
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
}
|
}
|
||||||
int
|
int
|
||||||
#if defined(__DragonFly__) || __FreeBSD_version < 500102
|
#if defined(__DragonFly__) || __FreeBSD_version < 500102
|
||||||
fwmem_mmap (dev_t dev, vm_offset_t offset, int nproto)
|
fwmem_mmap (struct cdev *dev, vm_offset_t offset, int nproto)
|
||||||
#else
|
#else
|
||||||
fwmem_mmap (dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int nproto)
|
fwmem_mmap (struct cdev *dev, vm_offset_t offset, vm_paddr_t *paddr, int nproto)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
|
@ -345,7 +345,7 @@ fwphy_rddata(struct fwohci_softc *sc, u_int addr)
|
|||||||
}
|
}
|
||||||
/* Device specific ioctl. */
|
/* Device specific ioctl. */
|
||||||
int
|
int
|
||||||
fwohci_ioctl (dev_t dev, u_long cmd, caddr_t data, int flag, fw_proc *td)
|
fwohci_ioctl (struct cdev *dev, u_long cmd, caddr_t data, int flag, fw_proc *td)
|
||||||
{
|
{
|
||||||
struct firewire_softc *sc;
|
struct firewire_softc *sc;
|
||||||
struct fwohci_softc *fc;
|
struct fwohci_softc *fc;
|
||||||
|
@ -260,7 +260,7 @@ pcigfb_detach(device_t dev)
|
|||||||
#ifdef FB_INSTALL_CDEV
|
#ifdef FB_INSTALL_CDEV
|
||||||
|
|
||||||
int
|
int
|
||||||
pcigfb_open(dev_t dev, int flag, int mode, struct thread *td)
|
pcigfb_open(struct cdev *dev, int flag, int mode, struct thread *td)
|
||||||
{
|
{
|
||||||
struct gfb_softc *sc;
|
struct gfb_softc *sc;
|
||||||
int error;
|
int error;
|
||||||
@ -277,7 +277,7 @@ pcigfb_open(dev_t dev, int flag, int mode, struct thread *td)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
pcigfb_close(dev_t dev, int flag, int mode, struct thread *td)
|
pcigfb_close(struct cdev *dev, int flag, int mode, struct thread *td)
|
||||||
{
|
{
|
||||||
struct gfb_softc *sc;
|
struct gfb_softc *sc;
|
||||||
|
|
||||||
@ -286,7 +286,7 @@ pcigfb_close(dev_t dev, int flag, int mode, struct thread *td)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
pcigfb_read(dev_t dev, struct uio *uio, int flag)
|
pcigfb_read(struct cdev *dev, struct uio *uio, int flag)
|
||||||
{
|
{
|
||||||
struct gfb_softc *sc;
|
struct gfb_softc *sc;
|
||||||
|
|
||||||
@ -295,7 +295,7 @@ pcigfb_read(dev_t dev, struct uio *uio, int flag)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
pcigfb_write(dev_t dev, struct uio *uio, int flag)
|
pcigfb_write(struct cdev *dev, struct uio *uio, int flag)
|
||||||
{
|
{
|
||||||
struct gfb_softc *sc;
|
struct gfb_softc *sc;
|
||||||
|
|
||||||
@ -304,7 +304,7 @@ pcigfb_write(dev_t dev, struct uio *uio, int flag)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
pcigfb_ioctl(dev_t dev, u_long cmd, caddr_t arg, int flag, struct thread *td)
|
pcigfb_ioctl(struct cdev *dev, u_long cmd, caddr_t arg, int flag, struct thread *td)
|
||||||
{
|
{
|
||||||
struct gfb_softc *sc;
|
struct gfb_softc *sc;
|
||||||
|
|
||||||
@ -313,7 +313,7 @@ pcigfb_ioctl(dev_t dev, u_long cmd, caddr_t arg, int flag, struct thread *td)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
pcigfb_mmap(dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int prot)
|
pcigfb_mmap(struct cdev *dev, vm_offset_t offset, vm_paddr_t *paddr, int prot)
|
||||||
{
|
{
|
||||||
struct gfb_softc *sc;
|
struct gfb_softc *sc;
|
||||||
|
|
||||||
|
@ -575,7 +575,7 @@ struct cmd_info {
|
|||||||
static struct cmd_info *ida_cmd_lookup(int);
|
static struct cmd_info *ida_cmd_lookup(int);
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ida_ioctl (dev_t dev, u_long cmd, caddr_t addr, int32_t flag, struct thread *td)
|
ida_ioctl (struct cdev *dev, u_long cmd, caddr_t addr, int32_t flag, struct thread *td)
|
||||||
{
|
{
|
||||||
struct ida_softc *sc;
|
struct ida_softc *sc;
|
||||||
struct ida_user_command *uc;
|
struct ida_user_command *uc;
|
||||||
|
@ -126,7 +126,7 @@ struct ida_access {
|
|||||||
struct ida_softc {
|
struct ida_softc {
|
||||||
device_t dev;
|
device_t dev;
|
||||||
int unit;
|
int unit;
|
||||||
dev_t ida_dev_t;
|
struct cdev *ida_dev_t;
|
||||||
|
|
||||||
int regs_res_type;
|
int regs_res_type;
|
||||||
int regs_res_id;
|
int regs_res_id;
|
||||||
|
@ -52,7 +52,7 @@ struct iic_softc {
|
|||||||
char sc_buffer[BUFSIZE]; /* output buffer */
|
char sc_buffer[BUFSIZE]; /* output buffer */
|
||||||
char sc_inbuf[BUFSIZE]; /* input buffer */
|
char sc_inbuf[BUFSIZE]; /* input buffer */
|
||||||
|
|
||||||
dev_t sc_devnode;
|
struct cdev *sc_devnode;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define IIC_SOFTC(unit) \
|
#define IIC_SOFTC(unit) \
|
||||||
@ -146,7 +146,7 @@ iic_detach(device_t dev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
iicopen (dev_t dev, int flags, int fmt, struct thread *td)
|
iicopen (struct cdev *dev, int flags, int fmt, struct thread *td)
|
||||||
{
|
{
|
||||||
struct iic_softc *sc = IIC_SOFTC(minor(dev));
|
struct iic_softc *sc = IIC_SOFTC(minor(dev));
|
||||||
|
|
||||||
@ -162,7 +162,7 @@ iicopen (dev_t dev, int flags, int fmt, struct thread *td)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
iicclose(dev_t dev, int flags, int fmt, struct thread *td)
|
iicclose(struct cdev *dev, int flags, int fmt, struct thread *td)
|
||||||
{
|
{
|
||||||
struct iic_softc *sc = IIC_SOFTC(minor(dev));
|
struct iic_softc *sc = IIC_SOFTC(minor(dev));
|
||||||
|
|
||||||
@ -181,7 +181,7 @@ iicclose(dev_t dev, int flags, int fmt, struct thread *td)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
iicwrite(dev_t dev, struct uio * uio, int ioflag)
|
iicwrite(struct cdev *dev, struct uio * uio, int ioflag)
|
||||||
{
|
{
|
||||||
device_t iicdev = IIC_DEVICE(minor(dev));
|
device_t iicdev = IIC_DEVICE(minor(dev));
|
||||||
struct iic_softc *sc = IIC_SOFTC(minor(dev));
|
struct iic_softc *sc = IIC_SOFTC(minor(dev));
|
||||||
@ -208,7 +208,7 @@ iicwrite(dev_t dev, struct uio * uio, int ioflag)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
iicread(dev_t dev, struct uio * uio, int ioflag)
|
iicread(struct cdev *dev, struct uio * uio, int ioflag)
|
||||||
{
|
{
|
||||||
device_t iicdev = IIC_DEVICE(minor(dev));
|
device_t iicdev = IIC_DEVICE(minor(dev));
|
||||||
struct iic_softc *sc = IIC_SOFTC(minor(dev));
|
struct iic_softc *sc = IIC_SOFTC(minor(dev));
|
||||||
@ -240,7 +240,7 @@ iicread(dev_t dev, struct uio * uio, int ioflag)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
iicioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct thread *td)
|
iicioctl(struct cdev *dev, u_long cmd, caddr_t data, int flags, struct thread *td)
|
||||||
{
|
{
|
||||||
device_t iicdev = IIC_DEVICE(minor(dev));
|
device_t iicdev = IIC_DEVICE(minor(dev));
|
||||||
struct iic_softc *sc = IIC_SOFTC(minor(dev));
|
struct iic_softc *sc = IIC_SOFTC(minor(dev));
|
||||||
|
@ -602,7 +602,7 @@ struct gdt_softc {
|
|||||||
#define GDT_POLLING 0x01
|
#define GDT_POLLING 0x01
|
||||||
#define GDT_SHUTDOWN 0x02
|
#define GDT_SHUTDOWN 0x02
|
||||||
#define GDT_POLL_WAIT 0x80
|
#define GDT_POLL_WAIT 0x80
|
||||||
dev_t sc_dev;
|
struct cdev *sc_dev;
|
||||||
bus_space_tag_t sc_dpmemt;
|
bus_space_tag_t sc_dpmemt;
|
||||||
bus_space_handle_t sc_dpmemh;
|
bus_space_handle_t sc_dpmemh;
|
||||||
bus_addr_t sc_dpmembase;
|
bus_addr_t sc_dpmembase;
|
||||||
@ -746,8 +746,8 @@ gdt_dec32(addr)
|
|||||||
extern TAILQ_HEAD(gdt_softc_list, gdt_softc) gdt_softcs;
|
extern TAILQ_HEAD(gdt_softc_list, gdt_softc) gdt_softcs;
|
||||||
extern u_int8_t gdt_polling;
|
extern u_int8_t gdt_polling;
|
||||||
|
|
||||||
dev_t gdt_make_dev(int unit);
|
struct cdev *gdt_make_dev(int unit);
|
||||||
void gdt_destroy_dev(dev_t dev);
|
void gdt_destroy_dev(struct cdev *dev);
|
||||||
void gdt_next(struct gdt_softc *gdt);
|
void gdt_next(struct gdt_softc *gdt);
|
||||||
void gdt_free_ccb(struct gdt_softc *gdt, struct gdt_ccb *gccb);
|
void gdt_free_ccb(struct gdt_softc *gdt, struct gdt_ccb *gccb);
|
||||||
|
|
||||||
|
@ -95,10 +95,10 @@ extern gdt_statist_t gdt_stat;
|
|||||||
* Given a controller number,
|
* Given a controller number,
|
||||||
* make a special device and return the dev_t
|
* make a special device and return the dev_t
|
||||||
*/
|
*/
|
||||||
dev_t
|
struct cdev *
|
||||||
gdt_make_dev(int unit)
|
gdt_make_dev(int unit)
|
||||||
{
|
{
|
||||||
dev_t dev;
|
struct cdev *dev;
|
||||||
|
|
||||||
#ifdef SDEV_PER_HBA
|
#ifdef SDEV_PER_HBA
|
||||||
dev = make_dev(&iir_cdevsw, hba2minor(unit), UID_ROOT, GID_OPERATOR,
|
dev = make_dev(&iir_cdevsw, hba2minor(unit), UID_ROOT, GID_OPERATOR,
|
||||||
@ -114,7 +114,7 @@ gdt_make_dev(int unit)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gdt_destroy_dev(dev_t dev)
|
gdt_destroy_dev(struct cdev *dev)
|
||||||
{
|
{
|
||||||
if (dev != NULL)
|
if (dev != NULL)
|
||||||
destroy_dev(dev);
|
destroy_dev(dev);
|
||||||
@ -144,7 +144,7 @@ gdt_minor2softc(int minor_no)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
iir_open(dev_t dev, int flags, int fmt, d_thread_t * p)
|
iir_open(struct cdev *dev, int flags, int fmt, d_thread_t * p)
|
||||||
{
|
{
|
||||||
GDT_DPRINTF(GDT_D_DEBUG, ("iir_open()\n"));
|
GDT_DPRINTF(GDT_D_DEBUG, ("iir_open()\n"));
|
||||||
|
|
||||||
@ -162,7 +162,7 @@ iir_open(dev_t dev, int flags, int fmt, d_thread_t * p)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
iir_close(dev_t dev, int flags, int fmt, d_thread_t * p)
|
iir_close(struct cdev *dev, int flags, int fmt, d_thread_t * p)
|
||||||
{
|
{
|
||||||
GDT_DPRINTF(GDT_D_DEBUG, ("iir_close()\n"));
|
GDT_DPRINTF(GDT_D_DEBUG, ("iir_close()\n"));
|
||||||
|
|
||||||
@ -180,7 +180,7 @@ iir_close(dev_t dev, int flags, int fmt, d_thread_t * p)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
iir_write(dev_t dev, struct uio * uio, int ioflag)
|
iir_write(struct cdev *dev, struct uio * uio, int ioflag)
|
||||||
{
|
{
|
||||||
GDT_DPRINTF(GDT_D_DEBUG, ("iir_write()\n"));
|
GDT_DPRINTF(GDT_D_DEBUG, ("iir_write()\n"));
|
||||||
|
|
||||||
@ -198,7 +198,7 @@ iir_write(dev_t dev, struct uio * uio, int ioflag)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
iir_read(dev_t dev, struct uio * uio, int ioflag)
|
iir_read(struct cdev *dev, struct uio * uio, int ioflag)
|
||||||
{
|
{
|
||||||
GDT_DPRINTF(GDT_D_DEBUG, ("iir_read()\n"));
|
GDT_DPRINTF(GDT_D_DEBUG, ("iir_read()\n"));
|
||||||
|
|
||||||
@ -222,7 +222,7 @@ iir_read(dev_t dev, struct uio * uio, int ioflag)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
static int
|
static int
|
||||||
iir_ioctl(dev_t dev, u_long cmd, caddr_t cmdarg, int flags, d_thread_t * p)
|
iir_ioctl(struct cdev *dev, u_long cmd, caddr_t cmdarg, int flags, d_thread_t * p)
|
||||||
{
|
{
|
||||||
GDT_DPRINTF(GDT_D_DEBUG, ("iir_ioctl() cmd 0x%lx\n",cmd));
|
GDT_DPRINTF(GDT_D_DEBUG, ("iir_ioctl() cmd 0x%lx\n",cmd));
|
||||||
|
|
||||||
|
@ -68,14 +68,14 @@ static const char* ips_adapter_name[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
static int ips_open(dev_t dev, int flags, int fmt, struct thread *td)
|
static int ips_open(struct cdev *dev, int flags, int fmt, struct thread *td)
|
||||||
{
|
{
|
||||||
ips_softc_t *sc = dev->si_drv1;
|
ips_softc_t *sc = dev->si_drv1;
|
||||||
sc->state |= IPS_DEV_OPEN;
|
sc->state |= IPS_DEV_OPEN;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ips_close(dev_t dev, int flags, int fmt, struct thread *td)
|
static int ips_close(struct cdev *dev, int flags, int fmt, struct thread *td)
|
||||||
{
|
{
|
||||||
ips_softc_t *sc = dev->si_drv1;
|
ips_softc_t *sc = dev->si_drv1;
|
||||||
sc->state &= ~IPS_DEV_OPEN;
|
sc->state &= ~IPS_DEV_OPEN;
|
||||||
@ -83,7 +83,7 @@ static int ips_close(dev_t dev, int flags, int fmt, struct thread *td)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ips_ioctl(dev_t dev, u_long command, caddr_t addr, int32_t flags, struct thread *td)
|
static int ips_ioctl(struct cdev *dev, u_long command, caddr_t addr, int32_t flags, struct thread *td)
|
||||||
{
|
{
|
||||||
ips_softc_t *sc;
|
ips_softc_t *sc;
|
||||||
|
|
||||||
|
@ -414,7 +414,7 @@ typedef struct ips_softc{
|
|||||||
bus_dma_tag_t command_dmatag;
|
bus_dma_tag_t command_dmatag;
|
||||||
bus_dma_tag_t sg_dmatag;
|
bus_dma_tag_t sg_dmatag;
|
||||||
device_t dev;
|
device_t dev;
|
||||||
dev_t device_file;
|
struct cdev *device_file;
|
||||||
struct callout_handle timer;
|
struct callout_handle timer;
|
||||||
u_int16_t adapter_type;
|
u_int16_t adapter_type;
|
||||||
ips_adapter_info_t adapter_info;
|
ips_adapter_info_t adapter_info;
|
||||||
|
@ -238,7 +238,7 @@ isp_freeze_loopdown(struct ispsoftc *isp, char *msg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ispioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct thread *td)
|
ispioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td)
|
||||||
{
|
{
|
||||||
struct ispsoftc *isp;
|
struct ispsoftc *isp;
|
||||||
int nr, retval = ENOTTY;
|
int nr, retval = ENOTTY;
|
||||||
|
@ -128,7 +128,7 @@ joy_detach(device_t dev)
|
|||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
joyopen(dev_t dev, int flags, int fmt, struct thread *td)
|
joyopen(struct cdev *dev, int flags, int fmt, struct thread *td)
|
||||||
{
|
{
|
||||||
int i = joypart (dev);
|
int i = joypart (dev);
|
||||||
struct joy_softc *joy = JOY_SOFTC(UNIT(dev));
|
struct joy_softc *joy = JOY_SOFTC(UNIT(dev));
|
||||||
@ -141,7 +141,7 @@ joyopen(dev_t dev, int flags, int fmt, struct thread *td)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
joyclose(dev_t dev, int flags, int fmt, struct thread *td)
|
joyclose(struct cdev *dev, int flags, int fmt, struct thread *td)
|
||||||
{
|
{
|
||||||
int i = joypart (dev);
|
int i = joypart (dev);
|
||||||
struct joy_softc *joy = JOY_SOFTC(UNIT(dev));
|
struct joy_softc *joy = JOY_SOFTC(UNIT(dev));
|
||||||
@ -151,7 +151,7 @@ joyclose(dev_t dev, int flags, int fmt, struct thread *td)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
joyread(dev_t dev, struct uio *uio, int flag)
|
joyread(struct cdev *dev, struct uio *uio, int flag)
|
||||||
{
|
{
|
||||||
struct joy_softc *joy = JOY_SOFTC(UNIT(dev));
|
struct joy_softc *joy = JOY_SOFTC(UNIT(dev));
|
||||||
bus_space_handle_t port = joy->port;
|
bus_space_handle_t port = joy->port;
|
||||||
@ -209,7 +209,7 @@ joyread(dev_t dev, struct uio *uio, int flag)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
joyioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td)
|
joyioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td)
|
||||||
{
|
{
|
||||||
struct joy_softc *joy = JOY_SOFTC(UNIT(dev));
|
struct joy_softc *joy = JOY_SOFTC(UNIT(dev));
|
||||||
int i = joypart (dev);
|
int i = joypart (dev);
|
||||||
|
@ -35,7 +35,7 @@ struct joy_softc {
|
|||||||
int timeout[2];
|
int timeout[2];
|
||||||
struct resource *res;
|
struct resource *res;
|
||||||
int rid;
|
int rid;
|
||||||
dev_t d;
|
struct cdev *d;
|
||||||
};
|
};
|
||||||
|
|
||||||
int joy_probe(device_t);
|
int joy_probe(device_t);
|
||||||
|
@ -489,7 +489,7 @@ kbd_detach(keyboard_t *kbd)
|
|||||||
static kbd_callback_func_t genkbd_event;
|
static kbd_callback_func_t genkbd_event;
|
||||||
|
|
||||||
static int
|
static int
|
||||||
genkbdopen(dev_t dev, int mode, int flag, struct thread *td)
|
genkbdopen(struct cdev *dev, int mode, int flag, struct thread *td)
|
||||||
{
|
{
|
||||||
keyboard_t *kbd;
|
keyboard_t *kbd;
|
||||||
genkbd_softc_t *sc;
|
genkbd_softc_t *sc;
|
||||||
@ -527,7 +527,7 @@ genkbdopen(dev_t dev, int mode, int flag, struct thread *td)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
genkbdclose(dev_t dev, int mode, int flag, struct thread *td)
|
genkbdclose(struct cdev *dev, int mode, int flag, struct thread *td)
|
||||||
{
|
{
|
||||||
keyboard_t *kbd;
|
keyboard_t *kbd;
|
||||||
genkbd_softc_t *sc;
|
genkbd_softc_t *sc;
|
||||||
@ -553,7 +553,7 @@ genkbdclose(dev_t dev, int mode, int flag, struct thread *td)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
genkbdread(dev_t dev, struct uio *uio, int flag)
|
genkbdread(struct cdev *dev, struct uio *uio, int flag)
|
||||||
{
|
{
|
||||||
keyboard_t *kbd;
|
keyboard_t *kbd;
|
||||||
genkbd_softc_t *sc;
|
genkbd_softc_t *sc;
|
||||||
@ -606,7 +606,7 @@ genkbdread(dev_t dev, struct uio *uio, int flag)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
genkbdwrite(dev_t dev, struct uio *uio, int flag)
|
genkbdwrite(struct cdev *dev, struct uio *uio, int flag)
|
||||||
{
|
{
|
||||||
keyboard_t *kbd;
|
keyboard_t *kbd;
|
||||||
|
|
||||||
@ -617,7 +617,7 @@ genkbdwrite(dev_t dev, struct uio *uio, int flag)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
genkbdioctl(dev_t dev, u_long cmd, caddr_t arg, int flag, struct thread *td)
|
genkbdioctl(struct cdev *dev, u_long cmd, caddr_t arg, int flag, struct thread *td)
|
||||||
{
|
{
|
||||||
keyboard_t *kbd;
|
keyboard_t *kbd;
|
||||||
int error;
|
int error;
|
||||||
@ -632,7 +632,7 @@ genkbdioctl(dev_t dev, u_long cmd, caddr_t arg, int flag, struct thread *td)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
genkbdpoll(dev_t dev, int events, struct thread *td)
|
genkbdpoll(struct cdev *dev, int events, struct thread *td)
|
||||||
{
|
{
|
||||||
keyboard_t *kbd;
|
keyboard_t *kbd;
|
||||||
genkbd_softc_t *sc;
|
genkbd_softc_t *sc;
|
||||||
|
@ -90,7 +90,7 @@ struct keyboard {
|
|||||||
#define KB_DELAY2 100
|
#define KB_DELAY2 100
|
||||||
unsigned long kb_count; /* # of processed key strokes */
|
unsigned long kb_count; /* # of processed key strokes */
|
||||||
u_char kb_lastact[NUM_KEYS/2];
|
u_char kb_lastact[NUM_KEYS/2];
|
||||||
dev_t kb_dev;
|
struct cdev *kb_dev;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define KBD_IS_VALID(k) ((k)->kb_flags & KB_VALID)
|
#define KBD_IS_VALID(k) ((k)->kb_flags & KB_VALID)
|
||||||
|
@ -26,7 +26,7 @@ struct ledsc {
|
|||||||
LIST_ENTRY(ledsc) list;
|
LIST_ENTRY(ledsc) list;
|
||||||
void *private;
|
void *private;
|
||||||
led_t *func;
|
led_t *func;
|
||||||
dev_t dev;
|
struct cdev *dev;
|
||||||
struct sbuf *spec;
|
struct sbuf *spec;
|
||||||
char *str;
|
char *str;
|
||||||
char *ptr;
|
char *ptr;
|
||||||
@ -72,7 +72,7 @@ led_timeout(void *p)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
led_write(dev_t dev, struct uio *uio, int ioflag)
|
led_write(struct cdev *dev, struct uio *uio, int ioflag)
|
||||||
{
|
{
|
||||||
int error;
|
int error;
|
||||||
char *s, *s2;
|
char *s, *s2;
|
||||||
@ -221,7 +221,7 @@ static struct cdevsw led_cdevsw = {
|
|||||||
.d_name = "LED",
|
.d_name = "LED",
|
||||||
};
|
};
|
||||||
|
|
||||||
dev_t
|
struct cdev *
|
||||||
led_create(led_t *func, void *priv, char const *name)
|
led_create(led_t *func, void *priv, char const *name)
|
||||||
{
|
{
|
||||||
struct ledsc *sc;
|
struct ledsc *sc;
|
||||||
@ -259,7 +259,7 @@ led_create(led_t *func, void *priv, char const *name)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
led_destroy(dev_t dev)
|
led_destroy(struct cdev *dev)
|
||||||
{
|
{
|
||||||
struct ledsc *sc;
|
struct ledsc *sc;
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
typedef void led_t(void *, int);
|
typedef void led_t(void *, int);
|
||||||
|
|
||||||
dev_t led_create(led_t *, void *, char const *);
|
struct cdev *led_create(led_t *, void *, char const *);
|
||||||
void led_destroy(dev_t);
|
void led_destroy(struct cdev *);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -624,7 +624,7 @@ struct matcd_mbx {
|
|||||||
|
|
||||||
static struct matcd_data {
|
static struct matcd_data {
|
||||||
device_t dev;
|
device_t dev;
|
||||||
dev_t matcd_dev_t;
|
struct cdev *matcd_dev_t;
|
||||||
short config;
|
short config;
|
||||||
short drivemode; /*Last state drive was set to*/
|
short drivemode; /*Last state drive was set to*/
|
||||||
short flags;
|
short flags;
|
||||||
@ -657,8 +657,8 @@ static unsigned char if_state[4]={0,0,0,0}; /*State of host I/F and bus*/
|
|||||||
|
|
||||||
int matcd_probe(struct matcd_softc *sc);
|
int matcd_probe(struct matcd_softc *sc);
|
||||||
int matcd_attach(struct matcd_softc *sc);
|
int matcd_attach(struct matcd_softc *sc);
|
||||||
static int matcdopen(dev_t dev, int flags, int fmt, struct thread *ptx);
|
static int matcdopen(struct cdev *dev, int flags, int fmt, struct thread *ptx);
|
||||||
static int matcdclose(dev_t dev, int flags, int fmt, struct thread *ptx);
|
static int matcdclose(struct cdev *dev, int flags, int fmt, struct thread *ptx);
|
||||||
static void matcdstrategy(struct bio *bp);
|
static void matcdstrategy(struct bio *bp);
|
||||||
static d_ioctl_t matcdioctl;
|
static d_ioctl_t matcdioctl;
|
||||||
static timeout_t matcd_timeout;
|
static timeout_t matcd_timeout;
|
||||||
@ -668,7 +668,7 @@ static timeout_t matcd_timeout;
|
|||||||
Internal function declarations
|
Internal function declarations
|
||||||
---------------------------------------------------------------------------*/
|
---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
static int matcdsize(dev_t dev);
|
static int matcdsize(struct cdev *dev);
|
||||||
static void matcd_start(struct bio_queue_head *dp);
|
static void matcd_start(struct bio_queue_head *dp);
|
||||||
static void zero_cmd(char *);
|
static void zero_cmd(char *);
|
||||||
static void matcd_pread(int port, int count, unsigned char * data);
|
static void matcd_pread(int port, int count, unsigned char * data);
|
||||||
@ -772,7 +772,7 @@ int matcd_attach(struct matcd_softc *sc)
|
|||||||
unsigned char data[12];
|
unsigned char data[12];
|
||||||
struct matcd_data *cd;
|
struct matcd_data *cd;
|
||||||
int port = sc->port_bsh; /*Take port ID selected in probe()*/
|
int port = sc->port_bsh; /*Take port ID selected in probe()*/
|
||||||
dev_t d;
|
struct cdev *d;
|
||||||
int unit=0;
|
int unit=0;
|
||||||
|
|
||||||
printf("matcdc%d: Host interface type %d port %x\n",
|
printf("matcdc%d: Host interface type %d port %x\n",
|
||||||
@ -864,7 +864,7 @@ int matcd_attach(struct matcd_softc *sc)
|
|||||||
<15> If LOCKDRIVE is enabled, additional minor number devices allow
|
<15> If LOCKDRIVE is enabled, additional minor number devices allow
|
||||||
<15> the drive to be locked while being accessed.
|
<15> the drive to be locked while being accessed.
|
||||||
---------------------------------------------------------------------------*/
|
---------------------------------------------------------------------------*/
|
||||||
static int matcdopen(dev_t dev, int flags, int fmt,
|
static int matcdopen(struct cdev *dev, int flags, int fmt,
|
||||||
struct thread *ptx)
|
struct thread *ptx)
|
||||||
{
|
{
|
||||||
int cdrive,ldrive,partition,controller,lock;
|
int cdrive,ldrive,partition,controller,lock;
|
||||||
@ -1051,7 +1051,7 @@ static int matcdopen(dev_t dev, int flags, int fmt,
|
|||||||
the drive. See Edit 15 in Edit History.
|
the drive. See Edit 15 in Edit History.
|
||||||
---------------------------------------------------------------------------*/
|
---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
static int matcdclose(dev_t dev, int flags, int fmt,struct thread *ptx)
|
static int matcdclose(struct cdev *dev, int flags, int fmt,struct thread *ptx)
|
||||||
{
|
{
|
||||||
int ldrive,cdrive,port,partition,controller,lock;
|
int ldrive,cdrive,port,partition,controller,lock;
|
||||||
struct matcd_data *cd;
|
struct matcd_data *cd;
|
||||||
@ -1910,7 +1910,7 @@ static void matcd_start(struct bio_queue_head *dp)
|
|||||||
things that don't fit into the block read scheme of things.
|
things that don't fit into the block read scheme of things.
|
||||||
---------------------------------------------------------------------------*/
|
---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
static int matcdioctl(dev_t dev, unsigned long command,
|
static int matcdioctl(struct cdev *dev, unsigned long command,
|
||||||
caddr_t addr, int flags,
|
caddr_t addr, int flags,
|
||||||
struct thread *td)
|
struct thread *td)
|
||||||
{
|
{
|
||||||
@ -2051,7 +2051,7 @@ static int matcdioctl(dev_t dev, unsigned long command,
|
|||||||
matcdsize - Reports how many blocks exist on the disc.
|
matcdsize - Reports how many blocks exist on the disc.
|
||||||
---------------------------------------------------------------------------*/
|
---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
static int matcdsize(dev_t dev)
|
static int matcdsize(struct cdev *dev)
|
||||||
{
|
{
|
||||||
int size,blksize;
|
int size,blksize;
|
||||||
int ldrive,part;
|
int ldrive,part;
|
||||||
|
@ -50,7 +50,7 @@ See matcd.c for Edit History
|
|||||||
|
|
||||||
struct matcd_softc {
|
struct matcd_softc {
|
||||||
device_t dev;
|
device_t dev;
|
||||||
dev_t matcd_dev_t;
|
struct cdev *matcd_dev_t;
|
||||||
struct resource * port;
|
struct resource * port;
|
||||||
int port_rid;
|
int port_rid;
|
||||||
int port_type;
|
int port_type;
|
||||||
|
@ -153,7 +153,7 @@ static int mcd_pause(struct mcd_softc *);
|
|||||||
static int mcd_resume(struct mcd_softc *);
|
static int mcd_resume(struct mcd_softc *);
|
||||||
static int mcd_lock_door(struct mcd_softc *, int lock);
|
static int mcd_lock_door(struct mcd_softc *, int lock);
|
||||||
static int mcd_close_tray(struct mcd_softc *);
|
static int mcd_close_tray(struct mcd_softc *);
|
||||||
static int mcd_size(dev_t dev);
|
static int mcd_size(struct cdev *dev);
|
||||||
|
|
||||||
static d_open_t mcdopen;
|
static d_open_t mcdopen;
|
||||||
static d_close_t mcdclose;
|
static d_close_t mcdclose;
|
||||||
@ -211,7 +211,7 @@ mcd_attach(struct mcd_softc *sc)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
mcdopen(dev_t dev, int flags, int fmt, struct thread *td)
|
mcdopen(struct cdev *dev, int flags, int fmt, struct thread *td)
|
||||||
{
|
{
|
||||||
struct mcd_softc *sc;
|
struct mcd_softc *sc;
|
||||||
int r,retry;
|
int r,retry;
|
||||||
@ -271,7 +271,7 @@ mcdopen(dev_t dev, int flags, int fmt, struct thread *td)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
mcdclose(dev_t dev, int flags, int fmt, struct thread *td)
|
mcdclose(struct cdev *dev, int flags, int fmt, struct thread *td)
|
||||||
{
|
{
|
||||||
struct mcd_softc *sc;
|
struct mcd_softc *sc;
|
||||||
|
|
||||||
@ -368,7 +368,7 @@ mcd_start(struct mcd_softc *sc)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
mcdioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct thread *td)
|
mcdioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td)
|
||||||
{
|
{
|
||||||
struct mcd_softc *sc;
|
struct mcd_softc *sc;
|
||||||
int retry,r;
|
int retry,r;
|
||||||
@ -466,7 +466,7 @@ MCD_TRACE("ioctl called 0x%lx\n", cmd);
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
mcd_size(dev_t dev)
|
mcd_size(struct cdev *dev)
|
||||||
{
|
{
|
||||||
struct mcd_softc *sc;
|
struct mcd_softc *sc;
|
||||||
int size;
|
int size;
|
||||||
|
@ -35,7 +35,7 @@ struct mcd_data {
|
|||||||
|
|
||||||
struct mcd_softc {
|
struct mcd_softc {
|
||||||
device_t dev;
|
device_t dev;
|
||||||
dev_t mcd_dev_t;
|
struct cdev *mcd_dev_t;
|
||||||
int debug;
|
int debug;
|
||||||
|
|
||||||
struct resource * port;
|
struct resource * port;
|
||||||
|
@ -107,7 +107,7 @@ static u_char end_mfs_root[] __unused = "MFS Filesystem had better STOP here";
|
|||||||
static g_init_t md_drvinit;
|
static g_init_t md_drvinit;
|
||||||
|
|
||||||
static int mdunits;
|
static int mdunits;
|
||||||
static dev_t status_dev = 0;
|
static struct cdev *status_dev = 0;
|
||||||
|
|
||||||
static d_ioctl_t mdctlioctl;
|
static d_ioctl_t mdctlioctl;
|
||||||
|
|
||||||
@ -137,7 +137,7 @@ struct md_s {
|
|||||||
LIST_ENTRY(md_s) list;
|
LIST_ENTRY(md_s) list;
|
||||||
struct bio_queue_head bio_queue;
|
struct bio_queue_head bio_queue;
|
||||||
struct mtx queue_mtx;
|
struct mtx queue_mtx;
|
||||||
dev_t dev;
|
struct cdev *dev;
|
||||||
enum md_types type;
|
enum md_types type;
|
||||||
unsigned nsect;
|
unsigned nsect;
|
||||||
unsigned opencount;
|
unsigned opencount;
|
||||||
@ -1078,7 +1078,7 @@ mddetach(int unit, struct thread *td)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
mdctlioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct thread *td)
|
mdctlioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td)
|
||||||
{
|
{
|
||||||
struct md_ioctl *mdio;
|
struct md_ioctl *mdio;
|
||||||
struct md_s *sc;
|
struct md_s *sc;
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user