linux_dsm_epyc7002/drivers/tty/serial/8250
Sebastian Andrzej Siewior 0fcb7901f9 tty: serial: 8250_dma: keep own book keeping about RX transfers
After dmaengine_terminate_all() has been invoked then both DMA drivers
(edma and omap-dma) do not invoke dma_cookie_complete() to mark the
transfer as complete. This dma_cookie_complete() is performed by the
Synopsys DesignWare driver which is probably the only one that is used
by omap8250-dma and hence don't see following problem…
…which is that once a RX transfer has been terminated then following
query of channel status reports DMA_IN_PROGRESS (again: the actual
transfer has been canceled, there is nothing going on anymore).

This means that serial8250_rx_dma() never enqueues another DMA transfer
because it (wrongly) assumes that there is a transer already pending.

Vinod Koul refuses to accept a patch which adds this
dma_cookie_complete() to both drivers and so dmaengine_tx_status() would
report DMA_COMPLETE instead (and behave like the Synopsys DesignWare
driver already does). He argues that I am not allowed to use the cookie
to query the status and that the driver already cleaned everything up after
the invokation of dmaengine_terminate_all().

To end this I add a bookkeeping whether or not a RX-transfer has been
started to the 8250-dma code. It has already been done for the TX side.
*Now* we learn about the RX status based on our bookkeeping and don't
need dmaengine_tx_status() for this anymore.

Cc: vinod.koul@intel.com
Reviewed-by: Tony Lindgren <tony@atomide.com>
Tested-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Reviewed-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-05 19:05:13 -08:00
..
8250_accent.c
8250_acorn.c tty: remove use of __devexit 2012-11-21 15:27:46 -08:00
8250_boca.c
8250_core.c tty: serial: 8250_dma: handle error on TX submit 2014-11-05 19:05:13 -08:00
8250_dma.c tty: serial: 8250_dma: keep own book keeping about RX transfers 2014-11-05 19:05:13 -08:00
8250_dw.c Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma 2014-10-18 18:11:04 -07:00
8250_early.c tty/serial: fix 8250 early console option passing to regular console 2014-06-19 13:07:26 -07:00
8250_em.c tty: delete non-required instances of include <linux/init.h> 2014-01-07 17:05:21 -08:00
8250_exar_st16c554.c
8250_fintek.c serial: Add support for Fintek F81216A LPC to 4 UART 2014-09-08 15:26:26 -07:00
8250_fourport.c
8250_fsl.c serial: 8250: introduce up_to_u8250p() helper 2014-07-17 18:16:23 -07:00
8250_gsc.c parisc: Fix interrupt routing for C8000 serial ports 2013-07-31 23:42:32 +02:00
8250_hp300.c serial: 8250_hp300: trivial: fix symbol name in #warning message 2014-09-08 16:03:47 -07:00
8250_hub6.c
8250_mtk.c tty: serial: 8250: Add Mediatek UART driver 2014-09-10 06:59:41 -07:00
8250_omap.c tty: serial: Add 8250-core based omap driver 2014-11-05 19:05:13 -08:00
8250_pci.c 8250_pci: Added driver for Endrun Technologies PTP PCIe card. 2014-11-05 16:36:01 -08:00
8250_pnp.c tty: delete non-required instances of include <linux/init.h> 2014-01-07 17:05:21 -08:00
8250.h tty: serial: 8250_dma: keep own book keeping about RX transfers 2014-11-05 19:05:13 -08:00
Kconfig tty: serial: Add 8250-core based omap driver 2014-11-05 19:05:13 -08:00
Makefile tty: serial: Add 8250-core based omap driver 2014-11-05 19:05:13 -08:00
serial_cs.c tty: delete non-required instances of include <linux/init.h> 2014-01-07 17:05:21 -08:00