Skip to content

Commit d442632

Browse files
saprojstorulf
authored andcommitted
mmc: moxart: read scr register without changing byte order
Conversion from big-endian to native is done in a common function mmc_app_send_scr(). Converting in moxart_transfer_pio() is extra. Double conversion on a LE system returns an incorrect SCR value, leads to errors: mmc0: unrecognised SCR structure version 8 Fixes: 1b66e94 ("mmc: moxart: Add MOXA ART SD/MMC driver") Signed-off-by: Sergei Antonov <saproj@gmail.com> Cc: Jonas Jensen <jonas.jensen@gmail.com> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230627120549.2400325-1-saproj@gmail.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
1 parent 06c2afb commit d442632

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

drivers/mmc/host/moxart-mmc.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -338,13 +338,7 @@ static void moxart_transfer_pio(struct moxart_host *host)
338338
return;
339339
}
340340
for (len = 0; len < remain && len < host->fifo_width;) {
341-
/* SCR data must be read in big endian. */
342-
if (data->mrq->cmd->opcode == SD_APP_SEND_SCR)
343-
*sgp = ioread32be(host->base +
344-
REG_DATA_WINDOW);
345-
else
346-
*sgp = ioread32(host->base +
347-
REG_DATA_WINDOW);
341+
*sgp = ioread32(host->base + REG_DATA_WINDOW);
348342
sgp++;
349343
len += 4;
350344
}

0 commit comments

Comments
 (0)