aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2011-11-12 10:54:16 +0000
committerGabor Juhos <juhosg@openwrt.org>2011-11-12 10:54:16 +0000
commit44a0cc9d1b8f59b533e4c26f1f6c00c689a7d73d (patch)
treedc2d5ab3e40cb275cae220a7c274e3750143f6e9 /target/linux
parent4faf62a121edc56a51adcd04cd8a6ecd9c575900 (diff)
downloadupstream-44a0cc9d1b8f59b533e4c26f1f6c00c689a7d73d.tar.gz
upstream-44a0cc9d1b8f59b533e4c26f1f6c00c689a7d73d.tar.bz2
upstream-44a0cc9d1b8f59b533e4c26f1f6c00c689a7d73d.zip
ar71xx: ag71xx: use fixed link parameters if the mii bus is not registered
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28977 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_phy.c4
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 85f17b9feb..9b88b3d417 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",