Skip to contentSkip to conversation

uevent before resume completion

DISCUSSION Yauhen Kharuzhy 3 participants 3 messages Sep 22, 2008 – Oct 5, 2008

lore
Share & tools
lore
#0 lore raw

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.

Signature · 5 lines
Yauhen Kharuzhy		jekhor _at_ gmail.com
			JID: [email protected]

A: No
Q: Should I quote below my post?
#1 lore raw
Quoted 9 lines · Yauhen Kharuzhy

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.

Quoted 4 lines

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...

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#2 lore raw

Hi.

Quoted 10 lines · Pavel Machek
Quoted 9 lines · Yauhen Kharuzhy

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.

Quoted 7 lines
Quoted 4 lines

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