shithub: riscv

Download patch

ref: aa1e68e9fef31dc17991d46523bbf3112d0959d4
parent: eb52c928b122d6bf4d1c9f8ea7460f3640658c43
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sun Dec 8 20:30:16 EST 2024

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.

--- a/sys/man/8/plan9.ini
+++ b/sys/man/8/plan9.ini
@@ -448,7 +448,7 @@
 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 @@
 .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
--- a/sys/src/9/boot/nusbrc
+++ b/sys/src/9/boot/nusbrc
@@ -5,7 +5,7 @@
 mkdir -p -m 700 '#σc/usb'
 mkdir -p -m 700 '#σc/usbnet'
 
-if(! nusb/usbd)
+if(! nusb/usbd $usbdebug)
 	exit
 
 @{
--