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.c68
1 files changed, 50 insertions, 18 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 1e1c341da763..63a5b96bc086 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -1084,7 +1084,8 @@ static int tg3_mdio_init(struct tg3 *tp)
1084 u32 reg; 1084 u32 reg;
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 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5719) {
1088 u32 is_serdes; 1089 u32 is_serdes;
1089 1090
1090 tp->phy_addr = PCI_FUNC(tp->pdev->devfn) + 1; 1091 tp->phy_addr = PCI_FUNC(tp->pdev->devfn) + 1;
@@ -1600,7 +1601,8 @@ static void tg3_phy_toggle_apd(struct tg3 *tp, bool enable)
1600 u32 reg; 1601 u32 reg;
1601 1602
1602 if (!(tp->tg3_flags2 & TG3_FLG2_5705_PLUS) || 1603 if (!(tp->tg3_flags2 & TG3_FLG2_5705_PLUS) ||
1603 (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717 && 1604 ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717 ||
1605 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5719) &&
1604 (tp->tg3_flags2 & TG3_FLG2_MII_SERDES))) 1606 (tp->tg3_flags2 & TG3_FLG2_MII_SERDES)))
1605 return; 1607 return;
1606 1608
@@ -1975,7 +1977,8 @@ static int tg3_phy_reset(struct tg3 *tp)
1975 } 1977 }
1976 } 1978 }
1977 1979
1978 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717 && 1980 if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717 ||
1981 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5719) &&
1979 (tp->tg3_flags2 & TG3_FLG2_MII_SERDES)) 1982 (tp->tg3_flags2 & TG3_FLG2_MII_SERDES))
1980 return 0; 1983 return 0;
1981 1984
@@ -2060,6 +2063,7 @@ static void tg3_frob_aux_power(struct tg3 *tp)
2060 2063
2061 /* The GPIOs do something completely different on 57765. */ 2064 /* The GPIOs do something completely different on 57765. */
2062 if ((tp->tg3_flags2 & TG3_FLG2_IS_NIC) == 0 || 2065 if ((tp->tg3_flags2 & TG3_FLG2_IS_NIC) == 0 ||
2066 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5719 ||
2063 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57765) 2067 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57765)
2064 return; 2068 return;
2065 2069
@@ -7083,6 +7087,7 @@ static int tg3_chip_reset(struct tg3 *tp)
7083 tp->pci_chip_rev_id != CHIPREV_ID_5750_A0 && 7087 tp->pci_chip_rev_id != CHIPREV_ID_5750_A0 &&
7084 GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5785 && 7088 GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5785 &&
7085 GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5717 && 7089 GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5717 &&
7090 GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5719 &&
7086 GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_57765) { 7091 GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_57765) {
7087 val = tr32(0x7c00); 7092 val = tr32(0x7c00);
7088 7093
@@ -7518,7 +7523,8 @@ static void tg3_rings_reset(struct tg3 *tp)
7518 7523
7519 7524
7520 /* Disable all receive return rings but the first. */ 7525 /* Disable all receive return rings but the first. */
7521 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717) 7526 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717 ||
7527 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5719)
7522 limit = NIC_SRAM_RCV_RET_RCB + TG3_BDINFO_SIZE * 17; 7528 limit = NIC_SRAM_RCV_RET_RCB + TG3_BDINFO_SIZE * 17;
7523 else if (!(tp->tg3_flags2 & TG3_FLG2_5705_PLUS)) 7529 else if (!(tp->tg3_flags2 & TG3_FLG2_5705_PLUS))
7524 limit = NIC_SRAM_RCV_RET_RCB + TG3_BDINFO_SIZE * 16; 7530 limit = NIC_SRAM_RCV_RET_RCB + TG3_BDINFO_SIZE * 16;
@@ -7756,6 +7762,7 @@ static int tg3_reset_hw(struct tg3 *tp, int reset_phy)
7756 return err; 7762 return err;
7757 7763
7758 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717 || 7764 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717 ||
7765 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5719 ||
7759 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57765) { 7766 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57765) {
7760 val = tr32(TG3PCI_DMA_RW_CTRL) & 7767 val = tr32(TG3PCI_DMA_RW_CTRL) &
7761 ~DMA_RWCTRL_DIS_CACHE_ALIGNMENT; 7768 ~DMA_RWCTRL_DIS_CACHE_ALIGNMENT;
@@ -7884,7 +7891,8 @@ static int tg3_reset_hw(struct tg3 *tp, int reset_phy)
7884 ((u64) tpr->rx_std_mapping >> 32)); 7891 ((u64) tpr->rx_std_mapping >> 32));
7885 tw32(RCVDBDI_STD_BD + TG3_BDINFO_HOST_ADDR + TG3_64BIT_REG_LOW, 7892 tw32(RCVDBDI_STD_BD + TG3_BDINFO_HOST_ADDR + TG3_64BIT_REG_LOW,
7886 ((u64) tpr->rx_std_mapping & 0xffffffff)); 7893 ((u64) tpr->rx_std_mapping & 0xffffffff));
7887 if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5717) 7894 if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5717 &&
7895 GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5719)
7888 tw32(RCVDBDI_STD_BD + TG3_BDINFO_NIC_ADDR, 7896 tw32(RCVDBDI_STD_BD + TG3_BDINFO_NIC_ADDR,
7889 NIC_SRAM_RX_BUFFER_DESC); 7897 NIC_SRAM_RX_BUFFER_DESC);
7890 7898
@@ -7909,7 +7917,8 @@ static int tg3_reset_hw(struct tg3 *tp, int reset_phy)
7909 tw32(RCVDBDI_JUMBO_BD + TG3_BDINFO_MAXLEN_FLAGS, 7917 tw32(RCVDBDI_JUMBO_BD + TG3_BDINFO_MAXLEN_FLAGS,
7910 (RX_JUMBO_MAX_SIZE << BDINFO_FLAGS_MAXLEN_SHIFT) | 7918 (RX_JUMBO_MAX_SIZE << BDINFO_FLAGS_MAXLEN_SHIFT) |
7911 BDINFO_FLAGS_USE_EXT_RECV); 7919 BDINFO_FLAGS_USE_EXT_RECV);
7912 if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5717) 7920 if (!(tp->tg3_flags3 & TG3_FLG3_USE_JUMBO_BDFLAG) ||
7921 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57765)
7913 tw32(RCVDBDI_JUMBO_BD + TG3_BDINFO_NIC_ADDR, 7922 tw32(RCVDBDI_JUMBO_BD + TG3_BDINFO_NIC_ADDR,
7914 NIC_SRAM_RX_JUMBO_BUFFER_DESC); 7923 NIC_SRAM_RX_JUMBO_BUFFER_DESC);
7915 } else { 7924 } else {
@@ -7918,6 +7927,7 @@ static int tg3_reset_hw(struct tg3 *tp, int reset_phy)
7918 } 7927 }
7919 7928
7920 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717 || 7929 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717 ||
7930 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5719 ||
7921 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57765) 7931 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57765)
7922 val = (RX_STD_MAX_SIZE_5705 << BDINFO_FLAGS_MAXLEN_SHIFT) | 7932 val = (RX_STD_MAX_SIZE_5705 << BDINFO_FLAGS_MAXLEN_SHIFT) |
7923 (TG3_RX_STD_DMA_SZ << 2); 7933 (TG3_RX_STD_DMA_SZ << 2);
@@ -7936,6 +7946,7 @@ static int tg3_reset_hw(struct tg3 *tp, int reset_phy)
7936 tw32_rx_mbox(TG3_RX_JMB_PROD_IDX_REG, tpr->rx_jmb_prod_idx); 7946 tw32_rx_mbox(TG3_RX_JMB_PROD_IDX_REG, tpr->rx_jmb_prod_idx);
7937 7947
7938 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717 || 7948 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717 ||
7949 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5719 ||
7939 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57765) { 7950 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57765) {
7940 tw32(STD_REPLENISH_LWM, 32); 7951 tw32(STD_REPLENISH_LWM, 32);
7941 tw32(JMB_REPLENISH_LWM, 16); 7952 tw32(JMB_REPLENISH_LWM, 16);
@@ -7971,7 +7982,8 @@ static int tg3_reset_hw(struct tg3 *tp, int reset_phy)
7971 RDMAC_MODE_FIFOURUN_ENAB | RDMAC_MODE_FIFOOREAD_ENAB | 7982 RDMAC_MODE_FIFOURUN_ENAB | RDMAC_MODE_FIFOOREAD_ENAB |
7972 RDMAC_MODE_LNGREAD_ENAB); 7983 RDMAC_MODE_LNGREAD_ENAB);
7973 7984
7974 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717) 7985 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717 ||
7986 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5719)
7975 rdmac_mode |= RDMAC_MODE_MULT_DMA_RD_DIS; 7987 rdmac_mode |= RDMAC_MODE_MULT_DMA_RD_DIS;
7976 7988
7977 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 || 7989 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 ||
@@ -8626,6 +8638,7 @@ static int tg3_test_interrupt(struct tg3 *tp)
8626 * observable way to know whether the interrupt was delivered. 8638 * observable way to know whether the interrupt was delivered.
8627 */ 8639 */
8628 if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717 || 8640 if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717 ||
8641 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5719 ||
8629 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57765) && 8642 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57765) &&
8630 (tp->tg3_flags2 & TG3_FLG2_USING_MSI)) { 8643 (tp->tg3_flags2 & TG3_FLG2_USING_MSI)) {
8631 val = tr32(MSGINT_MODE) | MSGINT_MODE_ONE_SHOT_DISABLE; 8644 val = tr32(MSGINT_MODE) | MSGINT_MODE_ONE_SHOT_DISABLE;
@@ -8670,6 +8683,7 @@ static int tg3_test_interrupt(struct tg3 *tp)
8670 if (intr_ok) { 8683 if (intr_ok) {
8671 /* Reenable MSI one shot mode. */ 8684 /* Reenable MSI one shot mode. */
8672 if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717 || 8685 if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717 ||
8686 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5719 ||
8673 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57765) && 8687 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57765) &&
8674 (tp->tg3_flags2 & TG3_FLG2_USING_MSI)) { 8688 (tp->tg3_flags2 & TG3_FLG2_USING_MSI)) {
8675 val = tr32(MSGINT_MODE) & ~MSGINT_MODE_ONE_SHOT_DISABLE; 8689 val = tr32(MSGINT_MODE) & ~MSGINT_MODE_ONE_SHOT_DISABLE;
@@ -8812,7 +8826,8 @@ static bool tg3_enable_msix(struct tg3 *tp)
8812 if (tp->irq_cnt > 1) { 8826 if (tp->irq_cnt > 1) {
8813 tp->tg3_flags3 |= TG3_FLG3_ENABLE_RSS; 8827 tp->tg3_flags3 |= TG3_FLG3_ENABLE_RSS;
8814 8828
8815 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717) { 8829 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717 ||
8830 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5719) {
8816 tp->tg3_flags3 |= TG3_FLG3_ENABLE_TSS; 8831 tp->tg3_flags3 |= TG3_FLG3_ENABLE_TSS;
8817 tp->dev->real_num_tx_queues = tp->irq_cnt - 1; 8832 tp->dev->real_num_tx_queues = tp->irq_cnt - 1;
8818 } 8833 }
@@ -8965,6 +8980,7 @@ static int tg3_open(struct net_device *dev)
8965 } 8980 }
8966 8981
8967 if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5717 && 8982 if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5717 &&
8983 GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5719 &&
8968 GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_57765 && 8984 GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_57765 &&
8969 (tp->tg3_flags2 & TG3_FLG2_USING_MSI) && 8985 (tp->tg3_flags2 & TG3_FLG2_USING_MSI) &&
8970 (tp->tg3_flags2 & TG3_FLG2_1SHOT_MSI)) { 8986 (tp->tg3_flags2 & TG3_FLG2_1SHOT_MSI)) {
@@ -10576,7 +10592,8 @@ static int tg3_test_memory(struct tg3 *tp)
10576 int err = 0; 10592 int err = 0;
10577 int i; 10593 int i;
10578 10594
10579 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717) 10595 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717 ||
10596 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5719)
10580 mem_tbl = mem_tbl_5717; 10597 mem_tbl = mem_tbl_5717;
10581 else if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57765) 10598 else if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57765)
10582 mem_tbl = mem_tbl_57765; 10599 mem_tbl = mem_tbl_57765;
@@ -11656,7 +11673,8 @@ static void __devinit tg3_nvram_init(struct tg3 *tp)
11656 else if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57780 || 11673 else if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57780 ||
11657 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57765) 11674 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57765)
11658 tg3_get_57780_nvram_info(tp); 11675 tg3_get_57780_nvram_info(tp);
11659 else if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717) 11676 else if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717 ||
11677 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5719)
11660 tg3_get_5717_nvram_info(tp); 11678 tg3_get_5717_nvram_info(tp);
11661 else 11679 else
11662 tg3_get_nvram_info(tp); 11680 tg3_get_nvram_info(tp);
@@ -12092,11 +12110,10 @@ static void __devinit tg3_get_eeprom_hw_cfg(struct tg3 *tp)
12092 12110
12093 tp->phy_id = eeprom_phy_id; 12111 tp->phy_id = eeprom_phy_id;
12094 if (eeprom_phy_serdes) { 12112 if (eeprom_phy_serdes) {
12095 if ((tp->tg3_flags2 & TG3_FLG2_5780_CLASS) || 12113 if (!(tp->tg3_flags2 & TG3_FLG2_5705_PLUS))
12096 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717)
12097 tp->tg3_flags2 |= TG3_FLG2_MII_SERDES;
12098 else
12099 tp->tg3_flags2 |= TG3_FLG2_PHY_SERDES; 12114 tp->tg3_flags2 |= TG3_FLG2_PHY_SERDES;
12115 else
12116 tp->tg3_flags2 |= TG3_FLG2_MII_SERDES;
12100 } 12117 }
12101 12118
12102 if (tp->tg3_flags2 & TG3_FLG2_5750_PLUS) 12119 if (tp->tg3_flags2 & TG3_FLG2_5750_PLUS)
@@ -12826,7 +12843,8 @@ static int __devinit tg3_get_invariants(struct tg3 *tp)
12826 12843
12827 if (tp->pdev->device == TG3PCI_DEVICE_TIGON3_5717 || 12844 if (tp->pdev->device == TG3PCI_DEVICE_TIGON3_5717 ||
12828 tp->pdev->device == TG3PCI_DEVICE_TIGON3_5718 || 12845 tp->pdev->device == TG3PCI_DEVICE_TIGON3_5718 ||
12829 tp->pdev->device == TG3PCI_DEVICE_TIGON3_5724) 12846 tp->pdev->device == TG3PCI_DEVICE_TIGON3_5724 ||
12847 tp->pdev->device == TG3PCI_DEVICE_TIGON3_5719)
12830 pci_read_config_dword(tp->pdev, 12848 pci_read_config_dword(tp->pdev,
12831 TG3PCI_GEN2_PRODID_ASICREV, 12849 TG3PCI_GEN2_PRODID_ASICREV,
12832 &prod_id_asic_rev); 12850 &prod_id_asic_rev);
@@ -12992,6 +13010,7 @@ static int __devinit tg3_get_invariants(struct tg3 *tp)
12992 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5785 || 13010 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5785 ||
12993 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57780 || 13011 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57780 ||
12994 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717 || 13012 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717 ||
13013 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5719 ||
12995 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57765) 13014 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57765)
12996 tp->tg3_flags3 |= TG3_FLG3_5755_PLUS; 13015 tp->tg3_flags3 |= TG3_FLG3_5755_PLUS;
12997 13016
@@ -13021,6 +13040,7 @@ static int __devinit tg3_get_invariants(struct tg3 *tp)
13021 13040
13022 /* Determine TSO capabilities */ 13041 /* Determine TSO capabilities */
13023 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717 || 13042 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717 ||
13043 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5719 ||
13024 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57765) 13044 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57765)
13025 tp->tg3_flags2 |= TG3_FLG2_HW_TSO_3; 13045 tp->tg3_flags2 |= TG3_FLG2_HW_TSO_3;
13026 else if ((tp->tg3_flags3 & TG3_FLG3_5755_PLUS) || 13046 else if ((tp->tg3_flags3 & TG3_FLG3_5755_PLUS) ||
@@ -13058,6 +13078,7 @@ static int __devinit tg3_get_invariants(struct tg3 *tp)
13058 } 13078 }
13059 13079
13060 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717 || 13080 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717 ||
13081 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5719 ||
13061 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57765) { 13082 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57765) {
13062 tp->tg3_flags |= TG3_FLAG_SUPPORT_MSIX; 13083 tp->tg3_flags |= TG3_FLAG_SUPPORT_MSIX;
13063 tp->irq_max = TG3_IRQ_MAX_VECS; 13084 tp->irq_max = TG3_IRQ_MAX_VECS;
@@ -13065,6 +13086,7 @@ static int __devinit tg3_get_invariants(struct tg3 *tp)
13065 } 13086 }
13066 13087
13067 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717 || 13088 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717 ||
13089 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5719 ||
13068 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906) 13090 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906)
13069 tp->tg3_flags3 |= TG3_FLG3_SHORT_DMA_BUG; 13091 tp->tg3_flags3 |= TG3_FLG3_SHORT_DMA_BUG;
13070 else if (!(tp->tg3_flags3 & TG3_FLG3_5755_PLUS)) { 13092 else if (!(tp->tg3_flags3 & TG3_FLG3_5755_PLUS)) {
@@ -13073,6 +13095,7 @@ static int __devinit tg3_get_invariants(struct tg3 *tp)
13073 } 13095 }
13074 13096
13075 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717 || 13097 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717 ||
13098 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5719 ||
13076 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57765) 13099 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57765)
13077 tp->tg3_flags3 |= TG3_FLG3_USE_JUMBO_BDFLAG; 13100 tp->tg3_flags3 |= TG3_FLG3_USE_JUMBO_BDFLAG;
13078 13101
@@ -13275,6 +13298,7 @@ static int __devinit tg3_get_invariants(struct tg3 *tp)
13275 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5785 || 13298 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5785 ||
13276 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57780 || 13299 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57780 ||
13277 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717 || 13300 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717 ||
13301 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5719 ||
13278 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57765) 13302 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57765)
13279 tp->tg3_flags |= TG3_FLAG_CPMU_PRESENT; 13303 tp->tg3_flags |= TG3_FLAG_CPMU_PRESENT;
13280 13304
@@ -13355,6 +13379,7 @@ static int __devinit tg3_get_invariants(struct tg3 *tp)
13355 GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5785 && 13379 GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5785 &&
13356 GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_57780 && 13380 GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_57780 &&
13357 GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5717 && 13381 GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5717 &&
13382 GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5719 &&
13358 GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_57765) { 13383 GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_57765) {
13359 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755 || 13384 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755 ||
13360 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787 || 13385 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787 ||
@@ -13603,9 +13628,12 @@ static int __devinit tg3_get_device_address(struct tg3 *tp)
13603 tw32_f(NVRAM_CMD, NVRAM_CMD_RESET); 13628 tw32_f(NVRAM_CMD, NVRAM_CMD_RESET);
13604 else 13629 else
13605 tg3_nvram_unlock(tp); 13630 tg3_nvram_unlock(tp);
13606 } else if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717) { 13631 } else if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717 ||
13607 if (PCI_FUNC(tp->pdev->devfn)) 13632 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5719) {
13633 if (PCI_FUNC(tp->pdev->devfn) & 1)
13608 mac_offset = 0xcc; 13634 mac_offset = 0xcc;
13635 if (PCI_FUNC(tp->pdev->devfn) > 1)
13636 mac_offset += 0x18c;
13609 } else if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906) 13637 } else if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906)
13610 mac_offset = 0x10; 13638 mac_offset = 0x10;
13611 13639
@@ -13691,6 +13719,7 @@ static u32 __devinit tg3_calc_dma_bndry(struct tg3 *tp, u32 val)
13691#endif 13719#endif
13692 13720
13693 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717 || 13721 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717 ||
13722 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5719 ||
13694 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57765) { 13723 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57765) {
13695 val = goal ? 0 : DMA_RWCTRL_DIS_CACHE_ALIGNMENT; 13724 val = goal ? 0 : DMA_RWCTRL_DIS_CACHE_ALIGNMENT;
13696 goto out; 13725 goto out;
@@ -13903,6 +13932,7 @@ static int __devinit tg3_test_dma(struct tg3 *tp)
13903 tp->dma_rwctrl = tg3_calc_dma_bndry(tp, tp->dma_rwctrl); 13932 tp->dma_rwctrl = tg3_calc_dma_bndry(tp, tp->dma_rwctrl);
13904 13933
13905 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717 || 13934 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717 ||
13935 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5719 ||
13906 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57765) 13936 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57765)
13907 goto out; 13937 goto out;
13908 13938
@@ -14102,6 +14132,7 @@ static void __devinit tg3_init_link_config(struct tg3 *tp)
14102static void __devinit tg3_init_bufmgr_config(struct tg3 *tp) 14132static void __devinit tg3_init_bufmgr_config(struct tg3 *tp)
14103{ 14133{
14104 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717 || 14134 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717 ||
14135 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5719 ||
14105 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57765) { 14136 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57765) {
14106 tp->bufmgr_config.mbuf_read_dma_low_water = 14137 tp->bufmgr_config.mbuf_read_dma_low_water =
14107 DEFAULT_MB_RDMA_LOW_WATER_5705; 14138 DEFAULT_MB_RDMA_LOW_WATER_5705;
@@ -14427,7 +14458,8 @@ static int __devinit tg3_init_one(struct pci_dev *pdev,
14427 } 14458 }
14428 14459
14429 if ((tp->tg3_flags3 & TG3_FLG3_5755_PLUS) && 14460 if ((tp->tg3_flags3 & TG3_FLG3_5755_PLUS) &&
14430 tp->pci_chip_rev_id != CHIPREV_ID_5717_A0) 14461 tp->pci_chip_rev_id != CHIPREV_ID_5717_A0 &&
14462 GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5719)
14431 dev->netdev_ops = &tg3_netdev_ops; 14463 dev->netdev_ops = &tg3_netdev_ops;
14432 else 14464 else
14433 dev->netdev_ops = &tg3_netdev_ops_dma_bug; 14465 dev->netdev_ops = &tg3_netdev_ops_dma_bug;