HomeFreeBSD

Fix spurious timeouts on commands sent to mps(4) and mpr(4) controllers.

Description

Fix spurious timeouts on commands sent to mps(4) and mpr(4) controllers.

mps_wait_command() and mpr_wait_command() were using getmicrotime() to
determine elapsed time when checking for a timeout in polled mode.
getmicrotime() isn't guaranteed to monotonically increase, and that
caused spurious timeouts occasionally.

Switch to using getmicrouptime(), which does increase monotonically.
This fixes the spurious timeouts in my test case.

Reviewed by: slm, scottl
MFC after: 3 days
Sponsored by: Spectra Logic

Details

Provenance
kenAuthored on
Reviewer
slm
Parents
rS321206: Remove dead code that was killed by r320975
Branches
Unknown
Tags
Unknown