mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
usb: dwc3: gadget: fix the txfifo resize for isoc ep
The dwc3 driver sets the mult to 6 and alloc 0x307 * 8 Bytes for each isoc ep txfifo. It aims to improve isoc ep throughput, but it's wasteful. This patch sets the mult to dep->endpoint.mult * 2 for each isoc ep, it's enough to improve isoc ep throughput, and it can avoid exceeding the total size of txfifo if multiple isoc eps are used at the same time. Change-Id: I01d77d19b85e5f5930ff94ef40714129afe10b54 Signed-off-by: William Wu <william.wu@rock-chips.com>
This commit is contained in:
@@ -185,10 +185,14 @@ static int dwc3_gadget_resize_tx_fifos(struct dwc3 *dwc)
|
||||
if (!(dep->flags & DWC3_EP_ENABLED))
|
||||
continue;
|
||||
|
||||
if (usb_endpoint_xfer_bulk(dep->endpoint.desc))
|
||||
if (usb_endpoint_xfer_bulk(dep->endpoint.desc)) {
|
||||
mult = 3;
|
||||
else if (usb_endpoint_xfer_isoc(dep->endpoint.desc))
|
||||
mult = 6;
|
||||
} else if (usb_endpoint_xfer_isoc(dep->endpoint.desc)) {
|
||||
if (dep->endpoint.mult > 0)
|
||||
mult = dep->endpoint.mult * 2;
|
||||
else
|
||||
mult = 3;
|
||||
}
|
||||
|
||||
/*
|
||||
* REVISIT: the following assumes we will always have enough
|
||||
|
||||
Reference in New Issue
Block a user