Message ID | 57401748.9010001@gmail.com |
---|---|
State | Changes Requested |
Headers | show |
Hi, On 05/21/2016 10:07 AM, Michał Osowiecki wrote: > Cisco RV042G is Cavium based router with BCM53125 switch and BCM54612E > connected to port 8, and port 5 acts as cpu port. Probably Linksys > LRT214 and LRT224 will be affected by this patch too (boards are > identical). > I don't know if there are other Cavium boards with BCM53125. If so, this > patch will need more work to detect them. > > Signed-off-by: Michał Osowiecki <michal.osowiecki@gmail.com> > Could you send the patch inside the text of the mail please that makes review easier. How is the switch connected to the main SoC? I do not like the #ifdef in there, if it is not absolutely needed, would it be possible to extend some platform_data structure or similar to add this? Hauke
--- a/drivers/net/phy/b53/b53_common.c +++ b/drivers/net/phy/b53/b53_common.c @@ -1372,6 +1372,14 @@ /* cpu port is always last */ sw_dev->ports = sw_dev->cpu_port + 1; +#ifdef CONFIG_CAVIUM_OCTEON_SOC + if (dev->chip_id == BCM53125_DEVICE_ID) { + /* CISCO RV042G */ + sw_dev->cpu_port = 5; + sw_dev->ports = 9; + dev->enabled_ports = 0x11f; + } +#endif dev->enabled_ports |= BIT(sw_dev->cpu_port); dev->ports = devm_kzalloc(dev->dev,
Cisco RV042G is Cavium based router with BCM53125 switch and BCM54612E connected to port 8, and port 5 acts as cpu port. Probably Linksys LRT214 and LRT224 will be affected by this patch too (boards are identical). I don't know if there are other Cavium boards with BCM53125. If so, this patch will need more work to detect them. Signed-off-by: Michał Osowiecki <michal.osowiecki@gmail.com>