public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: "Jan Pedersen" <jan.pedersen@glaze.dk>
To: "'Jörn Engel'" <joern@wohnheim.fh-wedel.de>
Cc: linux-mtd@lists.infradead.org
Subject: RE: [patch] cfi: prevent kernel panic with cfi flash
Date: Thu, 6 Oct 2005 22:19:20 +0200	[thread overview]
Message-ID: <20051006201924.67089376459@rocket.glaze.se> (raw)
In-Reply-To: <20051005132548.GB1290@wohnheim.fh-wedel.de>

> Hmm.  Is there a good reason to pick (HZ) instead of (HZ/1000 + 1)?
> The latter would be one jiffy more than 1ms, much closer to intended
> value and still always nonzero.

It is not that important what the value is set to. I just checked the
datasheet, and my flash chips have a word write timing of maximum 210 uS
(typical 9 uS). After the 210 uS, dq5 is raised to indicate a write timeout.
This is detected by the sw, so the 1 ms timeout is never reached unless
there is a bug in hw or sw. Assuming that other flash chips have similar
write timings, 1 ms is enough, however, since the kernel panics instead
doing some retry, reaching the timeout means a dead box. Since the timeout
is initialized BEFORE the first poll, and the last time_after() call is done
AFTER the last poll, the actual timeout might be lower than intended if
jiffies ticks just after timeout initialization. So I simply picked the
value HZ.

      reply	other threads:[~2005-10-06 20:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-04 20:47 [patch] cfi: prevent kernel panic with cfi flash Jan Pedersen
2005-10-05 13:25 ` Jörn Engel
2005-10-06 20:19   ` Jan Pedersen [this message]

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=20051006201924.67089376459@rocket.glaze.se \
    --to=jan.pedersen@glaze.dk \
    --cc=joern@wohnheim.fh-wedel.de \
    --cc=linux-mtd@lists.infradead.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