1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-30 19:18:06 +02:00

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
This commit is contained in:
juhosg 2011-11-12 10:54:16 +00:00
parent a1f5559837
commit 3cd36281d9

View File

@ -198,6 +198,10 @@ int __devinit ag71xx_phy_connect(struct ag71xx *ag)
{ {
struct ag71xx_platform_data *pdata = ag71xx_get_pdata(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); ag->mii_bus = dev_to_mii_bus(pdata->mii_bus_dev);
if (ag->mii_bus == NULL) { if (ag->mii_bus == NULL) {
printk(KERN_ERR "%s: unable to find MII bus on device '%s'\n", printk(KERN_ERR "%s: unable to find MII bus on device '%s'\n",