summaryrefslogtreecommitdiff
path: root/sys/dev/ic
diff options
context:
space:
mode:
authorbouyer <bouyer@NetBSD.org>2008-10-02 21:05:17 +0000
committerbouyer <bouyer@NetBSD.org>2008-10-02 21:05:17 +0000
commit2887906e27ecfa60fbd7d0e8b06c23e6d2d993b7 (patch)
tree05bfe4a55cacd093912f1c6973ab39c11a88e1ee /sys/dev/ic
parent21150ac7ce53baead83f92ae96da829215152a5b (diff)
Kill ATACH_TH_RUN and use cpu_intr_p() instead.
Diffstat (limited to 'sys/dev/ic')
-rw-r--r--sys/dev/ic/wdc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/ic/wdc.c b/sys/dev/ic/wdc.c
index 48c0fe34f45..092d5699a55 100644
--- a/sys/dev/ic/wdc.c
+++ b/sys/dev/ic/wdc.c
@@ -1,4 +1,4 @@
-/* $NetBSD: wdc.c,v 1.254 2008/04/28 20:23:51 martin Exp $ */
+/* $NetBSD: wdc.c,v 1.255 2008/10/02 21:05:17 bouyer Exp $ */
/*
* Copyright (c) 1998, 2001, 2003 Manuel Bouyer. All rights reserved.
@@ -63,7 +63,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wdc.c,v 1.254 2008/04/28 20:23:51 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wdc.c,v 1.255 2008/10/02 21:05:17 bouyer Exp $");
#include "opt_ata.h"
@@ -76,6 +76,7 @@ __KERNEL_RCSID(0, "$NetBSD: wdc.c,v 1.254 2008/04/28 20:23:51 martin Exp $");
#include <sys/malloc.h>
#include <sys/syslog.h>
#include <sys/proc.h>
+#include <sys/cpu.h>
#include <sys/intr.h>
#include <sys/bus.h>
@@ -1257,8 +1258,7 @@ wdcwait(struct ata_channel *chp, int mask, int bits, int timeout, int flags)
else {
error = __wdcwait(chp, mask, bits, WDCDELAY_POLL);
if (error != 0) {
- if ((chp->ch_flags & ATACH_TH_RUN) ||
- (flags & AT_WAIT)) {
+ if (!cpu_intr_p()) {
/*
* we're running in the channel thread
* or some userland thread context
@@ -1273,7 +1273,7 @@ wdcwait(struct ata_channel *chp, int mask, int bits, int timeout, int flags)
}
} else {
/*
- * we're probably in interrupt context,
+ * we're in interrupt context,
* ask the thread to come back here
*/
#ifdef DIAGNOSTIC