On Sat 2019-05-25 19:02:47, Jacek Anaszewski wrote: > Hi, > > On 5/23/19 11:43 PM, Pavel Machek wrote: > >Hi! > > > >I'm trying to use disk activity trigger on a scrollock LED... but it > >significantly differs from "usual" disk LED: even under "full" disk > >activity (linear read) where it should be solidly "on", it keeps > >blinking. > > > >I guess that's what led_trigger_blink_oneshot() does. I tried to > >change the parameters... off_delay == 0 breaks it completely, and even > >with delay of 1 it behaves very weirdly. > > > >Is there better helper I should use? > > It seems this is the way how led_blink_set_oneshot() works. > It initially checks whether timer is pending and doesn't > reset the timer in this case: > > if (test_bit(LED_BLINK_ONESHOT, &led_cdev->work_flags) && > timer_pending(&led_cdev->blink_timer)) > return; > > In effect you get gaps between timer expiration and setting of a new > blink shot. Yep. I consider it a bug (it differs from hardware disk activity LEDs and looks horrible). Is there someone who considers it a feature? Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Attachment:
signature.asc
Description: Digital signature