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.60 (requested by yamt i...



details:   https://anonhg.NetBSD.org/src/rev/c1d4579bf5a6
branches:  netbsd-3
changeset: 575133:c1d4579bf5a6
user:      tron <tron%NetBSD.org@localhost>
date:      Wed Apr 06 11:56:31 2005 +0000

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

diffstat:

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

diffs (40 lines):

diff -r da4f23919380 -r c1d4579bf5a6 sys/dev/scsipi/ss.c
--- a/sys/dev/scsipi/ss.c       Wed Apr 06 11:56:25 2005 +0000
+++ b/sys/dev/scsipi/ss.c       Wed Apr 06 11:56:31 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ss.c,v 1.59 2005/02/01 00:19:34 reinoud Exp $  */
+/*     $NetBSD: ss.c,v 1.59.4.1 2005/04/06 11:56:31 tron Exp $ */
 
 /*
  * Copyright (c) 1995 Kenneth Stailey.  All rights reserved.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ss.c,v 1.59 2005/02/01 00:19:34 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ss.c,v 1.59.4.1 2005/04/06 11:56:31 tron Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -188,7 +188,6 @@
 ssdetach(struct device *self, int flags)
 {
        struct ss_softc *ss = (struct ss_softc *) self;
-       struct buf *bp;
        int s, cmaj, mn;
 
        /* locate the major number */
@@ -200,12 +199,7 @@
        s = splbio();
 
        /* Kill off any queued buffers. */
-       while ((bp = BUFQ_GET(&ss->buf_queue)) != NULL) {
-               bp->b_error = EIO;
-               bp->b_flags |= B_ERROR;
-               bp->b_resid = bp->b_bcount;
-               biodone(bp);
-       }
+       bufq_drain(&ss->buf_queue);
 
        bufq_free(&ss->buf_queue);
 



Home | Main Index | Thread Index | Old Index