Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752381Ab2BTIbY (ORCPT ); Mon, 20 Feb 2012 03:31:24 -0500 Received: from mail-iy0-f174.google.com ([209.85.210.174]:43667 "EHLO mail-iy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751794Ab2BTIbW (ORCPT ); Mon, 20 Feb 2012 03:31:22 -0500 MIME-Version: 1.0 In-Reply-To: References: Date: Mon, 20 Feb 2012 09:31:21 +0100 Message-ID: Subject: =?UTF-8?Q?Re=3A_=5BPATCH=5D_amba=2Dpl011=E2=80=8B=2Fdma=3A_Add_check_for_the_res?= =?UTF-8?Q?idue_in_DMA_callback?= From: Linus Walleij To: Chanho Min Cc: Russell King , Per Forlin , Alan Cox , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Rabin VINCENT Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 808 Lines: 20 On Mon, Feb 20, 2012 at 2:24 AM, Chanho Min wrote: > In DMA-operated uart, I found that rx data can be taken by the UART > interrupts during the DMA irq handler. pl011_int is occurred just > before it goes inside spin_lock_irq. When it returns to the callback, > DMA buffer already has been flushed. Then, pl011_dma_rx_chars gets > invalid data. So I add check for the residue as the patch bellow. > > Signed-off-by: Chanho Min Looks correct! Acked-by: Linus Walleij Thanks, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/