Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1775273imm; Thu, 20 Sep 2018 02:41:27 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZZH2yEtMuHkM3HL/e475HcUbSHQ/yLo7QyGYbwWBFUMVG10dl3oIBCtvTAlys4KWnekIdZ X-Received: by 2002:a17:902:5617:: with SMTP id h23-v6mr38780917pli.324.1537436487696; Thu, 20 Sep 2018 02:41:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537436487; cv=none; d=google.com; s=arc-20160816; b=otWWI8xAbhxhwD0c/jONmvqMrCjk2s+WLcVLsxNNOlfFC4qyiO6OSOmRZQF2SviCss YcroBgx1MnM6PmQp9K8LuxBS6kjeMekynbuutp6vTR9beR+PxKeuPAm8xonzWcXPjM87 bk26aB6lHXBwATJfori09ZpBo3pNUkqdWzNzJlUDp7BgV9c3lz1HaqbNf0M+2d0PdU+w CqdCqR7Dr8IUKNc4FWcSvJmA5MCHyBICrbCcPUYGcZ7bae25AV0BHcQrU+iLhFlYALOq 0GOd7XnQNNXjkzDh1UrBJHQXHpx400deLzxzUapbGuW3qT/W2iB4wvtc3eRNTTtGxiyh IPEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=ozvP+HTxoBa65DVtUg5Nsu/JtOFftQtyH35aUWoKG/w=; b=UgDgzeDw20RY8ikBQiHJ0fjYQ+HEKeJCHL+0sv7tzyaqF7Whd5YtQ12gteDp+QxR+1 Xx3Sla/JlszQ1ueMxzV2dljaiN4z39jIJxmqM6e3rbqV9PIJ3QSSX6m2BKmOdAygFC5P Z/NDBH50UzFP8hj8dI7CZYThWCawPWLdZ62LxVqhfLiiELYuiAO60EvDVS6R5Wu/dD20 Yn/E6tV9+407ed5Ato5KEWOGwKBONhkYzg8IVjMIOh58coomZbTamFmOPq3GBMgteWKC W+w0WE7XTwLnRGhOq2MZqcWG3kLsBik9HSkSUTtPiQK7zjFX1FM7F/pmD+VFzjU2p0ts RTxA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w1-v6si24258965plq.352.2018.09.20.02.41.11; Thu, 20 Sep 2018 02:41:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732047AbeITPWR (ORCPT + 99 others); Thu, 20 Sep 2018 11:22:17 -0400 Received: from metis.ext.pengutronix.de ([85.220.165.71]:41921 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726903AbeITPWQ (ORCPT ); Thu, 20 Sep 2018 11:22:16 -0400 Received: from kresse.hi.pengutronix.de ([2001:67c:670:100:1d::2a]) by metis.ext.pengutronix.de with esmtp (Exim 4.89) (envelope-from ) id 1g2vQv-0007NM-EJ; Thu, 20 Sep 2018 11:39:37 +0200 Message-ID: <1537436376.3362.159.camel@pengutronix.de> Subject: Re: [PATCH v1] tty: serial: imx: enable IDDMAEN for the last tail data From: Lucas Stach To: Robin Gong , Uwe =?ISO-8859-1?Q?Kleine-K=F6nig?= Cc: Andy Duan , "linux-serial@vger.kernel.org" , "linux-kernel@vger.kernel.org" , dl-linux-imx , "kernel@pengutronix.de" , "jslaby@suse.com" Date: Thu, 20 Sep 2018 11:39:36 +0200 In-Reply-To: References: <1537457160-10792-1-git-send-email-yibin.gong@nxp.com> <20180920075513.6jqfbrrjax3sp4cn@pengutronix.de> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.6-1+deb9u1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::2a X-SA-Exim-Mail-From: l.stach@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am Donnerstag, den 20.09.2018, 08:39 +0000 schrieb Robin Gong: > > -----Original Message----- > > From: Uwe Kleine-König > > Sent: 2018年9月20日 15:55 > > To: Robin Gong > > Cc: jslaby@suse.com; Andy Duan ; > > linux-serial@vger.kernel.org; linux-kernel@vger.kernel.org; dl- > > linux-imx > > ; kernel@pengutronix.de > > Subject: Re: [PATCH v1] tty: serial: imx: enable IDDMAEN for the > > last tail data > > > > Hello, > > > > On Thu, Sep 20, 2018 at 11:26:00PM +0800, Robin Gong wrote: > > > enable IDDMAEN in UCR4 to let sdma script has the chance to > > > detect the > > > idle status and transfer the last tail data with the interrupt > > > notifying uart driver.Otherwise, the last dma done interrupt of > > > the > > > tail data in rxfifo whose size is less than watermark may never > > > be > > > received by uart driver. > > > > Is this a theoretic issue? Or does it fix a real problem? > > > > If the former I'd say UCR1_ATDMAEN being set should prevent this > > stall. > > It's a real fix, you will see 'timeout We read 0 byte' with the > attached stress test > running on i.mx7d or i.mx6 if no this patch applied.  > ' while [ 1 ]; do /unit_tests/UART/mxc_uart_stress_test.out > /dev/ttymxc5 2000000 D L 100 100 L; done &' > Please make sure dma enabled on ttymxcX for your test, and sdma > firmware setup in your rootfs  > /lib/firmware/imx/sdma/sdma-imx6q.bin or /lib/firmware/imx/sdma/sdma- > imx7d.bin. > You can get sdma firmware from below: > https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux- > firmware.git/tree/imx/sdma Please see commit 905c0decad28402aa166975023fb88c8f62f93c8 on why using the idle detect together with with SDMA is wrong. We don't want to re- introduce the broken behavior. Regards, Lucas