From: Artem Bityutskiy <dedekind1@gmail.com>
To: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Cc: David Woodhouse <dwmw2@infradead.org>, linux-mtd@lists.infradead.org
Subject: Re: [PATCH] [MTD] Adjust the NOR CFI flash timeouts to round better
Date: Mon, 15 Oct 2012 16:42:36 +0300 [thread overview]
Message-ID: <1350308556.5769.5.camel@sauron.fi.intel.com> (raw)
In-Reply-To: <20121005183202.GA11385@obsidianresearch.com>
[-- Attachment #1: Type: text/plain, Size: 1030 bytes --]
On Fri, 2012-10-05 at 12:32 -0600, Jason Gunthorpe wrote:
> - /* see comments in do_write_oneword() regarding uWriteTimeo. */
> - unsigned long uWriteTimeout = ( HZ / 1000 ) + 1;
> + /* see comments in do_write_oneword() regarding uWriteTimeo.
> + Note: write_buffer commands take longer so we use a higher
> + time. The AMD 29LV256M for instance has a datasheet max
> + of 1.2ms for page and 600us for byte */
> + unsigned long uWriteTimeout = (HZ / 1500) + 2;
What does HZ / 1500 mean? HZ is amount of timer interrupts per second,
which may be 1/100, or 1/1000, or 1/300, depending on the system.
The CFI code seems to assume that HZ is 1/1000, which is wrong. I think
the entire timeout strategy in this file should be cleaned up. You
should use 'jiffies_to_msecs()' / 'msecs_to_jiffies()' helpers instead
of using 'HZ'. And time-outs should be specified in msecs, not in
jiffies. There should be no things like 'HZ/1500'.
Or do I misunderstand something?
--
Best Regards,
Artem Bityutskiy
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2012-10-15 13:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-05 18:32 [PATCH] [MTD] Adjust the NOR CFI flash timeouts to round better Jason Gunthorpe
2012-10-15 13:42 ` Artem Bityutskiy [this message]
2012-10-15 16:09 ` David Woodhouse
2012-10-15 16:57 ` Jason Gunthorpe
2012-10-15 17:31 ` David Woodhouse
2012-10-15 17:49 ` Jason Gunthorpe
2012-10-15 18:32 ` David Woodhouse
2012-10-15 19:08 ` Jason Gunthorpe
2012-10-15 19:28 ` Artem Bityutskiy
2012-10-15 20:00 ` David Woodhouse
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=1350308556.5769.5.camel@sauron.fi.intel.com \
--to=dedekind1@gmail.com \
--cc=dwmw2@infradead.org \
--cc=jgunthorpe@obsidianresearch.com \
--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