Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1204237

Re: [PATCH 1/3] tty: serial: 8250_omap: do not use RX DMA if pause is not supported

From Peter Hurley <peter@hurleysoftware.com>
Newsgroups linux.kernel
Subject Re: [PATCH 1/3] tty: serial: 8250_omap: do not use RX DMA if pause is not supported
Date 2015-08-10 15:10 +0200
Message-ID <pVUZX-7d8-7@gated-at.bofh.it> (permalink)
References <pUW7L-1ta-13@gated-at.bofh.it> <pUW7L-1ta-19@gated-at.bofh.it> <pVTUe-5qn-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 08/10/2015 07:54 AM, Peter Ujfalusi wrote:
> On 08/07/2015 11:00 PM, Sebastian Andrzej Siewior wrote:

> I don't think this is good thing for the stable _and_ for the mainline at the
> same time:
> in stable the rx DMA should not be allowed since the stable kernels does not
> allow pause/resume with omap-dma, so there the rx DMA should be just disabled
> for UART. This change will cause regression since it introduce a WARN_ON_ONCE,
> which will be printed if the user tries to use non working feature.
> 
> In mainline you will eventually going to have pause/resume support so this
> patch will make no sense there.

No, the whole point of this mess is that omap-dma does not provide pause/resume
support (without data loss). omap-dma will only be suitable for pause/terminate dma.

And adding pause support doesn't address the underlying problem that dmaengine
is not providing a means of determining if suitable support is available for
use by serial drivers, so this same problem is just waiting to happen again.

I think the way forward is,

For -stable, disable dma in the 8250_omap driver.
Then for mainline,
* extend the dma_get_slave_caps() api to differentiate the types of pause support
* query dma_get_slave_caps() when setting up the slave channel in 8250_dma & 8250_omap
  and only enable dma if suitable pause support is available
* add required dmaengine error checking in 8250_dma & 8250_omap _for unexpected errors_
  (so _not_ WARNs)
* do whatever with omap-dma. Not even sure it's worth trying to support dma with that;
  it still won't fully support tx dma which is forcing all kinds of goofy workarounds


Russell seemed to think that the current dma operation was necessary information to
differentiate types of pause support, but I don't think that's required.
As Sebastian's omap-dma driver patch shows, partial pause support has more
to do with how it's being used.

Regards,
Peter Hurley
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

omap-dma + 8250_omap: fix the dmaengine_pause() Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2015-08-07 22:10 +0200
  [PATCH 1/3] tty: serial: 8250_omap: do not use RX DMA if pause is not supported Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2015-08-07 22:10 +0200
    Re: [PATCH 1/3] tty: serial: 8250_omap: do not use RX DMA if pause  is not supported Peter Hurley <peter@hurleysoftware.com> - 2015-08-08 02:30 +0200
      Re: [PATCH 1/3] tty: serial: 8250_omap: do not use RX DMA if pause  is not supported Russell King - ARM Linux <linux@arm.linux.org.uk> - 2015-08-08 11:10 +0200
        Re: [PATCH 1/3] tty: serial: 8250_omap: do not use RX DMA if pause  is not supported Vinod Koul <vinod.koul@intel.com> - 2015-08-11 12:00 +0200
      Re: [PATCH 1/3] tty: serial: 8250_omap: do not use RX DMA if pause  is not supported Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2015-08-08 11:40 +0200
        Re: [PATCH 1/3] tty: serial: 8250_omap: do not use RX DMA if pause  is not supported Russell King - ARM Linux <linux@arm.linux.org.uk> - 2015-08-08 12:00 +0200
        Re: [PATCH 1/3] tty: serial: 8250_omap: do not use RX DMA if pause  is not supported Greg KH <greg@kroah.com> - 2015-08-08 17:50 +0200
    Re: [PATCH 1/3] tty: serial: 8250_omap: do not use RX DMA if pause is  not supported Peter Ujfalusi <peter.ujfalusi@ti.com> - 2015-08-10 14:00 +0200
      Re: [PATCH 1/3] tty: serial: 8250_omap: do not use RX DMA if pause  is not supported Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2015-08-10 14:20 +0200
      Re: [PATCH 1/3] tty: serial: 8250_omap: do not use RX DMA if pause  is not supported Peter Hurley <peter@hurleysoftware.com> - 2015-08-10 15:10 +0200
        Re: [PATCH 1/3] tty: serial: 8250_omap: do not use RX DMA if pause  is not supported Russell King - ARM Linux <linux@arm.linux.org.uk> - 2015-08-10 19:20 +0200
  [PATCH v3 3/3] dma: omap-dma: add support for pause of non-cyclic transfers Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2015-08-07 22:10 +0200
    Re: [PATCH v3 3/3] dma: omap-dma: add support for pause of non-cyclic  transfers Peter Ujfalusi <peter.ujfalusi@ti.com> - 2015-08-11 14:10 +0200
      Re: [PATCH v3 3/3] dma: omap-dma: add support for pause of  non-cyclic transfers Russell King - ARM Linux <linux@arm.linux.org.uk> - 2015-08-11 14:40 +0200
        Re: [PATCH v3 3/3] dma: omap-dma: add support for pause of non-cyclic  transfers Peter Ujfalusi <peter.ujfalusi@ti.com> - 2015-08-11 14:50 +0200
  [PATCH 2/3] dma: add __must_check annotation for dmaengine_pause() Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2015-08-07 22:10 +0200
    Re: [PATCH 2/3] dma: add __must_check annotation for dmaengine_pause() Peter Hurley <peter@hurleysoftware.com> - 2015-08-08 02:50 +0200
    Re: [PATCH 2/3] dma: add __must_check annotation for  dmaengine_pause() Vinod Koul <vinod.koul@intel.com> - 2015-08-11 12:00 +0200
      Re: [PATCH 2/3] dma: add __must_check annotation for  dmaengine_pause() Russell King - ARM Linux <linux@arm.linux.org.uk> - 2015-08-11 12:10 +0200
        Re: [PATCH 2/3] dma: add __must_check annotation for dmaengine_pause() Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2015-08-11 14:40 +0200

csiph-web