diff options
-rw-r--r-- | share/man/man9/physio.9 | 29 | ||||
-rw-r--r-- | sys/arch/hp300/dev/ct.c | 6 | ||||
-rw-r--r-- | sys/arch/hp300/dev/hd.c | 6 | ||||
-rw-r--r-- | sys/arch/hp300/dev/mt.c | 6 | ||||
-rw-r--r-- | sys/arch/sparc/dev/fd.c | 6 | ||||
-rw-r--r-- | sys/arch/sparc/dev/presto.c | 6 | ||||
-rw-r--r-- | sys/arch/sparc/dev/xd.c | 6 | ||||
-rw-r--r-- | sys/arch/sparc/dev/xy.c | 6 | ||||
-rw-r--r-- | sys/arch/sparc64/dev/fd.c | 6 | ||||
-rw-r--r-- | sys/arch/vax/mba/hp.c | 6 | ||||
-rw-r--r-- | sys/arch/vax/mscp/mscp_disk.c | 10 | ||||
-rw-r--r-- | sys/arch/vax/mscp/mscp_tape.c | 6 | ||||
-rw-r--r-- | sys/arch/vax/qbus/qd.c | 6 | ||||
-rw-r--r-- | sys/arch/vax/vsa/hdc9224.c | 6 | ||||
-rw-r--r-- | sys/dev/ata/wd.c | 9 | ||||
-rw-r--r-- | sys/dev/ccd.c | 6 | ||||
-rw-r--r-- | sys/dev/flash.c | 6 | ||||
-rw-r--r-- | sys/dev/isa/fd.c | 6 | ||||
-rw-r--r-- | sys/dev/isa/mcd.c | 6 | ||||
-rw-r--r-- | sys/dev/raidframe/rf_openbsdkintf.c | 6 | ||||
-rw-r--r-- | sys/dev/ramdisk.c | 6 | ||||
-rw-r--r-- | sys/dev/vnd.c | 6 | ||||
-rw-r--r-- | sys/kern/kern_physio.c | 25 | ||||
-rw-r--r-- | sys/scsi/cd.c | 6 | ||||
-rw-r--r-- | sys/scsi/sd.c | 6 | ||||
-rw-r--r-- | sys/scsi/st.c | 6 | ||||
-rw-r--r-- | sys/sys/buf.h | 6 |
27 files changed, 95 insertions, 116 deletions
diff --git a/share/man/man9/physio.9 b/share/man/man9/physio.9 index a99e738b51d..ffcc7e3a80d 100644 --- a/share/man/man9/physio.9 +++ b/share/man/man9/physio.9 @@ -1,4 +1,4 @@ -.\" $OpenBSD: physio.9,v 1.6 2008/06/26 05:42:08 ray Exp $ +.\" $OpenBSD: physio.9,v 1.7 2010/09/22 01:18:57 matthew Exp $ .\" $NetBSD: physio.9,v 1.5 1999/03/16 00:40:47 garbled Exp $ .\" .\" Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -28,7 +28,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: June 26 2008 $ +.Dd $Mdocdate: September 22 2010 $ .Dt PHYSIO 9 .Os .Sh NAME @@ -38,7 +38,6 @@ .Ft int .Fo "physio" .Fa "void (*strategy)(struct buf *)" -.Fa "struct buf *bp" .Fa "dev_t dev" .Fa "int flags" .Fa "void (*minphys)(struct buf *)" @@ -73,28 +72,20 @@ functions in .Fn physio always awaits the completion of the entire requested transfer before returning, unless an error condition is detected earlier. -In all cases, the buffer passed in -.Fa bp -is locked (marked as -.Dq busy ) -for the duration of the entire transfer. +.Pp +In all cases, a temporary buffer is allocated from a system pool. +This buffer will have the +.Dv B_BUSY , +.Dv B_PHYS , +and +.Dv B_RAW +flags set when passed to the strategy routine. .Pp A break-down of the arguments follows: .Bl -tag -width indent .It Fa strategy The device strategy routine to call for each chunk of data to initiate device I/O. -.It Fa bp -The buffer to use with the strategy routine. -The buffer flags will have -.Dv B_BUSY , -.Dv B_PHYS , -and -.Dv B_RAW -set when passed to the strategy routine. -If -.Dv NULL , -a buffer is allocated from a system pool. .It Fa dev The device number identifying the device to interact with. .It Fa flags diff --git a/sys/arch/hp300/dev/ct.c b/sys/arch/hp300/dev/ct.c index ea1bc02d2f9..25295601210 100644 --- a/sys/arch/hp300/dev/ct.c +++ b/sys/arch/hp300/dev/ct.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ct.c,v 1.21 2008/06/12 06:58:33 deraadt Exp $ */ +/* $OpenBSD: ct.c,v 1.22 2010/09/22 01:18:57 matthew Exp $ */ /* $NetBSD: ct.c,v 1.21 1997/04/02 22:37:23 scottr Exp $ */ /* @@ -864,7 +864,7 @@ ctread(dev, uio, flags) struct uio *uio; int flags; { - return (physio(ctstrategy, NULL, dev, B_READ, minphys, uio)); + return (physio(ctstrategy, dev, B_READ, minphys, uio)); } int @@ -874,7 +874,7 @@ ctwrite(dev, uio, flags) int flags; { /* XXX: check for hardware write-protect? */ - return (physio(ctstrategy, NULL, dev, B_WRITE, minphys, uio)); + return (physio(ctstrategy, dev, B_WRITE, minphys, uio)); } /*ARGSUSED*/ diff --git a/sys/arch/hp300/dev/hd.c b/sys/arch/hp300/dev/hd.c index e23eeb7c53f..6d2bd489153 100644 --- a/sys/arch/hp300/dev/hd.c +++ b/sys/arch/hp300/dev/hd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hd.c,v 1.62 2010/09/08 14:47:10 jsing Exp $ */ +/* $OpenBSD: hd.c,v 1.63 2010/09/22 01:18:57 matthew Exp $ */ /* $NetBSD: rd.c,v 1.33 1997/07/10 18:14:08 kleink Exp $ */ /* @@ -1110,7 +1110,7 @@ hdread(dev, uio, flags) int flags; { - return (physio(hdstrategy, NULL, dev, B_READ, minphys, uio)); + return (physio(hdstrategy, dev, B_READ, minphys, uio)); } int @@ -1120,7 +1120,7 @@ hdwrite(dev, uio, flags) int flags; { - return (physio(hdstrategy, NULL, dev, B_WRITE, minphys, uio)); + return (physio(hdstrategy, dev, B_WRITE, minphys, uio)); } int diff --git a/sys/arch/hp300/dev/mt.c b/sys/arch/hp300/dev/mt.c index b0615f51166..d76f55c3a6f 100644 --- a/sys/arch/hp300/dev/mt.c +++ b/sys/arch/hp300/dev/mt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mt.c,v 1.24 2010/07/10 03:06:51 matthew Exp $ */ +/* $OpenBSD: mt.c,v 1.25 2010/09/22 01:18:57 matthew Exp $ */ /* $NetBSD: mt.c,v 1.8 1997/03/31 07:37:29 scottr Exp $ */ /* @@ -914,7 +914,7 @@ mtread(dev, uio, flags) struct uio *uio; int flags; { - return (physio(mtstrategy, NULL, dev, B_READ, minphys, uio)); + return (physio(mtstrategy, dev, B_READ, minphys, uio)); } int @@ -923,7 +923,7 @@ mtwrite(dev, uio, flags) struct uio *uio; int flags; { - return (physio(mtstrategy, NULL, dev, B_WRITE, minphys, uio)); + return (physio(mtstrategy, dev, B_WRITE, minphys, uio)); } int diff --git a/sys/arch/sparc/dev/fd.c b/sys/arch/sparc/dev/fd.c index 97fcecb84f1..acf5e6ac2e6 100644 --- a/sys/arch/sparc/dev/fd.c +++ b/sys/arch/sparc/dev/fd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fd.c,v 1.76 2010/09/20 06:33:47 matthew Exp $ */ +/* $OpenBSD: fd.c,v 1.77 2010/09/22 01:18:57 matthew Exp $ */ /* $NetBSD: fd.c,v 1.51 1997/05/24 20:16:19 pk Exp $ */ /*- @@ -1007,7 +1007,7 @@ fdread(dev, uio, flag) int flag; { - return (physio(fdstrategy, NULL, dev, B_READ, minphys, uio)); + return (physio(fdstrategy, dev, B_READ, minphys, uio)); } int @@ -1017,7 +1017,7 @@ fdwrite(dev, uio, flag) int flag; { - return (physio(fdstrategy, NULL, dev, B_WRITE, minphys, uio)); + return (physio(fdstrategy, dev, B_WRITE, minphys, uio)); } void diff --git a/sys/arch/sparc/dev/presto.c b/sys/arch/sparc/dev/presto.c index 401996e8a2f..cfdf91d664c 100644 --- a/sys/arch/sparc/dev/presto.c +++ b/sys/arch/sparc/dev/presto.c @@ -1,4 +1,4 @@ -/* $OpenBSD: presto.c,v 1.18 2010/09/08 14:47:10 jsing Exp $ */ +/* $OpenBSD: presto.c,v 1.19 2010/09/22 01:18:57 matthew Exp $ */ /* * Copyright (c) 2003, Miodrag Vallat. * All rights reserved. @@ -259,13 +259,13 @@ prestoclose(dev_t dev, int flag, int fmt, struct proc *proc) int prestoread(dev_t dev, struct uio *uio, int flags) { - return (physio(prestostrategy, NULL, dev, B_READ, minphys, uio)); + return (physio(prestostrategy, dev, B_READ, minphys, uio)); } int prestowrite(dev_t dev, struct uio *uio, int flags) { - return (physio(prestostrategy, NULL, dev, B_WRITE, minphys, uio)); + return (physio(prestostrategy, dev, B_WRITE, minphys, uio)); } void diff --git a/sys/arch/sparc/dev/xd.c b/sys/arch/sparc/dev/xd.c index bb16447c11f..befdf6bfb83 100644 --- a/sys/arch/sparc/dev/xd.c +++ b/sys/arch/sparc/dev/xd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xd.c,v 1.50 2010/09/08 14:47:10 jsing Exp $ */ +/* $OpenBSD: xd.c,v 1.51 2010/09/22 01:18:57 matthew Exp $ */ /* $NetBSD: xd.c,v 1.37 1997/07/29 09:58:16 fair Exp $ */ /* @@ -954,7 +954,7 @@ xdread(dev, uio, flags) int flags; { - return (physio(xdstrategy, NULL, dev, B_READ, minphys, uio)); + return (physio(xdstrategy, dev, B_READ, minphys, uio)); } int @@ -964,7 +964,7 @@ xdwrite(dev, uio, flags) int flags; { - return (physio(xdstrategy, NULL, dev, B_WRITE, minphys, uio)); + return (physio(xdstrategy, dev, B_WRITE, minphys, uio)); } diff --git a/sys/arch/sparc/dev/xy.c b/sys/arch/sparc/dev/xy.c index 239bc2afd69..42b10c2e715 100644 --- a/sys/arch/sparc/dev/xy.c +++ b/sys/arch/sparc/dev/xy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xy.c,v 1.48 2010/09/08 14:47:10 jsing Exp $ */ +/* $OpenBSD: xy.c,v 1.49 2010/09/22 01:18:57 matthew Exp $ */ /* $NetBSD: xy.c,v 1.26 1997/07/19 21:43:56 pk Exp $ */ /* @@ -917,7 +917,7 @@ xyread(dev, uio, flags) int flags; { - return (physio(xystrategy, NULL, dev, B_READ, minphys, uio)); + return (physio(xystrategy, dev, B_READ, minphys, uio)); } int @@ -927,7 +927,7 @@ xywrite(dev, uio, flags) int flags; { - return (physio(xystrategy, NULL, dev, B_WRITE, minphys, uio)); + return (physio(xystrategy, dev, B_WRITE, minphys, uio)); } diff --git a/sys/arch/sparc64/dev/fd.c b/sys/arch/sparc64/dev/fd.c index 597c6339cb1..67e11009e0a 100644 --- a/sys/arch/sparc64/dev/fd.c +++ b/sys/arch/sparc64/dev/fd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fd.c,v 1.33 2010/09/08 14:47:10 jsing Exp $ */ +/* $OpenBSD: fd.c,v 1.34 2010/09/22 01:18:57 matthew Exp $ */ /* $NetBSD: fd.c,v 1.112 2003/08/07 16:29:35 agc Exp $ */ /*- @@ -1035,7 +1035,7 @@ fdread(dev, uio, flag) int flag; { - return (physio(fdstrategy, NULL, dev, B_READ, minphys, uio)); + return (physio(fdstrategy, dev, B_READ, minphys, uio)); } int @@ -1045,7 +1045,7 @@ fdwrite(dev, uio, flag) int flag; { - return (physio(fdstrategy, NULL, dev, B_WRITE, minphys, uio)); + return (physio(fdstrategy, dev, B_WRITE, minphys, uio)); } void diff --git a/sys/arch/vax/mba/hp.c b/sys/arch/vax/mba/hp.c index fdd4bd42cf2..567a6f8c25a 100644 --- a/sys/arch/vax/mba/hp.c +++ b/sys/arch/vax/mba/hp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hp.c,v 1.21 2010/09/08 14:47:10 jsing Exp $ */ +/* $OpenBSD: hp.c,v 1.22 2010/09/22 01:18:57 matthew Exp $ */ /* $NetBSD: hp.c,v 1.22 2000/02/12 16:09:33 ragge Exp $ */ /* * Copyright (c) 1996 Ludd, University of Lule}, Sweden. @@ -475,7 +475,7 @@ hpread(dev, uio) dev_t dev; struct uio *uio; { - return (physio(hpstrategy, NULL, dev, B_READ, minphys, uio)); + return (physio(hpstrategy, dev, B_READ, minphys, uio)); } int @@ -483,5 +483,5 @@ hpwrite(dev, uio) dev_t dev; struct uio *uio; { - return (physio(hpstrategy, NULL, dev, B_WRITE, minphys, uio)); + return (physio(hpstrategy, dev, B_WRITE, minphys, uio)); } diff --git a/sys/arch/vax/mscp/mscp_disk.c b/sys/arch/vax/mscp/mscp_disk.c index 27aeaa679e2..854c673c47a 100644 --- a/sys/arch/vax/mscp/mscp_disk.c +++ b/sys/arch/vax/mscp/mscp_disk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mscp_disk.c,v 1.30 2010/09/08 14:47:10 jsing Exp $ */ +/* $OpenBSD: mscp_disk.c,v 1.31 2010/09/22 01:18:57 matthew Exp $ */ /* $NetBSD: mscp_disk.c,v 1.30 2001/11/13 07:38:28 lukem Exp $ */ /* * Copyright (c) 1996 Ludd, University of Lule}, Sweden. @@ -345,7 +345,7 @@ raread(dev, uio) struct uio *uio; { - return (physio(rastrategy, NULL, dev, B_READ, minphys, uio)); + return (physio(rastrategy, dev, B_READ, minphys, uio)); } int @@ -354,7 +354,7 @@ rawrite(dev, uio) struct uio *uio; { - return (physio(rastrategy, NULL, dev, B_WRITE, minphys, uio)); + return (physio(rastrategy, dev, B_WRITE, minphys, uio)); } /* @@ -675,7 +675,7 @@ rxread(dev, uio) struct uio *uio; { - return (physio(rxstrategy, NULL, dev, B_READ, minphys, uio)); + return (physio(rxstrategy, dev, B_READ, minphys, uio)); } int @@ -684,7 +684,7 @@ rxwrite(dev, uio) struct uio *uio; { - return (physio(rxstrategy, NULL, dev, B_WRITE, minphys, uio)); + return (physio(rxstrategy, dev, B_WRITE, minphys, uio)); } /* diff --git a/sys/arch/vax/mscp/mscp_tape.c b/sys/arch/vax/mscp/mscp_tape.c index d192564076b..8a7ea3beb82 100644 --- a/sys/arch/vax/mscp/mscp_tape.c +++ b/sys/arch/vax/mscp/mscp_tape.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mscp_tape.c,v 1.10 2007/06/06 17:15:13 deraadt Exp $ */ +/* $OpenBSD: mscp_tape.c,v 1.11 2010/09/22 01:18:57 matthew Exp $ */ /* $NetBSD: mscp_tape.c,v 1.16 2001/11/13 07:38:28 lukem Exp $ */ /* * Copyright (c) 1996 Ludd, University of Lule}, Sweden. @@ -285,7 +285,7 @@ mtread(dev, uio) struct uio *uio; { - return (physio(mtstrategy, NULL, dev, B_READ, minphys, uio)); + return (physio(mtstrategy, dev, B_READ, minphys, uio)); } int @@ -294,7 +294,7 @@ mtwrite(dev, uio) struct uio *uio; { - return (physio(mtstrategy, NULL, dev, B_WRITE, minphys, uio)); + return (physio(mtstrategy, dev, B_WRITE, minphys, uio)); } void diff --git a/sys/arch/vax/qbus/qd.c b/sys/arch/vax/qbus/qd.c index 5b46316e2e6..d97ce5b9bc8 100644 --- a/sys/arch/vax/qbus/qd.c +++ b/sys/arch/vax/qbus/qd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: qd.c,v 1.19 2010/07/10 03:06:51 matthew Exp $ */ +/* $OpenBSD: qd.c,v 1.20 2010/09/22 01:18:57 matthew Exp $ */ /* $NetBSD: qd.c,v 1.17 2000/01/24 02:40:29 matt Exp $ */ /*- @@ -1601,7 +1601,7 @@ qdwrite(dev, uio, flag) /* * this is a DMA xfer from user space */ - return (physio(qd_strategy, NULL, dev, B_WRITE, minphys, uio)); + return (physio(qd_strategy, dev, B_WRITE, minphys, uio)); } return (ENXIO); } @@ -1629,7 +1629,7 @@ qdread(dev, uio, flag) /* * this is a bitmap-to-processor xfer */ - return (physio(qd_strategy, NULL, dev, B_READ, minphys, uio)); + return (physio(qd_strategy, dev, B_READ, minphys, uio)); } return (ENXIO); } diff --git a/sys/arch/vax/vsa/hdc9224.c b/sys/arch/vax/vsa/hdc9224.c index 18020d066c5..ba4c509951b 100644 --- a/sys/arch/vax/vsa/hdc9224.c +++ b/sys/arch/vax/vsa/hdc9224.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hdc9224.c,v 1.31 2010/09/20 06:33:48 matthew Exp $ */ +/* $OpenBSD: hdc9224.c,v 1.32 2010/09/22 01:18:57 matthew Exp $ */ /* $NetBSD: hdc9224.c,v 1.16 2001/07/26 15:05:09 wiz Exp $ */ /* * Copyright (c) 1996 Ludd, University of Lule}, Sweden. @@ -739,7 +739,7 @@ hdioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p) int hdread(dev_t dev, struct uio *uio, int flag) { - return (physio(hdstrategy, NULL, dev, B_READ, minphys, uio)); + return (physio(hdstrategy, dev, B_READ, minphys, uio)); } /* @@ -748,7 +748,7 @@ hdread(dev_t dev, struct uio *uio, int flag) int hdwrite(dev_t dev, struct uio *uio, int flag) { - return (physio(hdstrategy, NULL, dev, B_WRITE, minphys, uio)); + return (physio(hdstrategy, dev, B_WRITE, minphys, uio)); } /* diff --git a/sys/dev/ata/wd.c b/sys/dev/ata/wd.c index f2733aba906..d2095d9c272 100644 --- a/sys/dev/ata/wd.c +++ b/sys/dev/ata/wd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wd.c,v 1.94 2010/09/20 01:24:08 deraadt Exp $ */ +/* $OpenBSD: wd.c,v 1.95 2010/09/22 01:18:57 matthew Exp $ */ /* $NetBSD: wd.c,v 1.193 1999/02/28 17:15:27 explorer Exp $ */ /* @@ -659,7 +659,7 @@ wdread(dev_t dev, struct uio *uio, int flags) { WDCDEBUG_PRINT(("wdread\n"), DEBUG_XFERS); - return (physio(wdstrategy, NULL, dev, B_READ, minphys, uio)); + return (physio(wdstrategy, dev, B_READ, minphys, uio)); } int @@ -667,7 +667,7 @@ wdwrite(dev_t dev, struct uio *uio, int flags) { WDCDEBUG_PRINT(("wdwrite\n"), DEBUG_XFERS); - return (physio(wdstrategy, NULL, dev, B_WRITE, minphys, uio)); + return (physio(wdstrategy, dev, B_WRITE, minphys, uio)); } int @@ -938,8 +938,7 @@ wdioctl(dev_t dev, u_long xfer, caddr_t addr, int flag, struct proc *p) auio.uio_offset = fop->df_startblk * wd->sc_dk.dk_label->d_secsize; auio.uio_procp = p; - error = physio(wdformat, NULL, dev, B_WRITE, minphys, - &auio); + error = physio(wdformat, dev, B_WRITE, minphys, &auio); fop->df_count -= auio.uio_resid; fop->df_reg[0] = wdc->sc_status; fop->df_reg[1] = wdc->sc_error; diff --git a/sys/dev/ccd.c b/sys/dev/ccd.c index b9678b78aa2..3b6446a154a 100644 --- a/sys/dev/ccd.c +++ b/sys/dev/ccd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ccd.c,v 1.91 2010/09/08 14:47:12 jsing Exp $ */ +/* $OpenBSD: ccd.c,v 1.92 2010/09/22 01:18:57 matthew Exp $ */ /* $NetBSD: ccd.c,v 1.33 1996/05/05 04:21:14 thorpej Exp $ */ /*- @@ -978,7 +978,7 @@ ccdread(dev_t dev, struct uio *uio, int flags) * in particular, for raw I/O. Underlying devices might have some * non-obvious limits, because of the copy to user-space. */ - return (physio(ccdstrategy, NULL, dev, B_READ, minphys, uio)); + return (physio(ccdstrategy, dev, B_READ, minphys, uio)); } /* ARGSUSED */ @@ -1002,7 +1002,7 @@ ccdwrite(dev_t dev, struct uio *uio, int flags) * in particular, for raw I/O. Underlying devices might have some * non-obvious limits, because of the copy to user-space. */ - return (physio(ccdstrategy, NULL, dev, B_WRITE, minphys, uio)); + return (physio(ccdstrategy, dev, B_WRITE, minphys, uio)); } int diff --git a/sys/dev/flash.c b/sys/dev/flash.c index e81d28d4733..8f267d5775f 100644 --- a/sys/dev/flash.c +++ b/sys/dev/flash.c @@ -1,4 +1,4 @@ -/* $OpenBSD: flash.c,v 1.17 2010/09/08 14:47:12 jsing Exp $ */ +/* $OpenBSD: flash.c,v 1.18 2010/09/22 01:18:57 matthew Exp $ */ /* * Copyright (c) 2005 Uwe Stuehler <uwe@openbsd.org> @@ -1033,13 +1033,13 @@ flashminphys(struct buf *bp) int flashread(dev_t dev, struct uio *uio, int ioflag) { - return physio(flashstrategy, NULL, dev, B_READ, flashminphys, uio); + return physio(flashstrategy, dev, B_READ, flashminphys, uio); } int flashwrite(dev_t dev, struct uio *uio, int ioflag) { - return physio(flashstrategy, NULL, dev, B_WRITE, flashminphys, uio); + return physio(flashstrategy, dev, B_WRITE, flashminphys, uio); } /* diff --git a/sys/dev/isa/fd.c b/sys/dev/isa/fd.c index 8c8e34fa212..88938447720 100644 --- a/sys/dev/isa/fd.c +++ b/sys/dev/isa/fd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fd.c,v 1.87 2010/09/08 14:47:12 jsing Exp $ */ +/* $OpenBSD: fd.c,v 1.88 2010/09/22 01:18:57 matthew Exp $ */ /* $NetBSD: fd.c,v 1.90 1996/05/12 23:12:03 mycroft Exp $ */ /*- @@ -498,7 +498,7 @@ fdread(dev, uio, flags) int flags; { - return (physio(fdstrategy, NULL, dev, B_READ, minphys, uio)); + return (physio(fdstrategy, dev, B_READ, minphys, uio)); } int @@ -508,7 +508,7 @@ fdwrite(dev, uio, flags) int flags; { - return (physio(fdstrategy, NULL, dev, B_WRITE, minphys, uio)); + return (physio(fdstrategy, dev, B_WRITE, minphys, uio)); } void diff --git a/sys/dev/isa/mcd.c b/sys/dev/isa/mcd.c index cb767ddddab..2846878d66f 100644 --- a/sys/dev/isa/mcd.c +++ b/sys/dev/isa/mcd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mcd.c,v 1.55 2010/09/08 14:47:12 jsing Exp $ */ +/* $OpenBSD: mcd.c,v 1.56 2010/09/22 01:18:57 matthew Exp $ */ /* $NetBSD: mcd.c,v 1.60 1998/01/14 12:14:41 drochner Exp $ */ /* @@ -593,7 +593,7 @@ mcdread(dev, uio, flags) int flags; { - return (physio(mcdstrategy, NULL, dev, B_READ, minphys, uio)); + return (physio(mcdstrategy, dev, B_READ, minphys, uio)); } int @@ -603,7 +603,7 @@ mcdwrite(dev, uio, flags) int flags; { - return (physio(mcdstrategy, NULL, dev, B_WRITE, minphys, uio)); + return (physio(mcdstrategy, dev, B_WRITE, minphys, uio)); } int diff --git a/sys/dev/raidframe/rf_openbsdkintf.c b/sys/dev/raidframe/rf_openbsdkintf.c index 0b5eded062a..992ae78364b 100644 --- a/sys/dev/raidframe/rf_openbsdkintf.c +++ b/sys/dev/raidframe/rf_openbsdkintf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rf_openbsdkintf.c,v 1.58 2010/09/08 14:47:12 jsing Exp $ */ +/* $OpenBSD: rf_openbsdkintf.c,v 1.59 2010/09/22 01:18:57 matthew Exp $ */ /* $NetBSD: rf_netbsdkintf.c,v 1.109 2001/07/27 03:30:07 oster Exp $ */ /*- @@ -799,7 +799,7 @@ raidread(dev_t dev, struct uio *uio, int flags) db1_printf(("raidread: unit: %d partition: %d\n", unit, part)); - return (physio(raidstrategy, NULL, dev, B_READ, minphys, uio)); + return (physio(raidstrategy, dev, B_READ, minphys, uio)); } /* ARGSUSED */ @@ -816,7 +816,7 @@ raidwrite(dev_t dev, struct uio *uio, int flags) if ((rs->sc_flags & RAIDF_INITED) == 0) return (ENXIO); db1_printf(("raidwrite\n")); - return (physio(raidstrategy, NULL, dev, B_WRITE, minphys, uio)); + return (physio(raidstrategy, dev, B_WRITE, minphys, uio)); } int diff --git a/sys/dev/ramdisk.c b/sys/dev/ramdisk.c index 714131e6ddd..9a5df12c920 100644 --- a/sys/dev/ramdisk.c +++ b/sys/dev/ramdisk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ramdisk.c,v 1.49 2010/09/08 14:47:12 jsing Exp $ */ +/* $OpenBSD: ramdisk.c,v 1.50 2010/09/22 01:18:57 matthew Exp $ */ /* $NetBSD: ramdisk.c,v 1.8 1996/04/12 08:30:09 leo Exp $ */ /* @@ -308,13 +308,13 @@ rdclose(dev_t dev, int flag, int fmt, struct proc *proc) int rdread(dev_t dev, struct uio *uio, int flags) { - return (physio(rdstrategy, NULL, dev, B_READ, minphys, uio)); + return (physio(rdstrategy, dev, B_READ, minphys, uio)); } int rdwrite(dev_t dev, struct uio *uio, int flags) { - return (physio(rdstrategy, NULL, dev, B_WRITE, minphys, uio)); + return (physio(rdstrategy, dev, B_WRITE, minphys, uio)); } /* diff --git a/sys/dev/vnd.c b/sys/dev/vnd.c index 86385fac3d5..498fa9378c3 100644 --- a/sys/dev/vnd.c +++ b/sys/dev/vnd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vnd.c,v 1.102 2010/09/08 14:47:12 jsing Exp $ */ +/* $OpenBSD: vnd.c,v 1.103 2010/09/22 01:18:57 matthew Exp $ */ /* $NetBSD: vnd.c,v 1.26 1996/03/30 23:06:11 christos Exp $ */ /* @@ -699,7 +699,7 @@ vndread(dev_t dev, struct uio *uio, int flags) if ((sc->sc_flags & VNF_INITED) == 0) return (ENXIO); - return (physio(vndstrategy, NULL, dev, B_READ, minphys, uio)); + return (physio(vndstrategy, dev, B_READ, minphys, uio)); } /* ARGSUSED */ @@ -718,7 +718,7 @@ vndwrite(dev_t dev, struct uio *uio, int flags) if ((sc->sc_flags & VNF_INITED) == 0) return (ENXIO); - return (physio(vndstrategy, NULL, dev, B_WRITE, minphys, uio)); + return (physio(vndstrategy, dev, B_WRITE, minphys, uio)); } size_t diff --git a/sys/kern/kern_physio.c b/sys/kern/kern_physio.c index 546b18fd27e..8653c19298f 100644 --- a/sys/kern/kern_physio.c +++ b/sys/kern/kern_physio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_physio.c,v 1.31 2010/07/01 21:27:39 art Exp $ */ +/* $OpenBSD: kern_physio.c,v 1.32 2010/09/22 01:18:57 matthew Exp $ */ /* $NetBSD: kern_physio.c,v 1.28 1997/05/19 10:43:28 pk Exp $ */ /*- @@ -68,19 +68,19 @@ void putphysbuf(struct buf *bp); * Comments in brackets are from Leffler, et al.'s pseudo-code implementation. */ int -physio(void (*strategy)(struct buf *), struct buf *bp, dev_t dev, int flags, +physio(void (*strategy)(struct buf *), dev_t dev, int flags, void (*minphys)(struct buf *), struct uio *uio) { struct iovec *iovp; struct proc *p = curproc; - int error, done, i, nobuf, s, todo; + int error, done, i, s, todo; + struct buf *bp; error = 0; flags &= B_READ | B_WRITE; - /* Make sure we have a buffer, creating one if necessary. */ - if ((nobuf = (bp == NULL)) != 0) - bp = getphysbuf(); + /* Create a buffer. */ + bp = getphysbuf(); /* [raise the processor priority level to splbio;] */ s = splbio(); @@ -242,18 +242,7 @@ done: */ s = splbio(); bp->b_flags &= ~(B_BUSY | B_PHYS | B_RAW); - if (nobuf) - putphysbuf(bp); - else { - /* - * [if another process is waiting for the raw I/O buffer, - * wake up processes waiting to do physical I/O] - */ - if (bp->b_flags & B_WANTED) { - bp->b_flags &= ~B_WANTED; - wakeup(bp); - } - } + putphysbuf(bp); splx(s); return (error); diff --git a/sys/scsi/cd.c b/sys/scsi/cd.c index 4794294541e..7d93b274f5d 100644 --- a/sys/scsi/cd.c +++ b/sys/scsi/cd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cd.c,v 1.194 2010/09/21 12:20:53 krw Exp $ */ +/* $OpenBSD: cd.c,v 1.195 2010/09/22 01:18:57 matthew Exp $ */ /* $NetBSD: cd.c,v 1.100 1997/04/02 02:29:30 mycroft Exp $ */ /* @@ -769,14 +769,14 @@ int cdread(dev_t dev, struct uio *uio, int ioflag) { - return (physio(cdstrategy, NULL, dev, B_READ, cdminphys, uio)); + return (physio(cdstrategy, dev, B_READ, cdminphys, uio)); } int cdwrite(dev_t dev, struct uio *uio, int ioflag) { - return (physio(cdstrategy, NULL, dev, B_WRITE, cdminphys, uio)); + return (physio(cdstrategy, dev, B_WRITE, cdminphys, uio)); } /* diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c index 92dce4f2203..8ff42b8918b 100644 --- a/sys/scsi/sd.c +++ b/sys/scsi/sd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sd.c,v 1.216 2010/09/21 12:20:53 krw Exp $ */ +/* $OpenBSD: sd.c,v 1.217 2010/09/22 01:18:57 matthew Exp $ */ /* $NetBSD: sd.c,v 1.111 1997/04/02 02:29:41 mycroft Exp $ */ /*- @@ -841,13 +841,13 @@ sdminphys(struct buf *bp) int sdread(dev_t dev, struct uio *uio, int ioflag) { - return (physio(sdstrategy, NULL, dev, B_READ, sdminphys, uio)); + return (physio(sdstrategy, dev, B_READ, sdminphys, uio)); } int sdwrite(dev_t dev, struct uio *uio, int ioflag) { - return (physio(sdstrategy, NULL, dev, B_WRITE, sdminphys, uio)); + return (physio(sdstrategy, dev, B_WRITE, sdminphys, uio)); } /* diff --git a/sys/scsi/st.c b/sys/scsi/st.c index 01dde017fb5..ba5d811e631 100644 --- a/sys/scsi/st.c +++ b/sys/scsi/st.c @@ -1,4 +1,4 @@ -/* $OpenBSD: st.c,v 1.113 2010/09/20 02:51:52 deraadt Exp $ */ +/* $OpenBSD: st.c,v 1.114 2010/09/22 01:18:57 matthew Exp $ */ /* $NetBSD: st.c,v 1.71 1997/02/21 23:03:49 thorpej Exp $ */ /* @@ -1139,7 +1139,7 @@ stread(dev_t dev, struct uio *uio, int iomode) return (ENXIO); } - return (physio(ststrategy, NULL, dev, B_READ, stminphys, uio)); + return (physio(ststrategy, dev, B_READ, stminphys, uio)); } int @@ -1156,7 +1156,7 @@ stwrite(dev_t dev, struct uio *uio, int iomode) return (ENXIO); } - return (physio(ststrategy, NULL, dev, B_WRITE, stminphys, uio)); + return (physio(ststrategy, dev, B_WRITE, stminphys, uio)); } /* diff --git a/sys/sys/buf.h b/sys/sys/buf.h index fe01d4a7f98..9f9e58cda6c 100644 --- a/sys/sys/buf.h +++ b/sys/sys/buf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: buf.h,v 1.73 2010/09/06 16:33:41 thib Exp $ */ +/* $OpenBSD: buf.h,v 1.74 2010/09/22 01:18:57 matthew Exp $ */ /* $NetBSD: buf.h,v 1.25 1997/04/09 21:12:17 mycroft Exp $ */ /* @@ -301,8 +301,8 @@ void buf_free_pages(struct buf *); void minphys(struct buf *bp); -int physio(void (*strategy)(struct buf *), struct buf *bp, dev_t dev, - int flags, void (*minphys)(struct buf *), struct uio *uio); +int physio(void (*strategy)(struct buf *), dev_t dev, int flags, + void (*minphys)(struct buf *), struct uio *uio); void brelvp(struct buf *); void reassignbuf(struct buf *); void bgetvp(struct vnode *, struct buf *); |