From: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
To: David Woodhouse <dwmw2@infradead.org>
Cc: linux-mtd@lists.infradead.org, dedekind1@gmail.com
Subject: Re: [PATCH] [MTD] Adjust the NOR CFI flash timeouts to round better
Date: Mon, 15 Oct 2012 13:08:13 -0600 [thread overview]
Message-ID: <20121015190813.GA7638@obsidianresearch.com> (raw)
In-Reply-To: <1350325973.14124.49.camel@shinybook.infradead.org>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=unknown-8bit, Size: 1122 bytes --]
On Mon, Oct 15, 2012 at 11:32:53AM -0700, David Woodhouse wrote:
> Yes, HZ/1500+1 I could understand. That's the number of jiffies that
> give you '666µs or more'. The +2 is odd though.
Looking more closely I agree, it seems bogus - the use of time_after
takes care of the short first jiffy problem, the real problem I see is
that 1500 was supposed to be µs, that is close to the datasheet spec
for the flash I have. Fixing that will almost double the timeout on my
systems...
> > > I'd like someone with infinite amounts of free time to go through and
> > > clean them all up :)
> >
> > lol! Would you accept msecs_to_jiffies conversion for the cfi files?
>
> Absolutely. Although I'd like to take a little step back and take a more
> thoughtful view of how we *should* be handing these timeouts, rather
> than a simple janitor-style conversion of the existing code.
Okay, well, I'll send a patch in a few days, if there is a better way
than:
unsigned long uWriteTimeout = usecs_to_jiffies(1500);
timeo = jiffies + uWriteTimeout;
if (time_after(jiffies, timeo)) // TIMEOUT
Maybe someone will pipe up?
Jason
next prev parent reply other threads:[~2012-10-15 19:08 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
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 [this message]
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=20121015190813.GA7638@obsidianresearch.com \
--to=jgunthorpe@obsidianresearch.com \
--cc=dedekind1@gmail.com \
--cc=dwmw2@infradead.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.