Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[deliverable/linux.git] / arch / powerpc / sysdev / fsl_rio.c
index c1cd3698f534eea2e3abc728798151ed184200bd..f5bf38b9459585fcd1f8d4a34ed24c8067e67daa 100644 (file)
@@ -606,6 +606,12 @@ int fsl_rio_setup(struct platform_device *dev)
                if (!port)
                        continue;
 
+               rc = rio_mport_initialize(port);
+               if (rc) {
+                       kfree(port);
+                       continue;
+               }
+
                i = *port_index - 1;
                port->index = (unsigned char)i;
 
@@ -682,12 +688,6 @@ int fsl_rio_setup(struct platform_device *dev)
                dev_info(&dev->dev, "RapidIO Common Transport System size: %d\n",
                                port->sys_size ? 65536 : 256);
 
-               if (rio_register_mport(port)) {
-                       release_resource(&port->iores);
-                       kfree(priv);
-                       kfree(port);
-                       continue;
-               }
                if (port->host_deviceid >= 0)
                        out_be32(priv->regs_win + RIO_GCCSR, RIO_PORT_GEN_HOST |
                                RIO_PORT_GEN_MASTER | RIO_PORT_GEN_DISCOVERED);
@@ -726,7 +726,14 @@ int fsl_rio_setup(struct platform_device *dev)
                fsl_rio_inbound_mem_init(priv);
 
                dbell->mport[i] = port;
+               pw->mport[i] = port;
 
+               if (rio_register_mport(port)) {
+                       release_resource(&port->iores);
+                       kfree(priv);
+                       kfree(port);
+                       continue;
+               }
                active_ports++;
        }
 
This page took 0.026455 seconds and 5 git commands to generate.