[Blackfin] serial driver: Fix bug Free rx dma buffer in shutdown.
authorSonic Zhang <sonic.zhang@analog.com>
Fri, 21 Dec 2007 09:03:39 +0000 (17:03 +0800)
committerBryan Wu <cooloney@kernel.org>
Fri, 21 Dec 2007 09:03:39 +0000 (17:03 +0800)
Kernel crash for the serial driver in DMA mode:
http://blackfin.uclinux.org/gf/project/uclinux-dist/tracker/?action=TrackerItemEdit&tracker_item_id=3679

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
drivers/serial/bfin_5xx.c

index 3a2aa7e277fa476379b2bf0b5c0fc2614f600b80..838f491c8deb683964e1b912477e017dd5ea5969 100644 (file)
@@ -704,6 +704,7 @@ static void bfin_serial_shutdown(struct uart_port *port)
        disable_dma(uart->rx_dma_channel);
        free_dma(uart->rx_dma_channel);
        del_timer(&(uart->rx_dma_timer));
+       dma_free_coherent(NULL, PAGE_SIZE, uart->rx_dma_buf.buf, 0);
 #else
 #ifdef CONFIG_KGDB_UART
        if (uart->port.line != CONFIG_KGDB_UART_PORT)