Re: [PATCH] Revert "usb: gadget: Quieten gadget config message"
From: Greg KH
Date: Thu Jan 07 2021 - 04:50:15 EST
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@xxxxxxxxxx>
> ---
> 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.
What do you need to see this message for? What tool relies on it? Who
reads it?
thanks,
greg k-h