]> git.baikalelectronics.ru Git - uboot.git/commit
eth: mtk-eth: fix incorrect read of phy-handle
authorWeijie Gao <weijie.gao@mediatek.com>
Sun, 28 Apr 2019 07:08:57 +0000 (15:08 +0800)
committerJoe Hershberger <joe.hershberger@ni.com>
Tue, 14 May 2019 19:43:33 +0000 (14:43 -0500)
commit0a05862aee9627a796cb6d46b27ae57ec72ebb27
tree80af95eb1155638c3656242de88278239879ac44
parenta31b409bcbf7bde05f3a4c5f94c1dc170b2f58f7
eth: mtk-eth: fix incorrect read of phy-handle

In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
node itself:

phy-handle = <&phy0>;

phy0: ethernet-phy@0 {
reg = <0>;
}

However the driver used ofnode_find_subnode("phy-handle") to read the node.
It will always fail.

This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
make sure the node can be read correctly.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
drivers/net/mtk_eth.c