Skip to content

Commit

Permalink
powerpc/fsl_rio: changes to mport registration
Browse files Browse the repository at this point in the history
commit dd64f4f upstream.

Change mport object initialization/registration sequence to match
reworked version of rio_register_mport() in the core code.

Signed-off-by: Alexandre Bounine <[email protected]>
Cc: Matt Porter <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: Aurelien Jacquiot <[email protected]>
Cc: Andre van Herk <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Signed-off-by: Sekhar Nori <[email protected]>
  • Loading branch information
Alexandre Bounine authored and nsekhar committed Jun 16, 2016
1 parent a579aa7 commit 97c4c18
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions arch/powerpc/sysdev/fsl_rio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -727,6 +727,12 @@ int fsl_rio_setup(struct platform_device *dev)

dbell->mport[i] = port;

if (rio_register_mport(port)) {
release_resource(&port->iores);
kfree(priv);
kfree(port);
continue;
}
active_ports++;
}

Expand Down

0 comments on commit 97c4c18

Please sign in to comment.