From: Lucas Stach <l.stach@pengutronix.de>
To: "Robin Gong" <yibin.gong@nxp.com>,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Andy Duan <fugang.duan@nxp.com>,
"linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
dl-linux-imx <linux-imx@nxp.com>,
"kernel@pengutronix.de" <kernel@pengutronix.de>,
"jslaby@suse.com" <jslaby@suse.com>
Subject: Re: [PATCH v1] tty: serial: imx: enable IDDMAEN for the last tail data
Date: Thu, 20 Sep 2018 11:39:36 +0200 [thread overview]
Message-ID: <1537436376.3362.159.camel@pengutronix.de> (raw)
In-Reply-To: <VI1PR04MB45432291716B64380C1B90DD89130@VI1PR04MB4543.eurprd04.prod.outlook.com>
Am Donnerstag, den 20.09.2018, 08:39 +0000 schrieb Robin Gong:
> > -----Original Message-----
> > From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > Sent: 2018年9月20日 15:55
> > To: Robin Gong <yibin.gong@nxp.com>
> > Cc: jslaby@suse.com; Andy Duan <fugang.duan@nxp.com>;
> > linux-serial@vger.kernel.org; linux-kernel@vger.kernel.org; dl-
> > linux-imx
> > <linux-imx@nxp.com>; 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
next prev parent reply other threads:[~2018-09-20 9:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-20 15:26 [PATCH v1] tty: serial: imx: enable IDDMAEN for the last tail data Robin Gong
2018-09-20 7:55 ` Uwe Kleine-König
2018-09-20 8:39 ` Robin Gong
2018-09-20 9:39 ` Lucas Stach [this message]
2018-09-20 10:33 ` Andy Duan
2018-09-20 10:42 ` Lucas Stach
2018-09-20 10:54 ` Andy Duan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1537436376.3362.159.camel@pengutronix.de \
--to=l.stach@pengutronix.de \
--cc=fugang.duan@nxp.com \
--cc=jslaby@suse.com \
--cc=kernel@pengutronix.de \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=u.kleine-koenig@pengutronix.de \
--cc=yibin.gong@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).