public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "David Härdeman" <david@hardeman.nu>
To: linux-acpi@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: Why does my driver (drivers/input/misc/winbond-cir.c) break suspend?
Date: Mon, 8 Feb 2010 11:13:35 +0100	[thread overview]
Message-ID: <20100208101335.GA13907@hardeman.nu> (raw)

I've been trying to debug a problem with my driver 
(drivers/input/misc/winbond-cir.c) and suspend/resume.

If the driver is loaded, my test computer (Intel DG45FC motherboard) 
survives one suspend/resume cycle but hangs (no pings, no magic sysrq, 
etc) on the second suspend attempt (tested on 2.6.32.X and currently 
testing on a git checkout from yesterday).

After sprinkling a lot of printk's everywhere, it seems that the kernel 
freezes either in the below call, or at a random time soon after it:

drivers/pnp/driver.c:pnp_bus_suspend(), calls
pnp_dev->protocol->suspend()

Since this is a pnpacpi device, that is a call to:

drivers/pnp/pnpacpi/core.c:pnpacpi_disable_resources(), which calls the 
ACPI "_DIS" method for the "UAR3" object.

Now, if I add a hack to my driver to remove the PNP_DISABLE flag from 
device->capabilities (which means, AFAIK, that the above ACPI "_DIS" 
method won't get called during suspend), I can reliably suspend and 
resume, which is why I believe that this has got something to do with 
ACPI even though the crash during suspend doesn't always happen while 
"my" drivers _DIS method is being executed.

I've tried debugging the ACPI method by doing:
echo _DIS   >> /sys/module/acpi/parameters/trace_method_name
echo enable >> /sys/module/acpi/parameters/trace_state

and done a suspend/resume/suspend (i.e. caused the system to crash) 
while capturing the output via netconsole. I can't derive any 
interesting insights from the log though.

The decompiled dsdt table and the log capture from netconsole is 
attached to:
http://bugzilla.kernel.org/show_bug.cgi?id=15257

The first suspend starts at 203.176799 (the first line of the log) and 
ends around 209.083233 (line 2576), the resume starts right after the 
suspend and ends around 211.358430 (line 2712), the second suspend 
starts at 342.876299 (line 2718) and ends where the log file ends (with 
a freeze).

Any suggestions on what to try next?

(Please CC me on any replies)

-- 
David Härdeman

             reply	other threads:[~2010-02-09 18:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-08 10:13 David Härdeman [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-02-09  8:31 Why does my driver (drivers/input/misc/winbond-cir.c) break suspend? David

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=20100208101335.GA13907@hardeman.nu \
    --to=david@hardeman.nu \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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