Module Name: src
Committed By: pooka
Date: Mon Aug 23 20:01:17 UTC 2010
Modified Files:
src/sys/dev/scsipi: scsipi_base.c
Log Message:
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).
To generate a diff of this commit:
cvs rdiff -u -r1.153 -r1.154 src/sys/dev/scsipi/scsipi_base.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/scsipi/scsipi_base.c
diff -u src/sys/dev/scsipi/scsipi_base.c:1.153 src/sys/dev/scsipi/scsipi_base.c:1.154
--- src/sys/dev/scsipi/scsipi_base.c:1.153 Mon Jun 7 01:41:39 2010
+++ src/sys/dev/scsipi/scsipi_base.c Mon Aug 23 20:01:16 2010
@@ -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,