linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Sven Neumann <s.neumann@raumfeld.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, Daniel Mack <daniel@caiaq.de>
Subject: Re: resume regression in 2.6.37
Date: Mon, 17 Jan 2011 20:24:55 +0100	[thread overview]
Message-ID: <4D349787.80201@metafoo.de> (raw)
In-Reply-To: <alpine.LFD.2.00.1101171142380.2678@localhost6.localdomain6>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 01/17/2011 01:40 PM, Thomas Gleixner wrote:
> On Mon, 17 Jan 2011, Sven Neumann wrote:
>
>> On Thu, 2011-01-13 at 18:33 +0100, Thomas Gleixner wrote:
>>
>>>> Without the revert there is absolutely no sign of resume. With the
>>>> change reverted I can see that the PXA powers up again, there's an LED
>>>> showing that the USB controller has power again. Unfortunately there's
>>>> seems to be another problem and the resume doesn't complete. I've tried
>>>> to get console output by using no_console_suspend, but there's just
>>>> gibberish on the console after resume :(
>>>>
>>>> Any idea on how to proceed from here? I could perhaps ask our hardware
>>>> engineer to try find out where exactly we are stuck in the resume. But
>>>> I'd like to avoid that if possible.
>>>
>>> Can you stick a printk into the set_wake() function of that irq chip
>>> and print the irq and on arguments and the return value . Run that
>>> with both stock 2.6.37 and the patch reverted.
>>
>> pxa3xx_set_wake(31, 1) returns 0
>>
>> Same result with stock 2.6.37 and the patch reverted. Except that
>> without the patch reverted, the device doesn't power up again.
>
> Ok, can we agree that the patch has no functional impact on the
> set_wake function? And I don't see a reason why reverting that patch
> results in a working resume. That does not make sense at all. Which
> compiler version are you using ?
>
> Thanks,
>
> 	tglx
>

Hi

If you take a look at the pxa gpio irq handling you'll see that it sets the
"set_wake" field of it's irq_chip after calling set_irq_chip for all of the irqs, so
the compat handler gets never installed.

So I guess the following patch fixes it:

diff --git a/arch/arm/mach-pxa/irq.c b/arch/arm/mach-pxa/irq.c
- --- a/arch/arm/mach-pxa/irq.c
+++ b/arch/arm/mach-pxa/irq.c
@@ -111,13 +111,13 @@ static void __init pxa_init_low_gpio_irq(set_wake_t fn)
 	GRER0 &= ~0x3;
 	GEDR0 = 0x3;

+	pxa_low_gpio_chip.set_wake = fn;
+
 	for (irq = IRQ_GPIO0; irq <= IRQ_GPIO1; irq++) {
 		set_irq_chip(irq, &pxa_low_gpio_chip);
 		set_irq_handler(irq, handle_edge_irq);
 		set_irq_flags(irq, IRQF_VALID);
 	}
- -
- -	pxa_low_gpio_chip.set_wake = fn;
 }

 void __init pxa_init_irq(int irq_nr, set_wake_t fn)
@@ -142,13 +142,14 @@ void __init pxa_init_irq(int irq_nr, set_wake_t fn)
 	/* only unmasked interrupts kick us out of idle */
 	ICCR = 1;

+	pxa_internal_irq_chip.set_wake = fn;
+
 	for (irq = PXA_IRQ(0); irq < PXA_IRQ(irq_nr); irq++) {
 		set_irq_chip(irq, &pxa_internal_irq_chip);
 		set_irq_handler(irq, handle_level_irq);
 		set_irq_flags(irq, IRQF_VALID);
 	}

- -	pxa_internal_irq_chip.set_wake = fn;
 	pxa_init_low_gpio_irq(fn);
 }

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk00l4cACgkQBX4mSR26RiMTMQCdGCiu3ALAIEe0dUkX3u5xeHmz
dggAnj2cePanr6HFi+6KQ4tF7cT6xoq0
=yxJs
-----END PGP SIGNATURE-----

  parent reply	other threads:[~2011-01-17 19:25 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-13 15:44 resume regression in 2.6.37 Sven Neumann
2011-01-13 16:28 ` Thomas Gleixner
2011-01-13 17:16   ` Sven Neumann
2011-01-13 17:33     ` Thomas Gleixner
2011-01-17 10:36       ` Sven Neumann
2011-01-17 12:40         ` Thomas Gleixner
2011-01-17 14:04           ` Sven Neumann
2011-01-17 18:41             ` Thomas Gleixner
2011-01-17 19:24           ` Lars-Peter Clausen [this message]
2011-01-17 19:59             ` Lars-Peter Clausen
2011-01-18  8:16               ` Sven Neumann
2011-01-18  8:18                 ` [PATCH] pxa3xx: fix PXA GPIO IRQ handling Sven Neumann
2011-01-18 11:06                   ` Uwe Kleine-König
2011-01-18 11:47                   ` Lars-Peter Clausen
2011-01-18 12:29                     ` [PATCH] ARM: pxa: fix " Sven Neumann
2011-01-18 16:15                     ` [PATCH] pxa3xx: fix PXA " Eric Miao
2011-01-18 16:20                       ` Lennert Buijtenhek
2011-01-18 21:49                       ` Sven Neumann
2011-01-20 18:48                         ` Eric Miao
2011-01-20 18:55                           ` Eric Miao
2011-01-18  8:19             ` resume regression in 2.6.37 Thomas Gleixner

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=4D349787.80201@metafoo.de \
    --to=lars@metafoo.de \
    --cc=daniel@caiaq.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=s.neumann@raumfeld.com \
    --cc=tglx@linutronix.de \
    /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).