LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Aaro Koskinen <aaro.koskinen@iki.fi>
To: Christoph Hellwig <hch@lst.de>
Cc: Robin Murphy <robin.murphy@arm.com>,
	Rob Herring <robh@kernel.org>, Paul Burton <paul.burton@mips.com>,
	linux-mips@linux-mips.org, linux-kernel@vger.kernel.org
Subject: Re: [REGRESSION] OCTEON MMC driver failure with v4.19
Date: Tue, 6 Nov 2018 11:05:11 +0200	[thread overview]
Message-ID: <20181106090511.GA14958@darkstar.musicnaut.iki.fi> (raw)
In-Reply-To: <20181106062724.GA12413@lst.de>

Hi,

On Tue, Nov 06, 2018 at 07:27:24AM +0100, Christoph Hellwig wrote:
> On Tue, Nov 06, 2018 at 12:06:32AM +0200, Aaro Koskinen wrote:
> > With the below change, the MMC card probe seems to with v4.19. But it
> > feels a bit hackish, don't you think... Is there some obvious simple
> > fix that I'm missing? Any comments?
> 
> Please just use dma_coerce_mask_and_coherent in the platform drivers
> instead.

Tried, but that doesn't help with v4.19:

[    1.290698] octeon_mmc 1180000002000.mmc: dma_coerce_mask_and_coherent(): -5
[    1.297825] octeon_mmc: probe of 1180000002000.mmc failed with error -5

A.

diff --git a/drivers/mmc/host/cavium-octeon.c b/drivers/mmc/host/cavium-octeon.c
index 22aded1065ae..f7ce26ba6936 100644
--- a/drivers/mmc/host/cavium-octeon.c
+++ b/drivers/mmc/host/cavium-octeon.c
@@ -232,7 +232,8 @@ static int octeon_mmc_probe(struct platform_device *pdev)
 	 */
 	host->reg_off_dma = -0x20;
 
-	ret = dma_set_mask(&pdev->dev, DMA_BIT_MASK(64));
+	ret = dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
+	dev_err(&pdev->dev, "dma_coerce_mask_and_coherent(): %d", ret);
 	if (ret)
 		return ret;
 

  reply	other threads:[~2018-11-06  9:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-26 20:54 [REGRESSION] OCTEON MMC driver failure with v4.19 Aaro Koskinen
2018-11-05 22:06 ` Aaro Koskinen
2018-11-06  6:27   ` Christoph Hellwig
2018-11-06  9:05     ` Aaro Koskinen [this message]
2018-11-06 21:51       ` Aaro Koskinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181106090511.GA14958@darkstar.musicnaut.iki.fi \
    --to=aaro.koskinen@iki.fi \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=paul.burton@mips.com \
    --cc=robh@kernel.org \
    --cc=robin.murphy@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).