linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ondrej Zary <linux@rainbow-software.org>
To: Vojtech Pavlik <vojtech@suse.cz>
Cc: Pavel Machek <pavel@ucw.cz>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Trying to get swsusp working on DTK FortisPro TOP-5A notebook
Date: Sun, 23 Jul 2006 00:06:31 +0200	[thread overview]
Message-ID: <200607230006.31704.linux@rainbow-software.org> (raw)
In-Reply-To: <20060427074025.GA11322@suse.cz>

On Thursday 27 April 2006 09:40, Vojtech Pavlik wrote:
> On Fri, Apr 21, 2006 at 08:43:24AM +0000, Pavel Machek wrote:
> > On Tue 25-04-06 18:33:16, Ondrej Zary wrote:
> > > Hello,
> > > I'm trying to get swsusp working on my DTK FortisPro
> > > TOP-5A notebook. I compiled 2.6.16 kernel with drivers
> > > compiled in (ES1869 sound, TI CardBus, Xircom PCMCIA
> > > ethernet, Orinoco wifi and maybe something more). There
> > > is no ACPI as BIOS does not support it. The problem is
> > > that when I do "echo disk >/sys/power/state", it refuses
> > > to suspend:
> > >
> > > Stopping tasks: =============================|
> > > Shrinking memory... done (8698 pages freed)
> > > pnp: Device 00:19 disabled.
> > > pnp: Failed to disable device 00:16.
> > > Could not suspend device 00:16: error -5
> > > pnp: Device 00:19 activated.
> > > PCI: Found IRQ 11 for device 0000:00:01.2
> > > PCI: Found IRQ 9 for device 0000:00:0e.0
> > > PCI: Found IRQ 11 for device 0000:00:0e.1
> > > eth0: autonegotiation failed; using 10mbs
> > > eth0: MII selected
> > > eth0: media 10BaseT, silicon revision 4
> > > Some devices failed to suspend
> > > Restarting tasks... done
> > >
> > >
> > > Device 00:19 is gameport of the sound card (it seems to
> > > suspend fine), however device 00:16 does not. It seems to
> > > be the synaptics touchpad:
> >
> > rmmod touchpad driver before suspend; if it helps, fix psmouse.
>
> This is a problem in ACPI PnP layer - the device doesn't have a disable
> method (it simply doesn't support disabling in hardware). Not being able
> to disable it probably should be ignored when suspending.

Finally, I debugged it today. The problem is in PNP BIOS. pnp_bus_suspend() 
calls pnp_stop_dev() for the device if the device can be disabled according 
to pnp_can_disable(). The problem is that pnpbios_disable_resources() 
returns -EPERM if the device is not dynamic (!pnpbios_is_dynamic()) but 
insert_device() happily sets PNP_DISABLE capability/flag even if the device 
is not dynamic. So we try to disable non-dynamic devices which will fail. 
This patch prevents insert_device() from setting PNP_DISABLE if the device is 
not dynamic and fixes suspend on my system.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>

--- linux-2.6.17.5-orig/drivers/pnp/pnpbios/core.c	2006-07-15 
04:38:43.000000000 +0200
+++ linux-2.6.17.5/drivers/pnp/pnpbios/core.c	2006-07-22 18:44:36.000000000 
+0200
@@ -346,7 +346,7 @@
 	dev->flags = node->flags;
 	if (!(dev->flags & PNPBIOS_NO_CONFIG))
 		dev->capabilities |= PNP_CONFIGURABLE;
-	if (!(dev->flags & PNPBIOS_NO_DISABLE))
+	if (!(dev->flags & PNPBIOS_NO_DISABLE) && pnpbios_is_dynamic(dev))
 		dev->capabilities |= PNP_DISABLE;
 	dev->capabilities |= PNP_READ;
 	if (pnpbios_is_dynamic(dev))

-- 
Ondrej Zary

      parent reply	other threads:[~2006-07-22 22:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-25 16:33 Trying to get swsusp working on DTK FortisPro TOP-5A notebook Ondrej Zary
2006-04-21  8:43 ` Pavel Machek
2006-04-27  7:40   ` Vojtech Pavlik
2006-04-27  9:38     ` Pavel Machek
2006-04-27 13:46     ` Ondrej Zary
2006-07-22 22:06     ` Ondrej Zary [this message]

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=200607230006.31704.linux@rainbow-software.org \
    --to=linux@rainbow-software.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=vojtech@suse.cz \
    /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).