NetBSD-Bugs archive

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

Re: kern/57447: HEAD fails to probe USB devices and fails to boot up



The following reply was made to PR kern/57447; it has been noted by GNATS.

From: Taylor R Campbell <riastradh%NetBSD.org@localhost>
To: bsdprg%tuta.io@localhost
Cc: gnats-bugs%NetBSD.org@localhost
Subject: Re: kern/57447: HEAD fails to probe USB devices and fails to boot up
Date: Fri, 2 Jun 2023 09:35:47 +0000

 This is a multi-part message in MIME format.
 --=_y8mli43iaCzhPWCedvqgQnQqZuwvU3Ud
 
 Can you please run with the attached patch and share dmesg once the
 machine boots?
 
 It won't fix the problem -- it will leak memory, which the assertion
 had detected, but it will give a little more diagnostic information
 about the real cause of the problem so we can find the right way to
 fix it.
 
 --=_y8mli43iaCzhPWCedvqgQnQqZuwvU3Ud
 Content-Type: text/plain; charset="ISO-8859-1"; name="usbhack"
 Content-Transfer-Encoding: quoted-printable
 Content-Disposition: attachment; filename="usbhack.patch"
 
 diff --git a/sys/dev/usb/usb_subr.c b/sys/dev/usb/usb_subr.c
 index e14fec7e30be..2deb64b51c27 100644
 --- a/sys/dev/usb/usb_subr.c
 +++ b/sys/dev/usb/usb_subr.c
 @@ -680,6 +680,7 @@ usbd_set_config_no(struct usbd_device *dev, int no, int=
  msg)
  	return USBD_INVAL;
  }
 =20
 +#include <ddb/ddb.h>
  usbd_status
  usbd_set_config_index(struct usbd_device *dev, int index, int msg)
  {
 @@ -691,6 +692,8 @@ usbd_set_config_index(struct usbd_device *dev, int inde=
 x, int msg)
  	usbd_status err;
  	int i, ifcidx, nifc, len, selfpowered, power;
 =20
 +	printf("%s: addr %u index %d msg %d\n", __func__, index, msg);
 +	db_stacktrace();
 =20
  	if (index >=3D dev->ud_ddesc.bNumConfigurations &&
  	    index !=3D USB_UNCONFIG_INDEX) {
 @@ -867,7 +870,7 @@ usbd_set_config_index(struct usbd_device *dev, int inde=
 x, int msg)
  		goto bad;
  	}
 =20
 -	KASSERTMSG(dev->ud_ifaces =3D=3D NULL, "ud_ifaces=3D%p", dev->ud_ifaces);
 +//	KASSERTMSG(dev->ud_ifaces =3D=3D NULL, "ud_ifaces=3D%p", dev->ud_ifaces=
 );
 =20
  	/* Allocate and fill interface data. */
  	nifc =3D cdp->bNumInterface;
 
 --=_y8mli43iaCzhPWCedvqgQnQqZuwvU3Ud--
 


Home | Main Index | Thread Index | Old Index