Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 140037
b: refs/heads/master
c: 8a1def4
h: refs/heads/master
i:
  140035: 68cbcba
v: v3
  • Loading branch information
Helge Deller authored and Kyle McMartin committed Mar 31, 2009
1 parent c8a82ec commit 9d93424
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d75f054a2cf0614ff63d534ff21ca8eaab41e713
refs/heads/master: 8a1def457bab9f9654bd4dbb1e3eea6fedd26afa
23 changes: 17 additions & 6 deletions trunk/drivers/parisc/led.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* (c) Copyright 2000 Red Hat Software
* (c) Copyright 2000 Helge Deller <hdeller@redhat.com>
* (c) Copyright 2001-2005 Helge Deller <deller@gmx.de>
* (c) Copyright 2001-2009 Helge Deller <deller@gmx.de>
* (c) Copyright 2001 Randolph Chung <tausq@debian.org>
*
* This program is free software; you can redistribute it and/or modify
Expand Down Expand Up @@ -463,9 +463,20 @@ static void led_work_func (struct work_struct *unused)
if (likely(led_lanrxtx)) currentleds |= led_get_net_activity();
if (likely(led_diskio)) currentleds |= led_get_diskio_activity();

/* blink all LEDs twice a second if we got an Oops (HPMC) */
if (unlikely(oops_in_progress))
currentleds = (count_HZ<=(HZ/2)) ? 0 : 0xff;
/* blink LEDs if we got an Oops (HPMC) */
if (unlikely(oops_in_progress)) {
if (boot_cpu_data.cpu_type >= pcxl2) {
/* newer machines don't have loadavg. LEDs, so we
* let all LEDs blink twice per second instead */
currentleds = (count_HZ <= (HZ/2)) ? 0 : 0xff;
} else {
/* old machines: blink loadavg. LEDs twice per second */
if (count_HZ <= (HZ/2))
currentleds &= ~(LED4|LED5|LED6|LED7);
else
currentleds |= (LED4|LED5|LED6|LED7);
}
}

if (currentleds != lastleds)
{
Expand Down Expand Up @@ -511,7 +522,7 @@ static int led_halt(struct notifier_block *nb, unsigned long event, void *buf)

/* Cancel the work item and delete the queue */
if (led_wq) {
cancel_rearming_delayed_workqueue(led_wq, &led_task);
cancel_delayed_work_sync(&led_task);
destroy_workqueue(led_wq);
led_wq = NULL;
}
Expand Down Expand Up @@ -630,7 +641,7 @@ int lcd_print( const char *str )

/* temporarily disable the led work task */
if (led_wq)
cancel_rearming_delayed_workqueue(led_wq, &led_task);
cancel_delayed_work_sync(&led_task);

/* copy display string to buffer for procfs */
strlcpy(lcd_text, str, sizeof(lcd_text));
Expand Down

0 comments on commit 9d93424

Please sign in to comment.