Commit 727cba70 authored by Linus Walleij's avatar Linus Walleij Committed by Ulf Hansson

mmc: sh_mmcif: sg_miter must not be atomic

All the sglist iterations happen in the *threaded* interrupt handler and
that context is not atomic, so don't request an atomic sglist miter. Using
an atomic miter results in "BUG: scheduling while atomic" splats.
Reported-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
Fixes: 27b57277 ("mmc: sh_mmcif: Use sg_miter for PIO")
Tested-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20240221-fix-sh-mmcif-v2-1-5e521eb25ae4@linaro.orgSigned-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 44d41bf6
......@@ -607,7 +607,7 @@ static void sh_mmcif_single_read(struct sh_mmcif_host *host,
BLOCK_SIZE_MASK) + 3;
sg_miter_start(&host->sg_miter, data->sg, data->sg_len,
SG_MITER_ATOMIC | SG_MITER_TO_SG);
SG_MITER_TO_SG);
host->wait_for = MMCIF_WAIT_FOR_READ;
......@@ -662,7 +662,7 @@ static void sh_mmcif_multi_read(struct sh_mmcif_host *host,
BLOCK_SIZE_MASK;
sg_miter_start(&host->sg_miter, data->sg, data->sg_len,
SG_MITER_ATOMIC | SG_MITER_TO_SG);
SG_MITER_TO_SG);
host->wait_for = MMCIF_WAIT_FOR_MREAD;
......@@ -710,7 +710,7 @@ static void sh_mmcif_single_write(struct sh_mmcif_host *host,
BLOCK_SIZE_MASK) + 3;
sg_miter_start(&host->sg_miter, data->sg, data->sg_len,
SG_MITER_ATOMIC | SG_MITER_FROM_SG);
SG_MITER_FROM_SG);
host->wait_for = MMCIF_WAIT_FOR_WRITE;
......@@ -765,7 +765,7 @@ static void sh_mmcif_multi_write(struct sh_mmcif_host *host,
BLOCK_SIZE_MASK;
sg_miter_start(&host->sg_miter, data->sg, data->sg_len,
SG_MITER_ATOMIC | SG_MITER_FROM_SG);
SG_MITER_FROM_SG);
host->wait_for = MMCIF_WAIT_FOR_MWRITE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment