mmc: meson-gx: replace WARN_ONCE with dev_warn_once about scatterlist size alignment in block mode
Subsystems (2)
PATCH v2 1/1 mmc: meson-gx: replace WARN_ONCE with dev_warn_once about scatterlist size alignment in block mode
Since commit e085b51c74cc ("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.
---
Changes since v1:
- replace WARN_ONCE with dev_warn_once and explicit the warning message
drivers/mmc/host/meson-gx-mmc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/mmc/host/meson-gx-mmc.c +3 -2
@@ -247,8 +247,9 @@ static void meson_mmc_get_transfer_mode(struct mmc_host *mmc,*/ for_each_sg (data->sg, sg, data->sg_len, i) {if (sg->length % data->blksz) { -WARN_ONCE (1 ,"unaligned sg len %u blksize %u\n" , - sg->length, data->blksz); +dev_warn_once (mmc_dev (mmc), +"unaligned sg len %u blksize %u, disabling descriptor DMA for transfer\n" , + sg->length, data->blksz);return ; } }
Signature · 1 line
2.25.1
Quoted 10 lines · Neil Armstrong
Since commit
e085b51c74cc("mmc: meson-gx: check for scatterlist size alignment in block mode"), support for SDIOSD_IO_RW_EXTENDEDtransferts are properly filtered but some driver like brcmfmac still gives a block sg buffer size not aligned with SDIO block, triggerring aWARN_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.
Quoted 6 lines
This should be ultimately fixed in brcmfmac, but since it's only a performance issue the warning should be removed.
Fixes e085b51c74cc ("mmc: meson-gx: check for scatterlist size alignment in block mode")Reported-by Marek Szyprowski <[email protected]>Signed-off-by Neil Armstrong <[email protected]>
Applied for next, thanks! (I move to fixes if there is another rc on Monday).
Kind regards
Uffe
Quoted 26 lines
---
Changes since v1:
- replaceWARN_ONCEwithdev_warn_onceand explicit the warning messagedrivers/mmc/host/meson-gx-mmc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)drivers/mmc/host/meson-gx-mmc.c +3
-3@@ -247,8 +247,9 @@ static void meson_mmc_get_transfer_mode(struct mmc_host *mmc,*/ for_each_sg (data->sg, sg, data->sg_len, i) {if (sg->length % data->blksz) { -WARN_ONCE (1 ,"unaligned sg len %u blksize %u\n" , - sg->length, data->blksz); +dev_warn_once (mmc_dev (mmc), +"unaligned sg len %u blksize %u, disabling descriptor DMA for transfer\n" , + sg->length, data->blksz);return ; } } --2.25.1