aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/sysdev
diff options
context:
space:
mode:
authorAlexandre Bounine <alexandre.bounine@idt.com>2011-04-14 18:22:14 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-04-14 19:06:56 -0400
commit59f9996555542f901f2d01ccab5c0612c8c5c480 (patch)
tree2262a4e5620454fd97a82a276a417d1eaed11674 /arch/powerpc/sysdev
parent13209c2a52afa691ca19e7e6ebd22d4034bdfeed (diff)
RapidIO/mpc85xx: fix possible mport registration problems
Fix a possible problem with mport registration left non-cleared after fsl_rio_setup() exits on link error. Abort mport initialization if registration failed. This patch is applicable to 2.6.39-rc1 only. The problem does not exist for earlier versions. Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com> Cc: Kumar Gala <galak@kernel.crashing.org> Cc: Matt Porter <mporter@kernel.crashing.org> Cc: Li Yang <leoli@freescale.com> Cc: Thomas Moll <thomas.moll@sysgo.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/powerpc/sysdev')
-rw-r--r--arch/powerpc/sysdev/fsl_rio.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/powerpc/sysdev/fsl_rio.c b/arch/powerpc/sysdev/fsl_rio.c
index 14232d57369c..49798532b477 100644
--- a/arch/powerpc/sysdev/fsl_rio.c
+++ b/arch/powerpc/sysdev/fsl_rio.c
@@ -1457,7 +1457,6 @@ int fsl_rio_setup(struct platform_device *dev)
1457 port->ops = ops; 1457 port->ops = ops;
1458 port->priv = priv; 1458 port->priv = priv;
1459 port->phys_efptr = 0x100; 1459 port->phys_efptr = 0x100;
1460 rio_register_mport(port);
1461 1460
1462 priv->regs_win = ioremap(regs.start, regs.end - regs.start + 1); 1461 priv->regs_win = ioremap(regs.start, regs.end - regs.start + 1);
1463 rio_regs_win = priv->regs_win; 1462 rio_regs_win = priv->regs_win;
@@ -1504,6 +1503,9 @@ int fsl_rio_setup(struct platform_device *dev)
1504 dev_info(&dev->dev, "RapidIO Common Transport System size: %d\n", 1503 dev_info(&dev->dev, "RapidIO Common Transport System size: %d\n",
1505 port->sys_size ? 65536 : 256); 1504 port->sys_size ? 65536 : 256);
1506 1505
1506 if (rio_register_mport(port))
1507 goto err;
1508
1507 if (port->host_deviceid >= 0) 1509 if (port->host_deviceid >= 0)
1508 out_be32(priv->regs_win + RIO_GCCSR, RIO_PORT_GEN_HOST | 1510 out_be32(priv->regs_win + RIO_GCCSR, RIO_PORT_GEN_HOST |
1509 RIO_PORT_GEN_MASTER | RIO_PORT_GEN_DISCOVERED); 1511 RIO_PORT_GEN_MASTER | RIO_PORT_GEN_DISCOVERED);