Module Name: src
Committed By: snj
Date: Sat Jan 30 19:02:15 UTC 2010
Modified Files:
src/sys/dev/ata [netbsd-5]: wd.c
Log Message:
Pull up following revision(s) (requested by bouyer in ticket #1269):
sys/dev/ata/wd.c: revision 1.383 via patch
struct buf::b_iodone is not called at splbio() any more.
Make sure non-MPsafe iodone callbacks raise the SPL as appropriate.
To generate a diff of this commit:
cvs rdiff -u -r1.363.8.3 -r1.363.8.4 src/sys/dev/ata/wd.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/ata/wd.c
diff -u src/sys/dev/ata/wd.c:1.363.8.3 src/sys/dev/ata/wd.c:1.363.8.4
--- src/sys/dev/ata/wd.c:1.363.8.3 Sun Jan 10 23:59:30 2010
+++ src/sys/dev/ata/wd.c Sat Jan 30 19:02:14 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: wd.c,v 1.363.8.3 2010/01/10 23:59:30 snj Exp $ */
+/* $NetBSD: wd.c,v 1.363.8.4 2010/01/30 19:02:14 snj Exp $ */
/*
* Copyright (c) 1998, 2001 Manuel Bouyer. All rights reserved.
@@ -59,7 +59,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.363.8.3 2010/01/10 23:59:30 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.363.8.4 2010/01/30 19:02:14 snj Exp $");
#include "opt_ata.h"
@@ -613,6 +613,7 @@
struct buf *obp = bp->b_private;
struct wd_softc *sc =
device_lookup_private(&wd_cd, DISKUNIT(obp->b_dev));
+ int s;
if (__predict_false(bp->b_error != 0)) {
/*
@@ -641,15 +642,19 @@
bp->b_data = (char *)bp->b_data + bp->b_bcount;
bp->b_blkno += (bp->b_bcount / 512);
bp->b_rawblkno += (bp->b_bcount / 512);
+ s = splbio();
__wdstart(sc, bp);
+ splx(s);
return;
done:
obp->b_error = bp->b_error;
obp->b_resid = bp->b_resid;
+ s = splbio();
putiobuf(bp);
biodone(obp);
sc->openings++;
+ splx(s);
/* wddone() will call wdstart() */
}