* pull-request: can 2014-07-25
@ 2014-07-25 7:36 Marc Kleine-Budde
2014-07-25 7:36 ` [PATCH] can: c_can_platform: Fix raminit, use devm_ioremap() instead of devm_ioremap_resource() Marc Kleine-Budde
2014-07-29 0:01 ` pull-request: can 2014-07-25 David Miller
0 siblings, 2 replies; 4+ messages in thread
From: Marc Kleine-Budde @ 2014-07-25 7:36 UTC (permalink / raw)
To: netdev; +Cc: davem, linux-can, kernel
Hello David,
this is a pull request of one patch for the net tree, hoping to get into the
3.16 release.
The patch by George Cherian fixes a regression in the c_can platform driver.
When using two interfaces the regression leads to a non function second
interface.
regards,
Marc
---
The following changes since commit 15ba2236f3556fc01b9ca91394465152b5ea74b6:
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net (2014-07-21 22:46:01 -0700)
are available in the git repository at:
git://gitorious.org/linux-can/linux-can.git tags/linux-can-fixes-for-3.16-20140725
for you to fetch changes up to 33cf75656923ff11d67a937a4f8e9344f58cea77:
can: c_can_platform: Fix raminit, use devm_ioremap() instead of devm_ioremap_resource() (2014-07-25 09:23:08 +0200)
----------------------------------------------------------------
linux-can-fixes-for-3.16-20140725
----------------------------------------------------------------
George Cherian (1):
can: c_can_platform: Fix raminit, use devm_ioremap() instead of devm_ioremap_resource()
drivers/net/can/c_can/c_can_platform.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] can: c_can_platform: Fix raminit, use devm_ioremap() instead of devm_ioremap_resource()
2014-07-25 7:36 pull-request: can 2014-07-25 Marc Kleine-Budde
@ 2014-07-25 7:36 ` Marc Kleine-Budde
2014-07-25 20:21 ` Florian Fainelli
2014-07-29 0:01 ` pull-request: can 2014-07-25 David Miller
1 sibling, 1 reply; 4+ messages in thread
From: Marc Kleine-Budde @ 2014-07-25 7:36 UTC (permalink / raw)
To: netdev
Cc: davem, linux-can, kernel, George Cherian, Mugunthan V N,
linux-stable, Marc Kleine-Budde
From: George Cherian <george.cherian@ti.com>
The raminit register is shared register for both can0 and can1. Since commit:
32766ff net: can: Convert to use devm_ioremap_resource
devm_ioremap_resource() is used to map raminit register. When using both
interfaces the mapping for the can1 interface fails, leading to a non
functional can interface.
Signed-off-by: George Cherian <george.cherian@ti.com>
Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Cc: linux-stable <stable@vger.kernel.org> # >= v3.11
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
drivers/net/can/c_can/c_can_platform.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/can/c_can/c_can_platform.c b/drivers/net/can/c_can/c_can_platform.c
index 824108c..12430be 100644
--- a/drivers/net/can/c_can/c_can_platform.c
+++ b/drivers/net/can/c_can/c_can_platform.c
@@ -287,7 +287,8 @@ static int c_can_plat_probe(struct platform_device *pdev)
break;
}
- priv->raminit_ctrlreg = devm_ioremap_resource(&pdev->dev, res);
+ priv->raminit_ctrlreg = devm_ioremap(&pdev->dev, res->start,
+ resource_size(res));
if (IS_ERR(priv->raminit_ctrlreg) || priv->instance < 0)
dev_info(&pdev->dev, "control memory is not used for raminit\n");
else
--
2.0.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] can: c_can_platform: Fix raminit, use devm_ioremap() instead of devm_ioremap_resource()
2014-07-25 7:36 ` [PATCH] can: c_can_platform: Fix raminit, use devm_ioremap() instead of devm_ioremap_resource() Marc Kleine-Budde
@ 2014-07-25 20:21 ` Florian Fainelli
0 siblings, 0 replies; 4+ messages in thread
From: Florian Fainelli @ 2014-07-25 20:21 UTC (permalink / raw)
To: Marc Kleine-Budde
Cc: netdev, David Miller, linux-can, kernel, George Cherian,
Mugunthan V N, linux-stable, jg1.han@samsung.com
2014-07-25 0:36 GMT-07:00 Marc Kleine-Budde <mkl@pengutronix.de>:
> From: George Cherian <george.cherian@ti.com>
>
> The raminit register is shared register for both can0 and can1. Since commit:
>
> 32766ff net: can: Convert to use devm_ioremap_resource
>
> devm_ioremap_resource() is used to map raminit register. When using both
> interfaces the mapping for the can1 interface fails, leading to a non
> functional can interface.
Unfortunately, this is not the first time that devres conversions
break drivers because they were semi-automatic conversions without
taking a look at what the driver expects, see:
6892b41d9701283085b655c6086fb57a5d63fa47 ("net: davinci: emac: Convert
to devm_* api") and
33b7107f59a61236d94ecd6b45e20283cd5abcc8 ("net: davinci_emac: Replace
devm_request_irq with request_irq")
arguably, a comment here explaining why the request_mem_region() on
this resource should not be done might help people using automated
tools not to break things in the future...
>
> Signed-off-by: George Cherian <george.cherian@ti.com>
> Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
> Cc: linux-stable <stable@vger.kernel.org> # >= v3.11
> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
> ---
> drivers/net/can/c_can/c_can_platform.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/can/c_can/c_can_platform.c b/drivers/net/can/c_can/c_can_platform.c
> index 824108c..12430be 100644
> --- a/drivers/net/can/c_can/c_can_platform.c
> +++ b/drivers/net/can/c_can/c_can_platform.c
> @@ -287,7 +287,8 @@ static int c_can_plat_probe(struct platform_device *pdev)
> break;
> }
>
> - priv->raminit_ctrlreg = devm_ioremap_resource(&pdev->dev, res);
> + priv->raminit_ctrlreg = devm_ioremap(&pdev->dev, res->start,
> + resource_size(res));
> if (IS_ERR(priv->raminit_ctrlreg) || priv->instance < 0)
> dev_info(&pdev->dev, "control memory is not used for raminit\n");
> else
> --
> 2.0.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Florian
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: pull-request: can 2014-07-25
2014-07-25 7:36 pull-request: can 2014-07-25 Marc Kleine-Budde
2014-07-25 7:36 ` [PATCH] can: c_can_platform: Fix raminit, use devm_ioremap() instead of devm_ioremap_resource() Marc Kleine-Budde
@ 2014-07-29 0:01 ` David Miller
1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2014-07-29 0:01 UTC (permalink / raw)
To: mkl; +Cc: netdev, linux-can, kernel
From: Marc Kleine-Budde <mkl@pengutronix.de>
Date: Fri, 25 Jul 2014 09:36:49 +0200
> this is a pull request of one patch for the net tree, hoping to get into the
> 3.16 release.
>
> The patch by George Cherian fixes a regression in the c_can platform driver.
> When using two interfaces the regression leads to a non function second
> interface.
Pulled, thanks Marc.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-07-29 0:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-25 7:36 pull-request: can 2014-07-25 Marc Kleine-Budde
2014-07-25 7:36 ` [PATCH] can: c_can_platform: Fix raminit, use devm_ioremap() instead of devm_ioremap_resource() Marc Kleine-Budde
2014-07-25 20:21 ` Florian Fainelli
2014-07-29 0:01 ` pull-request: can 2014-07-25 David Miller
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).