summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorPeter Chen <peter.chen@nxp.com>2020-09-10 12:11:30 +0300
committerFelipe Balbi <balbi@kernel.org>2020-10-02 09:57:46 +0300
commit71ea88f6652a52f85b2110486ca99d26b71a3d8d (patch)
treea16fbe1118d1e7a1d57287d44b0c47d953382b48 /drivers/usb
parentd6be7c94f9f80fdb64d896b89657ebc9ed96e3ed (diff)
downloadlinux-71ea88f6652a52f85b2110486ca99d26b71a3d8d.tar.xz
usb: cdns3: gadget: enlarge the TRB ring length
At Android ADB and MTP use case, it uses f_fs which supports scatter list, it means one request may need several TRBs for it. Besides, TRB consumes very fast compared to TRB has prepared for above use case, there are at most 120 pending requests, the date size is 16KB for each request, so four TRBs (4KB per TRB) per sg entry at worst case. so we need to enlarge the TRB ring length to avoid "no free TRB error". Since each TRB only consumes 12 bytes (3 * 32 bits), we enlarge the TRB length to 600, it leaves some buffers for potential "no free TRB error", and only increases a little memory cost. Signed-off-by: Peter Chen <peter.chen@nxp.com> Signed-off-by: Felipe Balbi <balbi@kernel.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/cdns3/gadget.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/cdns3/gadget.h b/drivers/usb/cdns3/gadget.h
index 9f8bd452847e..1ccecd237530 100644
--- a/drivers/usb/cdns3/gadget.h
+++ b/drivers/usb/cdns3/gadget.h
@@ -966,7 +966,7 @@ struct cdns3_usb_regs {
/*
* USBSS-DEV DMA interface.
*/
-#define TRBS_PER_SEGMENT 40
+#define TRBS_PER_SEGMENT 600
#define ISO_MAX_INTERVAL 10