Skip to contentSkip to conversation

kernel driver "drivers/net/ethernet/realtek/r8169.c" msleep question

DISCUSSION Justin van Wijngaarden 2 participants 2 messages Feb 23, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore 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

#1 lore raw

Justin van Wijngaarden <[email protected]> :
[...]

Quoted 5 lines

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.

Signature · 1 line
Ueimor