diff options
author | Minas Harutyunyan <minas.harutyunyan@synopsys.com> | 2019-01-31 18:28:07 +0400 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2019-02-07 13:14:51 +0200 |
commit | 97311c8f8b6e26d5ba6508f0df430ad80fc59327 (patch) | |
tree | dab14469605fa1f65d4d94a6801f7ab29932dc88 /drivers/usb/dwc2 | |
parent | 836bcab50624d728abeab3766f356d54c48ea1b1 (diff) |
usb: dwc2: Fix EP TxFIFO number setting
In case when some EP IN is frequently reused, i.e. enabled/disabled by
function driver. It is required to clear TxFIFO number field in DIEPCTL
register before setting new number. Otherwise there is probability to
have same TxFIFO number for different EP's because of OR operator.
Signed-off-by: Minas Harutyunyan <hminas@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/dwc2')
-rw-r--r-- | drivers/usb/dwc2/gadget.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index 55ef3cc2701b..e15d8a462085 100644 --- a/drivers/usb/dwc2/gadget.c +++ b/drivers/usb/dwc2/gadget.c @@ -4005,6 +4005,7 @@ static int dwc2_hsotg_ep_enable(struct usb_ep *ep, ret = -ENOMEM; goto error1; } + epctrl &= ~(DXEPCTL_TXFNUM_LIMIT << DXEPCTL_TXFNUM_SHIFT); hsotg->fifo_map |= 1 << fifo_index; epctrl |= DXEPCTL_TXFNUM(fifo_index); hs_ep->fifo_index = fifo_index; |