From be9c681d6fd5da97d4d325ce534bde8e3f1bbdec Mon Sep 17 00:00:00 2001 From: thib Date: Wed, 17 Jun 2009 01:30:30 +0000 Subject: 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. --- sys/dev/flash.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'sys/dev/flash.c') 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 @@ -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); -- cgit v1.2.3-59-g8ed1b