Skip to content

Commit cabb1bb

Browse files
superna9999Ulf Hansson
authored andcommitted
mmc: meson-gx: make replace WARN_ONCE with dev_warn_once about scatterlist offset alignment
Some drivers like ath10k can sometimg give an sg buffer with an offset whose alignment is not compatible with the Amlogic DMA descriptor engine requirements. Simply replace with dev_warn_once() to inform user this should be fixed to avoid degraded performance. This should be ultimately fixed in ath10k, but since it's only a performance issue the warning should be removed. Fixes: 79ed05e ("mmc: meson-gx: add support for descriptor chain mode") Cc: stable@vger.kernel.org Reported-by: Christian Hewitt <christianshewitt@gmail.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Link: https://lore.kernel.org/r/20210426175559.3110575-1-narmstrong@baylibre.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
1 parent 6efb943 commit cabb1bb

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

drivers/mmc/host/meson-gx-mmc.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,9 @@ static void meson_mmc_get_transfer_mode(struct mmc_host *mmc,
258258
for_each_sg(data->sg, sg, data->sg_len, i) {
259259
/* check for 8 byte alignment */
260260
if (sg->offset % 8) {
261-
WARN_ONCE(1, "unaligned scatterlist buffer\n");
261+
dev_warn_once(mmc_dev(mmc),
262+
"unaligned sg offset %u, disabling descriptor DMA for transfer\n",
263+
sg->offset);
262264
return;
263265
}
264266
}

0 commit comments

Comments
 (0)