From: Kevin Hilman <khilman@ti.com>
To: Tony Lindgren <tony@atomide.com>
Cc: Tarun Kanti DebBarma <tarun.kanti@ti.com>,
Santosh Shilimkar <santosh.shilimkar@ti.com>,
Grant Likely <grant.likely@secretlab.ca>,
linux-omap@vger.kernel.org, "Cousson, Benoit" <b-cousson@ti.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 8/8] gpio/omap: fix missing check in *_runtime_suspend()
Date: Thu, 17 May 2012 16:56:48 -0700 [thread overview]
Message-ID: <87mx56s6nz.fsf@ti.com> (raw)
In-Reply-To: <20120517231251.GH17852@atomide.com> (Tony Lindgren's message of "Thu, 17 May 2012 16:12:52 -0700")
Tony Lindgren <tony@atomide.com> writes:
> * Kevin Hilman <khilman@ti.com> [120517 15:29]:
>>
>> I just noticed that this patch has caused some strange problems, notably
>> with the GPIO IRQ used by smsc911x NIC (Overo, Zoom3, 2430SDP, etc. etc.)
>>
>> The patch itself is OK, but it has exposed a bug in other parts of the
>> context restore path that was previously hidden.
>>
>> We seem to have been finding lots of GPIO bugs by just testing the
>> network chips with GPIO IRQs. Can I suggest that a platform with a GPIO
>> IRQ NIC be added to the test platforms you're using?
>
> Yes considering the breakage it's pretty obvious the original series was
> never properly tested on omaps.
Agreed.
> Regarding this fix, using gpio/next + this patch fixes nfsroot for 2430sdp,
> and gets zoom3 nfsroot booting going a bit better.
>
> However, at least on zoom3 nfsroot now takes several _minutes_ to get to
> login: with gpio/next + this patch. The system is totally unusable.
>
> It seems that the GPIO interrupt wake-up events are not properly working
> now?
>
> Reverting the "gpio/omap: fix missing check in *_runtime_suspend()"
> patch seems to fix the issue.
Argh, then $SUBJECT patch here has caused brokeness in multiple ways.
It managed to break both runtime suspend and runtime resume at the same
time. :(
The change added by this patch to runtime_suspend effectively disables
the fix I did in 68942edb09 (gpio/omap: fix wakeups on level-triggered GPIOs)
causing the sluggish network problems to reappear, since that GPIO IRQ
is no longer causing wakeups.
Simple fix is below, which just moves the check added in $SUBJECT patch
below the workaround for the edge/level fix. Can you confirm it works
on Zoom3 (applies on gpio/next + my previous fix.)
I didn't notice the same problem on Overo, but I guess it's because
Overo had some enabled non-wakeup GPIOs in the same bank, so it didn't
bypass the level-triggered IRQ fix.
>> Subject: [PATCH] gpio/omap: fix broken context restore for non-OFF mode
>> transitions
>>
>> The fix in commit 1b12870 (gpio/omap: fix missing check in
>> *_runtime_suspend()) exposed another bug in the context restore path.
>
> Kevin, looks like commit 1b12870 does not exist in gpio/next?
Will update the changelog.
Because of this new problem, I have to add the patch below too, so
I'll get them both queued up for Grant
In the mean time, they're availble in my for_3.5/fixes/gpio-2 branch.
Kevin
[1]
>From afb4f0836dc3c432aa999fc98a80bf75e1481e04 Mon Sep 17 00:00:00 2001
From: Kevin Hilman <khilman@ti.com>
Date: Thu, 17 May 2012 16:42:16 -0700
Subject: [PATCH] gpio/omap: (re)fix wakeups on level-triggered GPIOs
commit 1b1287032 (gpio/omap: fix missing check in *_runtime_suspend())
broke wakeups on level-triggered GPIOs by adding the enabled
non-wakeup GPIO check before the workaround that enables wakeups
on level-triggered IRQs, effectively disabling that workaround.
To fix, move the enabled non-wakeup GPIO check after the
level-triggered IRQ workaround.
Reported-by: Tony Lindgren <tony@atomide.com>
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: Tarun Kanti DebBarma <tarun.kanti@ti.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
---
drivers/gpio/gpio-omap.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index b570a6a..c4ed172 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -1157,9 +1157,6 @@ static int omap_gpio_runtime_suspend(struct device *dev)
spin_lock_irqsave(&bank->lock, flags);
- if (!bank->enabled_non_wakeup_gpios)
- goto update_gpio_context_count;
-
/*
* Only edges can generate a wakeup event to the PRCM.
*
@@ -1180,6 +1177,9 @@ static int omap_gpio_runtime_suspend(struct device *dev)
__raw_writel(wake_hi | bank->context.risingdetect,
bank->base + bank->regs->risingdetect);
+ if (!bank->enabled_non_wakeup_gpios)
+ goto update_gpio_context_count;
+
if (bank->power_mode != OFF_MODE) {
bank->power_mode = 0;
goto update_gpio_context_count;
--
1.7.9.2
WARNING: multiple messages have this Message-ID (diff)
From: khilman@ti.com (Kevin Hilman)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 8/8] gpio/omap: fix missing check in *_runtime_suspend()
Date: Thu, 17 May 2012 16:56:48 -0700 [thread overview]
Message-ID: <87mx56s6nz.fsf@ti.com> (raw)
In-Reply-To: <20120517231251.GH17852@atomide.com> (Tony Lindgren's message of "Thu, 17 May 2012 16:12:52 -0700")
Tony Lindgren <tony@atomide.com> writes:
> * Kevin Hilman <khilman@ti.com> [120517 15:29]:
>>
>> I just noticed that this patch has caused some strange problems, notably
>> with the GPIO IRQ used by smsc911x NIC (Overo, Zoom3, 2430SDP, etc. etc.)
>>
>> The patch itself is OK, but it has exposed a bug in other parts of the
>> context restore path that was previously hidden.
>>
>> We seem to have been finding lots of GPIO bugs by just testing the
>> network chips with GPIO IRQs. Can I suggest that a platform with a GPIO
>> IRQ NIC be added to the test platforms you're using?
>
> Yes considering the breakage it's pretty obvious the original series was
> never properly tested on omaps.
Agreed.
> Regarding this fix, using gpio/next + this patch fixes nfsroot for 2430sdp,
> and gets zoom3 nfsroot booting going a bit better.
>
> However, at least on zoom3 nfsroot now takes several _minutes_ to get to
> login: with gpio/next + this patch. The system is totally unusable.
>
> It seems that the GPIO interrupt wake-up events are not properly working
> now?
>
> Reverting the "gpio/omap: fix missing check in *_runtime_suspend()"
> patch seems to fix the issue.
Argh, then $SUBJECT patch here has caused brokeness in multiple ways.
It managed to break both runtime suspend and runtime resume at the same
time. :(
The change added by this patch to runtime_suspend effectively disables
the fix I did in 68942edb09 (gpio/omap: fix wakeups on level-triggered GPIOs)
causing the sluggish network problems to reappear, since that GPIO IRQ
is no longer causing wakeups.
Simple fix is below, which just moves the check added in $SUBJECT patch
below the workaround for the edge/level fix. Can you confirm it works
on Zoom3 (applies on gpio/next + my previous fix.)
I didn't notice the same problem on Overo, but I guess it's because
Overo had some enabled non-wakeup GPIOs in the same bank, so it didn't
bypass the level-triggered IRQ fix.
>> Subject: [PATCH] gpio/omap: fix broken context restore for non-OFF mode
>> transitions
>>
>> The fix in commit 1b12870 (gpio/omap: fix missing check in
>> *_runtime_suspend()) exposed another bug in the context restore path.
>
> Kevin, looks like commit 1b12870 does not exist in gpio/next?
Will update the changelog.
Because of this new problem, I have to add the patch below too, so
I'll get them both queued up for Grant
In the mean time, they're availble in my for_3.5/fixes/gpio-2 branch.
Kevin
[1]
>From afb4f0836dc3c432aa999fc98a80bf75e1481e04 Mon Sep 17 00:00:00 2001
From: Kevin Hilman <khilman@ti.com>
Date: Thu, 17 May 2012 16:42:16 -0700
Subject: [PATCH] gpio/omap: (re)fix wakeups on level-triggered GPIOs
commit 1b1287032 (gpio/omap: fix missing check in *_runtime_suspend())
broke wakeups on level-triggered GPIOs by adding the enabled
non-wakeup GPIO check before the workaround that enables wakeups
on level-triggered IRQs, effectively disabling that workaround.
To fix, move the enabled non-wakeup GPIO check after the
level-triggered IRQ workaround.
Reported-by: Tony Lindgren <tony@atomide.com>
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: Tarun Kanti DebBarma <tarun.kanti@ti.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
---
drivers/gpio/gpio-omap.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index b570a6a..c4ed172 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -1157,9 +1157,6 @@ static int omap_gpio_runtime_suspend(struct device *dev)
spin_lock_irqsave(&bank->lock, flags);
- if (!bank->enabled_non_wakeup_gpios)
- goto update_gpio_context_count;
-
/*
* Only edges can generate a wakeup event to the PRCM.
*
@@ -1180,6 +1177,9 @@ static int omap_gpio_runtime_suspend(struct device *dev)
__raw_writel(wake_hi | bank->context.risingdetect,
bank->base + bank->regs->risingdetect);
+ if (!bank->enabled_non_wakeup_gpios)
+ goto update_gpio_context_count;
+
if (bank->power_mode != OFF_MODE) {
bank->power_mode = 0;
goto update_gpio_context_count;
--
1.7.9.2
next prev parent reply other threads:[~2012-05-17 23:56 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-27 14:13 [PATCH 0/8] gpio/omap: remaining cleanups and fix Tarun Kanti DebBarma
2012-04-27 14:13 ` Tarun Kanti DebBarma
2012-04-27 14:13 ` [PATCH 1/8] gpio/omap: remove virtual_irq_start variable Tarun Kanti DebBarma
2012-04-27 14:13 ` Tarun Kanti DebBarma
2012-05-03 11:13 ` Santosh Shilimkar
2012-05-03 11:13 ` Santosh Shilimkar
2012-04-27 14:13 ` [PATCH 2/8] gpio/omap: remove saved_fallingdetect, saved_risingdetect Tarun Kanti DebBarma
2012-04-27 14:13 ` Tarun Kanti DebBarma
2012-04-27 14:13 ` [PATCH 3/8] gpio/omap: remove suspend_wakeup field from struct gpio_bank Tarun Kanti DebBarma
2012-04-27 14:13 ` Tarun Kanti DebBarma
2012-04-27 14:13 ` [PATCH 4/8] gpio/omap: remove saved_wakeup " Tarun Kanti DebBarma
2012-04-27 14:13 ` Tarun Kanti DebBarma
2012-04-27 14:13 ` [PATCH 5/8] gpio/omap: remove retrigger variable in gpio_irq_handler Tarun Kanti DebBarma
2012-04-27 14:13 ` Tarun Kanti DebBarma
2012-04-27 14:13 ` [PATCH 6/8] gpio/omap: remove suspend/resume callbacks Tarun Kanti DebBarma
2012-04-27 14:13 ` Tarun Kanti DebBarma
2012-04-27 14:13 ` [PATCH 7/8] gpio/omap: remove cpu_is_omapxxxx() checks from *_runtime_resume() Tarun Kanti DebBarma
2012-04-27 14:13 ` Tarun Kanti DebBarma
2012-05-03 11:15 ` Santosh Shilimkar
2012-05-03 11:15 ` Santosh Shilimkar
2012-04-27 14:13 ` [PATCH 8/8] gpio/omap: fix missing check in *_runtime_suspend() Tarun Kanti DebBarma
2012-04-27 14:13 ` Tarun Kanti DebBarma
2012-05-03 11:16 ` Santosh Shilimkar
2012-05-03 11:16 ` Santosh Shilimkar
2012-05-17 22:21 ` Kevin Hilman
2012-05-17 22:21 ` Kevin Hilman
2012-05-17 23:12 ` Tony Lindgren
2012-05-17 23:12 ` Tony Lindgren
2012-05-17 23:56 ` Kevin Hilman [this message]
2012-05-17 23:56 ` Kevin Hilman
2012-05-18 0:10 ` Tony Lindgren
2012-05-18 0:10 ` Tony Lindgren
2012-05-18 4:48 ` DebBarma, Tarun Kanti
2012-05-18 4:48 ` DebBarma, Tarun Kanti
2012-05-18 6:22 ` Shilimkar, Santosh
2012-05-18 6:22 ` Shilimkar, Santosh
2012-05-17 23:27 ` Grant Likely
2012-05-17 23:27 ` Grant Likely
2012-05-18 14:03 ` Kevin Hilman
2012-05-18 14:03 ` Kevin Hilman
2012-05-18 5:12 ` DebBarma, Tarun Kanti
2012-05-18 5:12 ` DebBarma, Tarun Kanti
2012-05-18 8:46 ` DebBarma, Tarun Kanti
2012-05-18 8:46 ` DebBarma, Tarun Kanti
2012-04-27 19:07 ` [PATCH 0/8] gpio/omap: remaining cleanups and fix Grant Likely
2012-04-27 19:07 ` Grant Likely
2012-04-27 21:57 ` Kevin Hilman
2012-04-27 21:57 ` Kevin Hilman
2012-04-27 22:05 ` Grant Likely
2012-04-27 22:05 ` Grant Likely
2012-05-03 11:17 ` Santosh Shilimkar
2012-05-03 11:17 ` Santosh Shilimkar
2012-05-10 6:38 ` Raja, Govindraj
2012-05-10 6:38 ` Raja, Govindraj
2012-05-10 22:13 ` Kevin Hilman
2012-05-10 22:13 ` Kevin Hilman
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=87mx56s6nz.fsf@ti.com \
--to=khilman@ti.com \
--cc=b-cousson@ti.com \
--cc=grant.likely@secretlab.ca \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=santosh.shilimkar@ti.com \
--cc=tarun.kanti@ti.com \
--cc=tony@atomide.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 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.