Source-Changes-HG archive

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

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



details:   https://anonhg.NetBSD.org/src/rev/8bdd1dc538fd
branches:  netbsd-8
changeset: 935937:8bdd1dc538fd
user:      martin <martin%NetBSD.org@localhost>
date:      Mon Jul 13 14:35:29 2020 +0000

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

        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 31ee7b538005 -r 8bdd1dc538fd sys/dev/usb/ualea.c
--- a/sys/dev/usb/ualea.c       Mon Jul 13 14:13:12 2020 +0000
+++ b/sys/dev/usb/ualea.c       Mon Jul 13 14:35:29 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ualea.c,v 1.6.8.1 2018/01/31 18:01:54 martin Exp $     */
+/*     $NetBSD: ualea.c,v 1.6.8.2 2020/07/13 14:35:29 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.6.8.1 2018/01/31 18:01:54 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ualea.c,v 1.6.8.2 2020/07/13 14:35:29 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