2 .\" Copyright (c) 2005 The DragonFly Project. All rights reserved.
4 .\" This code is derived from software contributed to The DragonFly Project
5 .\" by Hiten Pandya <hmp@backplane.com>.
7 .\" Redistribution and use in source and binary forms, with or without
8 .\" modification, are permitted provided that the following conditions
11 .\" 1. Redistributions of source code must retain the above copyright
12 .\" notice, this list of conditions and the following disclaimer.
13 .\" 2. Redistributions in binary form must reproduce the above copyright
14 .\" notice, this list of conditions and the following disclaimer in
15 .\" the documentation and/or other materials provided with the
17 .\" 3. Neither the name of The DragonFly Project nor the names of its
18 .\" contributors may be used to endorse or promote products derived
19 .\" from this software without specific, prior written permission.
21 .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 .\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24 .\" FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25 .\" COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26 .\" INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING,
27 .\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28 .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
29 .\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
30 .\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
31 .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 .\" $NetBSD: physio.9,v 1.2 1996/11/11 00:05:12 lukem Exp $
36 .\" Copyright (c) 1996 The NetBSD Foundation, Inc.
37 .\" All rights reserved.
39 .\" This code is derived from software contributed to The NetBSD Foundation
40 .\" by Paul Kranenburg.
42 .\" Redistribution and use in source and binary forms, with or without
43 .\" modification, are permitted provided that the following conditions
45 .\" 1. Redistributions of source code must retain the above copyright
46 .\" notice, this list of conditions and the following disclaimer.
47 .\" 2. Redistributions in binary form must reproduce the above copyright
48 .\" notice, this list of conditions and the following disclaimer in the
49 .\" documentation and/or other materials provided with the distribution.
50 .\" 3. All advertising materials mentioning features or use of this software
51 .\" must display the following acknowledgement:
52 .\" This product includes software developed by the NetBSD
53 .\" Foundation, Inc. and its contributors.
54 .\" 4. Neither the name of The NetBSD Foundation nor the names of its
55 .\" contributors may be used to endorse or promote products derived
56 .\" from this software without specific prior written permission.
58 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
59 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
60 .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
61 .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE
62 .\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
63 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
64 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
65 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
66 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
67 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
68 .\" POSSIBILITY OF SUCH DAMAGE.
70 .\" $FreeBSD: src/share/man/man9/physio.9,v 1.6.2.4 2001/12/17 11:30:18 ru Exp $
71 .\" $DragonFly: src/share/man/man9/physio.9,v 1.4 2007/06/30 19:03:52 swildner Exp $
78 .Nd initiate I/O on raw devices
84 .Fn physio "dev_t dev" "struct uio *uio" "int ioflag"
88 is a helper function typically called from character device read and write
89 routines to start I/O on a user process buffer.
92 routine one or more times depending on the size of transfer which is
97 The maximum amount of data transferable in one iteration of the
99 function is determined by the maximum I/O size supported by the device
101 otherwise the value of
104 Until the I/O operation is complete, the calling process or thread is
105 put to sleep with the wait message set to
110 function always awaits the completion of the entire requested transfer
111 before returning, unless an error condition is detected earlier.
113 A break-down of the arguments follow:
114 .Bl -tag -width indent
116 The device to interact with by using it as with the
118 routine in order to initiate I/O.
120 The description of the entire transfer as requested by the user process.
122 Direction of transfer; the only valid settings are
136 will be returned if the address range described by
138 is not accessible by the calling process or thread.
140 Note that the actual transfer size may be less than requested by
142 if the device signals an