On Fri, Jan 30, 2009 at 9:27 PM, Helge Deller <deller@xxxxxx> wrote: > Thibaut VARENE wrote: >> On Wed, Jan 21, 2009 at 3:31 PM, Kyle McMartin <kyle@xxxxxxxxxxxxx> wrote: >> >>> commit 1890e15142aa1318bb9775c4ea021aa022c506dc >>> Author: Helge Deller <deller@xxxxxx> >>> Date: Tue Jan 6 14:23:13 2009 +0100 >>> >>> parisc: blink loadavg LEDs on Oops >>> >> >> I thought we agreed this was a bad idea and that this patch should be >> left aside? >> Helge? > > Yes, that was an idea. > But we can easily detect which kind of machine it is, and then > either blink all LEDs or just the loadavg. LEDs. The patch below > does this and should be then fine for you? Ayup ;) Thanks for coming up with this! Acked-by: Thibaut Varène <varenet@xxxxxxxxxxxxxxxx> (if that matters ;) > Kyle, could you apply the patch below as well? > > Helge > ------------------------------------------------------------ > parisc: blink all or loadavg. LEDs on Oops depending on machine type. > > Signed-off-by: Helge Deller <deller@xxxxxx> > > diff --git a/drivers/parisc/led.c b/drivers/parisc/led.c > index 6d8753e..d6026d4 100644 > --- a/drivers/parisc/led.c > +++ b/drivers/parisc/led.c > @@ -463,12 +463,19 @@ 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 loadavg LEDs twice per second if we got an Oops (HPMC) */ > + /* blink LEDs if we got an Oops (HPMC) */ > if (unlikely(oops_in_progress)) { > - if (count_HZ <= (HZ/2)) > - currentleds &= ~(LED4|LED5|LED6|LED7); > - else > - currentleds |= (LED4|LED5|LED6|LED7); > + 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) > -- > To unsubscribe from this list: send the line "unsubscribe linux-parisc" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- Thibaut VARENE http://www.parisc-linux.org/~varenet/ -- To unsubscribe from this list: send the line "unsubscribe linux-parisc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html