]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: do not initialize MDIO bus when PHY is inexistent
authorJian Shen <shenjian15@huawei.com>
Sun, 14 Apr 2019 01:47:44 +0000 (09:47 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 14 Apr 2019 20:47:35 +0000 (13:47 -0700)
commita5c58f880dc5e7494531279af82166cd2c78a1af
tree8218d827a8f118c3757f9ca3e2ab26dfc1850793
parentc1328e9153d7fb0ccebd580c432e05a46edec397
net: hns3: do not initialize MDIO bus when PHY is inexistent

For some cases, PHY may not be connected to MDIO bus, then
the driver will initialize fail since MDIO bus initialization
fails.

This patch fixes it by skipping the MDIO bus initialization
when PHY is inexistent.

Signed-off-by: Jian Shen <shenjian15@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c