No message is showed after USB gadget has configured
Hi all,
From commit 1cbfb8c4f62d ("usb: gadget: Quieten gadget config message"), there is no any message from gadget side after it connects to host and works correctly. Although we could cat "state" under /sys/class/udc/$CONTROLLER/ to know its state, we can't easily know if the gadget works or not from console, USB host could have many messages after one device has connected, why we can't keep one for USB gadget?
Signature · 2 lines
Thanks, Peter Chen
Greg Kroah-Hartman
maintainerQuoted 9 lines · Peter Chen
Hi all,
Quoted 1 line
From commit
1cbfb8c4f62d("usb: gadget: Quieten gadget config message"),there is no any message from gadget side after it connects to host and works correctly. Although we could cat "state" under
/sys/class/udc/$CONTROLLER/to know its state, we can't easily know if the gadget works or not from console, USB host could have many messages after one device has connected, why we can't keep one for USB gadget?
Why not make "normal" USB devices quieter too? :)
Surely you do not have tools that watch syslog to determine if a device is working properly or not, right? That's what sysfs is for, not syslog entries.
thanks,
greg k-h
Quoted 13 lines · Peter Chen
Quoted 10 lines
Hi all,
Quoted 2 lines
From commit
1cbfb8c4f62d("usb: gadget: Quieten gadget config message"),there is no any message from gadget side after it connects to host and works correctly. Although we could cat "state" under
/sys/class/udc/$CONTROLLER/to know its state, we can't easily know if the gadget works or not from console, USB host could have many messages after one device has connected, why we can't keep one for USB gadget?
Quoted 5 lines
Why not make "normal" USB devices quieter too? :)
Surely you do not have tools that watch syslog to determine if a device is working properly or not, right? That's what sysfs is for, not syslog entries.
Yes, we use our eyes during the hot plug test for device or count the number of messages for it, with this change, it may cause difficult for hot plug test. For other tests, we could judge sysfs before later tests.
Since this message in there many years, we (and tester) may need time to adapt for this change.
Peter
Greg Kroah-Hartman
maintainerQuoted 19 lines · Peter Chen
Quoted 13 lines · Peter Chen
Quoted 10 lines
Hi all,
Quoted 2 lines
From commit
1cbfb8c4f62d("usb: gadget: Quieten gadget config message"),there is no any message from gadget side after it connects to host and works correctly. Although we could cat "state" under
/sys/class/udc/$CONTROLLER/to know its state, we can't easily know if the gadget works or not from console, USB host could have many messages after one device has connected, why we can't keep one for USB gadget?Quoted 5 lines
Why not make "normal" USB devices quieter too? :)
Surely you do not have tools that watch syslog to determine if a device is working properly or not, right? That's what sysfs is for, not syslog entries.
Quoted 6 lines
Yes, we use our eyes during the hot plug test for device or count the number of messages for it, with this change, it may cause difficult for hot plug test. For other tests, we could judge sysfs before later tests.
Since this message in there many years, we (and tester) may need time to adapt for this change.
Can you just turn on dynamic debugging for that one line with a simple echo to the debugfs file so that you still see this in your test framework?
thanks,
greg k-h
Quoted 27 lines · Peter Chen
Quoted 13 lines
Quoted 13 lines · Peter Chen
Quoted 10 lines
Hi all,
Quoted 2 lines
From commit
1cbfb8c4f62d("usb: gadget: Quieten gadget config message"),there is no any message from gadget side after it connects to host and works correctly. Although we could cat "state" under
/sys/class/udc/$CONTROLLER/to know its state, we can't easily know if the gadget works or not from console, USB host could have many messages after one device has connected, why we can't keep one for USB gadget?Quoted 4 lines
Quoted 4 lines
Why not make "normal" USB devices quieter too? :)
Surely you do not have tools that watch syslog to determine if a device is working properly or not, right? That's what sysfs is for, not syslog
entries.
Quoted 6 lines
Quoted 1 line
Yes, we use our eyes during the hot plug test for device or count the number of messages for it, with this change, it may cause difficult for hot plug test. For other tests, we could judge sysfs before later tests.
Quoted 6 lines
Quoted 2 lines
Since this message in there many years, we (and tester) may need time to adapt for this change.
Can you just turn on dynamic debugging for that one line with a simple echo to the debugfs file so that you still see this in your test framework?
No, most released kernel or end user's kernel doesn't enable dynamic debug. In fact, we use this message in formal release product to quick judge if the device function is ok, not just in development periods.
Peter
Hi,
Quoted 28 lines · Peter Chen
Quoted 28 lines · Peter Chen
Quoted 13 lines
Quoted 13 lines · Peter Chen
Quoted 10 lines
Hi all,
Quoted 2 lines
From commit
1cbfb8c4f62d("usb: gadget: Quieten gadget config message"),there is no any message from gadget side after it connects to host and works correctly. Although we could cat "state" under
/sys/class/udc/$CONTROLLER/to know its state, we can't easily know if the gadget works or not from console, USB host could have many messages after one device has connected, why we can't keep one for USB gadget?Quoted 4 lines
Quoted 4 lines
Why not make "normal" USB devices quieter too? :)
Surely you do not have tools that watch syslog to determine if a device is working properly or not, right? That's what sysfs is for, not syslog
entries.
Quoted 8 lines
Quoted 1 line
Yes, we use our eyes during the hot plug test for device or count the number of messages for it, with this change, it may cause difficult for hot plug test. For other tests, we could judge sysfs before later tests.
Since this message in there many years, we (and tester) may need time to adapt for this change.
Quoted 6 lines
Quoted 2 lines
Can you just turn on dynamic debugging for that one line with a simple echo to the debugfs file so that you still see this in your test framework?
No, most released kernel or end user's kernel doesn't enable dynamic debug. In fact, we use this message in formal release product to quick judge if the device function is ok, not just in development periods.
While I agree that dynamic debug is usually disabled, almost 100% of all product kernels have sysfs enabled. The only exception I know of is Microsoft Azure Sphere (downloadable from
https://3rdpartysource.microsoft.com/), but that doesn't support USB anyway.
It should be very easy to figure out if a new device was attached and is working, no?
From a peripheral stack point of view, at least dwc3 prints *nothing* unless there's an error. And that's okay since I only want to see messages if I get an error condition or a bug report, which case I'll enable trace events.
I agree with Greg here, we should actually make Host stack quieter too, including HCD drivers.
Signature · 1 line
balbi