From: Justin van Wijngaarden <justinvanwijngaarden@gmail.com>
To: nic_swsd@realtek.com
Cc: netdev@vger.kernel.org, romieu@fr.zoreil.com
Subject: kernel driver "drivers/net/ethernet/realtek/r8169.c" msleep question
Date: Sun, 23 Feb 2014 23:38:40 +0100 [thread overview]
Message-ID: <20140223223840.GA29808@snape.qqa.nl> (raw)
Hello,
I am in the progress of doing some checkpatch.pl clean-ups and took the above
driver to work on.
On line 6926 there is an msleep(1) statement.
According to the linux documentation @ Documentation/timers/timers-howto.txt
the msleep is not functioning as it should.
see output from that documentation below.
// quote
Why not msleep for (1ms - 20ms)?
Explained originally here:
http://lkml.org/lkml/2007/8/3/250
msleep(1~20) may not do what the caller intends, and
will often sleep longer (~20 ms actual sleep for any
value given in the 1~20ms range). In many cases this
is not the desired behavior.
// end quote
If you like I can take a re-write to usleep (1ms) or perhaps a 10/20 msleep.
I tested it both with my own hardware which works fine on both cases, but
ofcourse I don't have the hardware to test it for all use-cases.
Any preference?
Regards,
Justin van Wijngaarden
next reply other threads:[~2014-02-23 22:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-23 22:38 Justin van Wijngaarden [this message]
2014-02-23 23:55 ` kernel driver "drivers/net/ethernet/realtek/r8169.c" msleep question Francois Romieu
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=20140223223840.GA29808@snape.qqa.nl \
--to=justinvanwijngaarden@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=nic_swsd@realtek.com \
--cc=romieu@fr.zoreil.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).