Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/usb Call usbnet_attach before usbnet_{lock_core,busy}



details:   https://anonhg.NetBSD.org/src/rev/565088194c13
branches:  trunk
changeset: 960903:565088194c13
user:      skrll <skrll%NetBSD.org@localhost>
date:      Fri Apr 02 09:27:44 2021 +0000

description:
Call usbnet_attach before usbnet_{lock_core,busy}

kern/56090: panic in udav_attach

diffstat:

 sys/dev/usb/if_udav.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (35 lines):

diff -r 13fb90b5c085 -r 565088194c13 sys/dev/usb/if_udav.c
--- a/sys/dev/usb/if_udav.c     Fri Apr 02 09:27:32 2021 +0000
+++ b/sys/dev/usb/if_udav.c     Fri Apr 02 09:27:44 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_udav.c,v 1.77 2020/03/15 23:04:51 thorpej Exp $     */
+/*     $NetBSD: if_udav.c,v 1.78 2021/04/02 09:27:44 skrll Exp $       */
 /*     $nabe: if_udav.c,v 1.3 2003/08/21 16:57:19 nabe Exp $   */
 
 /*
@@ -45,7 +45,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_udav.c,v 1.77 2020/03/15 23:04:51 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_udav.c,v 1.78 2021/04/02 09:27:44 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -237,14 +237,14 @@
        /* Not supported yet. */
        un->un_ed[USBNET_ENDPT_INTR] = 0;
 
+       usbnet_attach(un, "udavdet");
+
        usbnet_lock_core(un);
        usbnet_busy(un);
 
 //     /* reset the adapter */
 //     udav_reset(un);
 
-       usbnet_attach(un, "udavdet");
-
        /* Get Ethernet Address */
        err = udav_csr_read(un, UDAV_PAR, un->un_eaddr, ETHER_ADDR_LEN);
        usbnet_unbusy(un);



Home | Main Index | Thread Index | Old Index