]> git.baikalelectronics.ru Git - kernel.git/commit
mmc: sdricoh_cs: Throttle polling rate for commands
authorUlf Hansson <ulf.hansson@linaro.org>
Fri, 8 May 2020 09:52:18 +0000 (11:52 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Thu, 28 May 2020 09:22:14 +0000 (11:22 +0200)
commit38a6553f4174bb1a449cf9f61175d45643b55056
treeca6513309184aa1e60ec10964b774dceb8eed344
parent0203e6b42cb5a9cee09a87422f7a27b6683b5c64
mmc: sdricoh_cs: Throttle polling rate for commands

Rather than to poll in a busy-loop, let's convert into using
read_poll_timeout() and insert a small delay between each polling attempts.
In particular, this avoids hogging the CPU.

Additionally, to convert to read_poll_timeout() we also need to switch from
using a specific number of polling attempts, into a specific timeout in us
instead. The previous 100000 attempts, is translated into a total timeout
of total 1s, as that seemed like reasonable value to pick.

Cc: Sascha Sommer <saschasommer@freenet.de>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Link: https://lore.kernel.org/r/20200508095218.14177-1-ulf.hansson@linaro.org
drivers/mmc/host/sdricoh_cs.c