Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-3]: src/sys/dev/scsipi Pull up revision 1.179 (requested by yamt ...



details:   https://anonhg.NetBSD.org/src/rev/e8970e3fbde3
branches:  netbsd-3
changeset: 575138:e8970e3fbde3
user:      tron <tron%NetBSD.org@localhost>
date:      Wed Apr 06 11:57:03 2005 +0000

description:
Pull up revision 1.179 (requested by yamt in ticket #112):
introduce a function to drain bufq and use it where appropriate.

diffstat:

 sys/dev/scsipi/st.c |  12 +++---------
 1 files changed, 3 insertions(+), 9 deletions(-)

diffs (40 lines):

diff -r d1fa90c1f992 -r e8970e3fbde3 sys/dev/scsipi/st.c
--- a/sys/dev/scsipi/st.c       Wed Apr 06 11:56:55 2005 +0000
+++ b/sys/dev/scsipi/st.c       Wed Apr 06 11:57:03 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: st.c,v 1.178 2005/02/27 00:27:48 perry Exp $ */
+/*     $NetBSD: st.c,v 1.178.2.1 2005/04/06 11:57:03 tron Exp $ */
 
 /*-
  * Copyright (c) 1998, 2004 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: st.c,v 1.178 2005/02/27 00:27:48 perry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: st.c,v 1.178.2.1 2005/04/06 11:57:03 tron Exp $");
 
 #include "opt_scsi.h"
 
@@ -439,7 +439,6 @@
 stdetach(struct device *self, int flags)
 {
        struct st_softc *st = (struct st_softc *)self;
-       struct buf *bp;
        int s, bmaj, cmaj, mn;
 
        /* locate the major number */
@@ -452,12 +451,7 @@
        s = splbio();
 
        /* Kill off any queued buffers. */
-       while ((bp = BUFQ_GET(&st->buf_queue)) != NULL) {
-               bp->b_error = EIO;
-               bp->b_flags |= B_ERROR;
-               bp->b_resid = bp->b_bcount;
-               biodone(bp);
-       }
+       bufq_drain(&st->buf_queue);
 
        bufq_free(&st->buf_queue);
 



Home | Main Index | Thread Index | Old Index