diff options
author | Ondrej Zary <linux@rainbow-software.org> | 2006-07-30 06:03:55 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-07-31 16:28:41 -0400 |
commit | 3ae192080cb4d007792d13522efa98ebe7f15475 (patch) | |
tree | 98786f16ad5946c907b17b6c46be1076349a4a3c | |
parent | 5b6509aa8c2f292caea7c0602ec361f920951508 (diff) |
[PATCH] Fix swsusp with PNP BIOS
swsusp is unable to suspend my machine (DTK FortisPro TOP-5A notebook) with
kernel 2.6.17.5 because it's unable to suspend PNP device 00:16 (mouse).
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>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | drivers/pnp/pnpbios/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pnp/pnpbios/core.c b/drivers/pnp/pnpbios/core.c index b154b3f52cbe..551f58e29810 100644 --- a/drivers/pnp/pnpbios/core.c +++ b/drivers/pnp/pnpbios/core.c | |||
@@ -346,7 +346,7 @@ static int insert_device(struct pnp_dev *dev, struct pnp_bios_node * node) | |||
346 | dev->flags = node->flags; | 346 | dev->flags = node->flags; |
347 | if (!(dev->flags & PNPBIOS_NO_CONFIG)) | 347 | if (!(dev->flags & PNPBIOS_NO_CONFIG)) |
348 | dev->capabilities |= PNP_CONFIGURABLE; | 348 | dev->capabilities |= PNP_CONFIGURABLE; |
349 | if (!(dev->flags & PNPBIOS_NO_DISABLE)) | 349 | if (!(dev->flags & PNPBIOS_NO_DISABLE) && pnpbios_is_dynamic(dev)) |
350 | dev->capabilities |= PNP_DISABLE; | 350 | dev->capabilities |= PNP_DISABLE; |
351 | dev->capabilities |= PNP_READ; | 351 | dev->capabilities |= PNP_READ; |
352 | if (pnpbios_is_dynamic(dev)) | 352 | if (pnpbios_is_dynamic(dev)) |