netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* kernel driver "drivers/net/ethernet/realtek/r8169.c" msleep question
@ 2014-02-23 22:38 Justin van Wijngaarden
  2014-02-23 23:55 ` Francois Romieu
  0 siblings, 1 reply; 2+ messages in thread
From: Justin van Wijngaarden @ 2014-02-23 22:38 UTC (permalink / raw)
  To: nic_swsd; +Cc: netdev, romieu

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: kernel driver "drivers/net/ethernet/realtek/r8169.c" msleep question
  2014-02-23 22:38 kernel driver "drivers/net/ethernet/realtek/r8169.c" msleep question Justin van Wijngaarden
@ 2014-02-23 23:55 ` Francois Romieu
  0 siblings, 0 replies; 2+ messages in thread
From: Francois Romieu @ 2014-02-23 23:55 UTC (permalink / raw)
  To: Justin van Wijngaarden; +Cc: nic_swsd, netdev

Justin van Wijngaarden <justinvanwijngaarden@gmail.com> :
[...]
> 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?

There is no much gain here.

I respectfully suggest to focus on real bugs.

-- 
Ueimor

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-02-23 23:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-23 22:38 kernel driver "drivers/net/ethernet/realtek/r8169.c" msleep question Justin van Wijngaarden
2014-02-23 23:55 ` Francois Romieu

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).