diff options
author | Michael Chan <mchan@broadcom.com> | 2006-03-21 01:27:35 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-03-21 01:27:35 -0500 |
commit | d9ab5ad12b0d865bdb1b750d81192d34465541e9 (patch) | |
tree | 0bc4b3e9139836b39e5cab3affe9090bae4b11c7 /drivers/net/tg3.c | |
parent | 6cb153cab92a6dc8771d496b10a50cd066fa7f71 (diff) |
[TG3]: Add 5787 and 5754 basic support
Add basic support for 2 new chips 5787 and 5754.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tg3.c')
-rw-r--r-- | drivers/net/tg3.c | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index d4f5b58e1dd4..e6ed940d7714 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -221,6 +221,14 @@ static struct pci_device_id tg3_pci_tbl[] = { | |||
221 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, | 221 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, |
222 | { PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5753F, | 222 | { PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5753F, |
223 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, | 223 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, |
224 | { PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5754, | ||
225 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, | ||
226 | { PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5754M, | ||
227 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, | ||
228 | { PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5787, | ||
229 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, | ||
230 | { PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5787M, | ||
231 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, | ||
224 | { PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5714, | 232 | { PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5714, |
225 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, | 233 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, |
226 | { PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5714S, | 234 | { PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5714S, |
@@ -4388,6 +4396,10 @@ static int tg3_chip_reset(struct tg3 *tp) | |||
4388 | tp->nvram_lock_cnt = 0; | 4396 | tp->nvram_lock_cnt = 0; |
4389 | } | 4397 | } |
4390 | 4398 | ||
4399 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5752 || | ||
4400 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787) | ||
4401 | tw32(GRC_FASTBOOT_PC, 0); | ||
4402 | |||
4391 | /* | 4403 | /* |
4392 | * We must avoid the readl() that normally takes place. | 4404 | * We must avoid the readl() that normally takes place. |
4393 | * It locks machines, causes machine checks, and other | 4405 | * It locks machines, causes machine checks, and other |
@@ -6018,6 +6030,10 @@ static int tg3_reset_hw(struct tg3 *tp) | |||
6018 | } | 6030 | } |
6019 | } | 6031 | } |
6020 | 6032 | ||
6033 | /* Enable host coalescing bug fix */ | ||
6034 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787) | ||
6035 | val |= (1 << 29); | ||
6036 | |||
6021 | tw32_f(WDMAC_MODE, val); | 6037 | tw32_f(WDMAC_MODE, val); |
6022 | udelay(40); | 6038 | udelay(40); |
6023 | 6039 | ||
@@ -8326,6 +8342,9 @@ static void tg3_self_test(struct net_device *dev, struct ethtool_test *etest, | |||
8326 | if (!err) | 8342 | if (!err) |
8327 | tg3_nvram_unlock(tp); | 8343 | tg3_nvram_unlock(tp); |
8328 | 8344 | ||
8345 | if (tp->tg3_flags2 & TG3_FLG2_MII_SERDES) | ||
8346 | tg3_phy_reset(tp); | ||
8347 | |||
8329 | if (tg3_test_registers(tp) != 0) { | 8348 | if (tg3_test_registers(tp) != 0) { |
8330 | etest->flags |= ETH_TEST_FL_FAILED; | 8349 | etest->flags |= ETH_TEST_FL_FAILED; |
8331 | data[2] = 1; | 8350 | data[2] = 1; |
@@ -9681,6 +9700,7 @@ static int __devinit tg3_get_invariants(struct tg3 *tp) | |||
9681 | 9700 | ||
9682 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750 || | 9701 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750 || |
9683 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5752 || | 9702 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5752 || |
9703 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787 || | ||
9684 | (tp->tg3_flags2 & TG3_FLG2_5780_CLASS)) | 9704 | (tp->tg3_flags2 & TG3_FLG2_5780_CLASS)) |
9685 | tp->tg3_flags2 |= TG3_FLG2_5750_PLUS; | 9705 | tp->tg3_flags2 |= TG3_FLG2_5750_PLUS; |
9686 | 9706 | ||
@@ -9693,7 +9713,8 @@ static int __devinit tg3_get_invariants(struct tg3 *tp) | |||
9693 | 9713 | ||
9694 | if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705 && | 9714 | if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705 && |
9695 | GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5750 && | 9715 | GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5750 && |
9696 | GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5752) | 9716 | GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5752 && |
9717 | GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5787) | ||
9697 | tp->tg3_flags2 |= TG3_FLG2_JUMBO_CAPABLE; | 9718 | tp->tg3_flags2 |= TG3_FLG2_JUMBO_CAPABLE; |
9698 | 9719 | ||
9699 | if (pci_find_capability(tp->pdev, PCI_CAP_ID_EXP) != 0) | 9720 | if (pci_find_capability(tp->pdev, PCI_CAP_ID_EXP) != 0) |
@@ -9903,7 +9924,8 @@ static int __devinit tg3_get_invariants(struct tg3 *tp) | |||
9903 | if (tp->pci_chip_rev_id == CHIPREV_ID_5704_A0) | 9924 | if (tp->pci_chip_rev_id == CHIPREV_ID_5704_A0) |
9904 | tp->tg3_flags2 |= TG3_FLG2_PHY_5704_A0_BUG; | 9925 | tp->tg3_flags2 |= TG3_FLG2_PHY_5704_A0_BUG; |
9905 | 9926 | ||
9906 | if (tp->tg3_flags2 & TG3_FLG2_5705_PLUS) | 9927 | if ((tp->tg3_flags2 & TG3_FLG2_5705_PLUS) && |
9928 | (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5787)) | ||
9907 | tp->tg3_flags2 |= TG3_FLG2_PHY_BER_BUG; | 9929 | tp->tg3_flags2 |= TG3_FLG2_PHY_BER_BUG; |
9908 | 9930 | ||
9909 | tp->coalesce_mode = 0; | 9931 | tp->coalesce_mode = 0; |
@@ -10628,6 +10650,7 @@ static char * __devinit tg3_phy_string(struct tg3 *tp) | |||
10628 | case PHY_ID_BCM5752: return "5752"; | 10650 | case PHY_ID_BCM5752: return "5752"; |
10629 | case PHY_ID_BCM5714: return "5714"; | 10651 | case PHY_ID_BCM5714: return "5714"; |
10630 | case PHY_ID_BCM5780: return "5780"; | 10652 | case PHY_ID_BCM5780: return "5780"; |
10653 | case PHY_ID_BCM5787: return "5787"; | ||
10631 | case PHY_ID_BCM8002: return "8002/serdes"; | 10654 | case PHY_ID_BCM8002: return "8002/serdes"; |
10632 | case 0: return "serdes"; | 10655 | case 0: return "serdes"; |
10633 | default: return "unknown"; | 10656 | default: return "unknown"; |