Revert "serial: tegra: Use tegra_dma_cancel() to abort request"
Pradeep Kumar [Fri, 11 May 2012 06:24:05 +0000 (11:24 +0530)]
BT Filetransfer have some issue.
This reverts commit e8c243d5d09d1a552b66df7a8a0a0313047ebbac.

Bug 982630

Change-Id: I6e76d44e076874569518fa881e427918d3e546f2
Signed-off-by: Pradeep Kumar <pgoudagunta@nvidia.com>
Reviewed-on: http://git-master/r/101914
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit

drivers/tty/serial/tegra_hsuart.c

index 405886f..612e2bb 100644 (file)
@@ -156,14 +156,6 @@ static inline void uart_writeb(struct tegra_uart_port *t, u8 val,
        writeb(val, t->uport.membase + (reg << t->uport.regshift));
 }
 
-static void cancel_dma(struct tegra_dma_channel *dma_chan,
-       struct tegra_dma_req *req)
-{
-       tegra_dma_cancel(dma_chan);
-       if (req->status == -TEGRA_DMA_REQ_ERROR_ABORTED)
-               req->complete(req);
-}
-
 static inline void uart_writel(struct tegra_uart_port *t, u32 val,
        unsigned long reg)
 {
@@ -353,7 +345,7 @@ static void do_handle_rx_dma(struct tegra_uart_port *t)
        struct uart_port *u = &t->uport;
        if (t->rts_active)
                set_rts(t, false);
-       cancel_dma(t->rx_dma, &t->rx_dma_req);
+       tegra_dma_dequeue_req(t->rx_dma, &t->rx_dma_req);
        tty_flip_buffer_push(u->state->port.tty);
        /* enqueue the request again */
        tegra_start_dma_rx(t);
@@ -629,7 +621,7 @@ static void tegra_stop_rx(struct uart_port *u)
                t->rx_in_progress = 0;
 
                if (t->use_rx_dma && t->rx_dma)
-                       cancel_dma(t->rx_dma, &t->rx_dma_req);
+                       tegra_dma_dequeue_req(t->rx_dma, &t->rx_dma_req);
                else
                        do_handle_rx_pio(t);
 
@@ -1078,7 +1070,7 @@ static void tegra_stop_tx(struct uart_port *u)
        t = container_of(u, struct tegra_uart_port, uport);
 
        if (t->use_tx_dma)
-               cancel_dma(t->tx_dma, &t->tx_dma_req);
+               tegra_dma_dequeue_req(t->tx_dma, &t->tx_dma_req);
 
        return;
 }
@@ -1364,7 +1356,7 @@ static void tegra_flush_buffer(struct uart_port *u)
        t->tx_bytes = 0;
 
        if (t->use_tx_dma) {
-               cancel_dma(t->tx_dma, &t->tx_dma_req);
+               tegra_dma_dequeue_req(t->tx_dma, &t->tx_dma_req);
                t->tx_dma_req.size = 0;
        }
        return;