summaryrefslogtreecommitdiff
path: root/sys/dev/isa
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2002-05-24 13:31:12 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2002-05-24 13:31:12 +0000
commit6b5e100a29b02706dce0b1e36a059d0222b7949e (patch)
tree12e91aa0c4a2c3089e6cb315a1bb04130b1af47a /sys/dev/isa
parentde5bb8a212717730ee837be4b4802e239bd9ed7f (diff)
More splbio around biodone protection.
In these drivers I'm probably using more paranoia than necessary. If you really need to squeeze out the last drop of performance from the fd driver, call me.
Diffstat (limited to 'sys/dev/isa')
-rw-r--r--sys/dev/isa/fd.c6
-rw-r--r--sys/dev/isa/mcd.c6
-rw-r--r--sys/dev/isa/wt.c4
3 files changed, 13 insertions, 3 deletions
diff --git a/sys/dev/isa/fd.c b/sys/dev/isa/fd.c
index 33af8f328e9..3b371f21324 100644
--- a/sys/dev/isa/fd.c
+++ b/sys/dev/isa/fd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fd.c,v 1.44 2002/03/14 01:26:56 millert Exp $ */
+/* $OpenBSD: fd.c,v 1.45 2002/05/24 13:31:10 art Exp $ */
/* $NetBSD: fd.c,v 1.90 1996/05/12 23:12:03 mycroft Exp $ */
/*-
@@ -415,7 +415,9 @@ bad:
done:
/* Toss transfer; we're done early. */
bp->b_resid = bp->b_bcount;
+ s = splbio();
biodone(bp);
+ splx(s);
}
void
@@ -441,6 +443,8 @@ fdfinish(fd, bp)
{
struct fdc_softc *fdc = (void *)fd->sc_dev.dv_parent;
+ splassert(IPL_BIO);
+
/*
* Move this drive to the end of the queue to give others a `fair'
* chance. We only force a switch if N operations are completed while
diff --git a/sys/dev/isa/mcd.c b/sys/dev/isa/mcd.c
index 9486395ff64..898dafba85c 100644
--- a/sys/dev/isa/mcd.c
+++ b/sys/dev/isa/mcd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mcd.c,v 1.30 2002/03/14 01:26:56 millert Exp $ */
+/* $OpenBSD: mcd.c,v 1.31 2002/05/24 13:31:11 art Exp $ */
/* $NetBSD: mcd.c,v 1.60 1998/01/14 12:14:41 drochner Exp $ */
/*
@@ -514,7 +514,9 @@ bad:
bp->b_flags |= B_ERROR;
done:
bp->b_resid = bp->b_bcount;
+ s = splbio();
biodone(bp);
+ splx(s);
}
void
@@ -545,7 +547,9 @@ loop:
MCD_TRACE("start: drive not valid\n", 0, 0, 0, 0);
bp->b_error = EIO;
bp->b_flags |= B_ERROR;
+ s = splbio();
biodone(bp);
+ splx(s);
goto loop;
}
diff --git a/sys/dev/isa/wt.c b/sys/dev/isa/wt.c
index 21b56da722e..7cf63520562 100644
--- a/sys/dev/isa/wt.c
+++ b/sys/dev/isa/wt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wt.c,v 1.15 2002/03/14 01:26:57 millert Exp $ */
+/* $OpenBSD: wt.c,v 1.16 2002/05/24 13:31:11 art Exp $ */
/* $NetBSD: wt.c,v 1.33 1996/05/12 23:54:22 mycroft Exp $ */
/*
@@ -613,7 +613,9 @@ errxit:
bp->b_error = EIO;
}
xit:
+ s = splbio();
biodone(bp);
+ splx(s);
return;
}