Revert "Locking is changed."

This reverts commit b65474f4063be597fcd4b763de0e3a3bced45640.
Revert "use sx instead of mtx"

This reverts commit b845fe790b3e38340afd6af720547991b85a91d3.
Use mtx_sleep instead of tsleep.

Use mtx_sleep where the original driver uses tsleep
since it is not allowed to sleep when holding a mutex.