linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@kernel.org>
To: Jacky.Cao@sony.com, gregkh@linuxfoundation.org,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	Alan Stern <stern@rowland.harvard.edu>
Cc: Kento.A.Kobayashi@sony.com, Jacky.Cao@sony.com
Subject: Re: [PATCH] USB: dummy-hcd: fix power budget for SuperSpeed mode
Date: Wed, 04 Sep 2019 10:54:28 +0300	[thread overview]
Message-ID: <87sgpcmr7v.fsf@gmail.com> (raw)
In-Reply-To: <16EA1F625E922C43B00B9D82250220500871C862@APYOKXMS108.ap.sony.com>

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


Hi,

<Jacky.Cao@sony.com> 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 <Jacky.Cao@sony.com>
> ---
> 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?

-- 
balbi

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  reply	other threads:[~2019-09-04  7:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-04  7:52 [PATCH] USB: dummy-hcd: fix power budget for SuperSpeed mode Jacky.Cao
2019-09-04  7:54 ` Felipe Balbi [this message]
2019-09-04  7:58   ` Greg KH
2019-09-04  8:52     ` Jacky.Cao
2019-09-04 10:01       ` Greg KH
2019-09-04 14:21   ` Alan Stern
2019-09-05  4:18     ` Jacky.Cao
     [not found] <16EA1F625E922C43B00B9D82250220500871C7D7@APYOKXMS108.ap.sony.com>
2019-09-04  7:46 ` Felipe Balbi
2019-09-04  7:54   ` Jacky.Cao
     [not found] <16EA1F625E922C43B00B9D8225022050086ECF6A@APYOKXMS108.ap.sony.com>
     [not found] ` <16EA1F625E922C43B00B9D8225022050086F86B4@APYOKXMS108.ap.sony.com>
2019-09-04  6:12   ` Kobayashi, Kento (Sony)
2019-09-04  6:19     ` Felipe Balbi
2019-09-04  6:57       ` Kobayashi, Kento (Sony)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sgpcmr7v.fsf@gmail.com \
    --to=balbi@kernel.org \
    --cc=Jacky.Cao@sony.com \
    --cc=Kento.A.Kobayashi@sony.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).