* uevent before resume completion
@ 2008-09-22 14:19 Yauhen Kharuzhy
2008-10-05 9:49 ` Pavel Machek
0 siblings, 1 reply; 3+ messages in thread
From: Yauhen Kharuzhy @ 2008-09-22 14:19 UTC (permalink / raw)
To: linux-pm
Hi.
We have an ARM board which does wakeup on USB cable connection to
it. In our power supply driver "USB connect" interrupt handler calls
power_supply_changed() which cause generation of uevent (in
power_supply_changed_work() ). But usermodehelper_disabled
still equals to 1 because resume process is not finished yet and
userspace helper is not executed.
How to fix this behaviour without breaking other kernel parts? We
definitely need to invoke userspace helper on USB cable insertion. Yes,
we can generate event after some time with timer but I think that a more
elegant solution can be found.
Please, CC: answers to me.
--
Yauhen Kharuzhy jekhor _at_ gmail.com
JID: jek@jabber.ru
A: No
Q: Should I quote below my post?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: uevent before resume completion
2008-09-22 14:19 uevent before resume completion Yauhen Kharuzhy
@ 2008-10-05 9:49 ` Pavel Machek
2008-10-05 22:06 ` Nigel Cunningham
0 siblings, 1 reply; 3+ messages in thread
From: Pavel Machek @ 2008-10-05 9:49 UTC (permalink / raw)
To: Yauhen Kharuzhy; +Cc: linux-pm
On Mon 2008-09-22 17:19:59, Yauhen Kharuzhy wrote:
> Hi.
>
> We have an ARM board which does wakeup on USB cable connection to
> it. In our power supply driver "USB connect" interrupt handler calls
> power_supply_changed() which cause generation of uevent (in
> power_supply_changed_work() ). But usermodehelper_disabled
> still equals to 1 because resume process is not finished yet and
> userspace helper is not executed.
>
> How to fix this behaviour without breaking other kernel parts? We
> definitely need to invoke userspace helper on USB cable insertion. Yes,
> we can generate event after some time with timer but I think that a more
> elegant solution can be found.
If you do it such that your 'delayed uevent' code can be reused by
other subsystems, it should not be too bad...
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: uevent before resume completion
2008-10-05 9:49 ` Pavel Machek
@ 2008-10-05 22:06 ` Nigel Cunningham
0 siblings, 0 replies; 3+ messages in thread
From: Nigel Cunningham @ 2008-10-05 22:06 UTC (permalink / raw)
To: Pavel Machek; +Cc: linux-pm, Yauhen Kharuzhy
Hi.
On Sun, 2008-10-05 at 11:49 +0200, Pavel Machek wrote:
> On Mon 2008-09-22 17:19:59, Yauhen Kharuzhy wrote:
> > Hi.
> >
> > We have an ARM board which does wakeup on USB cable connection to
> > it. In our power supply driver "USB connect" interrupt handler calls
> > power_supply_changed() which cause generation of uevent (in
> > power_supply_changed_work() ). But usermodehelper_disabled
> > still equals to 1 because resume process is not finished yet and
> > userspace helper is not executed.
> >
> > How to fix this behaviour without breaking other kernel parts? We
> > definitely need to invoke userspace helper on USB cable insertion. Yes,
> > we can generate event after some time with timer but I think that a more
> > elegant solution can be found.
>
> If you do it such that your 'delayed uevent' code can be reused by
> other subsystems, it should not be too bad...
One option would be to use the pm_notifier call chain, but it sounds to
me like a better solution would be for someone to modify the
kernel/kmod.c to handle delaying tasks until post hibernate/suspend if
they're UMH_NO_WAIT (Yauhen, is your call blocking?)
Regards,
Nigel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-10-05 22:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-22 14:19 uevent before resume completion Yauhen Kharuzhy
2008-10-05 9:49 ` Pavel Machek
2008-10-05 22:06 ` Nigel Cunningham
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox