RE: No message is showed after USB gadget has configured

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Peter Chen <peter.chen@xxxxxxx> writes:
>> On Mon, Jan 20, 2020 at 09:48:24AM +0000, Peter Chen wrote:
>> >
>> > > On Mon, Jan 20, 2020 at 09:03:59AM +0000, Peter Chen wrote:
>> > > > 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?
>> > >
>> > > 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.
>> 
>> 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.

-- 
balbi

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux