staging: mt7621-mmc: Bill the caller for I/O time
authorGeorge Hilliard <thirtythreeforty@gmail.com>
Tue, 19 Mar 2019 02:20:06 +0000 (20:20 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Mar 2019 07:23:18 +0000 (08:23 +0100)
When waiting on completions, use the _io variant so the caller is
charged as using I/O.

This should have no effect on the module's functionality, only improve
CPU accounting.

Signed-off-by: George Hilliard <thirtythreeforty@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/mt7621-mmc/sd.c

index 8b52cd64e575fa93d3e788b7f94990ac912d772d..6f0c939247cb2d9d09b543017ad62338963042f4 100644 (file)
@@ -493,7 +493,7 @@ static unsigned int msdc_command_resp(struct msdc_host   *host,
        //sdr_set_bits(host->base + MSDC_INTEN, wints);
 
        spin_unlock(&host->lock);
-       if (!wait_for_completion_timeout(&host->cmd_done, 10 * timeout)) {
+       if (!wait_for_completion_io_timeout(&host->cmd_done, 10 * timeout)) {
                dev_err(mmc_dev(host->mmc),
                        "%d -> XXX CMD<%d> wait_for_completion timeout ARG<0x%.8x>\n",
                        host->id, opcode, cmd->arg);
@@ -696,7 +696,7 @@ static int msdc_do_request(struct mmc_host *mmc, struct mmc_request *mrq)
                msdc_dma_start(host);
 
                spin_unlock(&host->lock);
-               if (!wait_for_completion_timeout(&host->xfer_done, DAT_TIMEOUT)) {
+               if (!wait_for_completion_io_timeout(&host->xfer_done, DAT_TIMEOUT)) {
                        dev_err(mmc_dev(host->mmc),
                                "%d -> XXX CMD<%d> wait xfer_done<%d> timeout!!\n",
                                host->id, cmd->opcode,