tty: serial: msm: Don't read off end of tx fifo
For dm uarts in pio mode tx data is transferred to the fifo register 4 bytes at a time, but care is not taken when these 4 bytes spans the end of the xmit buffer so the loop might read up to 3 bytes past the buffer and then skip the actual data at the beginning of the buffer. Fix this by, analogous to the DMA case, make sure the chunk doesn't wrap the xmit buffer. Fixes: 3a878c43 ("tty: serial: msm: Add TX DMA support") Cc: Ivan Ivanov <iivanov.xz@gmail.com> Cc: stable@vger.kernel.org Reported-by: NFrank Rowand <frowand.list@gmail.com> Reported-by: NNicolas Dechesne <nicolas.dechesne@linaro.org> Signed-off-by: NBjorn Andersson <bjorn.andersson@linaro.org> Acked-by: NAndy Gross <andy.gross@linaro.org> Tested-by: NFrank Rowand <frank.rowand@am.sony.com> Reviewed-by: NStephen Boyd <sboyd@codeaurora.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Showing
想要评论请 注册 或 登录