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 <[email protected]>
--- 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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]