mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 11:50:43 +09:00
usb: dwc3: gadget: fix fifo number for txfifo resize
If the dep resoure is assigned to an EP-IN, and the EP-IN
has not yet be enabled, we need to increase the fifo number
rather than skip out directly.
Fixes: 49b5c0d29f ("usb: dwc3: gadget: fix ep init for unequal num of in/out eps")
Change-Id: I6d45f859edda52542d421e1711138f69050dd90f
Signed-off-by: William Wu <william.wu@rock-chips.com>
This commit is contained in:
@@ -180,10 +180,14 @@ static int dwc3_gadget_resize_tx_fifos(struct dwc3 *dwc)
|
||||
int tmp;
|
||||
|
||||
/* Skip out endpoints */
|
||||
if (!dep || !dep->direction ||
|
||||
!(dep->flags & DWC3_EP_ENABLED))
|
||||
if (!dep || !dep->direction)
|
||||
continue;
|
||||
|
||||
if (!(dep->flags & DWC3_EP_ENABLED)) {
|
||||
fifo_number++;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (usb_endpoint_xfer_bulk(dep->endpoint.desc)) {
|
||||
mult = 3;
|
||||
} else if (usb_endpoint_xfer_isoc(dep->endpoint.desc)) {
|
||||
|
||||
Reference in New Issue
Block a user