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.c27
1 files changed, 19 insertions, 8 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 3a74d2168598..7f82b0238e08 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -4,7 +4,7 @@
4 * Copyright (C) 2001, 2002, 2003, 2004 David S. Miller (davem@redhat.com) 4 * Copyright (C) 2001, 2002, 2003, 2004 David S. Miller (davem@redhat.com)
5 * Copyright (C) 2001, 2002, 2003 Jeff Garzik (jgarzik@pobox.com) 5 * Copyright (C) 2001, 2002, 2003 Jeff Garzik (jgarzik@pobox.com)
6 * Copyright (C) 2004 Sun Microsystems Inc. 6 * Copyright (C) 2004 Sun Microsystems Inc.
7 * Copyright (C) 2005-2009 Broadcom Corporation. 7 * Copyright (C) 2005-2010 Broadcom Corporation.
8 * 8 *
9 * Firmware is: 9 * Firmware is:
10 * Derived from proprietary unpublished source code, 10 * Derived from proprietary unpublished source code,
@@ -68,8 +68,8 @@
68 68
69#define DRV_MODULE_NAME "tg3" 69#define DRV_MODULE_NAME "tg3"
70#define PFX DRV_MODULE_NAME ": " 70#define PFX DRV_MODULE_NAME ": "
71#define DRV_MODULE_VERSION "3.105" 71#define DRV_MODULE_VERSION "3.106"
72#define DRV_MODULE_RELDATE "December 2, 2009" 72#define DRV_MODULE_RELDATE "January 12, 2010"
73 73
74#define TG3_DEF_MAC_MODE 0 74#define TG3_DEF_MAC_MODE 0
75#define TG3_DEF_RX_MODE 0 75#define TG3_DEF_RX_MODE 0
@@ -1037,7 +1037,11 @@ static void tg3_mdio_start(struct tg3 *tp)
1037 else 1037 else
1038 tp->phy_addr = 1; 1038 tp->phy_addr = 1;
1039 1039
1040 is_serdes = tr32(SG_DIG_STATUS) & SG_DIG_IS_SERDES; 1040 if (tp->pci_chip_rev_id != CHIPREV_ID_5717_A0)
1041 is_serdes = tr32(SG_DIG_STATUS) & SG_DIG_IS_SERDES;
1042 else
1043 is_serdes = tr32(TG3_CPMU_PHY_STRAP) &
1044 TG3_CPMU_PHY_STRAP_IS_SERDES;
1041 if (is_serdes) 1045 if (is_serdes)
1042 tp->phy_addr += 7; 1046 tp->phy_addr += 7;
1043 } else 1047 } else
@@ -4693,8 +4697,9 @@ next_pkt:
4693 (*post_ptr)++; 4697 (*post_ptr)++;
4694 4698
4695 if (unlikely(rx_std_posted >= tp->rx_std_max_post)) { 4699 if (unlikely(rx_std_posted >= tp->rx_std_max_post)) {
4696 u32 idx = *post_ptr % TG3_RX_RING_SIZE; 4700 tpr->rx_std_prod_idx = std_prod_idx % TG3_RX_RING_SIZE;
4697 tw32_rx_mbox(TG3_RX_STD_PROD_IDX_REG, idx); 4701 tw32_rx_mbox(TG3_RX_STD_PROD_IDX_REG,
4702 tpr->rx_std_prod_idx);
4698 work_mask &= ~RXD_OPAQUE_RING_STD; 4703 work_mask &= ~RXD_OPAQUE_RING_STD;
4699 rx_std_posted = 0; 4704 rx_std_posted = 0;
4700 } 4705 }
@@ -7742,7 +7747,7 @@ static int tg3_reset_hw(struct tg3 *tp, int reset_phy)
7742 ((u64) tpr->rx_std_mapping >> 32)); 7747 ((u64) tpr->rx_std_mapping >> 32));
7743 tw32(RCVDBDI_STD_BD + TG3_BDINFO_HOST_ADDR + TG3_64BIT_REG_LOW, 7748 tw32(RCVDBDI_STD_BD + TG3_BDINFO_HOST_ADDR + TG3_64BIT_REG_LOW,
7744 ((u64) tpr->rx_std_mapping & 0xffffffff)); 7749 ((u64) tpr->rx_std_mapping & 0xffffffff));
7745 if (!(tp->tg3_flags3 & TG3_FLG3_5755_PLUS)) 7750 if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5717)
7746 tw32(RCVDBDI_STD_BD + TG3_BDINFO_NIC_ADDR, 7751 tw32(RCVDBDI_STD_BD + TG3_BDINFO_NIC_ADDR,
7747 NIC_SRAM_RX_BUFFER_DESC); 7752 NIC_SRAM_RX_BUFFER_DESC);
7748 7753
@@ -12122,7 +12127,8 @@ static void __devinit tg3_get_eeprom_hw_cfg(struct tg3 *tp)
12122 12127
12123 tp->phy_id = eeprom_phy_id; 12128 tp->phy_id = eeprom_phy_id;
12124 if (eeprom_phy_serdes) { 12129 if (eeprom_phy_serdes) {
12125 if (tp->tg3_flags2 & TG3_FLG2_5780_CLASS) 12130 if ((tp->tg3_flags2 & TG3_FLG2_5780_CLASS) ||
12131 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717)
12126 tp->tg3_flags2 |= TG3_FLG2_MII_SERDES; 12132 tp->tg3_flags2 |= TG3_FLG2_MII_SERDES;
12127 else 12133 else
12128 tp->tg3_flags2 |= TG3_FLG2_PHY_SERDES; 12134 tp->tg3_flags2 |= TG3_FLG2_PHY_SERDES;
@@ -13384,6 +13390,11 @@ static int __devinit tg3_get_invariants(struct tg3 *tp)
13384 if (err) 13390 if (err)
13385 return err; 13391 return err;
13386 13392
13393 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717 &&
13394 (tp->pci_chip_rev_id != CHIPREV_ID_5717_A0 ||
13395 (tp->tg3_flags2 & TG3_FLG2_MII_SERDES)))
13396 return -ENOTSUPP;
13397
13387 /* Initialize data/descriptor byte/word swapping. */ 13398 /* Initialize data/descriptor byte/word swapping. */
13388 val = tr32(GRC_MODE); 13399 val = tr32(GRC_MODE);
13389 val &= GRC_MODE_HOST_STACKUP; 13400 val &= GRC_MODE_HOST_STACKUP;