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 13:50:15 +0000

 This is a multi-part message in MIME format.
 --=_/7SKalmIntflQ5fRRqx18SV1eoaDZ/rT
 Content-Transfer-Encoding: quoted-printable
 
 > Date: Fri, 2 Jun 2023 15:40:37 +0200 (CEST)
 > From: bsdprg%tuta.io@localhost
 >=20
 > HI Taylor,
 >=20
 > Thanks for the patch. Unfortunately, I am not able to apply the patch.=C2=
 =A0
 > I have the NetBSD-current development branch checked out from cvs in /usr=
 /src
 >=20
 > $ patch < /home/salil/Downloads/usbhack-v2.patch
 > Hmm... Looks like a unified diff to me...
 > The text leading up to this was:
 > --------------------------
 > |diff --git a/libexec/ld.elf_so/arch/aarch64/mdreloc.c b/libexec/ld.elf_s=
 o/arch/aarch64/mdreloc.c
 
 Oops -- sorry, I inadvertently mixed another local change into the
 patch.  New patch attached.
 
 --=_/7SKalmIntflQ5fRRqx18SV1eoaDZ/rT
 Content-Type: text/plain; charset="ISO-8859-1"; name="usbhack-v3"
 Content-Transfer-Encoding: quoted-printable
 Content-Disposition: attachment; filename="usbhack-v3.patch"
 
 diff --git a/sys/dev/usb/usb_subr.c b/sys/dev/usb/usb_subr.c
 index e14fec7e30be..33402e0a3ea8 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,9 @@ 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__,
 +	    dev->ud_addr, index, msg);
 +	db_stacktrace();
 =20
  	if (index >=3D dev->ud_ddesc.bNumConfigurations &&
  	    index !=3D USB_UNCONFIG_INDEX) {
 @@ -867,7 +871,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;
 
 --=_/7SKalmIntflQ5fRRqx18SV1eoaDZ/rT--
 


Home | Main Index | Thread Index | Old Index