Thread (5 messages) 5 messages, 2 authors, 2011-03-10

Re: [PATCH 2/2] wl1251: fix elp_work race condition

From: Kalle Valo <hidden>
Date: 2011-03-10 15:16:00

Grazvydas Ignotas [off-list ref] writes:
While working on PS I've noticed elp_work is kicking rather often, and
sometimes the chip is put to sleep before 5ms delay expires. This
seems to happen because by the time wl1251_ps_elp_wakeup is called
elp_work might still be pending. After wakeup is done, the processing
may take some time, during which 5ms might expire and elp_work might
get scheduled. In this case, ss soon as 1st thread finishes work and
releases the mutex, elp_work will then put the device to sleep without
5ms delay. In addition 1st thread will queue additional elp_work
needlessly.

Fix this by cancelling work in wl1251_ps_elp_wakeup instead.
Thanks for debugging this.
Signed-off-by: Grazvydas Ignotas <redacted>
Acked-by: Kalle Valo <redacted>

-- 
Kalle Valo
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help