Re: [PATCH] Quirk to fix suspend/resume on Lenovo Edge 11,13,14,15

From: Manoj Iyer
Date: Mon Jan 31 2011 - 12:54:38 EST


Andreas,

I tested your patch on a ThinkPad Edge 14, I only tested if the
machines was able to suspend and resume without delay, in that respect
I think your test patch works well. Please let me know when you have
your final patch ready I will be happy to test it and report back to
you.

On Mon, Jan 31, 2011 at 10:44 AM, Manoj Iyer <manoj.iyer@xxxxxxxxxxxxx> wrote:
> Sorry, I was not able to get to this last week, I will test your patch
> today and reply by EOBD today.
>
> On Fri, Jan 28, 2011 at 11:59 AM, Andreas Herrmann
> <andreas.herrmann3@xxxxxxx> wrote:
>> On Fri, Jan 14, 2011 at 02:55:30PM -0500, Manoj Iyer wrote:
>>> Borislav,
>>>
>>> Any more thoughts on this one ?
>>
>> Seems that we've identified the root cause.
>>
>> I wondered why systems with the problem have configured IOAPIC pin
>> with polarity=1 (low active).  That was different to what the working
>> systems used.
>>
>> Switching the configuration to the usual polarity=0 (high active)
>> fixed the issue.
>>
>> The explanation is that when hpet interrupt is triggerd, signal goes
>> from low to high. (AFAIK HPET spec even mentions that HPET interrupts
>> are all active high.)
>>
>> Now if IO-APIC pin is configured as low active it just ignores this
>> signal change. It just triggers later when for next interrupt signal
>> will go from high to low and high again. (That happens the first time
>> after resume when the HPET counter wrapped around.)
>>
>> Setting the correct polarity fixes the detection of the first hpet
>> interrupt after resume.
>>
>> To confirm that your systems behave similar you should boot with
>> "apic=debug" kernel parameter. The output for IO APIC should show
>> polarity=1 for IO APIC pin 2, e.g.
>>
>>  [    0.158179] IO APIC #2......
>>   ...
>>  [    0.158205]  NR Dst Mask Trig IRR Pol Stat Dmod Deli Vect:
>>  [    0.158210]  00 000 1    0    0   0   0    0    0    00
>>  [    0.158217]  01 003 0    0    0   0   0    1    1    31
>>  [    0.158224]  02 003 0    0    0   1   0    1    1    30
>>
>> Furthermore you can check with attached test patch whether changing
>> the polarity fixes the problem on your system. IO APIC debug output
>> with this patch should change to
>>
>>  [    0.156170] IO APIC #2......
>>   ...
>>  [    0.156197]  NR Dst Mask Trig IRR Pol Stat Dmod Deli Vect:
>>  [    0.156202]  00 000 1    0    0   0   0    0    0    00
>>  [    0.156209]  01 003 0    0    0   0   0    1    1    31
>>  [    0.156216]  02 003 0    0    0   0   0    1    1    30
>>
>>
>> I'll come up with an SB800 quirk asap. (Of course we'll also try to
>> fix the respective BIOSes but too often BIOS updates are only
>> available for a limited time period.)
>>
>>
>> Regards,
>>
>> Andreas
>>
>> --
>> Operating | Advanced Micro Devices GmbH
>>  System  | Einsteinring 24, 85609 Dornach b. München, Germany
>>  Research | Geschäftsführer: Alberto Bozzo, Andrew Bowd
>>  Center  | Sitz: Dornach, Gemeinde Aschheim, Landkreis München
>>  (OSRC)  | Registergericht München, HRB Nr. 43632
>>
>
>
>
> --
> -----------------------------------------------------
> Manoj Iyer
> Ubuntu/Canonical Kernel Developer
> Hardware Enablement Team
> ------------------------------------------------------
>



--
-----------------------------------------------------
Manoj Iyer
Ubuntu/Canonical Kernel Developer
Hardware Enablement Team
------------------------------------------------------
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/