* [PATCH] dma-mapping: fix size when of_dma_get_range() fails
@ 2014-12-24 21:56 ` Murali Karicheri
0 siblings, 0 replies; 9+ messages in thread
From: Murali Karicheri @ 2014-12-24 21:56 UTC (permalink / raw)
To: linux, linux-arm-kernel, linux-kernel, arnd, will.deacon,
grant.likely, robh+dt, devicetree
Cc: Murali Karicheri
When call to of_dma_get_range() fails, the code currently set size
to dev->coherent_dma_mask instead of dev->coherent_dma_mask + 1. Fix this
to make the code consistent with the case when size is obtained from
dma-range property.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/of/platform.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index a54ec10..af9aef1 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -185,7 +185,7 @@ static void of_dma_configure(struct device *dev)
ret = of_dma_get_range(dev->of_node, &dma_addr, &paddr, &size);
if (ret < 0) {
dma_addr = offset = 0;
- size = dev->coherent_dma_mask;
+ size = dev->coherent_dma_mask + 1;
} else {
offset = PFN_DOWN(paddr - dma_addr);
dev_dbg(dev, "dma_pfn_offset(%#08lx)\n", offset);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH] dma-mapping: fix size when of_dma_get_range() fails
@ 2014-12-24 21:56 ` Murali Karicheri
0 siblings, 0 replies; 9+ messages in thread
From: Murali Karicheri @ 2014-12-24 21:56 UTC (permalink / raw)
To: linux, linux-arm-kernel, linux-kernel, arnd, will.deacon,
grant.likely, robh+dt, devicetree
Cc: Murali Karicheri
When call to of_dma_get_range() fails, the code currently set size
to dev->coherent_dma_mask instead of dev->coherent_dma_mask + 1. Fix this
to make the code consistent with the case when size is obtained from
dma-range property.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/of/platform.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index a54ec10..af9aef1 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -185,7 +185,7 @@ static void of_dma_configure(struct device *dev)
ret = of_dma_get_range(dev->of_node, &dma_addr, &paddr, &size);
if (ret < 0) {
dma_addr = offset = 0;
- size = dev->coherent_dma_mask;
+ size = dev->coherent_dma_mask + 1;
} else {
offset = PFN_DOWN(paddr - dma_addr);
dev_dbg(dev, "dma_pfn_offset(%#08lx)\n", offset);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH] dma-mapping: fix size when of_dma_get_range() fails
@ 2014-12-24 21:56 ` Murali Karicheri
0 siblings, 0 replies; 9+ messages in thread
From: Murali Karicheri @ 2014-12-24 21:56 UTC (permalink / raw)
To: linux-arm-kernel
When call to of_dma_get_range() fails, the code currently set size
to dev->coherent_dma_mask instead of dev->coherent_dma_mask + 1. Fix this
to make the code consistent with the case when size is obtained from
dma-range property.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/of/platform.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index a54ec10..af9aef1 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -185,7 +185,7 @@ static void of_dma_configure(struct device *dev)
ret = of_dma_get_range(dev->of_node, &dma_addr, &paddr, &size);
if (ret < 0) {
dma_addr = offset = 0;
- size = dev->coherent_dma_mask;
+ size = dev->coherent_dma_mask + 1;
} else {
offset = PFN_DOWN(paddr - dma_addr);
dev_dbg(dev, "dma_pfn_offset(%#08lx)\n", offset);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] dma-mapping: fix size when of_dma_get_range() fails
2014-12-24 21:56 ` Murali Karicheri
(?)
@ 2015-03-19 19:25 ` Grant Likely
-1 siblings, 0 replies; 9+ messages in thread
From: Grant Likely @ 2015-03-19 19:25 UTC (permalink / raw)
To: Murali Karicheri, linux, linux-arm-kernel, linux-kernel, arnd,
will.deacon, robh+dt, devicetree
Cc: Murali Karicheri
On Wed, 24 Dec 2014 16:56:50 -0500
, Murali Karicheri <m-karicheri2@ti.com>
wrote:
> When call to of_dma_get_range() fails, the code currently set size
> to dev->coherent_dma_mask instead of dev->coherent_dma_mask + 1. Fix this
> to make the code consistent with the case when size is obtained from
> dma-range property.
>
> Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
> Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Looks okay to me. I've merged it into my tree.
g.
> ---
> drivers/of/platform.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/of/platform.c b/drivers/of/platform.c
> index a54ec10..af9aef1 100644
> --- a/drivers/of/platform.c
> +++ b/drivers/of/platform.c
> @@ -185,7 +185,7 @@ static void of_dma_configure(struct device *dev)
> ret = of_dma_get_range(dev->of_node, &dma_addr, &paddr, &size);
> if (ret < 0) {
> dma_addr = offset = 0;
> - size = dev->coherent_dma_mask;
> + size = dev->coherent_dma_mask + 1;
> } else {
> offset = PFN_DOWN(paddr - dma_addr);
> dev_dbg(dev, "dma_pfn_offset(%#08lx)\n", offset);
> --
> 1.7.9.5
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] dma-mapping: fix size when of_dma_get_range() fails
@ 2015-03-19 19:25 ` Grant Likely
0 siblings, 0 replies; 9+ messages in thread
From: Grant Likely @ 2015-03-19 19:25 UTC (permalink / raw)
To: linux, linux-arm-kernel, linux-kernel, arnd, will.deacon,
robh+dt, devicetree
Cc: Murali Karicheri
On Wed, 24 Dec 2014 16:56:50 -0500
, Murali Karicheri <m-karicheri2@ti.com>
wrote:
> When call to of_dma_get_range() fails, the code currently set size
> to dev->coherent_dma_mask instead of dev->coherent_dma_mask + 1. Fix this
> to make the code consistent with the case when size is obtained from
> dma-range property.
>
> Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
> Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Looks okay to me. I've merged it into my tree.
g.
> ---
> drivers/of/platform.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/of/platform.c b/drivers/of/platform.c
> index a54ec10..af9aef1 100644
> --- a/drivers/of/platform.c
> +++ b/drivers/of/platform.c
> @@ -185,7 +185,7 @@ static void of_dma_configure(struct device *dev)
> ret = of_dma_get_range(dev->of_node, &dma_addr, &paddr, &size);
> if (ret < 0) {
> dma_addr = offset = 0;
> - size = dev->coherent_dma_mask;
> + size = dev->coherent_dma_mask + 1;
> } else {
> offset = PFN_DOWN(paddr - dma_addr);
> dev_dbg(dev, "dma_pfn_offset(%#08lx)\n", offset);
> --
> 1.7.9.5
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] dma-mapping: fix size when of_dma_get_range() fails
@ 2015-03-19 19:25 ` Grant Likely
0 siblings, 0 replies; 9+ messages in thread
From: Grant Likely @ 2015-03-19 19:25 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, 24 Dec 2014 16:56:50 -0500
, Murali Karicheri <m-karicheri2@ti.com>
wrote:
> When call to of_dma_get_range() fails, the code currently set size
> to dev->coherent_dma_mask instead of dev->coherent_dma_mask + 1. Fix this
> to make the code consistent with the case when size is obtained from
> dma-range property.
>
> Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
> Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Looks okay to me. I've merged it into my tree.
g.
> ---
> drivers/of/platform.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/of/platform.c b/drivers/of/platform.c
> index a54ec10..af9aef1 100644
> --- a/drivers/of/platform.c
> +++ b/drivers/of/platform.c
> @@ -185,7 +185,7 @@ static void of_dma_configure(struct device *dev)
> ret = of_dma_get_range(dev->of_node, &dma_addr, &paddr, &size);
> if (ret < 0) {
> dma_addr = offset = 0;
> - size = dev->coherent_dma_mask;
> + size = dev->coherent_dma_mask + 1;
> } else {
> offset = PFN_DOWN(paddr - dma_addr);
> dev_dbg(dev, "dma_pfn_offset(%#08lx)\n", offset);
> --
> 1.7.9.5
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] dma-mapping: fix size when of_dma_get_range() fails
2015-03-19 19:25 ` Grant Likely
(?)
@ 2015-03-20 11:54 ` Grant Likely
-1 siblings, 0 replies; 9+ messages in thread
From: Grant Likely @ 2015-03-20 11:54 UTC (permalink / raw)
To: Murali Karicheri, Russell King - ARM Linux, linux-arm-kernel,
Linux Kernel Mailing List, Arnd Bergmann, Will Deacon,
Rob Herring, devicetree
On Thu, Mar 19, 2015 at 7:25 PM, Grant Likely <grant.likely@linaro.org> wrote:
> On Wed, 24 Dec 2014 16:56:50 -0500
> , Murali Karicheri <m-karicheri2@ti.com>
> wrote:
>> When call to of_dma_get_range() fails, the code currently set size
>> to dev->coherent_dma_mask instead of dev->coherent_dma_mask + 1. Fix this
>> to make the code consistent with the case when size is obtained from
>> dma-range property.
>>
>> Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
>> Reviewed-by: Arnd Bergmann <arnd@arndb.de>
>
> Looks okay to me. I've merged it into my tree.
Oops, never mind. I see that it's been rolled into the series going
through Bjorn's tree. Sorry for the noise.
g.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] dma-mapping: fix size when of_dma_get_range() fails
@ 2015-03-20 11:54 ` Grant Likely
0 siblings, 0 replies; 9+ messages in thread
From: Grant Likely @ 2015-03-20 11:54 UTC (permalink / raw)
To: Murali Karicheri, Russell King - ARM Linux, linux-arm-kernel,
Linux Kernel Mailing List, Arnd Bergmann, Will Deacon,
Rob Herring, devicetree
On Thu, Mar 19, 2015 at 7:25 PM, Grant Likely <grant.likely@linaro.org> wrote:
> On Wed, 24 Dec 2014 16:56:50 -0500
> , Murali Karicheri <m-karicheri2@ti.com>
> wrote:
>> When call to of_dma_get_range() fails, the code currently set size
>> to dev->coherent_dma_mask instead of dev->coherent_dma_mask + 1. Fix this
>> to make the code consistent with the case when size is obtained from
>> dma-range property.
>>
>> Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
>> Reviewed-by: Arnd Bergmann <arnd@arndb.de>
>
> Looks okay to me. I've merged it into my tree.
Oops, never mind. I see that it's been rolled into the series going
through Bjorn's tree. Sorry for the noise.
g.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] dma-mapping: fix size when of_dma_get_range() fails
@ 2015-03-20 11:54 ` Grant Likely
0 siblings, 0 replies; 9+ messages in thread
From: Grant Likely @ 2015-03-20 11:54 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Mar 19, 2015 at 7:25 PM, Grant Likely <grant.likely@linaro.org> wrote:
> On Wed, 24 Dec 2014 16:56:50 -0500
> , Murali Karicheri <m-karicheri2@ti.com>
> wrote:
>> When call to of_dma_get_range() fails, the code currently set size
>> to dev->coherent_dma_mask instead of dev->coherent_dma_mask + 1. Fix this
>> to make the code consistent with the case when size is obtained from
>> dma-range property.
>>
>> Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
>> Reviewed-by: Arnd Bergmann <arnd@arndb.de>
>
> Looks okay to me. I've merged it into my tree.
Oops, never mind. I see that it's been rolled into the series going
through Bjorn's tree. Sorry for the noise.
g.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2015-03-20 11:54 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-24 21:56 [PATCH] dma-mapping: fix size when of_dma_get_range() fails Murali Karicheri
2014-12-24 21:56 ` Murali Karicheri
2014-12-24 21:56 ` Murali Karicheri
2015-03-19 19:25 ` Grant Likely
2015-03-19 19:25 ` Grant Likely
2015-03-19 19:25 ` Grant Likely
2015-03-20 11:54 ` Grant Likely
2015-03-20 11:54 ` Grant Likely
2015-03-20 11:54 ` Grant Likely
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.