Loading drivers/usb/dwc3/gadget.c +5 −7 Original line number Diff line number Diff line Loading @@ -204,7 +204,7 @@ void dwc3_ep_inc_deq(struct dwc3_ep *dep) int dwc3_gadget_resize_tx_fifos(struct dwc3 *dwc, struct dwc3_ep *dep) { int fifo_size, mdwidth, max_packet = 1024; int tmp, mult = 1, size; int tmp, mult = 1, fifo_0_start; if (!dwc->needs_fifo_resize || !dwc->tx_fifo_size) return 0; Loading Loading @@ -239,13 +239,11 @@ int dwc3_gadget_resize_tx_fifos(struct dwc3 *dwc, struct dwc3_ep *dep) fifo_size = DIV_ROUND_UP(tmp, mdwidth); dep->fifo_depth = fifo_size; size = dwc3_readl(dwc->regs, DWC3_GTXFIFOSIZ(0)); if (dwc3_is_usb31(dwc)) size = DWC31_GTXFIFOSIZ_TXFDEF(size); else size = DWC3_GTXFIFOSIZ_TXFDEF(size); /* Check if TXFIFOs start at non-zero addr */ tmp = dwc3_readl(dwc->regs, DWC3_GTXFIFOSIZ(0)); fifo_0_start = DWC3_GTXFIFOSIZ_TXFSTADDR(tmp); fifo_size |= (size + (dwc->last_fifo_depth << 16)); fifo_size |= (fifo_0_start + (dwc->last_fifo_depth << 16)); if (dwc3_is_usb31(dwc)) dwc->last_fifo_depth += DWC31_GTXFIFOSIZ_TXFDEF(fifo_size); else Loading Loading
drivers/usb/dwc3/gadget.c +5 −7 Original line number Diff line number Diff line Loading @@ -204,7 +204,7 @@ void dwc3_ep_inc_deq(struct dwc3_ep *dep) int dwc3_gadget_resize_tx_fifos(struct dwc3 *dwc, struct dwc3_ep *dep) { int fifo_size, mdwidth, max_packet = 1024; int tmp, mult = 1, size; int tmp, mult = 1, fifo_0_start; if (!dwc->needs_fifo_resize || !dwc->tx_fifo_size) return 0; Loading Loading @@ -239,13 +239,11 @@ int dwc3_gadget_resize_tx_fifos(struct dwc3 *dwc, struct dwc3_ep *dep) fifo_size = DIV_ROUND_UP(tmp, mdwidth); dep->fifo_depth = fifo_size; size = dwc3_readl(dwc->regs, DWC3_GTXFIFOSIZ(0)); if (dwc3_is_usb31(dwc)) size = DWC31_GTXFIFOSIZ_TXFDEF(size); else size = DWC3_GTXFIFOSIZ_TXFDEF(size); /* Check if TXFIFOs start at non-zero addr */ tmp = dwc3_readl(dwc->regs, DWC3_GTXFIFOSIZ(0)); fifo_0_start = DWC3_GTXFIFOSIZ_TXFSTADDR(tmp); fifo_size |= (size + (dwc->last_fifo_depth << 16)); fifo_size |= (fifo_0_start + (dwc->last_fifo_depth << 16)); if (dwc3_is_usb31(dwc)) dwc->last_fifo_depth += DWC31_GTXFIFOSIZ_TXFDEF(fifo_size); else Loading