diff options
Diffstat (limited to 'drivers/net/tg3.c')
-rw-r--r-- | drivers/net/tg3.c | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index dc6b60b65c0b..53a1209d4f9c 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -2125,7 +2125,8 @@ static void tg3_frob_aux_power(struct tg3 *tp) | |||
2125 | 2125 | ||
2126 | if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704 || | 2126 | if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704 || |
2127 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5714 || | 2127 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5714 || |
2128 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717) && | 2128 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717 || |
2129 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5720) && | ||
2129 | tp->pdev_peer != tp->pdev) { | 2130 | tp->pdev_peer != tp->pdev) { |
2130 | struct net_device *dev_peer; | 2131 | struct net_device *dev_peer; |
2131 | 2132 | ||
@@ -7251,6 +7252,11 @@ static int tg3_chip_reset(struct tg3 *tp) | |||
7251 | tw32(0x7c00, val | (1 << 25)); | 7252 | tw32(0x7c00, val | (1 << 25)); |
7252 | } | 7253 | } |
7253 | 7254 | ||
7255 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5720) { | ||
7256 | val = tr32(TG3_CPMU_CLCK_ORIDE); | ||
7257 | tw32(TG3_CPMU_CLCK_ORIDE, val & ~CPMU_CLCK_ORIDE_MAC_ORIDE_EN); | ||
7258 | } | ||
7259 | |||
7254 | /* Reprobe ASF enable state. */ | 7260 | /* Reprobe ASF enable state. */ |
7255 | tp->tg3_flags &= ~TG3_FLAG_ENABLE_ASF; | 7261 | tp->tg3_flags &= ~TG3_FLAG_ENABLE_ASF; |
7256 | tp->tg3_flags2 &= ~TG3_FLG2_ASF_NEW_HANDSHAKE; | 7262 | tp->tg3_flags2 &= ~TG3_FLG2_ASF_NEW_HANDSHAKE; |
@@ -8214,7 +8220,8 @@ static int tg3_reset_hw(struct tg3 *tp, int reset_phy) | |||
8214 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57780 || | 8220 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57780 || |
8215 | (tp->tg3_flags3 & TG3_FLG3_57765_PLUS)) { | 8221 | (tp->tg3_flags3 & TG3_FLG3_57765_PLUS)) { |
8216 | val = tr32(TG3_RDMA_RSRVCTRL_REG); | 8222 | val = tr32(TG3_RDMA_RSRVCTRL_REG); |
8217 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5719) { | 8223 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5719 || |
8224 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5720) { | ||
8218 | val &= ~(TG3_RDMA_RSRVCTRL_TXMRGN_MASK | | 8225 | val &= ~(TG3_RDMA_RSRVCTRL_TXMRGN_MASK | |
8219 | TG3_RDMA_RSRVCTRL_FIFO_LWM_MASK | | 8226 | TG3_RDMA_RSRVCTRL_FIFO_LWM_MASK | |
8220 | TG3_RDMA_RSRVCTRL_FIFO_HWM_MASK); | 8227 | TG3_RDMA_RSRVCTRL_FIFO_HWM_MASK); |
@@ -8226,7 +8233,8 @@ static int tg3_reset_hw(struct tg3 *tp, int reset_phy) | |||
8226 | val | TG3_RDMA_RSRVCTRL_FIFO_OFLW_FIX); | 8233 | val | TG3_RDMA_RSRVCTRL_FIFO_OFLW_FIX); |
8227 | } | 8234 | } |
8228 | 8235 | ||
8229 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5719) { | 8236 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5719 || |
8237 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5720) { | ||
8230 | val = tr32(TG3_LSO_RD_DMA_CRPTEN_CTRL); | 8238 | val = tr32(TG3_LSO_RD_DMA_CRPTEN_CTRL); |
8231 | tw32(TG3_LSO_RD_DMA_CRPTEN_CTRL, val | | 8239 | tw32(TG3_LSO_RD_DMA_CRPTEN_CTRL, val | |
8232 | TG3_LSO_RD_DMA_CRPTEN_CTRL_BLEN_BD_4K | | 8240 | TG3_LSO_RD_DMA_CRPTEN_CTRL_BLEN_BD_4K | |
@@ -9050,7 +9058,9 @@ static bool tg3_enable_msix(struct tg3 *tp) | |||
9050 | 9058 | ||
9051 | if (tp->irq_cnt > 1) { | 9059 | if (tp->irq_cnt > 1) { |
9052 | tp->tg3_flags3 |= TG3_FLG3_ENABLE_RSS; | 9060 | tp->tg3_flags3 |= TG3_FLG3_ENABLE_RSS; |
9053 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5719) { | 9061 | |
9062 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5719 || | ||
9063 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5720) { | ||
9054 | tp->tg3_flags3 |= TG3_FLG3_ENABLE_TSS; | 9064 | tp->tg3_flags3 |= TG3_FLG3_ENABLE_TSS; |
9055 | netif_set_real_num_tx_queues(tp->dev, tp->irq_cnt - 1); | 9065 | netif_set_real_num_tx_queues(tp->dev, tp->irq_cnt - 1); |
9056 | } | 9066 | } |
@@ -13166,7 +13176,8 @@ static int __devinit tg3_get_invariants(struct tg3 *tp) | |||
13166 | 13176 | ||
13167 | if (tp->pdev->device == TG3PCI_DEVICE_TIGON3_5717 || | 13177 | if (tp->pdev->device == TG3PCI_DEVICE_TIGON3_5717 || |
13168 | tp->pdev->device == TG3PCI_DEVICE_TIGON3_5718 || | 13178 | tp->pdev->device == TG3PCI_DEVICE_TIGON3_5718 || |
13169 | tp->pdev->device == TG3PCI_DEVICE_TIGON3_5719) | 13179 | tp->pdev->device == TG3PCI_DEVICE_TIGON3_5719 || |
13180 | tp->pdev->device == TG3PCI_DEVICE_TIGON3_5720) | ||
13170 | pci_read_config_dword(tp->pdev, | 13181 | pci_read_config_dword(tp->pdev, |
13171 | TG3PCI_GEN2_PRODID_ASICREV, | 13182 | TG3PCI_GEN2_PRODID_ASICREV, |
13172 | &prod_id_asic_rev); | 13183 | &prod_id_asic_rev); |
@@ -13321,11 +13332,13 @@ static int __devinit tg3_get_invariants(struct tg3 *tp) | |||
13321 | 13332 | ||
13322 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704 || | 13333 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704 || |
13323 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5714 || | 13334 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5714 || |
13324 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717) | 13335 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717 || |
13336 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5720) | ||
13325 | tp->pdev_peer = tg3_find_peer(tp); | 13337 | tp->pdev_peer = tg3_find_peer(tp); |
13326 | 13338 | ||
13327 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717 || | 13339 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717 || |
13328 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5719) | 13340 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5719 || |
13341 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5720) | ||
13329 | tp->tg3_flags3 |= TG3_FLG3_5717_PLUS; | 13342 | tp->tg3_flags3 |= TG3_FLG3_5717_PLUS; |
13330 | 13343 | ||
13331 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57765 || | 13344 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57765 || |
@@ -13444,7 +13457,8 @@ static int __devinit tg3_get_invariants(struct tg3 *tp) | |||
13444 | tp->tg3_flags2 |= TG3_FLG2_PCI_EXPRESS; | 13457 | tp->tg3_flags2 |= TG3_FLG2_PCI_EXPRESS; |
13445 | 13458 | ||
13446 | tp->pcie_readrq = 4096; | 13459 | tp->pcie_readrq = 4096; |
13447 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5719) | 13460 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5719 || |
13461 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5720) | ||
13448 | tp->pcie_readrq = 2048; | 13462 | tp->pcie_readrq = 2048; |
13449 | 13463 | ||
13450 | pcie_set_readrq(tp->pdev, tp->pcie_readrq); | 13464 | pcie_set_readrq(tp->pdev, tp->pcie_readrq); |