Module Name:    src
Committed By:   skrll
Date:           Fri Apr  2 09:27:44 UTC 2021

Modified Files:
        src/sys/dev/usb: if_udav.c

Log Message:
Call usbnet_attach before usbnet_{lock_core,busy}

kern/56090: panic in udav_attach


To generate a diff of this commit:
cvs rdiff -u -r1.77 -r1.78 src/sys/dev/usb/if_udav.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/usb/if_udav.c
diff -u src/sys/dev/usb/if_udav.c:1.77 src/sys/dev/usb/if_udav.c:1.78
--- src/sys/dev/usb/if_udav.c:1.77	Sun Mar 15 23:04:51 2020
+++ src/sys/dev/usb/if_udav.c	Fri Apr  2 09:27:44 2021
@@ -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 @@ udav_attach(device_t parent, device_t se
 	/* 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);

Reply via email to