summaryrefslogtreecommitdiffstats
path: root/sys/dev/flash.c
diff options
context:
space:
mode:
authorthib <thib@openbsd.org>2009-06-17 01:30:30 +0000
committerthib <thib@openbsd.org>2009-06-17 01:30:30 +0000
commitbe9c681d6fd5da97d4d325ce534bde8e3f1bbdec (patch)
tree2998f99d8f56d90b519ea7ed089e3117b4614f1c /sys/dev/flash.c
parentdate based reversion of uvm to the 4th May. (diff)
downloadwireguard-openbsd-be9c681d6fd5da97d4d325ce534bde8e3f1bbdec.tar.xz
wireguard-openbsd-be9c681d6fd5da97d4d325ce534bde8e3f1bbdec.zip
Revert bufq's. this is inline with the major midlayer reverts that
have been going on. this appears to bring us back to stable state. lots of testing by oga and ariane and my self.
Diffstat (limited to 'sys/dev/flash.c')
-rw-r--r--sys/dev/flash.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/dev/flash.c b/sys/dev/flash.c
index ea87e89ce61..3e04aa4a268 100644
--- a/sys/dev/flash.c
+++ b/sys/dev/flash.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: flash.c,v 1.11 2009/06/04 23:13:21 deraadt Exp $ */
+/* $OpenBSD: flash.c,v 1.12 2009/06/17 01:30:30 thib Exp $ */
/*
* Copyright (c) 2005 Uwe Stuehler <uwe@openbsd.org>
@@ -814,7 +814,7 @@ flashstrategy(struct buf *bp)
/* Queue the transfer. */
s = splbio();
- BUFQ_ADD(sc->sc_dk.dk_bufq, bp);
+ disksort(&sc->sc_q, bp);
flashstart(sc);
splx(s);
device_unref(&sc->sc_dev);
@@ -877,13 +877,15 @@ flashsize(dev_t dev)
void
flashstart(struct flash_softc *sc)
{
- struct buf *bp;
+ struct buf *dp, *bp;
while (1) {
/* Remove the next buffer from the queue or stop. */
- bp = BUFQ_GET(sc->sc_dk.dk_bufq);
+ dp = &sc->sc_q;
+ bp = dp->b_actf;
if (bp == NULL)
return;
+ dp->b_actf = bp->b_actf;
/* Transfer this buffer now. */
_flashstart(sc, bp);