Skip to content

Commit 72ca0ab

Browse files
krzkgregkh
authored andcommitted
serial: samsung: Continue to work if DMA request fails
commit f98c7bce570bdbe344b74ff5daa7dfeef3f22929 upstream. If DMA is not available (even when configured in DeviceTree), the driver will fail the startup procedure thus making serial console not available. For example this causes boot failure on QEMU ARMv7 (Exynos4210, SMDKC210): [    1.302575] OF: amba_device_add() failed (-19) for /amba/pdma@12680000 ... [   11.435732] samsung-uart 13800000.serial: DMA request failed [   72.963893] samsung-uart 13800000.serial: DMA request failed [   73.143361] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000000 DMA is not necessary for serial to work, so continue with UART startup after emitting a warning. Fixes: 62c37ee ("serial: samsung: add dma reqest/release functions") Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 72bb2b9 commit 72ca0ab

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

drivers/tty/serial/samsung.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1030,8 +1030,10 @@ static int s3c64xx_serial_startup(struct uart_port *port)
10301030
if (ourport->dma) {
10311031
ret = s3c24xx_serial_request_dma(ourport);
10321032
if (ret < 0) {
1033-
dev_warn(port->dev, "DMA request failed\n");
1034-
return ret;
1033+
dev_warn(port->dev,
1034+
"DMA request failed, DMA will not be used\n");
1035+
devm_kfree(port->dev, ourport->dma);
1036+
ourport->dma = NULL;
10351037
}
10361038
}
10371039

0 commit comments

Comments
 (0)