diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2011-11-12 10:54:16 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2011-11-12 10:54:16 +0000 |
commit | 2f9e535e89a862ddda90eda0ff905a0aa8fd9d3b (patch) | |
tree | 5c8a14b503e7f8571cb315c35cbe8ec6afe92760 /target/linux/ar71xx/files/drivers | |
parent | e962b07c8be841f60731d1f1894d73d93c1a992f (diff) | |
download | mtk-20170518-2f9e535e89a862ddda90eda0ff905a0aa8fd9d3b.zip mtk-20170518-2f9e535e89a862ddda90eda0ff905a0aa8fd9d3b.tar.gz mtk-20170518-2f9e535e89a862ddda90eda0ff905a0aa8fd9d3b.tar.bz2 |
ar71xx: ag71xx: use fixed link parameters if the mii bus is not registered
SVN-Revision: 28977
Diffstat (limited to 'target/linux/ar71xx/files/drivers')
-rw-r--r-- | target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_phy.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_phy.c b/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_phy.c index 85f17b9..9b88b3d 100644 --- a/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_phy.c +++ b/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_phy.c @@ -198,6 +198,10 @@ int __devinit ag71xx_phy_connect(struct ag71xx *ag) { struct ag71xx_platform_data *pdata = ag71xx_get_pdata(ag); + if (pdata->mii_bus_dev == NULL || + pdata->mii_bus_dev->bus == NULL ) + return ag71xx_phy_connect_fixed(ag); + ag->mii_bus = dev_to_mii_bus(pdata->mii_bus_dev); if (ag->mii_bus == NULL) { printk(KERN_ERR "%s: unable to find MII bus on device '%s'\n", |