Skip to content

Commit 7412dee

Browse files
superna9999Ulf Hansson
authored andcommitted
mmc: meson-gx: replace WARN_ONCE with dev_warn_once about scatterlist size alignment in block mode
Since commit e085b51 ("mmc: meson-gx: check for scatterlist size alignment in block mode"), support for SDIO SD_IO_RW_EXTENDED transferts are properly filtered but some driver like brcmfmac still gives a block sg buffer size not aligned with SDIO block, triggerring a WARN_ONCE() with scary stacktrace even if the transfer works fine but with possible degraded performances. Simply replace with dev_warn_once() to inform user this should be fixed to avoid degraded performance. This should be ultimately fixed in brcmfmac, but since it's only a performance issue the warning should be removed. Fixes: e085b51 ("mmc: meson-gx: check for scatterlist size alignment in block mode") Reported-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Link: https://lore.kernel.org/r/20210416094347.2015896-1-narmstrong@baylibre.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
1 parent a5e13c6 commit 7412dee

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,9 @@ static void meson_mmc_get_transfer_mode(struct mmc_host *mmc,
247247
*/
248248
for_each_sg(data->sg, sg, data->sg_len, i) {
249249
if (sg->length % data->blksz) {
250-
WARN_ONCE(1, "unaligned sg len %u blksize %u\n",
251-
sg->length, data->blksz);
250+
dev_warn_once(mmc_dev(mmc),
251+
"unaligned sg len %u blksize %u, disabling descriptor DMA for transfer\n",
252+
sg->length, data->blksz);
252253
return;
253254
}
254255
}

0 commit comments

Comments
 (0)