All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pinctrl: single: Fix missing flush of posted write for a wakeirq
@ 2016-05-31 21:17 Tony Lindgren
  2016-06-02 12:27 ` Linus Walleij
  0 siblings, 1 reply; 4+ messages in thread
From: Tony Lindgren @ 2016-05-31 21:17 UTC (permalink / raw)
  To: Linus Walleij; +Cc: Haojian Zhuang, Grygorii Strashko, linux-gpio, linux-omap

With many repeated suspend resume cycles, the pin specific wakeirq
may not always work on omaps. This is because the write to enable the
pin interrupt may not have reached the device over the interconnect
before suspend happens.

Let's fix the issue with a flush of posted write with a readback.

Reported-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 drivers/pinctrl/pinctrl-single.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c
index cf9bafa..bfdf720 100644
--- a/drivers/pinctrl/pinctrl-single.c
+++ b/drivers/pinctrl/pinctrl-single.c
@@ -1580,6 +1580,9 @@ static inline void pcs_irq_set(struct pcs_soc_data *pcs_soc,
 		else
 			mask &= ~soc_mask;
 		pcs->write(mask, pcswi->reg);
+
+		/* flush posted write */
+		mask = pcs->read(pcswi->reg);
 		raw_spin_unlock(&pcs->lock);
 	}
 
-- 
2.8.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] pinctrl: single: Fix missing flush of posted write for a wakeirq
  2016-05-31 21:17 [PATCH] pinctrl: single: Fix missing flush of posted write for a wakeirq Tony Lindgren
@ 2016-06-02 12:27 ` Linus Walleij
  2016-06-02 15:19   ` Tony Lindgren
  0 siblings, 1 reply; 4+ messages in thread
From: Linus Walleij @ 2016-06-02 12:27 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: Haojian Zhuang, Grygorii Strashko, linux-gpio, Linux-OMAP

On Tue, May 31, 2016 at 11:17 PM, Tony Lindgren <tony@atomide.com> wrote:

> With many repeated suspend resume cycles, the pin specific wakeirq
> may not always work on omaps. This is because the write to enable the
> pin interrupt may not have reached the device over the interconnect
> before suspend happens.
>
> Let's fix the issue with a flush of posted write with a readback.
>
> Reported-by: Nishanth Menon <nm@ti.com>
> Signed-off-by: Tony Lindgren <tony@atomide.com>

Patch applied.

Is it a regression that needs to be sent to fixes and tagged
for stable?

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] pinctrl: single: Fix missing flush of posted write for a wakeirq
  2016-06-02 12:27 ` Linus Walleij
@ 2016-06-02 15:19   ` Tony Lindgren
  2016-06-08  8:05     ` Linus Walleij
  0 siblings, 1 reply; 4+ messages in thread
From: Tony Lindgren @ 2016-06-02 15:19 UTC (permalink / raw)
  To: Linus Walleij; +Cc: Haojian Zhuang, Grygorii Strashko, linux-gpio, Linux-OMAP

* Linus Walleij <linus.walleij@linaro.org> [160602 05:29]:
> On Tue, May 31, 2016 at 11:17 PM, Tony Lindgren <tony@atomide.com> wrote:
> 
> > With many repeated suspend resume cycles, the pin specific wakeirq
> > may not always work on omaps. This is because the write to enable the
> > pin interrupt may not have reached the device over the interconnect
> > before suspend happens.
> >
> > Let's fix the issue with a flush of posted write with a readback.
> >
> > Reported-by: Nishanth Menon <nm@ti.com>
> > Signed-off-by: Tony Lindgren <tony@atomide.com>
> 
> Patch applied.

Thanks.

> Is it a regression that needs to be sent to fixes and tagged
> for stable?

It fixes wake from suspend in repeated cases, so at least
Android users would appreciate it in the stable trees.

Although the Android users are using vendor tree, it's still
one fix less to carry them.

So yeah, I'd vote yes for stable tag on this one.

Regards,

Tony

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] pinctrl: single: Fix missing flush of posted write for a wakeirq
  2016-06-02 15:19   ` Tony Lindgren
@ 2016-06-08  8:05     ` Linus Walleij
  0 siblings, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2016-06-08  8:05 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: Haojian Zhuang, Grygorii Strashko, linux-gpio, Linux-OMAP

On Thu, Jun 2, 2016 at 5:19 PM, Tony Lindgren <tony@atomide.com> wrote:

> So yeah, I'd vote yes for stable tag on this one.

I trust you :)

Put in my fixes branch and tagged for stable.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-06-08  8:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-31 21:17 [PATCH] pinctrl: single: Fix missing flush of posted write for a wakeirq Tony Lindgren
2016-06-02 12:27 ` Linus Walleij
2016-06-02 15:19   ` Tony Lindgren
2016-06-08  8:05     ` Linus Walleij

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.