linux_dsm_epyc7002/drivers/usb/dwc2
Minas Harutyunyan 729cac693e usb: dwc2: Change ISOC DDMA flow
Changed existing two descriptor-chain flow to one chain.

In two-chain implementation BNA interrupt used for switching between
two chains. BNA interrupt asserted because of returning to
beginning of the chain based on L-bit of last descriptor.

Because of that we lose packets. This issue resolved by using one
desc-chain.

Removed all staff related to two desc-chain flow from
DDMA ISOC related functions.

Removed request length checking from dwc2_gadget_fill_isoc_desc()
function. Request length checking added to dwc2_hsotg_ep_queue()
function. If request length greater than descriptor limits then
request not added to queue. Additional checking done for High
Bandwidth ISOC OUT's which not supported by driver. In
dwc2_gadget_fill_isoc_desc() function also checked desc-chain
status (full or not) to avoid of reusing not yet processed
descriptors.

In dwc2_gadget_start_isoc_ddma() function creation of desc-chain
always started from descriptor 0. Before filling descriptors, they
were initialized by HOST BUSY status.

In dwc2_gadget_complete_isoc_request_ddma() added checking for
desc-chain rollover. Also added checking completion status.
Request completed successfully if DEV_DMA_STS is DEV_DMA_STS_SUCC,
otherwise complete with actual=0. For systems with high IRQ latency
added pointer compl_desc to next descriptor to be completed by
XferCompl interrupt. This pointer replace descriptor index calculation
based on DxEPDMA register. On descriptor completion interrupt
processing all descriptors starting from compl_desc till descriptor
which Buffer Status field not equal DMA_DONE status.

Actually removed dwc2_gadget_start_next_isoc_ddma() function because
now driver use only one desc-chain and instead that function added
dwc2_gadget_handle_isoc_bna() function for handling BNA interrupts.

Handling BNA interrupt done by flushing TxFIFOs for OUT EPs,
completing request with actual=0 and resetting desc-chain number and
target frame to initial values for restarting transfers.

On handling NAK request completed with actual=0. Incremented target
frame to allow fill desc chain and start transfers.
In DDMA mode avoided of frame number incrementing, because tracking
of frame number performed in dwc2_gadget_fill_isoc_desc() function.

When core assert XferCompl along with BNA, we should ignore XferCompl
in dwc2_hsotg_epint() function.

On BNA interrupt replaced dwc2_gadget_start_next_isoc_ddma() by above
mentioned BNA handler.

In dwc2_hsotg_ep_enable() function added sanity check of bInterval
for ISOC IN in DDMA mode, because HW doesn't supported EP's with
bInterval more than 10 and check for mc for ISOC OUT transfers,
because core doesn't support high bandwidth transfers.

Signed-off-by: Minas Harutyunyan <hminas@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2018-05-15 10:16:19 +03:00
..
core_intr.c usb: dwc2: Add dwc2_handle_gpwrdn_intr() handler 2018-03-13 10:47:57 +02:00
core.c usb: dwc2: Make dwc2_force_mode() static 2018-03-13 10:47:58 +02:00
core.h usb: dwc2: Change ISOC DDMA flow 2018-05-15 10:16:19 +03:00
debug.h USB: dwc2: Remove redundant license text 2017-11-07 15:45:01 +01:00
debugfs.c usb: dwc2: Rename hibernation to partial_power_down 2018-03-13 10:47:53 +02:00
gadget.c usb: dwc2: Change ISOC DDMA flow 2018-05-15 10:16:19 +03:00
hcd_ddma.c USB: add SPDX identifiers to all remaining files in drivers/usb/ 2017-11-04 11:48:02 +01:00
hcd_intr.c usb: dwc2: host: Don't retry NAKed transactions right away 2017-12-13 11:27:53 +02:00
hcd_queue.c usb: dwc2: host: Don't retry NAKed transactions right away 2017-12-13 11:27:53 +02:00
hcd.c usb: dwc2: fix spelling mistake: "genereted" -> "generated" 2018-03-14 11:00:26 +02:00
hcd.h usb: dwc2: Delete unused functionality 2018-03-13 10:47:42 +02:00
hw.h usb: dwc2: Rename GLPMCFG... definitions 2018-03-13 10:47:47 +02:00
Kconfig usb: add CONFIG_USB_PCI for system have both PCI HW and non-PCI based USB HW 2017-03-17 13:16:56 +09:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
params.c usb: changes for v4.17 merge window 2018-03-23 13:33:09 +01:00
pci.c usb: dwc2: pci: Handle error cleanup in probe 2018-03-13 10:47:45 +02:00
platform.c usb: dwc2: Force mode optimizations 2018-03-13 10:47:58 +02:00