aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/tg3.c27
-rw-r--r--drivers/net/tg3.h6
-rw-r--r--include/linux/pci_ids.h4
3 files changed, 34 insertions, 3 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";
diff --git a/drivers/net/tg3.h b/drivers/net/tg3.h
index 7e3b613afb29..8d32fbe0d303 100644
--- a/drivers/net/tg3.h
+++ b/drivers/net/tg3.h
@@ -138,6 +138,7 @@
138#define ASIC_REV_5752 0x06 138#define ASIC_REV_5752 0x06
139#define ASIC_REV_5780 0x08 139#define ASIC_REV_5780 0x08
140#define ASIC_REV_5714 0x09 140#define ASIC_REV_5714 0x09
141#define ASIC_REV_5787 0x0b
141#define GET_CHIP_REV(CHIP_REV_ID) ((CHIP_REV_ID) >> 8) 142#define GET_CHIP_REV(CHIP_REV_ID) ((CHIP_REV_ID) >> 8)
142#define CHIPREV_5700_AX 0x70 143#define CHIPREV_5700_AX 0x70
143#define CHIPREV_5700_BX 0x71 144#define CHIPREV_5700_BX 0x71
@@ -1393,6 +1394,7 @@
1393#define GRC_MDI_CTRL 0x00006844 1394#define GRC_MDI_CTRL 0x00006844
1394#define GRC_SEEPROM_DELAY 0x00006848 1395#define GRC_SEEPROM_DELAY 0x00006848
1395/* 0x684c --> 0x6c00 unused */ 1396/* 0x684c --> 0x6c00 unused */
1397#define GRC_FASTBOOT_PC 0x00006894 /* 5752, 5755, 5787 */
1396 1398
1397/* 0x6c00 --> 0x7000 unused */ 1399/* 0x6c00 --> 0x7000 unused */
1398 1400
@@ -2247,6 +2249,7 @@ struct tg3 {
2247#define PHY_ID_BCM5752 0x60008100 2249#define PHY_ID_BCM5752 0x60008100
2248#define PHY_ID_BCM5714 0x60008340 2250#define PHY_ID_BCM5714 0x60008340
2249#define PHY_ID_BCM5780 0x60008350 2251#define PHY_ID_BCM5780 0x60008350
2252#define PHY_ID_BCM5787 0xbc050ce0
2250#define PHY_ID_BCM8002 0x60010140 2253#define PHY_ID_BCM8002 0x60010140
2251#define PHY_ID_INVALID 0xffffffff 2254#define PHY_ID_INVALID 0xffffffff
2252#define PHY_ID_REV_MASK 0x0000000f 2255#define PHY_ID_REV_MASK 0x0000000f
@@ -2271,7 +2274,8 @@ struct tg3 {
2271 (X) == PHY_ID_BCM5703 || (X) == PHY_ID_BCM5704 || \ 2274 (X) == PHY_ID_BCM5703 || (X) == PHY_ID_BCM5704 || \
2272 (X) == PHY_ID_BCM5705 || (X) == PHY_ID_BCM5750 || \ 2275 (X) == PHY_ID_BCM5705 || (X) == PHY_ID_BCM5750 || \
2273 (X) == PHY_ID_BCM5752 || (X) == PHY_ID_BCM5714 || \ 2276 (X) == PHY_ID_BCM5752 || (X) == PHY_ID_BCM5714 || \
2274 (X) == PHY_ID_BCM5780 || (X) == PHY_ID_BCM8002) 2277 (X) == PHY_ID_BCM5780 || (X) == PHY_ID_BCM5787 || \
2278 (X) == PHY_ID_BCM8002)
2275 2279
2276 struct tg3_hw_stats *hw_stats; 2280 struct tg3_hw_stats *hw_stats;
2277 dma_addr_t stats_mapping; 2281 dma_addr_t stats_mapping;
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index a3a09cceb026..b9810ddf435a 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -1861,14 +1861,18 @@
1861#define PCI_DEVICE_ID_TIGON3_5780 0x166a 1861#define PCI_DEVICE_ID_TIGON3_5780 0x166a
1862#define PCI_DEVICE_ID_TIGON3_5780S 0x166b 1862#define PCI_DEVICE_ID_TIGON3_5780S 0x166b
1863#define PCI_DEVICE_ID_TIGON3_5705F 0x166e 1863#define PCI_DEVICE_ID_TIGON3_5705F 0x166e
1864#define PCI_DEVICE_ID_TIGON3_5754M 0x1672
1864#define PCI_DEVICE_ID_TIGON3_5750 0x1676 1865#define PCI_DEVICE_ID_TIGON3_5750 0x1676
1865#define PCI_DEVICE_ID_TIGON3_5751 0x1677 1866#define PCI_DEVICE_ID_TIGON3_5751 0x1677
1866#define PCI_DEVICE_ID_TIGON3_5715 0x1678 1867#define PCI_DEVICE_ID_TIGON3_5715 0x1678
1867#define PCI_DEVICE_ID_TIGON3_5715S 0x1679 1868#define PCI_DEVICE_ID_TIGON3_5715S 0x1679
1869#define PCI_DEVICE_ID_TIGON3_5754 0x167a
1868#define PCI_DEVICE_ID_TIGON3_5750M 0x167c 1870#define PCI_DEVICE_ID_TIGON3_5750M 0x167c
1869#define PCI_DEVICE_ID_TIGON3_5751M 0x167d 1871#define PCI_DEVICE_ID_TIGON3_5751M 0x167d
1870#define PCI_DEVICE_ID_TIGON3_5751F 0x167e 1872#define PCI_DEVICE_ID_TIGON3_5751F 0x167e
1873#define PCI_DEVICE_ID_TIGON3_5787M 0x1693
1871#define PCI_DEVICE_ID_TIGON3_5782 0x1696 1874#define PCI_DEVICE_ID_TIGON3_5782 0x1696
1875#define PCI_DEVICE_ID_TIGON3_5787 0x169b
1872#define PCI_DEVICE_ID_TIGON3_5788 0x169c 1876#define PCI_DEVICE_ID_TIGON3_5788 0x169c
1873#define PCI_DEVICE_ID_TIGON3_5789 0x169d 1877#define PCI_DEVICE_ID_TIGON3_5789 0x169d
1874#define PCI_DEVICE_ID_TIGON3_5702X 0x16a6 1878#define PCI_DEVICE_ID_TIGON3_5702X 0x16a6