netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* pull-request: can 2012-09-21
@ 2012-09-21 11:05 Marc Kleine-Budde
  2012-09-21 11:05 ` [PATCH 1/2] can: janz-ican3: fix support for older hardware revisions Marc Kleine-Budde
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Marc Kleine-Budde @ 2012-09-21 11:05 UTC (permalink / raw)
  To: davem; +Cc: netdev, linux-can

Hello David,

two patches for the v3.6 release cycle. Ira W. Snyder fixed support for the
older version of the Janz CMOD-IO Carrier Board. I found and fixed an oops in
the ti_hecc driver, which occurs when removing the module if the network
interface is still open.

If it's too late for these patches, I'll rebase them to net-next.
 
regards, Marc

--

The following changes since commit c0d680e577ff171e7b37dbdb1b1bf5451e851f04:

  net: do not disable sg for packets requiring no checksum (2012-09-20 22:23:40 -0400)

are available in the git repository at:

  git://gitorious.org/linux-can/linux-can.git fixes-for-3.6

for you to fetch changes up to ab04c8bd423edb03e2148350a091836c196107fc:

  can: ti_hecc: fix oops during rmmod (2012-09-21 12:54:53 +0200)

----------------------------------------------------------------
Ira W. Snyder (1):
      can: janz-ican3: fix support for older hardware revisions

Marc Kleine-Budde (1):
      can: ti_hecc: fix oops during rmmod

 drivers/net/can/janz-ican3.c |    4 +---
 drivers/net/can/ti_hecc.c    |    2 +-
 2 files changed, 2 insertions(+), 4 deletions(-)



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] can: janz-ican3: fix support for older hardware revisions
  2012-09-21 11:05 pull-request: can 2012-09-21 Marc Kleine-Budde
@ 2012-09-21 11:05 ` Marc Kleine-Budde
  2012-09-21 11:05 ` [PATCH 2/2] can: ti_hecc: fix oops during rmmod Marc Kleine-Budde
  2012-09-21 17:51 ` pull-request: can 2012-09-21 David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Marc Kleine-Budde @ 2012-09-21 11:05 UTC (permalink / raw)
  To: davem; +Cc: netdev, linux-can, Ira W. Snyder, stable, Marc Kleine-Budde

From: "Ira W. Snyder" <iws@ovro.caltech.edu>

The Revision 1.0 Janz CMOD-IO Carrier Board does not have support for
the reset registers. To support older hardware, the code is changed to
use the hardware reset register on the Janz VMOD-ICAN3 hardware itself.

Cc: stable <stable@vger.kernel.org>
Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 drivers/net/can/janz-ican3.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/can/janz-ican3.c b/drivers/net/can/janz-ican3.c
index 98ee438..7edadee 100644
--- a/drivers/net/can/janz-ican3.c
+++ b/drivers/net/can/janz-ican3.c
@@ -1391,7 +1391,6 @@ static irqreturn_t ican3_irq(int irq, void *dev_id)
  */
 static int ican3_reset_module(struct ican3_dev *mod)
 {
-	u8 val = 1 << mod->num;
 	unsigned long start;
 	u8 runold, runnew;
 
@@ -1405,8 +1404,7 @@ static int ican3_reset_module(struct ican3_dev *mod)
 	runold = ioread8(mod->dpm + TARGET_RUNNING);
 
 	/* reset the module */
-	iowrite8(val, &mod->ctrl->reset_assert);
-	iowrite8(val, &mod->ctrl->reset_deassert);
+	iowrite8(0x00, &mod->dpmctrl->hwreset);
 
 	/* wait until the module has finished resetting and is running */
 	start = jiffies;
-- 
1.7.10


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] can: ti_hecc: fix oops during rmmod
  2012-09-21 11:05 pull-request: can 2012-09-21 Marc Kleine-Budde
  2012-09-21 11:05 ` [PATCH 1/2] can: janz-ican3: fix support for older hardware revisions Marc Kleine-Budde
@ 2012-09-21 11:05 ` Marc Kleine-Budde
  2012-09-21 17:51 ` pull-request: can 2012-09-21 David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Marc Kleine-Budde @ 2012-09-21 11:05 UTC (permalink / raw)
  To: davem; +Cc: netdev, linux-can, Marc Kleine-Budde, stable, Anant Gole

This patch fixes an oops which occurs when unloading the driver, while the
network interface is still up. The problem is that first the io mapping is
teared own, then the CAN device is unregistered, resulting in accessing the
hardware's iomem:

[  172.744232] Unable to handle kernel paging request at virtual address c88b0040
[  172.752441] pgd = c7be4000
[  172.755645] [c88b0040] *pgd=87821811, *pte=00000000, *ppte=00000000
[  172.762207] Internal error: Oops: 807 [#1] PREEMPT ARM
[  172.767517] Modules linked in: ti_hecc(-) can_dev
[  172.772430] CPU: 0    Not tainted  (3.5.0alpha-00037-g3554cc0 #126)
[  172.778961] PC is at ti_hecc_close+0xb0/0x100 [ti_hecc]
[  172.784423] LR is at __dev_close_many+0x90/0xc0
[  172.789123] pc : [<bf00c768>]    lr : [<c033be58>]    psr: 60000013
[  172.789123] sp : c5c1de68  ip : 00040081  fp : 00000000
[  172.801025] r10: 00000001  r9 : c5c1c000  r8 : 00100100
[  172.806457] r7 : c5d0a48c  r6 : c5d0a400  r5 : 00000000  r4 : c5d0a000
[  172.813232] r3 : c88b0000  r2 : 00000001  r1 : c5d0a000  r0 : c5d0a000
[  172.820037] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
[  172.827423] Control: 10c5387d  Table: 87be4019  DAC: 00000015
[  172.833404] Process rmmod (pid: 600, stack limit = 0xc5c1c2f0)
[  172.839447] Stack: (0xc5c1de68 to 0xc5c1e000)
[  172.843994] de60:                   bf00c6b8 c5c1dec8 c5d0a000 c5d0a000 00200200 c033be58
[  172.852478] de80: c5c1de44 c5c1dec8 c5c1dec8 c033bf2c c5c1de90 c5c1de90 c5d0a084 c5c1de44
[  172.860992] dea0: c5c1dec8 c033c098 c061d3dc c5d0a000 00000000 c05edf28 c05edb34 c000d724
[  172.869476] dec0: 00000000 c033c2f8 c5d0a084 c5d0a084 00000000 c033c370 00000000 c5d0a000
[  172.877990] dee0: c05edb00 c033c3b8 c5d0a000 bf00d3ac c05edb00 bf00d7c8 bf00d7c8 c02842dc
[  172.886474] df00: c02842c8 c0282f90 c5c1c000 c05edb00 bf00d7c8 c0283668 bf00d7c8 00000000
[  172.894989] df20: c0611f98 befe2f80 c000d724 c0282d10 bf00d804 00000000 00000013 c0068a8c
[  172.903472] df40: c5c538e8 685f6974 00636365 c61571a8 c5cb9980 c61571a8 c6158a20 c00c9bc4
[  172.911987] df60: 00000000 00000000 c5cb9980 00000000 c5cb9980 00000000 c7823680 00000006
[  172.920471] df80: bf00d804 00000880 c5c1df8c 00000000 000d4267 befe2f80 00000001 b6d90068
[  172.928985] dfa0: 00000081 c000d5a0 befe2f80 00000001 befe2f80 00000880 b6d90008 00000008
[  172.937469] dfc0: befe2f80 00000001 b6d90068 00000081 00000001 00000000 befe2eac 00000000
[  172.945983] dfe0: 00000000 befe2b18 00023ba4 b6e6addc 60000010 befe2f80 a8e00190 86d2d344
[  172.954498] [<bf00c768>] (ti_hecc_close+0xb0/0x100 [ti_hecc]) from [<c033be58>] (__dev__registered_many+0xc0/0x2a0)
[  172.984161] [<c033c098>] (rollback_registered_many+0xc0/0x2a0) from [<c033c2f8>] (rollback_registered+0x20/0x30)
[  172.994750] [<c033c2f8>] (rollback_registered+0x20/0x30) from [<c033c370>] (unregister_netdevice_queue+0x68/0x98)
[  173.005401] [<c033c370>] (unregister_netdevice_queue+0x68/0x98) from [<c033c3b8>] (unregister_netdev+0x18/0x20)
[  173.015899] [<c033c3b8>] (unregister_netdev+0x18/0x20) from [<bf00d3ac>] (ti_hecc_remove+0x60/0x80 [ti_hecc])
[  173.026245] [<bf00d3ac>] (ti_hecc_remove+0x60/0x80 [ti_hecc]) from [<c02842dc>] (platform_drv_remove+0x14/0x18)
[  173.036712] [<c02842dc>] (platform_drv_remove+0x14/0x18) from [<c0282f90>] (__device_release_driver+0x7c/0xbc)

Cc: stable <stable@vger.kernel.org>
Cc: Anant Gole <anantgole@ti.com>
Tested-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 drivers/net/can/ti_hecc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/can/ti_hecc.c b/drivers/net/can/ti_hecc.c
index 527dbcf..9ded21e 100644
--- a/drivers/net/can/ti_hecc.c
+++ b/drivers/net/can/ti_hecc.c
@@ -984,12 +984,12 @@ static int __devexit ti_hecc_remove(struct platform_device *pdev)
 	struct net_device *ndev = platform_get_drvdata(pdev);
 	struct ti_hecc_priv *priv = netdev_priv(ndev);
 
+	unregister_candev(ndev);
 	clk_disable(priv->clk);
 	clk_put(priv->clk);
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	iounmap(priv->base);
 	release_mem_region(res->start, resource_size(res));
-	unregister_candev(ndev);
 	free_candev(ndev);
 	platform_set_drvdata(pdev, NULL);
 
-- 
1.7.10

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: pull-request: can 2012-09-21
  2012-09-21 11:05 pull-request: can 2012-09-21 Marc Kleine-Budde
  2012-09-21 11:05 ` [PATCH 1/2] can: janz-ican3: fix support for older hardware revisions Marc Kleine-Budde
  2012-09-21 11:05 ` [PATCH 2/2] can: ti_hecc: fix oops during rmmod Marc Kleine-Budde
@ 2012-09-21 17:51 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2012-09-21 17:51 UTC (permalink / raw)
  To: mkl; +Cc: netdev, linux-can

From: Marc Kleine-Budde <mkl@pengutronix.de>
Date: Fri, 21 Sep 2012 13:05:33 +0200

> two patches for the v3.6 release cycle. Ira W. Snyder fixed support for the
> older version of the Janz CMOD-IO Carrier Board. I found and fixed an oops in
> the ti_hecc driver, which occurs when removing the module if the network
> interface is still open.
 ...
> The following changes since commit c0d680e577ff171e7b37dbdb1b1bf5451e851f04:
> 
>   net: do not disable sg for packets requiring no checksum (2012-09-20 22:23:40 -0400)
> 
> are available in the git repository at:
> 
>   git://gitorious.org/linux-can/linux-can.git fixes-for-3.6

Pulled, thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-09-21 17:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-21 11:05 pull-request: can 2012-09-21 Marc Kleine-Budde
2012-09-21 11:05 ` [PATCH 1/2] can: janz-ican3: fix support for older hardware revisions Marc Kleine-Budde
2012-09-21 11:05 ` [PATCH 2/2] can: ti_hecc: fix oops during rmmod Marc Kleine-Budde
2012-09-21 17:51 ` pull-request: can 2012-09-21 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).