Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp385380ybe; Wed, 4 Sep 2019 01:01:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqx9uZ/l8rhQUgnj5BHNCdDUnzz4JA1R+y9dbr4mL46qUHfP8Kjb1PKD8cD76edeUc8UIPFF X-Received: by 2002:a17:90a:c8d:: with SMTP id v13mr3627681pja.4.1567584069611; Wed, 04 Sep 2019 01:01:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567584069; cv=none; d=google.com; s=arc-20160816; b=vYyxmNIdT0hKrqfLA1YUgOACBCq+teUymf2SJw1K5OSRpRijVnSL+D+EWETPvVPv1h E8dRacGjUkphgpBaT1UNo0axbseHSWzSzWE0fC26igOk9hF1ZOIxeaxod2YE2HvVnnqn 62xdW7XvGfCPuPizB3Y2dTgl3FjjRkGYo9u//eAZzpc0ILtWUHdw0R5JjODkKO0EF+Zx y6584vvod4I7wA4V5dHnM/lbIoP+m+av3oTPwWpFSYEUbSlGNEedcEgK6uR3cfy4UTAx aE1ETwjuQtB8L8l3tzWvOGLFbU1aMtI66XMKlp5OrGqDlBRfoRVKS4vm9YWYODenRHV3 Ev/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=8ZaUxvFXksZsIeeYYOqqP+1kvz0jQgCjh+rXd1ECRfw=; b=DSvxcTJA7wxMx6TWW9IL+9jpjwWIgcmxWRN2q8dpea6bsbvIHLfeJl5wLCvO/4gYki O8e2raslV1TGEeYhKjHF2UfWvfPWhdCKXLbL9X5BePr0Fh23NMSRP4yPYJt6Vu2TtqJN nQeVbZTdVJtVqXaJiavtH0UVyJVLOIupc/QzcUemaYNyKF33IjzMAUrhBspDCZcU80JM lxuDBiX26iFJbADnnQdz3zm3i180fQtYlzmgAAojJrH+GXLj33KCVWI5h4qQhl6cOpas yWY58yaLOi+PZN8PA9DYbRwrwGr6t5+0y7J+YsqO+S4E3zoKOFJcppcl9zQqrkPirvJp mWjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=y512PAzU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h38si16828585pgi.327.2019.09.04.01.00.52; Wed, 04 Sep 2019 01:01:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=y512PAzU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729177AbfIDH6n (ORCPT + 99 others); Wed, 4 Sep 2019 03:58:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:51104 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726061AbfIDH6m (ORCPT ); Wed, 4 Sep 2019 03:58:42 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 529FE20820; Wed, 4 Sep 2019 07:58:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1567583921; bh=eQJoRYxz3mDb8fvKOmbNYK16DrykSDmjb38YODdG02Y=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=y512PAzUx2FFwBtxUBv//JpU4QLdQSmJY0B8fdz/BM+RaW0rNqa7Ht/w0eZ59mwtA EhYgyT+gkuyIyotLPK/rb6C1B2zBFkolrEyTtPTVYTO7YzNkpUVLLx3+Od024C+FKN yFgvuwMHUoPhHHG95iW4SBQ4RvT7EyTFB6HDyDzk= Date: Wed, 4 Sep 2019 09:58:39 +0200 From: Greg KH To: Felipe Balbi Cc: Jacky.Cao@sony.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Alan Stern , Kento.A.Kobayashi@sony.com Subject: Re: [PATCH] USB: dummy-hcd: fix power budget for SuperSpeed mode Message-ID: <20190904075839.GA28042@kroah.com> References: <16EA1F625E922C43B00B9D82250220500871C862@APYOKXMS108.ap.sony.com> <87sgpcmr7v.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87sgpcmr7v.fsf@gmail.com> User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 04, 2019 at 10:54:28AM +0300, Felipe Balbi wrote: > > Hi, > > writes: > > > The power budget for SuperSpeed mode should be 900 mA > > according to USB3.0 specification, so set the power > > budget to 900 mA for dummy_start_ss which is only used > > for SuperSpeed mode. > > > > If the max power consumption of SuperSpeed device is > > larger than 500 mA, insufficient available bus power > > error happens in usb_choose_configuration function > > when the device connects to dummy hcd. > > > > Signed-off-by: Jacky Cao > > --- > > drivers/usb/gadget/udc/dummy_hcd.c | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/usb/gadget/udc/dummy_hcd.c b/drivers/usb/gadget/udc/dummy_hcd.c > > index 8414fac..52f2cf5 100644 > > --- a/drivers/usb/gadget/udc/dummy_hcd.c > > +++ b/drivers/usb/gadget/udc/dummy_hcd.c > > @@ -48,6 +48,7 @@ > > #define DRIVER_VERSION "02 May 2005" > > > > #define POWER_BUDGET 500 /* in mA; use 8 for low-power port testing */ > > +#define POWER_BUDGET_3_0 900 /* in mA */ > > > > static const char driver_name[] = "dummy_hcd"; > > static const char driver_desc[] = "USB Host+Gadget Emulator"; > > @@ -2432,7 +2433,7 @@ static int dummy_start_ss(struct dummy_hcd *dum_hcd) > > dum_hcd->rh_state = DUMMY_RH_RUNNING; > > dum_hcd->stream_en_ep = 0; > > INIT_LIST_HEAD(&dum_hcd->urbp_list); > > - dummy_hcd_to_hcd(dum_hcd)->power_budget = POWER_BUDGET; > > + dummy_hcd_to_hcd(dum_hcd)->power_budget = POWER_BUDGET_3_0; > > dummy_hcd_to_hcd(dum_hcd)->state = HC_STATE_RUNNING; > > dummy_hcd_to_hcd(dum_hcd)->uses_new_polling = 1; > > #ifdef CONFIG_USB_OTG > > Alan, I suppose you're okay with this change? I'm not ok with the whitespace damage making this patch impossible to apply :)