Skip to content

Commit 0830c98

Browse files
ffainellidavem330
authored andcommitted
net: dsa: b53: Add BCM7445 quirk
The Broadcom BCM7445 STB chip has an issued in its revision D0 which was previously worked around in drivers/net/dsa/bcm_sf2.c where we may end-up double programming the integrated BCM7445 switch (bcm_sf2) and an external Broadcom switch such as BCM53125, since these are mostly register compatible. Add a small quirk which just defers probing until we are sitting on the slave DSA MDIO bus, which will allow us to intercept reads/writes and funnel them through the SF2 internal MDIO master (which happens to disconnect its pseudo PHY). Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 967dd82 commit 0830c98

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

drivers/net/dsa/b53/b53_mdio.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,17 @@ static int b53_mdio_probe(struct mdio_device *mdiodev)
316316
return -ENODEV;
317317
}
318318

319+
/* First probe will come from SWITCH_MDIO controller on the 7445D0
320+
* switch, which will conflict with the 7445 integrated switch
321+
* pseudo-phy (we end-up programming both). In that case, we return
322+
* -EPROBE_DEFER for the first time we get here, and wait until we come
323+
* back with the slave MDIO bus which has the correct indirection
324+
* layer setup
325+
*/
326+
if (of_machine_is_compatible("brcm,bcm7445d0") &&
327+
strcmp(mdiodev->bus->name, "sf2 slave mii"))
328+
return -EPROBE_DEFER;
329+
319330
dev = b53_switch_alloc(&mdiodev->dev, &b53_mdio_ops, mdiodev->bus);
320331
if (!dev)
321332
return -ENOMEM;

0 commit comments

Comments
 (0)