aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tg3.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/tg3.c')
-rw-r--r--drivers/net/tg3.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 2dcde1343cc7..1e1c341da763 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -1085,13 +1085,9 @@ static int tg3_mdio_init(struct tg3 *tp)
1085 struct phy_device *phydev; 1085 struct phy_device *phydev;
1086 1086
1087 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717) { 1087 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717) {
1088 u32 funcnum, is_serdes; 1088 u32 is_serdes;
1089 1089
1090 funcnum = tr32(TG3_CPMU_STATUS) & TG3_CPMU_STATUS_PCIE_FUNC; 1090 tp->phy_addr = PCI_FUNC(tp->pdev->devfn) + 1;
1091 if (funcnum)
1092 tp->phy_addr = 2;
1093 else
1094 tp->phy_addr = 1;
1095 1091
1096 if (tp->pci_chip_rev_id != CHIPREV_ID_5717_A0) 1092 if (tp->pci_chip_rev_id != CHIPREV_ID_5717_A0)
1097 is_serdes = tr32(SG_DIG_STATUS) & SG_DIG_IS_SERDES; 1093 is_serdes = tr32(SG_DIG_STATUS) & SG_DIG_IS_SERDES;
@@ -13608,7 +13604,7 @@ static int __devinit tg3_get_device_address(struct tg3 *tp)
13608 else 13604 else
13609 tg3_nvram_unlock(tp); 13605 tg3_nvram_unlock(tp);
13610 } else if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717) { 13606 } else if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717) {
13611 if (tr32(TG3_CPMU_STATUS) & TG3_CPMU_STATUS_PCIE_FUNC) 13607 if (PCI_FUNC(tp->pdev->devfn))
13612 mac_offset = 0xcc; 13608 mac_offset = 0xcc;
13613 } else if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906) 13609 } else if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906)
13614 mac_offset = 0x10; 13610 mac_offset = 0x10;