Module Name: src
Committed By: ad
Date: Tue May 26 00:46:22 UTC 2009
Modified Files:
src/sys/arch/hp300/dev: mt.c
Log Message:
Build failure, reported by he@
To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/hp300/dev/mt.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/arch/hp300/dev/mt.c
diff -u src/sys/arch/hp300/dev/mt.c:1.47 src/sys/arch/hp300/dev/mt.c:1.48
--- src/sys/arch/hp300/dev/mt.c:1.47 Mon May 18 20:41:57 2009
+++ src/sys/arch/hp300/dev/mt.c Tue May 26 00:46:22 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: mt.c,v 1.47 2009/05/18 20:41:57 ad Exp $ */
+/* $NetBSD: mt.c,v 1.48 2009/05/26 00:46:22 ad Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mt.c,v 1.47 2009/05/18 20:41:57 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mt.c,v 1.48 2009/05/26 00:46:22 ad Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -425,18 +425,16 @@
mtcommand(dev_t dev, int cmd, int cnt)
{
struct mt_softc *sc = device_lookup_private(&mt_cd,UNIT(dev));
- struct buf *bp = &sc->sc_bufstore;
int error = 0;
+ buf_t *bp;
-#if 1
- if (bp->b_cflags & BC_BUSY)
- return EBUSY;
-#endif
+ bp = getiobuf(NULL, true);
bp->b_cmd = cmd;
bp->b_dev = dev;
do {
bp->b_cflags = BC_BUSY;
bp->b_flags = B_CMD;
+ bp->b_oflags = 0;
mtstrategy(bp);
biowait(bp);
if (bp->b_error != 0) {
@@ -444,11 +442,8 @@
break;
}
} while (--cnt > 0);
-#if 0
- bp->b_flags = 0 /*&= ~BC_BUSY*/;
-#else
- bp->b_flags &= ~BC_BUSY;
-#endif
+ putiobuf(bp);
+
return error;
}
@@ -919,7 +914,6 @@
static int
mtread(dev_t dev, struct uio *uio, int flags)
{
- struct mt_softc *sc = device_lookup_private(&mt_cd,UNIT(dev));
return physio(mtstrategy, NULL, dev, B_READ, minphys, uio);
}
@@ -927,7 +921,6 @@
static int
mtwrite(dev_t dev, struct uio *uio, int flags)
{
- struct mt_softc *sc = device_lookup_private(&mt_cd,UNIT(dev));
return physio(mtstrategy, NULL, dev, B_WRITE, minphys, uio);
}