aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhulianqin <hulianqin@vivo.corp-partner.google.com>2024-05-12 20:25:02 +0800
committerLianqin Hu <hulianqin@vivo.corp-partner.google.com>2024-05-17 02:31:16 +0000
commitfd07886c72df4e66fb98593141d2db2b5b6f1f0e (patch)
tree7c3257f08acad5a29f83fff0219a2600e23530c8
parent4399b7da1b982b5ac5b245b08b1dc269fc734b65 (diff)
downloadhikey-linaro-mirror-android13-5.10.tar.gz
ANDROID: usb: Optimize the problem of slow transfer rate in USB accessory modemirror-android13-5.10
The data transfer rate using Google Restore in USB3.2 mode is slower, only about 140MB/s at 5Gbps. The bMaxBurst is not set, and num_fifos in dwc3_gadget_resize_tx_fifosis 1, which results in only 131btye of dwc3 ram space being allocated to ep. Modify bMaxBurst to 6. The 5Gbps rate increases from 140MB/s to 350MB/s. The 10Gbps rate is increased from 220MB/s to 500MB/s. Bug: 340049583 BUG: 341178033 Change-Id: I5710af32c72d0b57afaecc00c4f0909af4b9a299 Signed-off-by: Lianqin Hu <hulianqin@vivo.corp-partner.google.com> Signed-off-by: Lianqin Hu <hulianqin@vivo.com> (cherry picked from commit 23f2a9f5f13426263f557ff67ce8f4e3f7965d12) Signed-off-by: Lianqin Hu <hulianqin@vivo.com>
-rw-r--r--drivers/usb/gadget/function/f_accessory.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/gadget/function/f_accessory.c b/drivers/usb/gadget/function/f_accessory.c
index ce7814c22057..9a4aec8dbaf0 100644
--- a/drivers/usb/gadget/function/f_accessory.c
+++ b/drivers/usb/gadget/function/f_accessory.c
@@ -171,7 +171,7 @@ static struct usb_ss_ep_comp_descriptor acc_superspeedplus_comp_desc = {
.bDescriptorType = USB_DT_SS_ENDPOINT_COMP,
/* the following 2 values can be tweaked if necessary */
- /* .bMaxBurst = 0, */
+ .bMaxBurst = 6,
/* .bmAttributes = 0, */
};
@@ -196,7 +196,7 @@ static struct usb_ss_ep_comp_descriptor acc_superspeed_comp_desc = {
.bDescriptorType = USB_DT_SS_ENDPOINT_COMP,
/* the following 2 values can be tweaked if necessary */
- /* .bMaxBurst = 0, */
+ .bMaxBurst = 6,
/* .bmAttributes = 0, */
};