From: Cheng Lu Date: Wed, 24 Mar 2021 14:11:13 +0800 Subject: [PATCH] usb: dwc2: Set max xfer length to speed up R/W Message-ID: <20210324061113.1705392-1-Cheng.Lu@synaptics.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Set transfer length to the maximum (65535 * 512) Bytes of SCSI READ(10) and WRITE(10) commands, while default transfer length is (20 * 512) Bytes Signed-off-by: Cheng Lu Cc: --- drivers/usb/host/dwc2.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/usb/host/dwc2.c b/drivers/usb/host/dwc2.c index f1d13b1c1d..936d7ceb5f 100644 --- a/drivers/usb/host/dwc2.c +++ b/drivers/usb/host/dwc2.c @@ -1456,10 +1456,17 @@ static int dwc2_usb_remove(struct udevice *dev) return 0; } +static int dwc2_get_max_xfer_size(struct udevice *dev, size_t *size) +{ + *size = SIZE_MAX; + return 0; +} + struct dm_usb_ops dwc2_usb_ops = { .control = dwc2_submit_control_msg, .bulk = dwc2_submit_bulk_msg, .interrupt = dwc2_submit_int_msg, + .get_max_xfer_size = dwc2_get_max_xfer_size, }; static const struct udevice_id dwc2_usb_ids[] = { -- 2.25.1