Skip to contentSkip to conversation

pinctrl: single: Fix missing flush of posted write for a wakeirq

PATCH In review Tony Lindgren 2 participants 4 messages May 31, 2016 – Jun 8, 2016

Subsystems (3)
lore
Share & tools
lore

Tony Lindgren

author maintainer
#0 lore raw

PATCH 1/1 pinctrl: single: Fix missing flush of posted write for a wakeirq

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.

---
 drivers/pinctrl/pinctrl-single.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/pinctrl/pinctrl-single.c +3 -0
index cf9bafa..bfdf720 100644
@@ -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);
 	}
 
Signature · 1 line
2.8.1
#1 lore raw
Quoted 9 lines · Tony Lindgren

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.

Patch applied.

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

Yours,
Linus Walleij

author maintainer
#2 lore raw
Quoted 7 lines · Linus Walleij
Quoted 5 lines · Tony Lindgren

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.

Quoted 6 lines
Quoted 4 lines

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

Patch applied.

Thanks.

Quoted 2 lines

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

#3 lore raw
Quoted 1 line · Tony Lindgren

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