NetBSD-Bugs archive

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

Re: port-sparc64/60428 (NetBSD 11.99.6/sparc64 panics on USB insertion)



Synopsis: NetBSD 11.99.6/sparc64 panics on USB insertion

Responsible-Changed-From-To: port-sparc64-maintainer->thorpej
Responsible-Changed-By: riastradh%NetBSD.org@localhost
Responsible-Changed-When: Wed, 08 Jul 2026 17:04:58 +0000
Responsible-Changed-Why:
Can you please take a look?


State-Changed-From-To: open->analyzed
State-Changed-By: riastradh%NetBSD.org@localhost
State-Changed-When: Wed, 08 Jul 2026 17:04:58 +0000
State-Changed-Why:
The assertion is here:

   1232 		/*
   1233 		 * busdev now points to the direct descendent of the
   1234 		 * controller ("atabus" or "scsibus").  Get the
   1235 		 * controller's devhandle.  Hoist it up one more so
   1236 		 * that busdev points at the controller.
   1237 		 */
   1238 		busdev = device_parent(busdev);
   1239 		devhandle = device_handle(busdev);
=> 1240 		KASSERT(devhandle_type(devhandle) == DEVHANDLE_TYPE_OF);
   1241 		ofnode = devhandle_to_of(devhandle);

https://nxr.netbsd.org/xref/src/sys/arch/sparc64/sparc64/autoconf.c?r=1.251#1232

Since pluggable USB devices almost certainly have no associated OF
nodes, this is probably a matter of:

--- src/sys/arch/sparc64/sparc64/autoconf.c
+++ src/sys/arch/sparc64/sparc64/autoconf.c
@@ -1237,7 +1237,8 @@
 		 */
 		busdev = device_parent(busdev);
 		devhandle = device_handle(busdev);
-		KASSERT(devhandle_type(devhandle) == DEVHANDLE_TYPE_OF);
+		if (devhandle_type(devhandle) != DEVHANDLE_TYPE_OF)
+			return;
 		ofnode = devhandle_to_of(devhandle);
 






Home | Main Index | Thread Index | Old Index