Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 202682
b: refs/heads/master
c: 9c7df91
h: refs/heads/master
v: v3
  • Loading branch information
Matt Carlson authored and David S. Miller committed Jun 7, 2010
1 parent 8240226 commit 38f7148
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 57d8b88030ca9f295bb72ef65228c6d86bed22f6
refs/heads/master: 9c7df9157889a8f67d2d104fd52f2aacb3826fe7
10 changes: 3 additions & 7 deletions trunk/drivers/net/tg3.c
Original file line number Diff line number Diff line change
Expand Up @@ -1085,13 +1085,9 @@ static int tg3_mdio_init(struct tg3 *tp)
struct phy_device *phydev;

if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717) {
u32 funcnum, is_serdes;
u32 is_serdes;

funcnum = tr32(TG3_CPMU_STATUS) & TG3_CPMU_STATUS_PCIE_FUNC;
if (funcnum)
tp->phy_addr = 2;
else
tp->phy_addr = 1;
tp->phy_addr = PCI_FUNC(tp->pdev->devfn) + 1;

if (tp->pci_chip_rev_id != CHIPREV_ID_5717_A0)
is_serdes = tr32(SG_DIG_STATUS) & SG_DIG_IS_SERDES;
Expand Down Expand Up @@ -13608,7 +13604,7 @@ static int __devinit tg3_get_device_address(struct tg3 *tp)
else
tg3_nvram_unlock(tp);
} else if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717) {
if (tr32(TG3_CPMU_STATUS) & TG3_CPMU_STATUS_PCIE_FUNC)
if (PCI_FUNC(tp->pdev->devfn))
mac_offset = 0xcc;
} else if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906)
mac_offset = 0x10;
Expand Down
4 changes: 1 addition & 3 deletions trunk/drivers/net/tg3.h
Original file line number Diff line number Diff line change
Expand Up @@ -1073,10 +1073,8 @@
#define TG3_CPMU_HST_ACC 0x0000361c
#define CPMU_HST_ACC_MACCLK_MASK 0x001f0000
#define CPMU_HST_ACC_MACCLK_6_25 0x00130000
/* 0x3620 --> 0x362c unused */
/* 0x3620 --> 0x3630 unused */

#define TG3_CPMU_STATUS 0x0000362c
#define TG3_CPMU_STATUS_PCIE_FUNC 0x20000000
#define TG3_CPMU_CLCK_STAT 0x00003630
#define CPMU_CLCK_STAT_MAC_CLCK_MASK 0x001f0000
#define CPMU_CLCK_STAT_MAC_CLCK_62_5 0x00000000
Expand Down

0 comments on commit 38f7148

Please sign in to comment.