Skip to content

Commit c4053ef

Browse files
baruchsiachdavem330
authored andcommitted
net: mvpp2: initialize port of_node pointer
Without a valid of_node in struct device we can't find the mvpp2 port device by its DT node. Specifically, this breaks of_find_net_device_by_node(). For example, the Armada 8040 based Clearfog GT-8K uses Marvell 88E6141 switch connected to the &cp1_eth2 port: &cp1_mdio { ... switch0: switch0@4 { compatible = "marvell,mv88e6085"; ... ports { ... port@5 { reg = <5>; label = "cpu"; ethernet = <&cp1_eth2>; }; }; }; }; Without this patch, dsa_register_switch() returns -EPROBE_DEFER because of_find_net_device_by_node() can't find the device_node of the &cp1_eth2 device. Reviewed-by: Andrew Lunn <[email protected]> Signed-off-by: Baruch Siach <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent c3c397c commit c4053ef

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4803,6 +4803,7 @@ static int mvpp2_port_probe(struct platform_device *pdev,
48034803
dev->min_mtu = ETH_MIN_MTU;
48044804
/* 9704 == 9728 - 20 and rounding to 8 */
48054805
dev->max_mtu = MVPP2_BM_JUMBO_PKT_SIZE;
4806+
dev->dev.of_node = port_node;
48064807

48074808
/* Phylink isn't used w/ ACPI as of now */
48084809
if (port_node) {

0 commit comments

Comments
 (0)