From aa1e68e9fef31dc17991d46523bbf3112d0959d4 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Mon, 9 Dec 2024 01:30:16 +0000 Subject: [PATCH] nusbrd: pass $usbdebug to nusb/usbd This can be usefull for debugging usb enumeration issues from boot, if one has the chance to pass parameters on the bootloader. It was initially suggested in a troubleshooting session todo as a quick modification, but it can be usefull in general. --- sys/man/8/plan9.ini | 10 +++++++++- sys/src/9/boot/nusbrc | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/sys/man/8/plan9.ini b/sys/man/8/plan9.ini index 7f5752dfb..325dadcbf 100755 --- a/sys/man/8/plan9.ini +++ b/sys/man/8/plan9.ini @@ -448,7 +448,7 @@ will appear when using the WIFI interface for netbooting. To avoid the prompt, the .I password can be specified with the boot parameter above. -.SS \fLwpaopts=\fivalue\fP +.SS \fLwpaopts=\fIvalue\fP Pass .I value as additional options to @@ -956,6 +956,14 @@ When defined, .IR nusbrc (8) will use the dynamically assigned usb device address to name usb devices instead of the device unique name. +.SS \fLusbdebug=\fIvalue\fP +When defined, pass +.I value +as arguments to +.IR usbd (4). +Usually used to pass +.B -d +flags for verbose debug printing. .SS VIDEO .SS \fL*nocga=\fP This inhibits the kernel and diff --git a/sys/src/9/boot/nusbrc b/sys/src/9/boot/nusbrc index 48b0fbec9..f15ebcec8 100755 --- a/sys/src/9/boot/nusbrc +++ b/sys/src/9/boot/nusbrc @@ -5,7 +5,7 @@ if(! bind -a '#u' /dev) mkdir -p -m 700 '#σc/usb' mkdir -p -m 700 '#σc/usbnet' -if(! nusb/usbd) +if(! nusb/usbd $usbdebug) exit @{