diff options
author | Matt Carlson <mcarlson@broadcom.com> | 2010-01-12 05:11:38 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-01-13 20:18:53 -0500 |
commit | d1ec96af77df611d1728f3bb70289f83a02df1ea (patch) | |
tree | b6268f532c7d40272da4149f27518afa0dd2191b /drivers/net | |
parent | 86cfe4ff02a51294cb2c974a8bedc7f648491df9 (diff) |
tg3: Add reliable serdes detection for 5717 A0
The serdes status bit does not work as intended for the 5717 A0.
This patch implements an alternative detection scheme that will only be
valid for A0 revisions.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/tg3.c | 9 | ||||
-rw-r--r-- | drivers/net/tg3.h | 2 |
2 files changed, 9 insertions, 2 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 4e8b87d1ffa9..0a632f96d16b 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -1037,7 +1037,11 @@ static void tg3_mdio_start(struct tg3 *tp) | |||
1037 | else | 1037 | else |
1038 | tp->phy_addr = 1; | 1038 | tp->phy_addr = 1; |
1039 | 1039 | ||
1040 | is_serdes = tr32(SG_DIG_STATUS) & SG_DIG_IS_SERDES; | 1040 | if (tp->pci_chip_rev_id != CHIPREV_ID_5717_A0) |
1041 | is_serdes = tr32(SG_DIG_STATUS) & SG_DIG_IS_SERDES; | ||
1042 | else | ||
1043 | is_serdes = tr32(TG3_CPMU_PHY_STRAP) & | ||
1044 | TG3_CPMU_PHY_STRAP_IS_SERDES; | ||
1041 | if (is_serdes) | 1045 | if (is_serdes) |
1042 | tp->phy_addr += 7; | 1046 | tp->phy_addr += 7; |
1043 | } else | 1047 | } else |
@@ -12123,7 +12127,8 @@ static void __devinit tg3_get_eeprom_hw_cfg(struct tg3 *tp) | |||
12123 | 12127 | ||
12124 | tp->phy_id = eeprom_phy_id; | 12128 | tp->phy_id = eeprom_phy_id; |
12125 | if (eeprom_phy_serdes) { | 12129 | if (eeprom_phy_serdes) { |
12126 | if (tp->tg3_flags2 & TG3_FLG2_5780_CLASS) | 12130 | if ((tp->tg3_flags2 & TG3_FLG2_5780_CLASS) || |
12131 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717) | ||
12127 | tp->tg3_flags2 |= TG3_FLG2_MII_SERDES; | 12132 | tp->tg3_flags2 |= TG3_FLG2_MII_SERDES; |
12128 | else | 12133 | else |
12129 | tp->tg3_flags2 |= TG3_FLG2_PHY_SERDES; | 12134 | tp->tg3_flags2 |= TG3_FLG2_PHY_SERDES; |
diff --git a/drivers/net/tg3.h b/drivers/net/tg3.h index cd30889650f8..43ed41b9f559 100644 --- a/drivers/net/tg3.h +++ b/drivers/net/tg3.h | |||
@@ -1054,6 +1054,8 @@ | |||
1054 | #define CPMU_MUTEX_REQ_DRIVER 0x00001000 | 1054 | #define CPMU_MUTEX_REQ_DRIVER 0x00001000 |
1055 | #define TG3_CPMU_MUTEX_GNT 0x00003660 | 1055 | #define TG3_CPMU_MUTEX_GNT 0x00003660 |
1056 | #define CPMU_MUTEX_GNT_DRIVER 0x00001000 | 1056 | #define CPMU_MUTEX_GNT_DRIVER 0x00001000 |
1057 | #define TG3_CPMU_PHY_STRAP 0x00003664 | ||
1058 | #define TG3_CPMU_PHY_STRAP_IS_SERDES 0x00000020 | ||
1057 | /* 0x3664 --> 0x3800 unused */ | 1059 | /* 0x3664 --> 0x3800 unused */ |
1058 | 1060 | ||
1059 | /* Mbuf cluster free registers */ | 1061 | /* Mbuf cluster free registers */ |