summaryrefslogtreecommitdiff
path: root/drivers/net/fec.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/fec.c')
-rwxr-xr-xdrivers/net/fec.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/fec.c b/drivers/net/fec.c
index 73f3f2b49a61..bcd02e5cfaf0 100755
--- a/drivers/net/fec.c
+++ b/drivers/net/fec.c
@@ -692,8 +692,14 @@ static void __inline__ fec_get_mac(struct net_device *ndev)
memcpy(ndev->dev_addr, iap, ETH_ALEN);
/* Adjust MAC if using macaddr */
+#if CONFIG_COLIBRI_VF
+ /* Add 0x100000 to the first MAC address to get the second */
+ if (iap == macaddr)
+ ndev->dev_addr[3] = macaddr[3] + (fep->pdev->id * 0x10);
+#else
if (iap == macaddr)
ndev->dev_addr[ETH_ALEN-1] = macaddr[ETH_ALEN-1] + fep->pdev->id;
+#endif /* !CONFIG_COLIBRI_VF */
}
/* ------------------------------------------------------------------------- */
@@ -876,6 +882,7 @@ static int fec_enet_mii_init(struct platform_device *pdev)
platform_get_device_id(fep->pdev);
int err = -ENXIO, i;
+#if !defined(CONFIG_COLIBRI_VF)
/*
* The dual fec interfaces are not equivalent with enet-mac.
* Here are the differences:
@@ -897,6 +904,7 @@ static int fec_enet_mii_init(struct platform_device *pdev)
fep->mii_bus = fec0_mii_bus;
return 0;
}
+#endif /* !CONFIG_COLIBRI_VF */
fep->mii_timeout = 0;
@@ -940,9 +948,11 @@ static int fec_enet_mii_init(struct platform_device *pdev)
if (mdiobus_register(fep->mii_bus))
goto err_out_free_mdio_irq;
+#if !defined(CONFIG_COLIBRI_VF)
/* save fec0 mii_bus */
if (id_entry->driver_data & FEC_QUIRK_ENET_MAC)
fec0_mii_bus = fep->mii_bus;
+#endif /* !CONFIG_COLIBRI_VF */
return 0;