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)



The following reply was made to PR port-sparc64/60428; it has been noted by GNATS.

From: Taylor R Campbell <riastradh%NetBSD.org@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: thorpej%netbsd.org@localhost, port-sparc64-maintainer%netbsd.org@localhost,
	netbsd-bugs%netbsd.org@localhost, gnats-admin%netbsd.org@localhost, john%ziaspace.com@localhost
Subject: Re: port-sparc64/60428 (NetBSD 11.99.6/sparc64 panics on USB insertion)
Date: Wed, 8 Jul 2026 17:07:30 +0000

 > Date: Wed,  8 Jul 2026 17:04:59 +0000 (UTC)
 > From: riastradh%NetBSD.org@localhost
 > 
 > 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);
 
 Or, better:
 
 --- src/sys/arch/sparc64/sparc64/autoconf.c
 +++ src/sys/arch/sparc64/sparc64/autoconf.c
 @@ -1235,6 +1235,8 @@
  		 * controller's devhandle.  Hoist it up one more so
  		 * that busdev points at the controller.
  		 */
 +		if (devhandle_type(devhandle) != DEVHANDLE_TYPE_OF)
 +			return;
  		busdev = device_parent(busdev);
  		devhandle = device_handle(busdev);
  		KASSERT(devhandle_type(devhandle) == DEVHANDLE_TYPE_OF);
 



Home | Main Index | Thread Index | Old Index