Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp11547pxb; Thu, 7 Jan 2021 19:45:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJy7hxcOkQCBwBTWQfOe34LPkxpw/v5/p6I0lQhC21FkqqSKYnCkfJlVbfATA7d2XpY3CmYW X-Received: by 2002:aa7:c58a:: with SMTP id g10mr3836102edq.315.1610077527143; Thu, 07 Jan 2021 19:45:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610077527; cv=none; d=google.com; s=arc-20160816; b=DFD8WI8Wl7DMwLlqCVB4bab0LQM8/55Km2qSf+2Ko1J0TVWe69qXvDwOY5nX03iy0/ gLUKbaywbrbhAVjKp+gRg7psfjYhNbrleIHbfRLwFEAcOJNA6PlQWAg75knUKEKIZQDa o1Q9OQnojmEKux4J5aVW3TLJdZjrNLRhMVyyqygfxPrkrc6WqujwOe4h8nKIufcmAOSe 7QgoHHTIDyoM057Y4OeCEOZd87yYCEwpAtcSFi6z747HgX1+yQrTFCM8ltby4J0fISDk ADyV1omCFdhBpDc26F+kRZKSF0aokyTsTBjsZuRSNj4WH3eD2LB/Rs8pns5btkyBOMoI YIIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=p2m6LtSdXslT5k/jlieRoXHeU0l2jufsh23Ksbl5Of8=; b=Sy7403asvEzE6PmSlQbtX+h/HZ/+3F0CXTRnPrENIQRZii3uYksVHxl0aylwWiaFN+ pfXRBKXJ6YMMRA+18b4rQ3P67c0d06CFWCkvygg7Il60UQ85av2vpKnkQ6E02EAdSPlf ocF/Z682uSAP1Z+AKh5eMCzLgAsI1iVY5zr5ZfuTT3uXeFp/b/xuEoeiTUD7/KYQHqbd s7zUUA97slOQbylU3Y1/CTMk02e/Csc3Ia6LyXAHNUPpP1a3tKCJORI5Dx6m4q1/7yLm S0x+FUEgkMEoYwZpZ7C25TiqK16t+yax3j6hRykT3JFImH+5cEX2qgiMDxme/wWdIh9U 7mZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=UMKxq6Do; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z11si3066997ejw.19.2021.01.07.19.45.03; Thu, 07 Jan 2021 19:45:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=UMKxq6Do; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726492AbhAHDoE (ORCPT + 99 others); Thu, 7 Jan 2021 22:44:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39606 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726410AbhAHDoE (ORCPT ); Thu, 7 Jan 2021 22:44:04 -0500 Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7C4CC0612F5 for ; Thu, 7 Jan 2021 19:43:23 -0800 (PST) Received: by mail-ej1-x62b.google.com with SMTP id ce23so12696107ejb.8 for ; Thu, 07 Jan 2021 19:43:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=p2m6LtSdXslT5k/jlieRoXHeU0l2jufsh23Ksbl5Of8=; b=UMKxq6Dohmlt9YeOlCbg8vTv7eGJOT720rswvrldFMHxAYmsDqOOPWNRZxmBpIa9UL l+eDJ0B0/p3ciKkD91YBCdftFJ7q3B7GBMqDyaVqfhf8u0hg4WBpYstCoKaL9bsnCwuu N3j59NuaVccGldKAp19X+tRMcXdAfldfHtJqjj6YHhNex1Vq0QTEAY/NVtCAwWv2IZpP LkWD3PZQ6pnWsikKbwUwwZA8Wdz7OrplOAQrd38cDhkGqCHh4S6ygg6asyOb3l5U+Xca aEJjfBVDiC+U8CaWRmtIvKPnNCnbKOnp/sP9Tizv9AUk7CwkFwY4H/dNgv9GbsazHEe/ /tew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=p2m6LtSdXslT5k/jlieRoXHeU0l2jufsh23Ksbl5Of8=; b=Nh+wmcDTonLcg1Fni67a9uSYzZwYS3TgLKR+d9dIM7k6hQuY6llXIhE5dKlGwKYa22 Wjvx4os7y68a+YD4BGS6U5RGcqva0KokFTjdUpR+fH3Uf2hzWim2yEyRsnsJJovi4rOi bahtEvFS11z7m/v/le/Q5NZrOzysHV/KngSXjLdmIfBjHWVaaFA1USvxt4EUx6Z3gfL7 fulVLpY+AjCDZ52l8dQekAUOQNZZOR9mpb+t7bVq0MsVfu370V56DXz5Vlt3HSZLixAE HLNgu9oA/13bdNa2CVkTAssDw3xiBy6qV6QZnwmuYoh02RHogeB7WbK3v8fPHsLMxnNv U8Dg== X-Gm-Message-State: AOAM530tZgxZ8BRR7Tpn/upyk6RqxRO3Iqzs3749cSXLcC665MgOrbdn Vu9GLU8e4MFgPFJV+5X/HWzjvapz0p3Vdd/gniua/A== X-Received: by 2002:a17:906:1a4e:: with SMTP id j14mr1294526ejf.507.1610077402250; Thu, 07 Jan 2021 19:43:22 -0800 (PST) MIME-Version: 1.0 References: <20210107090604.299270-1-albertccwang@google.com> <20210108021642.GA4672@b29397-desktop> In-Reply-To: <20210108021642.GA4672@b29397-desktop> From: Albert Wang Date: Fri, 8 Jan 2021 11:43:11 +0800 Message-ID: Subject: Re: [PATCH] Revert "usb: gadget: Quieten gadget config message" To: Peter Chen Cc: Greg KH , balbi@kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > 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 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 > > > --- > > > 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 >