More spllowersoftclock() fallout.

This commit is contained in:
ad 2007-02-16 14:00:17 +00:00
parent 31e60d91eb
commit 2d62904bd2
3 changed files with 12 additions and 13 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: par.c,v 1.32 2006/03/26 04:35:37 thorpej Exp $ */ /* $NetBSD: par.c,v 1.33 2007/02/16 14:00:17 ad Exp $ */
/* /*
* Copyright (c) 1982, 1990 The Regents of the University of California. * Copyright (c) 1982, 1990 The Regents of the University of California.
@ -32,7 +32,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: par.c,v 1.32 2006/03/26 04:35:37 thorpej Exp $"); __KERNEL_RCSID(0, "$NetBSD: par.c,v 1.33 2007/02/16 14:00:17 ad Exp $");
/* /*
* parallel port interface * parallel port interface
@ -294,7 +294,6 @@ parrw(dev_t dev, register struct uio *uio)
break; break;
} }
again: again:
s = splbio();
#if 0 #if 0
if ((sc->sc_flags & PARF_UIO) && hpibreq(&sc->sc_dq) == 0) if ((sc->sc_flags & PARF_UIO) && hpibreq(&sc->sc_dq) == 0)
sleep(sc, PRIBIO+1); sleep(sc, PRIBIO+1);
@ -302,7 +301,7 @@ again:
/* /*
* Check if we timed out during sleep or uiomove * Check if we timed out during sleep or uiomove
*/ */
(void) spllowersoftclock(); s = splsoftclock();
if ((sc->sc_flags & PARF_UIO) == 0) if ((sc->sc_flags & PARF_UIO) == 0)
{ {
#ifdef DEBUG #ifdef DEBUG

View File

@ -1,4 +1,4 @@
/* $NetBSD: ppi.c,v 1.34 2006/07/21 10:01:39 tsutsui Exp $ */ /* $NetBSD: ppi.c,v 1.35 2007/02/16 14:00:17 ad Exp $ */
/*- /*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc. * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@ -72,7 +72,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ppi.c,v 1.34 2006/07/21 10:01:39 tsutsui Exp $"); __KERNEL_RCSID(0, "$NetBSD: ppi.c,v 1.35 2007/02/16 14:00:17 ad Exp $");
#include <sys/param.h> #include <sys/param.h>
#include <sys/systm.h> #include <sys/systm.h>
@ -292,7 +292,7 @@ ppirw(dev_t dev, struct uio *uio)
{ {
int unit = UNIT(dev); int unit = UNIT(dev);
struct ppi_softc *sc = ppi_cd.cd_devs[unit]; struct ppi_softc *sc = ppi_cd.cd_devs[unit];
int s, len, cnt; int s, s2, len, cnt;
char *cp; char *cp;
int error = 0, gotdata = 0; int error = 0, gotdata = 0;
int buflen, ctlr, slave; int buflen, ctlr, slave;
@ -327,14 +327,15 @@ ppirw(dev_t dev, struct uio *uio)
break; break;
} }
again: again:
s = splbio(); s = splsoftclock();
s2 = splbio();
if ((sc->sc_flags & PPIF_UIO) && if ((sc->sc_flags & PPIF_UIO) &&
hpibreq(device_parent(&sc->sc_dev), &sc->sc_hq) == 0) hpibreq(device_parent(&sc->sc_dev), &sc->sc_hq) == 0)
(void) tsleep(sc, PRIBIO + 1, "ppirw", 0); (void) tsleep(sc, PRIBIO + 1, "ppirw", 0);
/* /*
* Check if we timed out during sleep or uiomove * Check if we timed out during sleep or uiomove
*/ */
(void) spllowersoftclock(); splx(s2);
if ((sc->sc_flags & PPIF_UIO) == 0) { if ((sc->sc_flags & PPIF_UIO) == 0) {
#ifdef DEBUG #ifdef DEBUG
if (ppidebug & PDB_IO) if (ppidebug & PDB_IO)

View File

@ -1,4 +1,4 @@
/* $NetBSD: par.c,v 1.25 2006/03/28 17:38:28 thorpej Exp $ */ /* $NetBSD: par.c,v 1.26 2007/02/16 14:00:17 ad Exp $ */
/* /*
* Copyright (c) 1982, 1990 The Regents of the University of California. * Copyright (c) 1982, 1990 The Regents of the University of California.
@ -36,7 +36,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: par.c,v 1.25 2006/03/28 17:38:28 thorpej Exp $"); __KERNEL_RCSID(0, "$NetBSD: par.c,v 1.26 2007/02/16 14:00:17 ad Exp $");
#include <sys/param.h> #include <sys/param.h>
#include <sys/errno.h> #include <sys/errno.h>
@ -302,11 +302,10 @@ parrw(dev_t dev, struct uio *uio)
break; break;
} }
again: again:
s = spl1(); s = splsoftclock();
/* /*
* Check if we timed out during sleep or uiomove * Check if we timed out during sleep or uiomove
*/ */
(void) spllowersoftclock();
if ((sc->sc_flags & PARF_UIO) == 0) { if ((sc->sc_flags & PARF_UIO) == 0) {
#ifdef DEBUG #ifdef DEBUG
if (pardebug & PDB_IO) if (pardebug & PDB_IO)