mirror of
https://github.com/torvalds/linux.git
synced 2024-12-29 06:12:08 +00:00
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 <andrew@lunn.ch> Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
c3c397c1f1
commit
c4053ef322
@ -4803,6 +4803,7 @@ static int mvpp2_port_probe(struct platform_device *pdev,
|
|||||||
dev->min_mtu = ETH_MIN_MTU;
|
dev->min_mtu = ETH_MIN_MTU;
|
||||||
/* 9704 == 9728 - 20 and rounding to 8 */
|
/* 9704 == 9728 - 20 and rounding to 8 */
|
||||||
dev->max_mtu = MVPP2_BM_JUMBO_PKT_SIZE;
|
dev->max_mtu = MVPP2_BM_JUMBO_PKT_SIZE;
|
||||||
|
dev->dev.of_node = port_node;
|
||||||
|
|
||||||
/* Phylink isn't used w/ ACPI as of now */
|
/* Phylink isn't used w/ ACPI as of now */
|
||||||
if (port_node) {
|
if (port_node) {
|
||||||
|
Loading…
Reference in New Issue
Block a user