Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/scsipi Convert one second(!!) delay to kpause. It w...
details: https://anonhg.NetBSD.org/src/rev/d1a6cb48625e
branches: trunk
changeset: 757285:d1a6cb48625e
user: pooka <pooka%NetBSD.org@localhost>
date: Mon Aug 23 20:01:16 2010 +0000
description:
Convert one second(!!) delay to kpause. It was originally done
from a callout, so delay was the only option (in those days). Then
the caller was converted to a thread, but left as a delay. It
still may block the scsipi completion thread processing (so I
seriously doubt this code path is executed very often on a live
system).
diffstat:
sys/dev/scsipi/scsipi_base.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (28 lines):
diff -r 8f759f580690 -r d1a6cb48625e sys/dev/scsipi/scsipi_base.c
--- a/sys/dev/scsipi/scsipi_base.c Mon Aug 23 16:20:44 2010 +0000
+++ b/sys/dev/scsipi/scsipi_base.c Mon Aug 23 20:01:16 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: scsipi_base.c,v 1.153 2010/06/07 01:41:39 pgoyette Exp $ */
+/* $NetBSD: scsipi_base.c,v 1.154 2010/08/23 20:01:16 pooka Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000, 2002, 2003, 2004 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: scsipi_base.c,v 1.153 2010/06/07 01:41:39 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: scsipi_base.c,v 1.154 2010/08/23 20:01:16 pooka Exp $");
#include "opt_scsi.h"
@@ -1513,7 +1513,8 @@
*/
if ((xs->xs_control & XS_CTL_POLL) ||
(chan->chan_flags & SCSIPI_CHAN_TACTIVE) == 0) {
- delay(1000000);
+ /* XXX: quite extreme */
+ kpause("xsbusy", false, hz, NULL);
} else if (!callout_pending(&periph->periph_callout)) {
scsipi_periph_freeze(periph, 1);
callout_reset(&periph->periph_callout,
Home |
Main Index |
Thread Index |
Old Index