Skip to content

Commit 44d41bf

Browse files
linuswstorulf
authored andcommitted
mmc: sdhci-esdhc-mcf: Flag the sg_miter as atomic
The sg_miter used to loop over the returned sglist from a transfer in the esdhc subdriver for SDHCI can be called from atomic context so the miter needs to be atomic. sdhci_request_done() is always called from process context, either as a work or as part of the threaded interrupt handler, but the one case when we are actually calling .request_done() from an atomic context is in sdhci_irq(). Fix this by flagging the miter atomic so we always use kmap_atomic(). Fixes: e8a167b ("mmc: sdhci-esdhc-mcf: Use sg_miter for swapping") Reported-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Link: https://lore.kernel.org/r/20240228-fix-sdhci-esdhc-mcf-2-v2-1-4ebb3fd691ea@linaro.org Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
1 parent 6f3d568 commit 44d41bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/mmc/host/sdhci-esdhc-mcf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ static void esdhc_mcf_request_done(struct sdhci_host *host,
313313
* transfer endiannes. A swap after the transfer is needed.
314314
*/
315315
sg_miter_start(&sgm, mrq->data->sg, mrq->data->sg_len,
316-
SG_MITER_TO_SG | SG_MITER_FROM_SG);
316+
SG_MITER_ATOMIC | SG_MITER_TO_SG | SG_MITER_FROM_SG);
317317
while (sg_miter_next(&sgm)) {
318318
buffer = sgm.addr;
319319
esdhc_mcf_buffer_swap32(buffer, sgm.length);

0 commit comments

Comments
 (0)