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.5 2008/11/09 10:59:14 swildner Exp $
79 .Nd initiate I/O on raw devices
84 .Fn physread "struct dev_read_args *ap"
86 .Fn physwrite "struct dev_write_args *ap"
91 are helper functions typically called from character device read and write
92 routines to start I/O on a user process buffer.
95 routine one or more times depending on the size of transfer which is
100 The maximum amount of data transferable in one iteration of the
104 functions is determined by the maximum I/O size supported by the device
106 otherwise the value of
109 Until the I/O operation is complete, the calling process or thread is
110 put to sleep with the wait message set to
117 functions always await the completion of the entire requested transfer
118 before returning, unless an error condition is detected earlier.
122 argument is a pointer to a
126 structure, as passed to
141 will be returned if the address range described by
143 is not accessible by the calling process or thread.
145 Note that the actual transfer size may be less than requested by
147 if the device signals an