[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87sgpcmr7v.fsf@gmail.com>
Date: Wed, 04 Sep 2019 10:54:28 +0300
From: Felipe Balbi <balbi@...nel.org>
To: Jacky.Cao@...y.com, gregkh@...uxfoundation.org,
linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
Alan Stern <stern@...land.harvard.edu>
Cc: Kento.A.Kobayashi@...y.com, Jacky.Cao@...y.com
Subject: Re: [PATCH] USB: dummy-hcd: fix power budget for SuperSpeed mode
Hi,
<Jacky.Cao@...y.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@...y.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
Download attachment "signature.asc" of type "application/pgp-signature" (833 bytes)
Powered by blists - more mailing lists