Fishwaldo commented on code in PR #19861:
URL: https://github.com/apache/nuttx/pull/19861#discussion_r3885947454
##########
drivers/usbhost/usbhost_xhci.c:
##########
@@ -2811,6 +2853,9 @@ static void xhci_portsc_work(FAR void *arg)
usbhost_vtrace2(XHCI_VTRACE2_PORTSC_DISCONND,
rhpndx + 1, priv->pscwait);
+ syslog(LOG_INFO, "%s: port %d: device removed\n",
Review Comment:
I left these as syslog rather than the debug macros so users could see when
devices were attached/detached. Putting it over to debug macros with INFO level
either suppresses these messages or (if enabled) floods the users with plenty
of other messages.
Without this, and Debug Info messages suppressed it's almost impossible to
know if a device was detected/detected.
So- quality of life improvements? Let me know you really want it switched
over to Debug Macros or maybe put behind a KConfig option?
##########
drivers/usbhost/usbhost_xhci.c:
##########
@@ -1496,6 +1498,16 @@ static int xhci_port_enable(FAR struct usbhost_xhci_s
*priv,
}
}
+ /* Say what turned up, now that the port can answer.
+ *
+ * The speed field only means anything once the port has been reset and
+ * enabled. A USB2 port reports the reset default, full speed, until
+ * then.
+ */
+
+ syslog(LOG_INFO, "%s: port %d: device attached at %s\n",
Review Comment:
See above.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]