tty: serial: atmel: Check return code of dmaengine_submit()
stable inclusion from stable-v5.10.94 commit 755a6c873b9c2e092ab6055cd116b1d8228ac34b bugzilla: https://gitee.com/openeuler/kernel/issues/I531X9 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=755a6c873b9c2e092ab6055cd116b1d8228ac34b -------------------------------- [ Upstream commit 1e67bd2b ] The tx_submit() method of struct dma_async_tx_descriptor is entitled to do sanity checks and return errors if encountered. It's not the case for the DMA controller drivers that this client is using (at_h/xdmac), because they currently don't do sanity checks and always return a positive cookie at tx_submit() method. In case the controller drivers will implement sanity checks and return errors, print a message so that the client will be informed that something went wrong at tx_submit() level. Fixes: 08f738be ("serial: at91: add tx dma support") Signed-off-by: NTudor Ambarus <tudor.ambarus@microchip.com> Acked-by: NRichard Genoud <richard.genoud@gmail.com> Link: https://lore.kernel.org/r/20211125090028.786832-3-tudor.ambarus@microchip.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com> Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
Showing
想要评论请 注册 或 登录