linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tty/serial/pl011: don't print error msg if dmaengine_pause is not supported
@ 2011-04-18 11:22 Viresh Kumar
  2011-04-18 15:13 ` Russell King - ARM Linux
  2011-04-19  0:27 ` Linus Walleij
  0 siblings, 2 replies; 4+ messages in thread
From: Viresh Kumar @ 2011-04-18 11:22 UTC (permalink / raw)
  To: linux-arm-kernel

Few dma controller doesn't support dmaengine_pause() and return -ENXIO if
dmaengine_pause() is called for them. Error messages such as "unable to pause
DMA transfer" shouldn't be printed for them.

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
---
 drivers/tty/serial/amba-pl011.c |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
index 6deee4e..c0e1a42 100644
--- a/drivers/tty/serial/amba-pl011.c
+++ b/drivers/tty/serial/amba-pl011.c
@@ -755,18 +755,21 @@ static void pl011_dma_rx_irq(struct uart_amba_port *uap)
 	size_t pending;
 	struct dma_tx_state state;
 	enum dma_status dmastat;
+	int ret;
 
 	/*
 	 * Pause the transfer so we can trust the current counter,
 	 * do this before we pause the PL011 block, else we may
 	 * overflow the FIFO.
 	 */
-	if (dmaengine_pause(rxchan))
-		dev_err(uap->port.dev, "unable to pause DMA transfer\n");
+	ret = dmaengine_pause(rxchan);
+	if (ret && ret != -ENXIO)
+		dev_err(uap->port.dev, "unable to pause DMA transfer");
+
 	dmastat = rxchan->device->device_tx_status(rxchan,
-						   dmarx->cookie, &state);
-	if (dmastat != DMA_PAUSED)
-		dev_err(uap->port.dev, "unable to pause DMA transfer\n");
+			dmarx->cookie, &state);
+	if (ret != -ENXIO && dmastat != DMA_PAUSED)
+		dev_err(uap->port.dev, "unable to pause DMA transfer");
 
 	/* Disable RX DMA - incoming data will wait in the FIFO */
 	uap->dmacr &= ~UART011_RXDMAE;
-- 
1.7.2.2

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-04-19  6:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-18 11:22 [PATCH] tty/serial/pl011: don't print error msg if dmaengine_pause is not supported Viresh Kumar
2011-04-18 15:13 ` Russell King - ARM Linux
2011-04-19  6:07   ` viresh kumar
2011-04-19  0:27 ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).