NetBSD-Bugs archive

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

Re: kern/54762 (kernel assert "mii != NULL" when urndis is plugged)



Synopsis: kernel assert "mii != NULL" when urndis is plugged

State-Changed-From-To: open->analyzed
State-Changed-By: maya%NetBSD.org@localhost
State-Changed-When: Sat, 14 Dec 2019 14:37:49 +0000
State-Changed-Why:
Index: usbnet.c
===================================================================
RCS file: /cvsroot/src/sys/dev/usb/usbnet.c,v
retrieving revision 1.32
diff -u -r1.32 usbnet.c
--- usbnet.c	3 Dec 2019 05:01:58 -0000	1.32
+++ usbnet.c	14 Dec 2019 14:34:45 -0000
@@ -1197,9 +1197,11 @@
 		usbnet_watchdog(ifp);
 
 	DPRINTFN(8, "mii %jx ifp %jx", (uintptr_t)mii, (uintptr_t)ifp, 0, 0);
-	mii_tick(mii);
-	if (!unp->unp_link)
-		(*mii->mii_statchg)(ifp);
+	if (mii) {
+		mii_tick(mii);
+		if (!unp->unp_link)
+			(*mii->mii_statchg)(ifp);
+	}
 
 	/* Call driver if requested. */
 	uno_tick(un);






Home | Main Index | Thread Index | Old Index