All of lore.kernel.org
 help / color / mirror / Atom feed
From: arno@natisbad.org (Arnaud Ebalard)
To: linux-arm-kernel@lists.infradead.org
Subject: [REGRESSION, BISECTED] DMA mask issue on ReadyNAS 102 w/ 3.13.0-rc3
Date: Sun, 08 Dec 2013 00:42:47 +0100	[thread overview]
Message-ID: <87eh5ow7m0.fsf@natisbad.org> (raw)
In-Reply-To: <20131207231958.GS4360@n2100.arm.linux.org.uk> (Russell King's message of "Sat, 7 Dec 2013 23:19:58 +0000")

Hi Russell,

Russell King - ARM Linux <linux@arm.linux.org.uk> writes:

> On Sun, Dec 08, 2013 at 12:02:45AM +0100, Arnaud Ebalard wrote:
>> 3.13.0-rc2 worked just fine so I decided to git-bisect the issue and
>> ended up on 11a5aa32562e (ARM: dma-mapping: check DMA mask against
>> available memory).
>> 
>> If it has already been reported and fixed, sorry for the noise.
>
> Please try this patch, thanks:
>
> diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
> index f6b6bfa88ecf..c143a7bb681b 100644
> --- a/arch/arm/mm/dma-mapping.c
> +++ b/arch/arm/mm/dma-mapping.c
> @@ -185,7 +185,7 @@ static u64 get_coherent_dma_mask(struct device *dev)
>  		 */
>  		if (sizeof(mask) != sizeof(dma_addr_t) &&
>  		    mask > (dma_addr_t)~0 &&
> -		    dma_to_pfn(dev, ~0) > max_dma_pfn) {
> +		    dma_to_pfn(dev, ~0) < max_dma_pfn) {
>  			dev_warn(dev, "Coherent DMA mask %#llx is larger than dma_addr_t allows\n",
>  				 mask);
>  			dev_warn(dev, "Driver did not use or check the return value from dma_set_coherent_mask()?\n");
> @@ -1041,7 +1041,7 @@ int dma_supported(struct device *dev, u64 mask)
>  	 */
>  	if (sizeof(mask) != sizeof(dma_addr_t) &&
>  	    mask > (dma_addr_t)~0 &&
> -	    dma_to_pfn(dev, ~0) > arm_dma_pfn_limit)
> +	    dma_to_pfn(dev, ~0) < min(max_pfn, arm_dma_pfn_limit))
>  		return 0;
>  
>  	/*
>

With that applied, 3.13.0-rc3 boots again on my RN102 w/o any error.

Cheers,

a+

  reply	other threads:[~2013-12-07 23:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-07 23:02 [REGRESSION,BISECTED] DMA mask issue on ReadyNAS 102 w/ 3.13.0-rc3 Arnaud Ebalard
2013-12-07 23:19 ` Russell King - ARM Linux
2013-12-07 23:42   ` Arnaud Ebalard [this message]
2013-12-11 18:54     ` Jason Cooper
2013-12-11 20:57       ` Russell King - ARM Linux
2013-12-12 12:34         ` Jason Cooper
2013-12-12 12:41           ` Russell King - ARM Linux
2013-12-12 13:32             ` Jason Cooper

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=87eh5ow7m0.fsf@natisbad.org \
    --to=arno@natisbad.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.