aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMatt Carlson <mcarlson@broadcom.com>2007-10-10 21:03:07 -0400
committerDavid S. Miller <davem@davemloft.net>2007-10-10 21:03:07 -0400
commit9936bcf68a7e4d33f080bba9ee03d156c75c91ee (patch)
tree304371f919a53ee6be7c7bf0b672078ab123eb71 /drivers
parent0d3031d9e674cddd4c09731123ad252294cdf15f (diff)
[TG3]: Add 5761 support
This patch adds rest of the miscellaneous code required to support the 5761. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/tg3.c86
-rw-r--r--drivers/net/tg3.h14
2 files changed, 85 insertions, 15 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 5b6c1b286e92..65aeca8e5147 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -200,6 +200,8 @@ static struct pci_device_id tg3_pci_tbl[] = {
200 {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5906M)}, 200 {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5906M)},
201 {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5784)}, 201 {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5784)},
202 {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5764)}, 202 {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5764)},
203 {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5761)},
204 {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5761E)},
203 {PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, PCI_DEVICE_ID_SYSKONNECT_9DXX)}, 205 {PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, PCI_DEVICE_ID_SYSKONNECT_9DXX)},
204 {PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, PCI_DEVICE_ID_SYSKONNECT_9MXX)}, 206 {PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, PCI_DEVICE_ID_SYSKONNECT_9MXX)},
205 {PCI_DEVICE(PCI_VENDOR_ID_ALTIMA, PCI_DEVICE_ID_ALTIMA_AC1000)}, 207 {PCI_DEVICE(PCI_VENDOR_ID_ALTIMA, PCI_DEVICE_ID_ALTIMA_AC1000)},
@@ -5087,7 +5089,8 @@ static int tg3_chip_reset(struct tg3 *tp)
5087 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5752 || 5089 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5752 ||
5088 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755 || 5090 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755 ||
5089 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787 || 5091 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787 ||
5090 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784) 5092 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 ||
5093 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5761)
5091 tw32(GRC_FASTBOOT_PC, 0); 5094 tw32(GRC_FASTBOOT_PC, 0);
5092 5095
5093 /* 5096 /*
@@ -6363,7 +6366,8 @@ static int tg3_reset_hw(struct tg3 *tp, int reset_phy)
6363 if (err) 6366 if (err)
6364 return err; 6367 return err;
6365 6368
6366 if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5784) { 6369 if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5784 &&
6370 GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5761) {
6367 /* This value is determined during the probe time DMA 6371 /* This value is determined during the probe time DMA
6368 * engine test, tg3_test_dma. 6372 * engine test, tg3_test_dma.
6369 */ 6373 */
@@ -6769,7 +6773,8 @@ static int tg3_reset_hw(struct tg3 *tp, int reset_phy)
6769 /* Enable host coalescing bug fix */ 6773 /* Enable host coalescing bug fix */
6770 if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755) || 6774 if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755) ||
6771 (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787) || 6775 (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787) ||
6772 (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784)) 6776 (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784) ||
6777 (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5761))
6773 val |= (1 << 29); 6778 val |= (1 << 29);
6774 6779
6775 tw32_f(WDMAC_MODE, val); 6780 tw32_f(WDMAC_MODE, val);
@@ -6797,7 +6802,13 @@ static int tg3_reset_hw(struct tg3 *tp, int reset_phy)
6797 tw32(RCVDCC_MODE, RCVDCC_MODE_ENABLE | RCVDCC_MODE_ATTN_ENABLE); 6802 tw32(RCVDCC_MODE, RCVDCC_MODE_ENABLE | RCVDCC_MODE_ATTN_ENABLE);
6798 if (!(tp->tg3_flags2 & TG3_FLG2_5705_PLUS)) 6803 if (!(tp->tg3_flags2 & TG3_FLG2_5705_PLUS))
6799 tw32(MBFREE_MODE, MBFREE_MODE_ENABLE); 6804 tw32(MBFREE_MODE, MBFREE_MODE_ENABLE);
6800 tw32(SNDDATAC_MODE, SNDDATAC_MODE_ENABLE); 6805
6806 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5761)
6807 tw32(SNDDATAC_MODE,
6808 SNDDATAC_MODE_ENABLE | SNDDATAC_MODE_CDELAY);
6809 else
6810 tw32(SNDDATAC_MODE, SNDDATAC_MODE_ENABLE);
6811
6801 tw32(SNDBDC_MODE, SNDBDC_MODE_ENABLE | SNDBDC_MODE_ATTN_ENABLE); 6812 tw32(SNDBDC_MODE, SNDBDC_MODE_ENABLE | SNDBDC_MODE_ATTN_ENABLE);
6802 tw32(RCVBDI_MODE, RCVBDI_MODE_ENABLE | RCVBDI_MODE_RCB_ATTN_ENAB); 6813 tw32(RCVBDI_MODE, RCVBDI_MODE_ENABLE | RCVBDI_MODE_RCB_ATTN_ENAB);
6803 tw32(RCVDBDI_MODE, RCVDBDI_MODE_ENABLE | RCVDBDI_MODE_INV_RING_SZ); 6814 tw32(RCVDBDI_MODE, RCVDBDI_MODE_ENABLE | RCVDBDI_MODE_INV_RING_SZ);
@@ -6824,7 +6835,8 @@ static int tg3_reset_hw(struct tg3 *tp, int reset_phy)
6824 udelay(100); 6835 udelay(100);
6825 6836
6826 tp->rx_mode = RX_MODE_ENABLE; 6837 tp->rx_mode = RX_MODE_ENABLE;
6827 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755) 6838 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755 ||
6839 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5761)
6828 tp->rx_mode |= RX_MODE_IPV6_CSUM_ENABLE; 6840 tp->rx_mode |= RX_MODE_IPV6_CSUM_ENABLE;
6829 6841
6830 tw32_f(MAC_RX_MODE, tp->rx_mode); 6842 tw32_f(MAC_RX_MODE, tp->rx_mode);
@@ -8368,10 +8380,12 @@ static int tg3_set_tso(struct net_device *dev, u32 value)
8368 } 8380 }
8369 if ((tp->tg3_flags2 & TG3_FLG2_HW_TSO_2) && 8381 if ((tp->tg3_flags2 & TG3_FLG2_HW_TSO_2) &&
8370 (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5906)) { 8382 (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5906)) {
8371 if (value) 8383 if (value) {
8372 dev->features |= NETIF_F_TSO6; 8384 dev->features |= NETIF_F_TSO6;
8373 else 8385 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5761)
8374 dev->features &= ~NETIF_F_TSO6; 8386 dev->features |= NETIF_F_TSO_ECN;
8387 } else
8388 dev->features &= ~(NETIF_F_TSO6 | NETIF_F_TSO_ECN);
8375 } 8389 }
8376 return ethtool_op_set_tso(dev, value); 8390 return ethtool_op_set_tso(dev, value);
8377} 8391}
@@ -8550,7 +8564,8 @@ static int tg3_set_tx_csum(struct net_device *dev, u32 data)
8550 8564
8551 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755 || 8565 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755 ||
8552 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787 || 8566 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787 ||
8553 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784) 8567 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 ||
8568 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5761)
8554 ethtool_op_set_tx_ipv6_csum(dev, data); 8569 ethtool_op_set_tx_ipv6_csum(dev, data);
8555 else 8570 else
8556 ethtool_op_set_tx_csum(dev, data); 8571 ethtool_op_set_tx_csum(dev, data);
@@ -9047,7 +9062,8 @@ static int tg3_test_memory(struct tg3 *tp)
9047 if (tp->tg3_flags2 & TG3_FLG2_5705_PLUS) { 9062 if (tp->tg3_flags2 & TG3_FLG2_5705_PLUS) {
9048 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755 || 9063 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755 ||
9049 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787 || 9064 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787 ||
9050 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784) 9065 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 ||
9066 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5761)
9051 mem_tbl = mem_tbl_5755; 9067 mem_tbl = mem_tbl_5755;
9052 else if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906) 9068 else if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906)
9053 mem_tbl = mem_tbl_5906; 9069 mem_tbl = mem_tbl_5906;
@@ -9244,6 +9260,7 @@ out:
9244static int tg3_test_loopback(struct tg3 *tp) 9260static int tg3_test_loopback(struct tg3 *tp)
9245{ 9261{
9246 int err = 0; 9262 int err = 0;
9263 u32 cpmuctrl = 0;
9247 9264
9248 if (!netif_running(tp->dev)) 9265 if (!netif_running(tp->dev))
9249 return TG3_LOOPBACK_FAILED; 9266 return TG3_LOOPBACK_FAILED;
@@ -9252,8 +9269,40 @@ static int tg3_test_loopback(struct tg3 *tp)
9252 if (err) 9269 if (err)
9253 return TG3_LOOPBACK_FAILED; 9270 return TG3_LOOPBACK_FAILED;
9254 9271
9272 if (tp->tg3_flags & TG3_FLAG_CPMU_PRESENT) {
9273 int i;
9274 u32 status;
9275
9276 tw32(TG3_CPMU_MUTEX_REQ, CPMU_MUTEX_REQ_DRIVER);
9277
9278 /* Wait for up to 40 microseconds to acquire lock. */
9279 for (i = 0; i < 4; i++) {
9280 status = tr32(TG3_CPMU_MUTEX_GNT);
9281 if (status == CPMU_MUTEX_GNT_DRIVER)
9282 break;
9283 udelay(10);
9284 }
9285
9286 if (status != CPMU_MUTEX_GNT_DRIVER)
9287 return TG3_LOOPBACK_FAILED;
9288
9289 cpmuctrl = tr32(TG3_CPMU_CTRL);
9290
9291 /* Turn off power management based on link speed. */
9292 tw32(TG3_CPMU_CTRL,
9293 cpmuctrl & ~CPMU_CTRL_LINK_SPEED_MODE);
9294 }
9295
9255 if (tg3_run_loopback(tp, TG3_MAC_LOOPBACK)) 9296 if (tg3_run_loopback(tp, TG3_MAC_LOOPBACK))
9256 err |= TG3_MAC_LOOPBACK_FAILED; 9297 err |= TG3_MAC_LOOPBACK_FAILED;
9298
9299 if (tp->tg3_flags & TG3_FLAG_CPMU_PRESENT) {
9300 tw32(TG3_CPMU_CTRL, cpmuctrl);
9301
9302 /* Release the mutex */
9303 tw32(TG3_CPMU_MUTEX_GNT, CPMU_MUTEX_GNT_DRIVER);
9304 }
9305
9257 if (!(tp->tg3_flags2 & TG3_FLG2_PHY_SERDES)) { 9306 if (!(tp->tg3_flags2 & TG3_FLG2_PHY_SERDES)) {
9258 if (tg3_run_loopback(tp, TG3_PHY_LOOPBACK)) 9307 if (tg3_run_loopback(tp, TG3_PHY_LOOPBACK))
9259 err |= TG3_PHY_LOOPBACK_FAILED; 9308 err |= TG3_PHY_LOOPBACK_FAILED;
@@ -10192,6 +10241,7 @@ static int tg3_nvram_write_block_buffered(struct tg3 *tp, u32 offset, u32 len,
10192 (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5755) && 10241 (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5755) &&
10193 (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5787) && 10242 (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5787) &&
10194 (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5784) && 10243 (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5784) &&
10244 (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5761) &&
10195 (tp->nvram_jedecnum == JEDEC_ST) && 10245 (tp->nvram_jedecnum == JEDEC_ST) &&
10196 (nvram_cmd & NVRAM_CMD_FIRST)) { 10246 (nvram_cmd & NVRAM_CMD_FIRST)) {
10197 10247
@@ -10941,6 +10991,7 @@ static int __devinit tg3_get_invariants(struct tg3 *tp)
10941 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755 || 10991 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755 ||
10942 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787 || 10992 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787 ||
10943 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 || 10993 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 ||
10994 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5761 ||
10944 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906 || 10995 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906 ||
10945 (tp->tg3_flags2 & TG3_FLG2_5780_CLASS)) 10996 (tp->tg3_flags2 & TG3_FLG2_5780_CLASS))
10946 tp->tg3_flags2 |= TG3_FLG2_5750_PLUS; 10997 tp->tg3_flags2 |= TG3_FLG2_5750_PLUS;
@@ -10961,6 +11012,7 @@ static int __devinit tg3_get_invariants(struct tg3 *tp)
10961 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755 || 11012 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755 ||
10962 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787 || 11013 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787 ||
10963 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 || 11014 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 ||
11015 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5761 ||
10964 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906) { 11016 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906) {
10965 tp->tg3_flags2 |= TG3_FLG2_HW_TSO_2; 11017 tp->tg3_flags2 |= TG3_FLG2_HW_TSO_2;
10966 tp->tg3_flags2 |= TG3_FLG2_1SHOT_MSI; 11018 tp->tg3_flags2 |= TG3_FLG2_1SHOT_MSI;
@@ -10979,6 +11031,7 @@ static int __devinit tg3_get_invariants(struct tg3 *tp)
10979 GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5755 && 11031 GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5755 &&
10980 GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5787 && 11032 GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5787 &&
10981 GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5784 && 11033 GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5784 &&
11034 GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5761 &&
10982 GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5906) 11035 GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5906)
10983 tp->tg3_flags2 |= TG3_FLG2_JUMBO_CAPABLE; 11036 tp->tg3_flags2 |= TG3_FLG2_JUMBO_CAPABLE;
10984 11037
@@ -11164,7 +11217,8 @@ static int __devinit tg3_get_invariants(struct tg3 *tp)
11164 pci_state_reg); 11217 pci_state_reg);
11165 } 11218 }
11166 11219
11167 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784) 11220 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 ||
11221 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5761)
11168 tp->tg3_flags |= TG3_FLAG_CPMU_PRESENT; 11222 tp->tg3_flags |= TG3_FLAG_CPMU_PRESENT;
11169 11223
11170 /* Set up tp->grc_local_ctrl before calling tg3_set_power_state(). 11224 /* Set up tp->grc_local_ctrl before calling tg3_set_power_state().
@@ -11234,7 +11288,8 @@ static int __devinit tg3_get_invariants(struct tg3 *tp)
11234 if (tp->tg3_flags2 & TG3_FLG2_5705_PLUS) { 11288 if (tp->tg3_flags2 & TG3_FLG2_5705_PLUS) {
11235 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755 || 11289 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755 ||
11236 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787 || 11290 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787 ||
11237 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784) { 11291 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 ||
11292 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5761) {
11238 if (tp->pdev->device != PCI_DEVICE_ID_TIGON3_5756 && 11293 if (tp->pdev->device != PCI_DEVICE_ID_TIGON3_5756 &&
11239 tp->pdev->device != PCI_DEVICE_ID_TIGON3_5722) 11294 tp->pdev->device != PCI_DEVICE_ID_TIGON3_5722)
11240 tp->tg3_flags2 |= TG3_FLG2_PHY_JITTER_BUG; 11295 tp->tg3_flags2 |= TG3_FLG2_PHY_JITTER_BUG;
@@ -11378,6 +11433,7 @@ static int __devinit tg3_get_invariants(struct tg3 *tp)
11378 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755 || 11433 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755 ||
11379 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787 || 11434 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787 ||
11380 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 || 11435 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 ||
11436 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5761 ||
11381 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906) 11437 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906)
11382 tp->dev->hard_start_xmit = tg3_start_xmit; 11438 tp->dev->hard_start_xmit = tg3_start_xmit;
11383 else 11439 else
@@ -12002,6 +12058,7 @@ static char * __devinit tg3_phy_string(struct tg3 *tp)
12002 case PHY_ID_BCM5784: return "5784"; 12058 case PHY_ID_BCM5784: return "5784";
12003 case PHY_ID_BCM5756: return "5722/5756"; 12059 case PHY_ID_BCM5756: return "5722/5756";
12004 case PHY_ID_BCM5906: return "5906"; 12060 case PHY_ID_BCM5906: return "5906";
12061 case PHY_ID_BCM5761: return "5761";
12005 case PHY_ID_BCM8002: return "8002/serdes"; 12062 case PHY_ID_BCM8002: return "8002/serdes";
12006 case 0: return "serdes"; 12063 case 0: return "serdes";
12007 default: return "unknown"; 12064 default: return "unknown";
@@ -12304,6 +12361,8 @@ static int __devinit tg3_init_one(struct pci_dev *pdev,
12304 if ((tp->tg3_flags2 & TG3_FLG2_HW_TSO_2) && 12361 if ((tp->tg3_flags2 & TG3_FLG2_HW_TSO_2) &&
12305 (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5906)) 12362 (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5906))
12306 dev->features |= NETIF_F_TSO6; 12363 dev->features |= NETIF_F_TSO6;
12364 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5761)
12365 dev->features |= NETIF_F_TSO_ECN;
12307 } 12366 }
12308 12367
12309 12368
@@ -12345,7 +12404,8 @@ static int __devinit tg3_init_one(struct pci_dev *pdev,
12345 dev->features |= NETIF_F_IP_CSUM | NETIF_F_SG; 12404 dev->features |= NETIF_F_IP_CSUM | NETIF_F_SG;
12346 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755 || 12405 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755 ||
12347 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787 || 12406 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787 ||
12348 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784) 12407 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 ||
12408 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5761)
12349 dev->features |= NETIF_F_IPV6_CSUM; 12409 dev->features |= NETIF_F_IPV6_CSUM;
12350 12410
12351 tp->tg3_flags |= TG3_FLAG_RX_CHECKSUMS; 12411 tp->tg3_flags |= TG3_FLAG_RX_CHECKSUMS;
diff --git a/drivers/net/tg3.h b/drivers/net/tg3.h
index 632c2f084c52..d1f5fa394ea7 100644
--- a/drivers/net/tg3.h
+++ b/drivers/net/tg3.h
@@ -666,6 +666,7 @@
666#define SNDDATAC_MODE 0x00001000 666#define SNDDATAC_MODE 0x00001000
667#define SNDDATAC_MODE_RESET 0x00000001 667#define SNDDATAC_MODE_RESET 0x00000001
668#define SNDDATAC_MODE_ENABLE 0x00000002 668#define SNDDATAC_MODE_ENABLE 0x00000002
669#define SNDDATAC_MODE_CDELAY 0x00000010
669/* 0x1004 --> 0x1400 unused */ 670/* 0x1004 --> 0x1400 unused */
670 671
671/* Send BD ring selector */ 672/* Send BD ring selector */
@@ -854,7 +855,14 @@
854#define TG3_CPMU_CTRL 0x00003600 855#define TG3_CPMU_CTRL 0x00003600
855#define CPMU_CTRL_LINK_IDLE_MODE 0x00000200 856#define CPMU_CTRL_LINK_IDLE_MODE 0x00000200
856#define CPMU_CTRL_LINK_AWARE_MODE 0x00000400 857#define CPMU_CTRL_LINK_AWARE_MODE 0x00000400
857/* 0x3604 --> 0x3800 unused */ 858#define CPMU_CTRL_LINK_SPEED_MODE 0x00004000
859/* 0x3604 --> 0x365c unused */
860
861#define TG3_CPMU_MUTEX_REQ 0x0000365c
862#define CPMU_MUTEX_REQ_DRIVER 0x00001000
863#define TG3_CPMU_MUTEX_GNT 0x00003660
864#define CPMU_MUTEX_GNT_DRIVER 0x00001000
865/* 0x3664 --> 0x3800 unused */
858 866
859/* Mbuf cluster free registers */ 867/* Mbuf cluster free registers */
860#define MBFREE_MODE 0x00003800 868#define MBFREE_MODE 0x00003800
@@ -2394,6 +2402,7 @@ struct tg3 {
2394#define PHY_ID_BCM5787 0xbc050ce0 2402#define PHY_ID_BCM5787 0xbc050ce0
2395#define PHY_ID_BCM5756 0xbc050ed0 2403#define PHY_ID_BCM5756 0xbc050ed0
2396#define PHY_ID_BCM5784 0xbc050fa0 2404#define PHY_ID_BCM5784 0xbc050fa0
2405#define PHY_ID_BCM5761 0xbc050fd0
2397#define PHY_ID_BCM5906 0xdc00ac40 2406#define PHY_ID_BCM5906 0xdc00ac40
2398#define PHY_ID_BCM8002 0x60010140 2407#define PHY_ID_BCM8002 0x60010140
2399#define PHY_ID_INVALID 0xffffffff 2408#define PHY_ID_INVALID 0xffffffff
@@ -2423,7 +2432,8 @@ struct tg3 {
2423 (X) == PHY_ID_BCM5752 || (X) == PHY_ID_BCM5714 || \ 2432 (X) == PHY_ID_BCM5752 || (X) == PHY_ID_BCM5714 || \
2424 (X) == PHY_ID_BCM5780 || (X) == PHY_ID_BCM5787 || \ 2433 (X) == PHY_ID_BCM5780 || (X) == PHY_ID_BCM5787 || \
2425 (X) == PHY_ID_BCM5755 || (X) == PHY_ID_BCM5756 || \ 2434 (X) == PHY_ID_BCM5755 || (X) == PHY_ID_BCM5756 || \
2426 (X) == PHY_ID_BCM5906 || (X) == PHY_ID_BCM8002) 2435 (X) == PHY_ID_BCM5906 || (X) == PHY_ID_BCM5761 || \
2436 (X) == PHY_ID_BCM8002)
2427 2437
2428 struct tg3_hw_stats *hw_stats; 2438 struct tg3_hw_stats *hw_stats;
2429 dma_addr_t stats_mapping; 2439 dma_addr_t stats_mapping;