linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* No message is showed after USB gadget has configured
@ 2020-01-20  9:03 Peter Chen
  2020-01-20  9:29 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 6+ messages in thread
From: Peter Chen @ 2020-01-20  9:03 UTC (permalink / raw)
  To: linux-usb; +Cc: Felipe Balbi, Greg Kroah-Hartman

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?

-- 

Thanks,
Peter Chen

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: No message is showed after USB gadget has configured
  2020-01-20  9:03 No message is showed after USB gadget has configured Peter Chen
@ 2020-01-20  9:29 ` Greg Kroah-Hartman
  2020-01-20  9:48   ` Peter Chen
  0 siblings, 1 reply; 6+ messages in thread
From: Greg Kroah-Hartman @ 2020-01-20  9:29 UTC (permalink / raw)
  To: Peter Chen; +Cc: linux-usb, Felipe Balbi

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.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: No message is showed after USB gadget has configured
  2020-01-20  9:29 ` Greg Kroah-Hartman
@ 2020-01-20  9:48   ` Peter Chen
  2020-01-20 10:48     ` Greg Kroah-Hartman
  0 siblings, 1 reply; 6+ messages in thread
From: Peter Chen @ 2020-01-20  9:48 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-usb, Felipe Balbi

 
> 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.

Peter 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: No message is showed after USB gadget has configured
  2020-01-20  9:48   ` Peter Chen
@ 2020-01-20 10:48     ` Greg Kroah-Hartman
  2020-01-21  2:04       ` Peter Chen
  0 siblings, 1 reply; 6+ messages in thread
From: Greg Kroah-Hartman @ 2020-01-20 10:48 UTC (permalink / raw)
  To: Peter Chen; +Cc: linux-usb, Felipe Balbi

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?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: No message is showed after USB gadget has configured
  2020-01-20 10:48     ` Greg Kroah-Hartman
@ 2020-01-21  2:04       ` Peter Chen
  2020-01-21 12:08         ` Felipe Balbi
  0 siblings, 1 reply; 6+ messages in thread
From: Peter Chen @ 2020-01-21  2:04 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-usb, Felipe Balbi

 
> 
> 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.

Peter

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: No message is showed after USB gadget has configured
  2020-01-21  2:04       ` Peter Chen
@ 2020-01-21 12:08         ` Felipe Balbi
  0 siblings, 0 replies; 6+ messages in thread
From: Felipe Balbi @ 2020-01-21 12:08 UTC (permalink / raw)
  To: Peter Chen, Greg Kroah-Hartman; +Cc: linux-usb

[-- Attachment #1: Type: text/plain, Size: 2403 bytes --]


Hi,

Peter Chen <peter.chen@nxp.com> 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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-01-21 12:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-20  9:03 No message is showed after USB gadget has configured Peter Chen
2020-01-20  9:29 ` Greg Kroah-Hartman
2020-01-20  9:48   ` Peter Chen
2020-01-20 10:48     ` Greg Kroah-Hartman
2020-01-21  2:04       ` Peter Chen
2020-01-21 12:08         ` Felipe Balbi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).