linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: u.kleine-koenig@pengutronix.de (Uwe Kleine-König)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 0/6] serial: imx: handshaking fixes and improvments
Date: Tue, 12 Apr 2016 12:58:56 +0200	[thread overview]
Message-ID: <20160412105856.GR10108@pengutronix.de> (raw)
In-Reply-To: <20160412094846.GF26941@ibawizard.net>

Hello Petr,

On Tue, Apr 12, 2016 at 11:48:46AM +0200, Petr ?tetiar wrote:
> Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de> [2016-04-12 09:46:22]:
> > On Mon, Apr 11, 2016 at 06:01:28PM +0200, Petr ?tetiar wrote:
> > > Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de> [2016-03-24 14:24:19]:
> > > 
> > > > Among others it made my i.MX25 stuck when the other side toggles DCD.
> > > > The first 4 patches are fixes that I'd like to see in 4.6-rcX, the last two
> > > > patches are merge window material.
> > > 
> > > just FYI, my i.MX6 board has stopped booting over NFS on 4.6-rc1 and I've just
> > > bisected it down to the commit "serial: imx: repair and complete handshaking"
> > > 90ebc48386, it's leading to the following CPU stall:
> > 
> > hmm, I'm confused (because I don't understand it) and something between
> > happy and sad (because both 90ebc48386 and the series that fixes it are
> > mine).
> 
> I don't know what's going on, probably something related to the serial IRQs?
> 
> > This is an i.MX6 Solo (i.e. only one cpu)?
> 
> This is i.MX6 Quad, Toradex Apalis Ixora (imx6q-apalis-ixora.dts).
> 
> > Which patch fixes your problem?
> 
> First 3 patches:
> 
>   [v2,1/6] serial: imx: fix polarity of RI
>   [v2,2/6] serial: imx: let irq handler return IRQ_NONE if no event was handled
>   [v2,3/6] serial: imx: make sure unhandled irqs are disabled
> 
> > Is it enough to revert just the last hunk of 90ebc48386?
> 
> Yes, this fixes it also:
> 
> 	diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
> 	index 231e7d5..dab081c 100644
> 	--- a/drivers/tty/serial/imx.c
> 	+++ b/drivers/tty/serial/imx.c
> 	@@ -827,11 +827,6 @@ static void imx_set_mctrl(struct uart_port *port, unsigned int mctrl)
> 			writel(temp, sport->port.membase + UCR2);
> 		}
> 	 
> 	-       temp = readl(sport->port.membase + UCR3) & ~UCR3_DSR;
> 	-       if (!(mctrl & TIOCM_DTR))
> 	-               temp |= UCR3_DSR;
> 	-       writel(temp, sport->port.membase + UCR3);
> 	-
> 		temp = readl(sport->port.membase + uts_reg(sport)) & ~UTS_LOOP;
> 		if (mctrl & TIOCM_LOOP)
> 			temp |= UTS_LOOP;
> 
> > Do you use fsl,dte-mode for the uart in question?
> 
> Yes, from imx6qdl-apalis.dtsi:
> 
> 	&uart1 {
> 		pinctrl-names = "default";
> 		pinctrl-0 = <&pinctrl_uart1_dte &pinctrl_uart1_ctrl>;
> 		fsl,dte-mode;
> 		fsl,uart-has-rtscts;
> 		status = "disabled";
> 	};

ok, so UFCR_DCEDTE is set and UCR3_DSR controls the DTR output as
intended. What is connected to the respective pin?
MX6QDL_PAD_EIM_D25__UART1_DSR_B I think is the one.

> > IMHO patches 1-4 should get applied before 4.6.
> 
> Ok, good, but this leaves 4.5 broken, right? Thanks.

Once they landed in 4.6-rc they can and probably should be backported
for stable, yes.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

  reply	other threads:[~2016-04-12 10:58 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-24 13:24 [PATCH v2 0/6] serial: imx: handshaking fixes and improvments Uwe Kleine-König
2016-03-24 13:24 ` [PATCH v2 1/6] serial: imx: fix polarity of RI Uwe Kleine-König
2016-03-24 13:24 ` [PATCH v2 2/6] serial: imx: let irq handler return IRQ_NONE if no event was handled Uwe Kleine-König
2016-03-24 13:24 ` [PATCH v2 3/6] serial: imx: make sure unhandled irqs are disabled Uwe Kleine-König
2016-03-24 13:24 ` [PATCH v2 4/6] serial: imx: only count 0->1 transitions for RNG Uwe Kleine-König
2016-03-24 13:24 ` [PATCH v2 5/6] serial: imx: reorder functions to simplify next patch Uwe Kleine-König
2016-03-24 13:24 ` [PATCH v2 6/6] serial: imx: implement DSR irq handling for DTE mode Uwe Kleine-König
     [not found]   ` <1470350663.26773.41.camel@googlemail.com>
2016-08-05  6:58     ` serial: imx: regression triggered by newly introduced DSR irq handling Uwe Kleine-König
2016-08-05 12:03       ` Christoph Fritz
2016-08-10 20:54         ` Fabio Estevam
2016-08-13 20:35           ` Christoph Fritz
2016-08-15  5:22             ` Uwe Kleine-König
2016-08-17  9:25               ` [PATCH] ARM: dts: imx6sx: document SION necessity of ENET1_REF_CLK1 Christoph Fritz
2016-08-17 14:26                 ` Fabio Estevam
2016-08-17 18:03                   ` Christoph Fritz
2016-08-22 15:08                 ` Christoph Fritz
2016-08-29  1:18                 ` Shawn Guo
2016-11-21 11:00       ` serial: imx: regression triggered by newly introduced DSR irq handling Christoph Fritz
2016-11-21 11:07         ` Uwe Kleine-König
2016-04-11 16:01 ` [PATCH v2 0/6] serial: imx: handshaking fixes and improvments Petr Štetiar
2016-04-12  7:46   ` Uwe Kleine-König
2016-04-12  9:48     ` Petr Štetiar
2016-04-12 10:58       ` Uwe Kleine-König [this message]
2016-04-12 12:17         ` Petr Štetiar
2016-04-12 17:30           ` Uwe Kleine-König
2016-04-13  9:13             ` Petr Štetiar
2016-04-13 11:16               ` Uwe Kleine-König

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=20160412105856.GR10108@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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).