Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/usb Turn on interface OACTIVE in case of a transmit ...



details:   https://anonhg.NetBSD.org/src/rev/3bb3cda2eab0
branches:  trunk
changeset: 480608:3bb3cda2eab0
user:      augustss <augustss%NetBSD.org@localhost>
date:      Sun Jan 16 15:52:03 2000 +0000

description:
Turn on interface OACTIVE in case of a transmit error.

diffstat:

 sys/dev/usb/if_aue.c |  13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diffs (51 lines):

diff -r d4db0d6dee71 -r 3bb3cda2eab0 sys/dev/usb/if_aue.c
--- a/sys/dev/usb/if_aue.c      Sun Jan 16 15:43:24 2000 +0000
+++ b/sys/dev/usb/if_aue.c      Sun Jan 16 15:52:03 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_aue.c,v 1.6 2000/01/16 15:43:24 augustss Exp $      */
+/*     $NetBSD: if_aue.c,v 1.7 2000/01/16 15:52:03 augustss Exp $      */
 /*
  * Copyright (c) 1997, 1998, 1999, 2000
  *     Bill Paul <wpaul%ee.columbia.edu@localhost>.  All rights reserved.
@@ -146,8 +146,6 @@
 
 #include <dev/usb/if_auereg.h>
 
-#define AUE_DEBUG
-
 #ifdef AUE_DEBUG
 #define DPRINTF(x)     if (auedebug) logprintf x
 #define DPRINTFN(n,x)  if (auedebug >= (n)) logprintf x
@@ -1252,10 +1250,11 @@
 
        /* Setup new transfer. */
        usbd_setup_xfer(xfer, sc->aue_ep[AUE_ENDPT_RX],
-           c, c->aue_buf, AUE_CUTOFF, 
+           c, c->aue_buf, AUE_CUTOFF,
            USBD_SHORT_XFER_OK | USBD_NO_COPY,
            USBD_NO_TIMEOUT, aue_rxeof);
        usbd_transfer(xfer);
+
        DPRINTFN(10,("%s: %s: start rx\n", USBDEVNAME(sc->aue_dev),
                    __FUNCTION__));
 }
@@ -1281,6 +1280,9 @@
        DPRINTFN(10,("%s: %s: enter status=%d\n", USBDEVNAME(sc->aue_dev),
                    __FUNCTION__, status));
 
+       ifp->if_timer = 0;
+       ifp->if_flags &= ~IFF_OACTIVE;
+
        if (status != USBD_NORMAL_COMPLETION) {
                if (status == USBD_NOT_STARTED || status == USBD_CANCELLED) {
                        splx(s);
@@ -1295,9 +1297,6 @@
                return;
        }
 
-       ifp->if_timer = 0;
-       ifp->if_flags &= ~IFF_OACTIVE;
-
        ifp->if_opackets++;
 
 #if defined(__FreeBSD__)



Home | Main Index | Thread Index | Old Index