Source-Changes-HG archive

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

[src/netbsd-9]: src/sys/dev/usb Pull up following revision(s) (requested by s...



details:   https://anonhg.NetBSD.org/src/rev/9d64a02d17fb
branches:  netbsd-9
changeset: 964004:9d64a02d17fb
user:      martin <martin%NetBSD.org@localhost>
date:      Mon Jul 13 14:32:20 2020 +0000

description:
Pull up following revision(s) (requested by simonb in ticket #1003):

        sys/dev/usb/ualea.c: revision 1.12

Set up the USB xfer for every transfer, not just once in the attach
function.  Caught by DIAGNOSTIC on a similar driver.  Thanks to mrg@
for USB xfer clue and martin@ for testing.

diffstat:

 sys/dev/usb/ualea.c |  14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diffs (42 lines):

diff -r 3e149328b090 -r 9d64a02d17fb sys/dev/usb/ualea.c
--- a/sys/dev/usb/ualea.c       Mon Jul 13 14:22:47 2020 +0000
+++ b/sys/dev/usb/ualea.c       Mon Jul 13 14:32:20 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ualea.c,v 1.9 2018/01/21 13:57:12 skrll Exp $  */
+/*     $NetBSD: ualea.c,v 1.9.10.1 2020/07/13 14:32:20 martin Exp $    */
 
 /*-
  * Copyright (c) 2017 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ualea.c,v 1.9 2018/01/21 13:57:12 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ualea.c,v 1.9.10.1 2020/07/13 14:32:20 martin Exp $");
 
 #include <sys/types.h>
 #include <sys/atomic.h>
@@ -144,11 +144,6 @@
                return;
        }
 
-       /* Setup the xfer to call ualea_xfer_done with sc.  */
-       usbd_setup_xfer(sc->sc_xfer, sc, usbd_get_buffer(sc->sc_xfer),
-           sc->sc_maxpktsize, USBD_SHORT_XFER_OK, USBD_NO_TIMEOUT,
-           ualea_xfer_done);
-
        /* Success!  We are ready to run.  */
        mutex_enter(&sc->sc_lock);
        sc->sc_attached = true;
@@ -197,6 +192,11 @@
        if (sc->sc_needed == 0)
                return;
 
+       /* Setup the xfer to call ualea_xfer_done with sc.  */
+       usbd_setup_xfer(sc->sc_xfer, sc, usbd_get_buffer(sc->sc_xfer),
+           sc->sc_maxpktsize, USBD_SHORT_XFER_OK, USBD_NO_TIMEOUT,
+           ualea_xfer_done);
+
        /* Issue xfer or complain if we can't.  */
        /*
         * XXX Does USBD_NORMAL_COMPLETION (= 0) make sense here?  The



Home | Main Index | Thread Index | Old Index