Linux PARISC architecture development
 help / color / mirror / Atom feed
From: Grant Grundler <grundler@parisc-linux.org>
To: David Pye <dmp@davidmpye.dyndns.org>
Cc: James Bottomley <James.Bottomley@SteelEye.com>,
	PARISC list <parisc-linux@lists.parisc-linux.org>
Subject: Re: [parisc-linux] J5000 LED LCD patch (take 2)
Date: Thu, 24 Mar 2005 23:25:17 -0700	[thread overview]
Message-ID: <20050325062517.GH29361@colo.lackof.org> (raw)
In-Reply-To: <200503242100.06699.dmp@davidmpye.dyndns.org>

On Thu, Mar 24, 2005 at 09:00:05PM +0000, David Pye wrote:
...
> +	for (i=0; i<4; ++i) 
> +	{
> +		if ((leds & mask[i]) != (lastleds & mask[i])) 
> +		{
> +			gsc_writeb( blockp[i]->command, LCD_CMD_REG );
> +			msleep(msec_cmd_delay);
> +			
> +			gsc_writeb( leds & mask[i] ? blockp[i]->on : 
> +					blockp[i]->off, LCD_DATA_REG );
> +			msleep(msec_cmd_delay);
> +		}
>  	}
> +	lastleds = leds;

I still *really* like this bit. Good work!

> -   ** updates the chassis LCD/LED 
> +   ** is scheduled every 5 milliseconds and updates the chassis LCD/LED 
...
> -#define NORMALIZED_COUNT(count) (count/(HZ/100))
> +#define LED_MINIMUM_ON_TIME (HZ*10/100)

Why not just update every 10ms and ditch all the "minimum on time" stuff?
Can someone tell if an LED/LCD came on 5ms later than it should have been?

> +	static unsigned long diskio_on_jiffies;
> +	static unsigned long lantx_on_jiffies;
> +	static unsigned long lanrcv_on_jiffies;

If not, then this bit and...

> +	/* If the leds are on, but should be turned off, make sure they have been on for
> +	 * the minimum time, to prevent 'flutter' 
> +	 */

...and...

> +		else if (lastleds & LED_LAN_TX && time_before(jiffies, lantx_on_jiffies + LED_MINIMUM_ON_TIME))
> +		{
> +			currentleds |= LED_LAN_TX;
> +		}

can go away. Ditto for DiskIO.

We already know heartbeat stays on/off longer than that (about).

>  	/* blink all LEDs twice a second if we got an Oops (HPMC) */
> -	if (oops_in_progress) {
> +	if (oops_in_progress) 
> +	{
>  		currentleds = (count_HZ<=(HZ/2)) ? 0 : 0xff;
>  	}

Will this work for LCD?
Will the itimer continue to run and workq continue to get serviced?
Even if it does, I'm nervous about it.
Maybe stop all activity at that point?

The panic chassis log will get printed and that should be a good indicator.
Anyway, this is a seperate issue from the rest of the patch.

thanks,
grant
_______________________________________________
parisc-linux mailing list
parisc-linux@lists.parisc-linux.org
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux

  reply	other threads:[~2005-03-25  6:25 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-24 18:48 [parisc-linux] J5000 LED LCD patch (take 2) David Pye
2005-03-24 20:01 ` [parisc-linux] A second LCD patch David Pye
2005-03-24 20:05 ` [parisc-linux] J5000 LED LCD patch (take 2) James Bottomley
2005-03-24 21:00   ` David Pye
2005-03-25  6:25     ` Grant Grundler [this message]
2005-03-25 17:05       ` David Pye
2005-03-25 21:50         ` David Pye
2005-03-26  7:13           ` Grant Grundler
2005-03-26 15:14             ` David Pye
2005-03-26 15:33               ` James Bottomley
     [not found]                 ` <200503261545.05372.dmp@davidmpye.dyndns.org>
2005-03-26 15:51                   ` David Pye
2005-03-27  8:53               ` Grant Grundler
2005-03-27  9:38                 ` David Pye
2005-03-27 17:55                   ` David Pye
2005-03-28  1:51                     ` Grant Grundler
2005-03-28  2:13                   ` Grant Grundler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050325062517.GH29361@colo.lackof.org \
    --to=grundler@parisc-linux.org \
    --cc=James.Bottomley@SteelEye.com \
    --cc=dmp@davidmpye.dyndns.org \
    --cc=parisc-linux@lists.parisc-linux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox