diff options
| -rw-r--r-- | drivers/net/tg3.c | 18 | ||||
| -rw-r--r-- | drivers/net/tg3.h | 2 |
2 files changed, 14 insertions, 6 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index b66c75e3b8a1..e0dc31fdf844 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
| @@ -2097,9 +2097,11 @@ static int tg3_setup_copper_phy(struct tg3 *tp, int force_reset) | |||
| 2097 | MAC_STATUS_LNKSTATE_CHANGED)); | 2097 | MAC_STATUS_LNKSTATE_CHANGED)); |
| 2098 | udelay(40); | 2098 | udelay(40); |
| 2099 | 2099 | ||
| 2100 | tp->mi_mode = MAC_MI_MODE_BASE; | 2100 | if ((tp->mi_mode & MAC_MI_MODE_AUTO_POLL) != 0) { |
| 2101 | tw32_f(MAC_MI_MODE, tp->mi_mode); | 2101 | tw32_f(MAC_MI_MODE, |
| 2102 | udelay(80); | 2102 | (tp->mi_mode & ~MAC_MI_MODE_AUTO_POLL)); |
| 2103 | udelay(80); | ||
| 2104 | } | ||
| 2103 | 2105 | ||
| 2104 | tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x02); | 2106 | tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x02); |
| 2105 | 2107 | ||
| @@ -7102,7 +7104,7 @@ static int tg3_reset_hw(struct tg3 *tp, int reset_phy) | |||
| 7102 | tp->link_config.autoneg = tp->link_config.orig_autoneg; | 7104 | tp->link_config.autoneg = tp->link_config.orig_autoneg; |
| 7103 | } | 7105 | } |
| 7104 | 7106 | ||
| 7105 | tp->mi_mode = MAC_MI_MODE_BASE; | 7107 | tp->mi_mode &= ~MAC_MI_MODE_AUTO_POLL; |
| 7106 | tw32_f(MAC_MI_MODE, tp->mi_mode); | 7108 | tw32_f(MAC_MI_MODE, tp->mi_mode); |
| 7107 | udelay(80); | 7109 | udelay(80); |
| 7108 | 7110 | ||
| @@ -11764,6 +11766,12 @@ static int __devinit tg3_get_invariants(struct tg3 *tp) | |||
| 11764 | tp->phy_otp = TG3_OTP_DEFAULT; | 11766 | tp->phy_otp = TG3_OTP_DEFAULT; |
| 11765 | } | 11767 | } |
| 11766 | 11768 | ||
| 11769 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784 || | ||
| 11770 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5761) | ||
| 11771 | tp->mi_mode = MAC_MI_MODE_500KHZ_CONST; | ||
| 11772 | else | ||
| 11773 | tp->mi_mode = MAC_MI_MODE_BASE; | ||
| 11774 | |||
| 11767 | tp->coalesce_mode = 0; | 11775 | tp->coalesce_mode = 0; |
| 11768 | if (GET_CHIP_REV(tp->pci_chip_rev_id) != CHIPREV_5700_AX && | 11776 | if (GET_CHIP_REV(tp->pci_chip_rev_id) != CHIPREV_5700_AX && |
| 11769 | GET_CHIP_REV(tp->pci_chip_rev_id) != CHIPREV_5700_BX) | 11777 | GET_CHIP_REV(tp->pci_chip_rev_id) != CHIPREV_5700_BX) |
| @@ -12692,7 +12700,7 @@ static int __devinit tg3_init_one(struct pci_dev *pdev, | |||
| 12692 | tp->mac_mode = TG3_DEF_MAC_MODE; | 12700 | tp->mac_mode = TG3_DEF_MAC_MODE; |
| 12693 | tp->rx_mode = TG3_DEF_RX_MODE; | 12701 | tp->rx_mode = TG3_DEF_RX_MODE; |
| 12694 | tp->tx_mode = TG3_DEF_TX_MODE; | 12702 | tp->tx_mode = TG3_DEF_TX_MODE; |
| 12695 | tp->mi_mode = MAC_MI_MODE_BASE; | 12703 | |
| 12696 | if (tg3_debug > 0) | 12704 | if (tg3_debug > 0) |
| 12697 | tp->msg_enable = tg3_debug; | 12705 | tp->msg_enable = tg3_debug; |
| 12698 | else | 12706 | else |
diff --git a/drivers/net/tg3.h b/drivers/net/tg3.h index c688c3ac5035..ce2be3a96175 100644 --- a/drivers/net/tg3.h +++ b/drivers/net/tg3.h | |||
| @@ -415,7 +415,7 @@ | |||
| 415 | #define MAC_MI_MODE_CLK_10MHZ 0x00000001 | 415 | #define MAC_MI_MODE_CLK_10MHZ 0x00000001 |
| 416 | #define MAC_MI_MODE_SHORT_PREAMBLE 0x00000002 | 416 | #define MAC_MI_MODE_SHORT_PREAMBLE 0x00000002 |
| 417 | #define MAC_MI_MODE_AUTO_POLL 0x00000010 | 417 | #define MAC_MI_MODE_AUTO_POLL 0x00000010 |
| 418 | #define MAC_MI_MODE_CORE_CLK_62MHZ 0x00008000 | 418 | #define MAC_MI_MODE_500KHZ_CONST 0x00008000 |
| 419 | #define MAC_MI_MODE_BASE 0x000c0000 /* XXX magic values XXX */ | 419 | #define MAC_MI_MODE_BASE 0x000c0000 /* XXX magic values XXX */ |
| 420 | #define MAC_AUTO_POLL_STATUS 0x00000458 | 420 | #define MAC_AUTO_POLL_STATUS 0x00000458 |
| 421 | #define MAC_AUTO_POLL_ERROR 0x00000001 | 421 | #define MAC_AUTO_POLL_ERROR 0x00000001 |
