Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ic Fix reset status. Clear some flags for active pip...



details:   https://anonhg.NetBSD.org/src/rev/1873bd881931
branches:  trunk
changeset: 763209:1873bd881931
user:      kiyohara <kiyohara%NetBSD.org@localhost>
date:      Sun Mar 13 05:26:14 2011 +0000

description:
Fix reset status. Clear some flags for active pipes after completing hard reset.

diffstat:

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

diffs (47 lines):

diff -r 5fbf9569f6cd -r 1873bd881931 sys/dev/ic/sl811hs.c
--- a/sys/dev/ic/sl811hs.c      Sun Mar 13 05:03:21 2011 +0000
+++ b/sys/dev/ic/sl811hs.c      Sun Mar 13 05:26:14 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sl811hs.c,v 1.26 2010/05/08 01:33:00 isaki Exp $       */
+/*     $NetBSD: sl811hs.c,v 1.27 2011/03/13 05:26:14 kiyohara Exp $    */
 
 /*
  * Not (c) 2007 Matthew Orgass
@@ -84,7 +84,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sl811hs.c,v 1.26 2010/05/08 01:33:00 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sl811hs.c,v 1.27 2011/03/13 05:26:14 kiyohara Exp $");
 
 #include "opt_slhci.h"
 
@@ -2801,7 +2801,7 @@
        /* Cancel all pipes.  Note that not all of these may be on the 
         * callback queue yet; some could be in slhci_start, for example. */
        FOREACH_AP(q, t, spipe) {
-               spipe->pflags = PF_GONE;
+               spipe->pflags |= PF_GONE;
                spipe->pipe.repeat = 0;
                spipe->pipe.aborting = 1;
                if (spipe->xfer != NULL)
@@ -2828,6 +2828,8 @@
 slhci_reset(struct slhci_softc *sc)
 {
        struct slhci_transfers *t;
+       struct slhci_pipe *spipe;
+       struct gcq *q;
        uint8_t r, pol, ctrl;
 
        t = &sc->sc_transfers;
@@ -2914,6 +2916,10 @@
 
        t->flags &= ~(F_UDISABLED|F_RESET);
        t->flags |= F_CRESET|F_ROOTINTR;
+       FOREACH_AP(q, t, spipe) {
+               spipe->pflags &= ~PF_GONE;
+               spipe->pipe.aborting = 0;
+       }
        DLOG(D_MSG, "RESET done flags %#x", t->flags, 0,0,0);
 }
 



Home | Main Index | Thread Index | Old Index