* [patch] [resend] Fix swsusp with PNP BIOS
@ 2006-07-24 18:28 Ondrej Zary
2006-07-24 21:25 ` Rafael J. Wysocki
0 siblings, 1 reply; 6+ messages in thread
From: Ondrej Zary @ 2006-07-24 18:28 UTC (permalink / raw)
To: Linux List
Hello,
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>
--- 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [patch] [resend] Fix swsusp with PNP BIOS
2006-07-24 18:28 [patch] [resend] Fix swsusp with PNP BIOS Ondrej Zary
@ 2006-07-24 21:25 ` Rafael J. Wysocki
2006-07-24 22:56 ` Pavel Machek
2006-07-24 23:23 ` Nigel Cunningham
0 siblings, 2 replies; 6+ messages in thread
From: Rafael J. Wysocki @ 2006-07-24 21:25 UTC (permalink / raw)
To: Ondrej Zary; +Cc: Linux List, Pavel Machek
Hi,
On Monday 24 July 2006 20:28, Ondrej Zary wrote:
> Hello,
> 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.
Thanks for the patch.
Pavel, what do you think?
> 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))
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [patch] [resend] Fix swsusp with PNP BIOS
2006-07-24 21:25 ` Rafael J. Wysocki
@ 2006-07-24 22:56 ` Pavel Machek
2006-07-24 23:23 ` Nigel Cunningham
1 sibling, 0 replies; 6+ messages in thread
From: Pavel Machek @ 2006-07-24 22:56 UTC (permalink / raw)
To: Rafael J. Wysocki; +Cc: Ondrej Zary, Linux List
On Mon 2006-07-24 23:25:50, Rafael J. Wysocki wrote:
> Hi,
>
> On Monday 24 July 2006 20:28, Ondrej Zary wrote:
> > Hello,
> > 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.
>
> Thanks for the patch.
>
> Pavel, what do you think?
Knowing nothing about pnpbios it looks okay to me.
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [patch] [resend] Fix swsusp with PNP BIOS
2006-07-24 21:25 ` Rafael J. Wysocki
2006-07-24 22:56 ` Pavel Machek
@ 2006-07-24 23:23 ` Nigel Cunningham
2006-07-25 19:17 ` Adam Belay
1 sibling, 1 reply; 6+ messages in thread
From: Nigel Cunningham @ 2006-07-24 23:23 UTC (permalink / raw)
To: Rafael J. Wysocki; +Cc: Ondrej Zary, Linux List, Pavel Machek, Adam Belay
[-- Attachment #1: Type: text/plain, Size: 994 bytes --]
Hi.
On Tuesday 25 July 2006 07:25, Rafael J. Wysocki wrote:
> Hi,
>
> On Monday 24 July 2006 20:28, Ondrej Zary wrote:
> > Hello,
> > 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.
>
> Thanks for the patch.
>
> Pavel, what do you think?
Adam is probably a better person to ask. (Added to cc).
Regards,
Nigel
[-- Attachment #2: Type: application/pgp-signature, Size: 191 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [patch] [resend] Fix swsusp with PNP BIOS
2006-07-24 23:23 ` Nigel Cunningham
@ 2006-07-25 19:17 ` Adam Belay
2006-07-25 19:52 ` Rafael J. Wysocki
0 siblings, 1 reply; 6+ messages in thread
From: Adam Belay @ 2006-07-25 19:17 UTC (permalink / raw)
To: Nigel Cunningham, Ondrej Zary; +Cc: Rafael J. Wysocki, Linux List, Pavel Machek
On Tue, 2006-07-25 at 09:23 +1000, Nigel Cunningham wrote:
> Hi.
>
> On Tuesday 25 July 2006 07:25, Rafael J. Wysocki wrote:
> > Hi,
> >
> > On Monday 24 July 2006 20:28, Ondrej Zary wrote:
> > > Hello,
> > > 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.
> >
> > Thanks for the patch.
> >
> > Pavel, what do you think?
>
> Adam is probably a better person to ask. (Added to cc).
I appreciate it.
>
> Regards,
>
> Nigel
The patch looks good. Maybe we should even do this check for
PNP_CONFIGURABLE.
Thanks,
Adam
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [patch] [resend] Fix swsusp with PNP BIOS
2006-07-25 19:17 ` Adam Belay
@ 2006-07-25 19:52 ` Rafael J. Wysocki
0 siblings, 0 replies; 6+ messages in thread
From: Rafael J. Wysocki @ 2006-07-25 19:52 UTC (permalink / raw)
To: Adam Belay; +Cc: Nigel Cunningham, Ondrej Zary, Linux List, Pavel Machek
On Tuesday 25 July 2006 21:17, Adam Belay wrote:
> On Tue, 2006-07-25 at 09:23 +1000, Nigel Cunningham wrote:
> > Hi.
> >
> > On Tuesday 25 July 2006 07:25, Rafael J. Wysocki wrote:
> > > Hi,
> > >
> > > On Monday 24 July 2006 20:28, Ondrej Zary wrote:
> > > > Hello,
> > > > 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.
> > >
> > > Thanks for the patch.
> > >
> > > Pavel, what do you think?
> >
> > Adam is probably a better person to ask. (Added to cc).
>
> I appreciate it.
>
> >
> > Regards,
> >
> > Nigel
>
> The patch looks good.
I'll send it to Andrew then. I assume I can place your ACK on it?
Rafael
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2006-07-25 19:52 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-24 18:28 [patch] [resend] Fix swsusp with PNP BIOS Ondrej Zary
2006-07-24 21:25 ` Rafael J. Wysocki
2006-07-24 22:56 ` Pavel Machek
2006-07-24 23:23 ` Nigel Cunningham
2006-07-25 19:17 ` Adam Belay
2006-07-25 19:52 ` Rafael J. Wysocki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox