From: "H. Nikolaus Schaller" <hns@goldelico.com>
To: Andreas Kemnade <andreas@kemnade.info>, Tony Lindgren <tony@atomide.com>
Cc: Evgeniy Polyakov <zbr@ioremap.net>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-omap <linux-omap@vger.kernel.org>,
Adam Ford <aford173@gmail.com>, "Andrew F . Davis" <afd@ti.com>,
Vignesh R <vigneshr@ti.com>
Subject: Re: [PATCHv3] w1: omap-hdq: Simplify driver with PM runtime autosuspend
Date: Sat, 25 Apr 2020 12:37:01 +0200 [thread overview]
Message-ID: <E8575FE4-4BC2-41B7-B574-339C58D9CB5E@goldelico.com> (raw)
In-Reply-To: <44AD9673-AE02-498F-A5CC-48499DF226E3@goldelico.com>
> Am 25.04.2020 um 12:29 schrieb H. Nikolaus Schaller <hns@goldelico.com>:
>
> H
> The things start to get "fixed" when the hdq_isr
> jumps to 6 indicating
>
> OMAP_HDQ_INT_STATUS_RXCOMPLETE | OMAP_HDQ_INT_STATUS_TXCOMPLETE
>
> So I am getting more inclined to believe that it is
> not a power management issue but some piggybacked
> change to how interrupts are handled.
> Especially hdq_reset_irqstatus.
>
> So I will add a printk to hdq_reset_irqstatus
> to see what value it had before being reset.
I now did check the log during boot and there is the
reverse situation. Initially it works but suddenly
hdq_isr becomes 6 and then trouble starts.
So the key problem is that both, the RX and the TX
interrupts may be set and then, the code resets
everything to 0 and looses either one.
I wonder if that is an issue by two processes reading
hdq in parallel.
Another question is how independent command-writes + result-reads
are properly serialized and locked so that they don't overlap?
Maybe this is handled outside of the omap_hdq code.
So what could be a fix?
BR,
Nikolaus
[ 17.026916] omap_hdq 480b2000.1w: omap_hdq_probe
[ 17.057739] omap_hdq 480b2000.1w: omap_hdq_probe 1
[ 17.062866] omap_hdq 480b2000.1w: omap_hdq_runtime_resume
[ 17.221374] omap_hdq 480b2000.1w: OMAP HDQ Hardware Rev 0.5. Driver in Interrupt mode
[ 17.350860] omap_hdq 480b2000.1w: omap_hdq_probe 2
[ 17.372863] omap_hdq 480b2000.1w: omap_hdq_probe 3
[ 17.468444] omap_hdq 480b2000.1w: hdq_isr: 1
[ 17.473876] omap_hdq 480b2000.1w: Presence bit not set
[ 17.505249] omap_hdq 480b2000.1w: omap_hdq_probe 4
[ 17.576690] omap_hdq 480b2000.1w: omap_hdq_probe done
[ 17.697998] omap_hdq 480b2000.1w: hdq_write_byte
[ 17.704986] omap_hdq 480b2000.1w: hdq_isr: 4
[ 17.734954] omap_hdq 480b2000.1w: hdq_read_byte
[ 17.747528] omap_hdq 480b2000.1w: hdq_isr: 2
[ 17.752044] omap_hdq 480b2000.1w: hdq_write_byte
[ 17.759033] omap_hdq 480b2000.1w: hdq_isr: 4
[ 17.774414] omap_hdq 480b2000.1w: hdq_read_byte
[ 17.798767] omap_hdq 480b2000.1w: hdq_isr: 2
[ 17.803314] omap_hdq 480b2000.1w: hdq_write_byte
[ 17.821807] omap_hdq 480b2000.1w: hdq_isr: 4
[ 17.826385] omap_hdq 480b2000.1w: hdq_read_byte
[ 17.837646] omap_hdq 480b2000.1w: hdq_isr: 2
[ 17.842224] omap_hdq 480b2000.1w: hdq_write_byte
[ 17.849212] omap_hdq 480b2000.1w: hdq_isr: 4
[ 17.861877] omap_hdq 480b2000.1w: hdq_read_byte
[ 17.887573] omap_hdq 480b2000.1w: hdq_isr: 2
[ 17.892150] omap_hdq 480b2000.1w: hdq_write_byte
[ 17.899139] omap_hdq 480b2000.1w: hdq_isr: 4
[ 17.903686] omap_hdq 480b2000.1w: hdq_read_byte
[ 17.926177] omap_hdq 480b2000.1w: hdq_isr: 2
[ 17.945434] omap_hdq 480b2000.1w: hdq_write_byte
[ 17.953979] omap_hdq 480b2000.1w: hdq_isr: 4
[ 17.959503] omap_hdq 480b2000.1w: hdq_read_byte
[ 17.964294] omap_hdq 480b2000.1w: hdq_isr: 2
[ 17.984436] omap_hdq 480b2000.1w: hdq_write_byte
[ 18.017578] omap_hdq 480b2000.1w: hdq_isr: 6
[ 18.022521] omap_hdq 480b2000.1w: hdq_read_byte
[ 18.027282] omap_hdq 480b2000.1w: hdq_isr: 0
[ 18.287597] omap_hdq 480b2000.1w: timeout waiting for RXCOMPLETE, 0
[ 18.294250] omap_hdq 480b2000.1w: hdq_write_byte
[ 18.313720] omap_hdq 480b2000.1w: hdq_isr: 0
[ 18.537536] omap_hdq 480b2000.1w: TX wait elapsed
[ 18.542510] omap_hdq 480b2000.1w: TX failure:Ctrl status 0
[ 18.577697] omap_hdq 480b2000.1w: hdq_read_byte
[ 18.582489] omap_hdq 480b2000.1w: hdq_isr: 0
[ 18.787597] omap_hdq 480b2000.1w: timeout waiting for RXCOMPLETE, 0
next prev parent reply other threads:[~2020-04-25 10:37 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-17 0:40 [PATCHv3] w1: omap-hdq: Simplify driver with PM runtime autosuspend Tony Lindgren
2020-04-16 15:02 ` H. Nikolaus Schaller
2020-04-16 18:46 ` Tony Lindgren
2020-04-16 20:04 ` Andreas Kemnade
2020-04-16 20:33 ` Tony Lindgren
2020-04-17 14:21 ` H. Nikolaus Schaller
2020-04-17 14:22 ` H. Nikolaus Schaller
2020-04-17 14:43 ` Andreas Kemnade
2020-04-17 14:52 ` H. Nikolaus Schaller
2020-04-17 15:07 ` Tony Lindgren
2020-04-17 15:14 ` Tony Lindgren
2020-04-17 15:36 ` Andreas Kemnade
2020-04-17 21:03 ` H. Nikolaus Schaller
2020-04-20 15:08 ` Tony Lindgren
2020-04-20 21:11 ` H. Nikolaus Schaller
2020-04-21 6:53 ` Andreas Kemnade
2020-04-21 18:02 ` Tony Lindgren
2020-04-21 18:13 ` H. Nikolaus Schaller
2020-04-21 18:20 ` Tony Lindgren
2020-04-21 18:24 ` Andreas Kemnade
2020-04-21 20:40 ` H. Nikolaus Schaller
2020-04-22 10:04 ` Andreas Kemnade
2020-04-22 16:06 ` H. Nikolaus Schaller
[not found] ` <A2AC3E81-49B2-4CF2-A7CF-6075AEB1B72D@goldelico.com>
2020-04-25 10:29 ` H. Nikolaus Schaller
2020-04-25 10:37 ` H. Nikolaus Schaller [this message]
2020-04-29 21:34 ` H. Nikolaus Schaller
2020-04-29 21:38 ` Tony Lindgren
2020-05-09 11:47 ` H. Nikolaus Schaller
2020-05-09 13:59 ` Tony Lindgren
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=E8575FE4-4BC2-41B7-B574-339C58D9CB5E@goldelico.com \
--to=hns@goldelico.com \
--cc=afd@ti.com \
--cc=aford173@gmail.com \
--cc=andreas@kemnade.info \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=tony@atomide.com \
--cc=vigneshr@ti.com \
--cc=zbr@ioremap.net \
/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).