From: Andrey Borzenkov <arvidjaar@mail.ru>
To: "Rafael J. Wysocki" <rjw@sisk.pl>,
linux-usb@vger.kernel.org, linux-acpi@vger.kernel.org
Cc: Ingo Molnar <mingo@elte.hu>,
Peter Zijlstra <peterz@infradead.org>,
linux-kernel@vger.kernel.org,
Thomas Gleixner <tglx@linutronix.de>
Subject: [2.6.29-rc2] ALi USB OHCI enables interrupts during power down in suspend.
Date: Mon, 19 Jan 2009 21:37:23 +0300 [thread overview]
Message-ID: <200901192137.25988.arvidjaar@mail.ru> (raw)
In-Reply-To: <200901191051.13211.rjw@sisk.pl>
[-- Attachment #1: Type: text/plain, Size: 4095 bytes --]
On 19 января 2009 12:51:12 Rafael J. Wysocki wrote:
> On Monday 19 January 2009, Andrey Borzenkov wrote:
> > On 19 января 2009 03:17:49 Rafael J. Wysocki wrote:
> > > On Sunday 18 January 2009, Andrey Borzenkov wrote:
> > > > On 18 января 2009 23:21:24 Rafael J. Wysocki wrote:
> > > > > > > As far as I can tell, timekeeping_resume is called via
> > > > > > > class ->resume method; and according to comments in
> > > > > > > sysdev_resume() and device_power_up(), they are called
> > > > > > > with interrupts disabled.
> > > > > > >
> > > > > > > Looking at suspend_enter, irqs *are* disabled at this
> > > > > > > point.
> > > > > > >
> > > > > > > So it actually looks like something (may be some driver)
> > > > > > > unconditionally enabled irqs in resume path.
> > > > > > >
> > > > > > > I believe the patch should be hold back until this is
> > > > > > > clarified.
> > > > > >
> > > > > > That's a nice theory!
> > > > >
> > > > > That would be a bad bug.
[...]
>
> However, I suspect the problem is somewhere else.
>
Right.
> Can you apply the patch I sent earlier in this thread
> (http://lkml.org/lkml/2009/1/18/183) and retest?
>
I did and it was silent. But with patch below I get:
[ 152.526550] Freezing user space processes ... (elapsed 0.01 seconds)
done.
[ 152.544162] Freezing remaining freezable tasks ... (elapsed 0.00 seconds)
done.
[ 152.544854] Suspending console(s) (use no_console_suspend to debug)
[ 152.556234] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[ 152.907091] sd 0:0:0:0: [sda] Stopping disk
[ 153.579824] pci 0000:01:00.0: power state changed by ACPI to D3
[ 153.594449] e100 0000:00:0a.0: PME# enabled
[ 153.594688] e100 0000:00:0a.0: wake-up capability enabled by ACPI
[ 153.594855] e100 0000:00:0a.0: PCI INT A disabled
[ 153.650834] ALI 5451 0000:00:06.0: PCI INT A disabled
[ 153.663826] ALI 5451 0000:00:06.0: power state changed by ACPI to D3
[ 154.417072] pata_ali 0000:00:04.0: can't derive routing for PCI INT A
[ 154.430275] ohci_hcd 0000:00:02.0: PME# enabled
[ 154.430490] ohci_hcd 0000:00:02.0: wake-up capability enabled by ACPI
[ 154.430520] ohci_hcd 0000:00:02.0: PCI INT A disabled
[ 154.446867] ACPI: Preparing to enter system sleep state S3
[ 154.460237] ------------[ cut here ]------------
[ 154.460250] WARNING: at /home/bor/src/linux-
git/drivers/base/power/main.c:579 device_power_down+0x18f/0x1e0()
[ 154.460259] Hardware name: PORTEGE 4000
[ 154.460265] Interrupts enabled after 0000:00:02.0!
The device is
{pts/2}% lspci -nnv -s 00:02.0
00:02.0 USB Controller [0c03]: ALi Corporation USB 1.1 Controller
[10b9:5237] (rev 03) (prog-if 10 [OHCI])
Subsystem: Toshiba America Info Systems Device [1179:0004]
Flags: bus master, medium devsel, latency 64, IRQ 11
Memory at f7eff000 (32-bit, non-prefetchable) [size=4K]
Capabilities: <access denied>
Kernel driver in use: ohci_hcd
Kernel modules: ohci-hcd
and this does not surprise me at all given all the problems I had with this
USB controller.
Suspicious is
ohci_hcd 0000:00:02.0: wake-up capability enabled by ACPI
this controller has history of broken wake up functionality.
Patch follows:
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
index 670c9d6..e5e9c11 100644
--- a/drivers/base/power/main.c
+++ b/drivers/base/power/main.c
@@ -569,12 +569,14 @@ int device_power_down(pm_message_t state)
struct device *dev;
int error = 0;
+ WARN_ONCE(!irqs_disabled(), "Interrupts enabled!\n");
list_for_each_entry_reverse(dev, &dpm_list, power.entry) {
error = suspend_device_noirq(dev, state);
if (error) {
pm_dev_err(dev, state, " late", error);
break;
}
+ WARN_ONCE(!irqs_disabled(), "Interrupts enabled after %s!
\n", de
v_name(dev));
dev->power.status = DPM_OFF_IRQ;
}
if (!error)
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
next parent reply other threads:[~2009-01-19 18:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200901181642.00886.arvidjaar@mail.ru>
[not found] ` <200901190722.10762.arvidjaar@mail.ru>
[not found] ` <200901191051.13211.rjw@sisk.pl>
2009-01-19 18:37 ` Andrey Borzenkov [this message]
[not found] ` <200901192137.25988.arvidjaar-JGs/UdohzUI@public.gmane.org>
2009-01-19 19:13 ` [2.6.29-rc2] ALi USB OHCI enables interrupts during power down in suspend Rafael J. Wysocki
2009-01-19 20:33 ` Andrey Borzenkov
2009-01-19 20:48 ` Rafael J. Wysocki
2009-01-19 23:45 ` Ingo Molnar
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=200901192137.25988.arvidjaar@mail.ru \
--to=arvidjaar@mail.ru \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=rjw@sisk.pl \
--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