lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CANqn-rjVZRW+Y+_CMPJKBTi83VwSHV+Ow2k0AgooHRaKJozY6w@mail.gmail.com>
Date:   Fri, 8 Jan 2021 11:43:11 +0800
From:   Albert Wang <albertccwang@...gle.com>
To:     Peter Chen <hzpeterchen@...il.com>
Cc:     Greg KH <gregkh@...uxfoundation.org>, balbi@...nel.org,
        linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Revert "usb: gadget: Quieten gadget config message"

> Usually, the developer him(her)self wants to read it to know if current
> USB gadget enumerated and what speed is recognized, reading from the
> console by eyes is the quickest way. Without this message, there is no
> any messages when the USB gadget connects to host.
Yes, especially when enumeration USB3 failed then downgrade to USB2.

> If enable debug message, there are too many messages,
This is the reason why it is not a good solution, when I just need to
confirm what the enumeration result is.

--
Thanks,
Albert

On Fri, Jan 8, 2021 at 10:16 AM Peter Chen <hzpeterchen@...il.com> wrote:
>
> On 21-01-07 10:50:38, Greg KH wrote:
> > On Thu, Jan 07, 2021 at 09:06:04AM +0000, Albert Wang wrote:
> > > This reverts commit 1cbfb8c4f62d667f6b8b3948949737edb92992cc.
> > >
> > > The log of USB enumeration result is a useful log and only occupies
> > > one line especially when USB3 enumeration failed and then downgrade
> > > to USB2.
> > >
> > > Signed-off-by: Albert Wang <albertccwang@...gle.com>
> > > ---
> > >  drivers/usb/gadget/composite.c | 6 +++---
> > >  1 file changed, 3 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
> > > index c6d455f2bb92..5b0d6103a63d 100644
> > > --- a/drivers/usb/gadget/composite.c
> > > +++ b/drivers/usb/gadget/composite.c
> > > @@ -840,9 +840,9 @@ static int set_config(struct usb_composite_dev *cdev,
> > >             result = 0;
> > >     }
> > >
> > > -   DBG(cdev, "%s config #%d: %s\n",
> > > -       usb_speed_string(gadget->speed),
> > > -       number, c ? c->label : "unconfigured");
> > > +   INFO(cdev, "%s config #%d: %s\n",
> > > +        usb_speed_string(gadget->speed),
> > > +        number, c ? c->label : "unconfigured");
> >
> > When everything is working properly, the kernel should be quiet.  If you
> > have to see this message, you can turn it on at runtime, as Felipe
> > pointed out, to enable it for your system.  But it's not a good default
> > thing to have.
>
> For most production kernel (or kernel ready for customers), it may not enable
> CONFIG_DYNAMIC_DEBUG.
>
> >
> > What do you need to see this message for?  What tool relies on it?  Who
> > reads it?
> >
>
> Usually, the developer him(her)self wants to read it to know if current
> USB gadget enumerated and what speed is recognized, reading from the
> console by eyes is the quickest way. Without this message, there is no
> any messages when the USB gadget connects to host.
>
> If enable debug message, there are too many messages, but I think most
> developers may only need one information message to know if enumeration
> is established correctly.
>
> --
>
> Thanks,
> Peter Chen
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ