Fri Oct 25 16:06:44 2013 UTC ()
Mark a diagnostic-only variable


(martin)
diff -r1.221 -r1.222 src/sys/dev/scsipi/st.c

cvs diff -r1.221 -r1.222 src/sys/dev/scsipi/st.c (expand / switch to unified diff)

--- src/sys/dev/scsipi/st.c 2012/04/19 17:45:20 1.221
+++ src/sys/dev/scsipi/st.c 2013/10/25 16:06:44 1.222
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: st.c,v 1.221 2012/04/19 17:45:20 bouyer Exp $ */ 1/* $NetBSD: st.c,v 1.222 2013/10/25 16:06:44 martin Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 1998, 2004 The NetBSD Foundation, Inc. 4 * Copyright (c) 1998, 2004 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Charles M. Hannum. 8 * by Charles M. Hannum.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -40,27 +40,27 @@ @@ -40,27 +40,27 @@
40 * organisations permission to use or modify this software. 40 * organisations permission to use or modify this software.
41 * 41 *
42 * TFS supplies this software to be publicly redistributed 42 * TFS supplies this software to be publicly redistributed
43 * on the understanding that TFS is not responsible for the correct 43 * on the understanding that TFS is not responsible for the correct
44 * functioning of this software in any circumstances. 44 * functioning of this software in any circumstances.
45 * 45 *
46 * Ported to run under 386BSD by Julian Elischer (julian@tfs.com) Sept 1992 46 * Ported to run under 386BSD by Julian Elischer (julian@tfs.com) Sept 1992
47 * major changes by Julian Elischer (julian@jules.dialix.oz.au) May 1993 47 * major changes by Julian Elischer (julian@jules.dialix.oz.au) May 1993
48 * 48 *
49 * A lot of rewhacking done by mjacob (mjacob@nas.nasa.gov). 49 * A lot of rewhacking done by mjacob (mjacob@nas.nasa.gov).
50 */ 50 */
51 51
52#include <sys/cdefs.h> 52#include <sys/cdefs.h>
53__KERNEL_RCSID(0, "$NetBSD: st.c,v 1.221 2012/04/19 17:45:20 bouyer Exp $"); 53__KERNEL_RCSID(0, "$NetBSD: st.c,v 1.222 2013/10/25 16:06:44 martin Exp $");
54 54
55#include "opt_scsi.h" 55#include "opt_scsi.h"
56 56
57#include <sys/param.h> 57#include <sys/param.h>
58#include <sys/systm.h> 58#include <sys/systm.h>
59#include <sys/fcntl.h> 59#include <sys/fcntl.h>
60#include <sys/errno.h> 60#include <sys/errno.h>
61#include <sys/ioctl.h> 61#include <sys/ioctl.h>
62#include <sys/malloc.h> 62#include <sys/malloc.h>
63#include <sys/buf.h> 63#include <sys/buf.h>
64#include <sys/bufq.h> 64#include <sys/bufq.h>
65#include <sys/proc.h> 65#include <sys/proc.h>
66#include <sys/mtio.h> 66#include <sys/mtio.h>
@@ -1094,27 +1094,27 @@ abort: @@ -1094,27 +1094,27 @@ abort:
1094 * 1094 *
1095 * This routine is also called after other non-queued requests 1095 * This routine is also called after other non-queued requests
1096 * have been made of the scsi driver, to ensure that the queue 1096 * have been made of the scsi driver, to ensure that the queue
1097 * continues to be drained. 1097 * continues to be drained.
1098 * ststart() is called at splbio 1098 * ststart() is called at splbio
1099 */ 1099 */
1100static void 1100static void
1101ststart(struct scsipi_periph *periph) 1101ststart(struct scsipi_periph *periph)
1102{ 1102{
1103 struct st_softc *st = device_private(periph->periph_dev); 1103 struct st_softc *st = device_private(periph->periph_dev);
1104 struct buf *bp; 1104 struct buf *bp;
1105 struct scsi_rw_tape cmd; 1105 struct scsi_rw_tape cmd;
1106 struct scsipi_xfer *xs; 1106 struct scsipi_xfer *xs;
1107 int flags, error; 1107 int flags, error __diagused;
1108 1108
1109 SC_DEBUG(periph, SCSIPI_DB2, ("ststart ")); 1109 SC_DEBUG(periph, SCSIPI_DB2, ("ststart "));
1110 /* See if there is a buf to do and we are not already doing one */ 1110 /* See if there is a buf to do and we are not already doing one */
1111 while (periph->periph_active < periph->periph_openings) { 1111 while (periph->periph_active < periph->periph_openings) {
1112 /* if a special awaits, let it proceed first */ 1112 /* if a special awaits, let it proceed first */
1113 if (periph->periph_flags & PERIPH_WAITING) { 1113 if (periph->periph_flags & PERIPH_WAITING) {
1114 periph->periph_flags &= ~PERIPH_WAITING; 1114 periph->periph_flags &= ~PERIPH_WAITING;
1115 wakeup((void *)periph); 1115 wakeup((void *)periph);
1116 return; 1116 return;
1117 } 1117 }
1118 1118
1119 /* 1119 /*
1120 * If the device has been unmounted by the user 1120 * If the device has been unmounted by the user