From: Nicholas Mc Guire <der.herr@hofr.at>
To: Michael Schmitz <schmitzmic@gmail.com>
Cc: Finn Thain <fthain@telegraphics.com.au>,
"James E.J. Bottomley" <JBottomley@parallels.com>,
linux-scsi@vger.kernel.org
Subject: Re: [PATCH v2] scsi: NCR5380: use msecs_to_jiffies for conversions
Date: Sun, 1 Feb 2015 08:14:12 +0100 [thread overview]
Message-ID: <20150201071412.GA21711@opentech.at> (raw)
In-Reply-To: <d0a6819903df0864d2785bc209409cef@gmail.com>
On Sun, 01 Feb 2015, Michael Schmitz wrote:
> Finn, Nicholas,
>
>> On Sat, 31 Jan 2015, Nicholas Mc Guire wrote:
>>
>>> This is only an API consolidation to make things more readable.
>>>
>>> Instances of var * HZ / 1000 are replaced by msecs_to_jiffies(var).
>>
>> ... and some instances of "value" are replaced by
>> "msecs_to_jiffies(value)"
>> which seems to be completely wrong.
>
> The values for USLEEP_* are taken to be in units jiffies, according to
> comments in NCR5380.c. Replacing them by the msecs_to_jiffies conversion
> is in fact wrong.
>
> Please drop the changes to g_NCR5380.c for that reason.
>
right the comment indicates it should be jiffies - my interpretation
of that was that in NCR5380.c
were jiffies + (250 * HZ / 1000); constructs would be correctly
converted to e.g. jiffies + msecs_to_jiffies(250)
And defines like USLEEP_POLL are noted to be in jiffies:
* USLEEP_SLEEP - amount of time, in jiffies, to sleep
and then defined correctly as HZ indepenedent values:
#define USLEEP_SLEEP (20*HZ/1000)
and thus should be the same as msecs_to_jiffies(20)
now g_NCR5380.c defines
#define USLEEP_POLL 1
#define USLEEP_SLEEP 20
#define USLEEP_WAITLONG 500
for the DTC3181E card - but without the conversion to ms
from the use in the code though (e.g NCR5380_set_timer) it
seemed to me that it actually should be jiffeis equivalent ms and
the intent was only to change the USLEEP_POLL and USLEEP_WAITLONG
settings for the specific device but not the unit and thus it
shuld have been converted by msecs_to_jiffies(1) resp.
msecs_to_jiffies(500). The problem with this if it is left in its
current form is that the timeouts would actually depend on the HZ
setting of the system which is probably not the intent.
Pleas do give this one more look if the argument above is
not sound I appologize for the noise.
thx!
hofrat
next prev parent reply other threads:[~2015-02-01 7:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-31 8:13 [PATCH v2] scsi: NCR5380: use msecs_to_jiffies for conversions Nicholas Mc Guire
2015-01-31 23:20 ` Finn Thain
2015-02-01 4:20 ` Michael Schmitz
2015-02-01 6:23 ` Finn Thain
2015-02-01 7:14 ` Nicholas Mc Guire [this message]
2015-02-02 1:04 ` Michael Schmitz
2015-02-02 7:47 ` Nicholas Mc Guire
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=20150201071412.GA21711@opentech.at \
--to=der.herr@hofr.at \
--cc=JBottomley@parallels.com \
--cc=fthain@telegraphics.com.au \
--cc=linux-scsi@vger.kernel.org \
--cc=schmitzmic@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).