Hi Geert-san,
From: Geert Uytterhoeven, Sent: Thursday, June 28, 2018 9:50 PM
Hi Shimoda-san,
On Thu, Jun 28, 2018 at 1:53 PM Yoshihiro Shimoda yoshihiro.shimoda.uh@renesas.com wrote:
This patch fixes an issue that lacks the dma_unmap_sg() calling in the error patch of renesas_sdhi_internal_dmac_start_dma().
Nice catch! Thanks for your patch!
Fixes: 0cbc94daa554 ("mmc: renesas_sdhi_internal_dmac: limit DMA RX for old SoCs") Cc: stable@vger.kernel.org # v4.17+ Signed-off-by: Yoshihiro Shimoda yoshihiro.shimoda.uh@renesas.com
Reviewed-by: Geert Uytterhoeven geert+renesas@glider.be
Thank you for your review!
--- a/drivers/mmc/host/renesas_sdhi_internal_dmac.c +++ b/drivers/mmc/host/renesas_sdhi_internal_dmac.c @@ -173,8 +173,11 @@ if (data->flags & MMC_DATA_READ) { dtran_mode |= DTRAN_MODE_CH_NUM_CH1; if (test_bit(SDHI_INTERNAL_DMAC_ONE_RX_ONLY, &global_flags) &&
test_and_set_bit(SDHI_INTERNAL_DMAC_RX_IN_USE, &global_flags))
test_and_set_bit(SDHI_INTERNAL_DMAC_RX_IN_USE, &global_flags)) {
dma_unmap_sg(&host->pdev->dev, sg, host->sg_len,
mmc_get_dma_dir(data));
Given there is already a call to dma_unmap_sg() a few lines earlier , you may want to introduce a new label before force_pio, and move the call to dma_unmap_sg() there.
Thank you for the comment. So, I'll submit v2 patch.
Best regards, Yoshihiro Shimoda