patch "USB: dummy-hcd: fix power budget for SuperSpeed mode" added to usb-linus
Subsystems (2)
This is a note to let you know that I've just added the patch titled
USB: dummy-hcd: fix power budget for SuperSpeed mode
to my usb git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
in the usb-linus branch.
The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)
The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.
If you have any questions about this process, please let me know.
From 2636d49b64671d3d90ecc4daf971b58df3956519 Mon Sep 17 00:00:00 2001
From: "[email protected]" <[email protected]>
Date: Thu, 5 Sep 2019 04:11:57 +0000
Subject: USB: dummy-hcd: fix power budget for SuperSpeed mode
The power budget for SuperSpeed mode should be 900 mA according to USB specification, so set the power budget to 900mA 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.
--- drivers/usb/gadget/udc/dummy_hcd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/usb/gadget/udc/dummy_hcd.c +2 -1
@@ -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 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 ;dummy_hcd_to_hcd (dum_hcd)->state =HC_STATE_RUNNING ;dummy_hcd_to_hcd (dum_hcd)->uses_new_polling =1 ;#ifdef CONFIG_USB_OTG
Signature · 1 line
2.23.0