diff options
-rw-r--r-- | drivers/parisc/led.c | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/drivers/parisc/led.c b/drivers/parisc/led.c index 454b6532e409..75ff6d78f002 100644 --- a/drivers/parisc/led.c +++ b/drivers/parisc/led.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * (c) Copyright 2000 Red Hat Software | 4 | * (c) Copyright 2000 Red Hat Software |
5 | * (c) Copyright 2000 Helge Deller <hdeller@redhat.com> | 5 | * (c) Copyright 2000 Helge Deller <hdeller@redhat.com> |
6 | * (c) Copyright 2001-2005 Helge Deller <deller@gmx.de> | 6 | * (c) Copyright 2001-2009 Helge Deller <deller@gmx.de> |
7 | * (c) Copyright 2001 Randolph Chung <tausq@debian.org> | 7 | * (c) Copyright 2001 Randolph Chung <tausq@debian.org> |
8 | * | 8 | * |
9 | * This program is free software; you can redistribute it and/or modify | 9 | * This program is free software; you can redistribute it and/or modify |
@@ -463,9 +463,20 @@ static void led_work_func (struct work_struct *unused) | |||
463 | if (likely(led_lanrxtx)) currentleds |= led_get_net_activity(); | 463 | if (likely(led_lanrxtx)) currentleds |= led_get_net_activity(); |
464 | if (likely(led_diskio)) currentleds |= led_get_diskio_activity(); | 464 | if (likely(led_diskio)) currentleds |= led_get_diskio_activity(); |
465 | 465 | ||
466 | /* blink all LEDs twice a second if we got an Oops (HPMC) */ | 466 | /* blink LEDs if we got an Oops (HPMC) */ |
467 | if (unlikely(oops_in_progress)) | 467 | if (unlikely(oops_in_progress)) { |
468 | currentleds = (count_HZ<=(HZ/2)) ? 0 : 0xff; | 468 | if (boot_cpu_data.cpu_type >= pcxl2) { |
469 | /* newer machines don't have loadavg. LEDs, so we | ||
470 | * let all LEDs blink twice per second instead */ | ||
471 | currentleds = (count_HZ <= (HZ/2)) ? 0 : 0xff; | ||
472 | } else { | ||
473 | /* old machines: blink loadavg. LEDs twice per second */ | ||
474 | if (count_HZ <= (HZ/2)) | ||
475 | currentleds &= ~(LED4|LED5|LED6|LED7); | ||
476 | else | ||
477 | currentleds |= (LED4|LED5|LED6|LED7); | ||
478 | } | ||
479 | } | ||
469 | 480 | ||
470 | if (currentleds != lastleds) | 481 | if (currentleds != lastleds) |
471 | { | 482 | { |
@@ -511,7 +522,7 @@ static int led_halt(struct notifier_block *nb, unsigned long event, void *buf) | |||
511 | 522 | ||
512 | /* Cancel the work item and delete the queue */ | 523 | /* Cancel the work item and delete the queue */ |
513 | if (led_wq) { | 524 | if (led_wq) { |
514 | cancel_rearming_delayed_workqueue(led_wq, &led_task); | 525 | cancel_delayed_work_sync(&led_task); |
515 | destroy_workqueue(led_wq); | 526 | destroy_workqueue(led_wq); |
516 | led_wq = NULL; | 527 | led_wq = NULL; |
517 | } | 528 | } |
@@ -630,7 +641,7 @@ int lcd_print( const char *str ) | |||
630 | 641 | ||
631 | /* temporarily disable the led work task */ | 642 | /* temporarily disable the led work task */ |
632 | if (led_wq) | 643 | if (led_wq) |
633 | cancel_rearming_delayed_workqueue(led_wq, &led_task); | 644 | cancel_delayed_work_sync(&led_task); |
634 | 645 | ||
635 | /* copy display string to buffer for procfs */ | 646 | /* copy display string to buffer for procfs */ |
636 | strlcpy(lcd_text, str, sizeof(lcd_text)); | 647 | strlcpy(lcd_text, str, sizeof(lcd_text)); |