linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: balbi@ti.com, linux-serial@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	Vinod Koul <vinod.koul@intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Paul Walmsley <paul@pwsan.com>
Subject: Re: [PATCH 15/15] tty: serial: 8250: omap: add dma support
Date: Wed, 3 Sep 2014 10:48:46 -0700	[thread overview]
Message-ID: <20140903174845.GE11766@atomide.com> (raw)
In-Reply-To: <540745CC.2090901@linutronix.de>

* Sebastian Andrzej Siewior <bigeasy@linutronix.de> [140903 09:46]:
> On 09/02/2014 10:15 PM, Tony Lindgren wrote:
> >> - I see to face two kind of "deaths":
> >>   - the LED still goes on and off and the uart just does not respond
> >>     even if I tell the button print something on the screen (the button
> >>     also changes the frequency of the LED so I know that the button is
> >>     doing something).
> >>     Also from dumping the content of /proc/interrupts it seems that a
> >>     wake up is made, the uart should have restored the registers.
> > 
> > OK yeah this is the case I was seeing too. So do you just set the
> > LED triggers to none in sysfs to make it easier to reproduce?
> 
> Yes.
> 
> >>   - one where the system is dead and the LED does not blink anymore.
> >>     Also my button is dead.
> > 
> > This I don't think I've seen. This could also be the errata issue on
> > your earlier rev beagleboard-xm with off-idle.
> 
> might be.
> 
> Your pstore hint gave me something. I tried that earlier but somehow
> assumed that dram content was killed on init. But the content is even
> there are pressing the reset button :)

Yeah pstore is very nice for debugging mystery hangs :)
 
> However, I was able to capture the case where the LED was not blinking:
> The IIR register says 0xc6 (=> line status error). That is okay. At the
> same time LSR register says 0xe0. This is not okay. It means that there
> is some kind of error and at least one error bit is set in this
> register which is not the case. Also those bits are cleared on read
> which does not happen here. And we loop forever so the LED does blink
> anymore.

OK
 
> The RX-count register says that it is empty which sense because bit 0
> is not set (in LSR). However I can read multiple times from the RX FIFO
> until I get the "unhandled bus access" error which usually happens
> right away if the empty FIFO is read on omap3 HW. In the last test I
> mange to read 91 times before the crash. I hoped that this FIFO read
> would make the interrupt go away but it did not.
> 
> The HW seems to be in a strange state. It might be either the errata
> or something else. I even took the resume routine from omap-serial in
> case I did something wrong. In my last test it worked for 10minues
> before the interrupt storm came.
> 
> This is probably the same thing I see on the omap-serial driver where I
> got from pstore:
> 
> [   32.659271] random: nonblocking pool is initialized
> [  212.170623] NMI watchdog: BUG: soft lockup - CPU#0 stuck for 22s!
> [swapper:0]
> 
> So I *guess* the interrupt routine is looping. This is problem one, no
> idea what is going on (the register status captured on 8250-omap makes
> no sense).

See recent commit cc824534d4fe, and try commenting out the check for
HWMOD_FORCE_MSTANDBY in omap_hwmod.c so _reconfigure_io_chain() is always
called. If that changes something, we at least have some idea.

It could be also the wake-up interrupt looping. So you may also want to
try adding some printks (pstore only) into omap_prcm_irq_handler() and
omap3xxx_prm_clear_mod_irqs() as that's handling the wake-up event
interrupts.
 
> Problem two, where the UART does not wakeup:
> What I observed is that sometimes the UART does not wake up properly
> i.e. it does not write anything on the console, even where it should. I
> can't tell if the read is working properly, the write does not.
> From my capture I see that the resume routine was running and the
> register should have been written. That means the UART should be up and
> running but nothing happens.

This seems also be hinting to something needing _reconfigure_io_chain()
to be called along the lines of commit cc824534d4fe.

> It often works again after the system comes out of resume again (i.e.
> RPM suspens and resumes the UART). So it is okay on the next wakeup. Or
> the wakeup after next.
> From the script:
> 
> | while ((1))
> | do
> |
> |         echo -n 409-chars >/dev/ttyUSB0
> |
> |         sleep 1
> |         a=$(date)
> |         echo -e "\n#$a" >/dev/ttyUSB0
> |         echo $a
> |         sleep 13;
> | done
> 
> I see that sometimes one or two sequential timestamps are missing. And
> the it continues like nothing happened.

OK. At least it's starting to now sound that the bugs are pretty much
the same with 8250 and serial-omap :)

Regards,

Tony

  reply	other threads:[~2014-09-03 17:48 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-15 17:42 [PATCH v7] 8250-core based serial driver for OMAP + DMA Sebastian Andrzej Siewior
2014-08-15 17:42 ` [PATCH 01/15] tty: serial: 8250_core: allow to overwrite & export serial8250_startup() Sebastian Andrzej Siewior
2014-08-15 17:42 ` [PATCH 02/15] tty: serial: 8250_core: allow to set ->throttle / ->unthrottle callbacks Sebastian Andrzej Siewior
2014-08-15 17:42 ` [PATCH 03/15] tty: serial: 8250_core: add run time pm Sebastian Andrzej Siewior
2014-08-20  9:23   ` Frans Klaver
2014-08-20  9:39     ` Frans Klaver
2014-09-01 14:48       ` Sebastian Andrzej Siewior
2014-08-15 17:42 ` [PATCH 04/15] tty: serial: 8250_core: read only RX if there is something in the FIFO Sebastian Andrzej Siewior
2014-08-15 17:42 ` [PATCH 05/15] tty: serial: Add 8250-core based omap driver Sebastian Andrzej Siewior
2014-08-15 18:37   ` Lennart Sorensen
2014-08-15 19:27     ` Sebastian Andrzej Siewior
2014-08-15 19:33       ` Lennart Sorensen
2014-08-15 20:20         ` Sebastian Andrzej Siewior
2014-08-15 21:07   ` Tony Lindgren
2014-08-15 22:44     ` Tony Lindgren
2014-08-29 15:49       ` Sebastian Andrzej Siewior
2014-08-29 16:08         ` Tony Lindgren
2014-08-21 11:00     ` Sebastian Andrzej Siewior
2014-08-21 18:38       ` Tony Lindgren
2014-08-18 13:46   ` Heikki Krogerus
2014-09-01 13:31     ` Sebastian Andrzej Siewior
2014-08-15 17:42 ` [PATCH 06/15] tty: serial: 8250_dma: handle error on TX submit Sebastian Andrzej Siewior
2014-08-18 13:57   ` Heikki Krogerus
2014-09-01 14:38     ` Sebastian Andrzej Siewior
2014-08-15 17:42 ` [PATCH 07/15] tty: serial: 8250_dma: enqueue RX dma again on completion Sebastian Andrzej Siewior
2014-08-18 10:52   ` One Thousand Gnomes
2014-08-29 15:52     ` Sebastian Andrzej Siewior
2014-08-15 17:42 ` [PATCH 08/15] dmaengine: edma: fix two faults which happen with the 8250_dma user Sebastian Andrzej Siewior
2014-08-15 17:42 ` [PATCH 09/15] dmaengine: omap-dma: complete the transfer on terminate_all Sebastian Andrzej Siewior
2014-08-15 17:42 ` [PATCH 10/15] tty: serial: 8250_dma: Add a TX trigger workaround for AM33xx Sebastian Andrzej Siewior
2014-08-15 17:42 ` [PATCH 11/15] tty: serial: 8250_dma: handle the when UART response while DMA remains idle Sebastian Andrzej Siewior
2014-08-15 17:42 ` [PATCH 12/15] tty: serial: 8250_dma: add pm runtime Sebastian Andrzej Siewior
2014-08-15 17:42 ` [PATCH 13/15] arm: dts: am33xx: add DMA properties for UART Sebastian Andrzej Siewior
2014-08-15 17:42 ` [PATCH 14/15] arm: dts: dra7: " Sebastian Andrzej Siewior
2014-08-15 17:42 ` [PATCH 15/15] tty: serial: 8250: omap: add dma support Sebastian Andrzej Siewior
2014-08-15 21:02   ` Tony Lindgren
2014-08-21  8:34     ` Sebastian Andrzej Siewior
2014-08-21 18:44       ` Tony Lindgren
2014-08-27 19:54         ` Sebastian Andrzej Siewior
2014-08-27 20:23           ` Tony Lindgren
2014-08-28  8:23             ` Sebastian Andrzej Siewior
2014-08-28 16:46               ` Tony Lindgren
2014-08-28 19:37                 ` Sebastian Andrzej Siewior
2014-08-28 22:54                   ` Tony Lindgren
2014-08-29  9:32                     ` Sebastian Andrzej Siewior
2014-08-29 15:55                       ` Felipe Balbi
2014-08-29 16:12                       ` Tony Lindgren
2014-08-29 16:31                         ` Sebastian Andrzej Siewior
2014-09-01 17:47                         ` Sebastian Andrzej Siewior
2014-09-02  3:05                           ` Sebastian Reichel
2014-09-02 16:55                             ` Tony Lindgren
2014-09-02 18:39                           ` Sebastian Andrzej Siewior
2014-09-02 20:15                             ` Tony Lindgren
2014-09-02 20:38                               ` Sebastian Reichel
2014-09-03 16:46                               ` Sebastian Andrzej Siewior
2014-09-03 17:48                                 ` Tony Lindgren [this message]
2014-09-04 13:44                                   ` Sebastian Andrzej Siewior
2014-09-04 14:52                                     ` Tony Lindgren
2014-09-04 14:56                                       ` Sebastian Andrzej Siewior
2014-09-04 16:25                                         ` Tony Lindgren
2014-08-15 18:17 ` [PATCH v7] 8250-core based serial driver for OMAP + DMA Lennart Sorensen
2014-08-15 19:14   ` Sebastian Andrzej Siewior
2014-08-15 20:28     ` Tony Lindgren
2014-08-17 20:35       ` Sebastian Andrzej Siewior
2014-08-18 15:15       ` Peter Hurley
2014-08-18 16:37         ` Felipe Balbi

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=20140903174845.GE11766@atomide.com \
    --to=tony@atomide.com \
    --cc=balbi@ti.com \
    --cc=bigeasy@linutronix.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=paul@pwsan.com \
    --cc=vinod.koul@intel.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).