netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: mvpp2: initialize port of_node pointer
@ 2018-08-27 12:12 Baruch Siach
  2018-08-27 13:47 ` Andrew Lunn
  0 siblings, 1 reply; 4+ messages in thread
From: Baruch Siach @ 2018-08-27 12:12 UTC (permalink / raw)
  To: Maxime Chevallier, Antoine Tenart
  Cc: netdev, Russell King, Ori Shem-Tov, Jason Cooper, Andrew Lunn,
	Gregory Clement, Sebastian Hesselbarth, Baruch Siach

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().

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
 drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
index 32d785b616e1..28500417843e 100644
--- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
+++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
@@ -4803,6 +4803,7 @@ static int mvpp2_port_probe(struct platform_device *pdev,
 	dev->min_mtu = ETH_MIN_MTU;
 	/* 9704 == 9728 - 20 and rounding to 8 */
 	dev->max_mtu = MVPP2_BM_JUMBO_PKT_SIZE;
+	dev->dev.of_node = port_node;
 
 	/* Phylink isn't used w/ ACPI as of now */
 	if (port_node) {
-- 
2.18.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-08-27 22:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-27 12:12 [PATCH] net: mvpp2: initialize port of_node pointer Baruch Siach
2018-08-27 13:47 ` Andrew Lunn
2018-08-27 18:17   ` Baruch Siach
2018-08-27 18:44     ` Andrew Lunn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).