diff options
author | David S. Miller <davem@davemloft.net> | 2008-06-10 05:22:26 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-06-10 05:22:26 -0400 |
commit | 65b53e4cc90e59936733b3b95b9451d2ca47528d (patch) | |
tree | 29932718192962671c48c3fd1ea017a6112459e8 /drivers/net/tg3.c | |
parent | 788c0a53164c05c5ccdb1472474372b72ba74644 (diff) | |
parent | 2e761e0532a784816e7e822dbaaece8c5d4be14d (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/tg3.c
drivers/net/wireless/rt2x00/rt2x00dev.c
net/mac80211/ieee80211_i.h
Diffstat (limited to 'drivers/net/tg3.c')
-rw-r--r-- | drivers/net/tg3.c | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index d9f248f23b97..633c128a6228 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -1828,6 +1828,21 @@ static void tg3_frob_aux_power(struct tg3 *tp) | |||
1828 | GRC_LCLCTRL_GPIO_OUTPUT0 | | 1828 | GRC_LCLCTRL_GPIO_OUTPUT0 | |
1829 | GRC_LCLCTRL_GPIO_OUTPUT1), | 1829 | GRC_LCLCTRL_GPIO_OUTPUT1), |
1830 | 100); | 1830 | 100); |
1831 | } else if (tp->pdev->device == PCI_DEVICE_ID_TIGON3_5761) { | ||
1832 | /* The 5761 non-e device swaps GPIO 0 and GPIO 2. */ | ||
1833 | u32 grc_local_ctrl = GRC_LCLCTRL_GPIO_OE0 | | ||
1834 | GRC_LCLCTRL_GPIO_OE1 | | ||
1835 | GRC_LCLCTRL_GPIO_OE2 | | ||
1836 | GRC_LCLCTRL_GPIO_OUTPUT0 | | ||
1837 | GRC_LCLCTRL_GPIO_OUTPUT1 | | ||
1838 | tp->grc_local_ctrl; | ||
1839 | tw32_wait_f(GRC_LOCAL_CTRL, grc_local_ctrl, 100); | ||
1840 | |||
1841 | grc_local_ctrl |= GRC_LCLCTRL_GPIO_OUTPUT2; | ||
1842 | tw32_wait_f(GRC_LOCAL_CTRL, grc_local_ctrl, 100); | ||
1843 | |||
1844 | grc_local_ctrl &= ~GRC_LCLCTRL_GPIO_OUTPUT0; | ||
1845 | tw32_wait_f(GRC_LOCAL_CTRL, grc_local_ctrl, 100); | ||
1831 | } else { | 1846 | } else { |
1832 | u32 no_gpio2; | 1847 | u32 no_gpio2; |
1833 | u32 grc_local_ctrl = 0; | 1848 | u32 grc_local_ctrl = 0; |
@@ -3534,8 +3549,7 @@ static int tg3_setup_fiber_mii_phy(struct tg3 *tp, int force_reset) | |||
3534 | err |= tg3_readphy(tp, MII_BMCR, &bmcr); | 3549 | err |= tg3_readphy(tp, MII_BMCR, &bmcr); |
3535 | 3550 | ||
3536 | if ((tp->link_config.autoneg == AUTONEG_ENABLE) && !force_reset && | 3551 | if ((tp->link_config.autoneg == AUTONEG_ENABLE) && !force_reset && |
3537 | (tp->tg3_flags2 & TG3_FLG2_PARALLEL_DETECT) && | 3552 | (tp->tg3_flags2 & TG3_FLG2_PARALLEL_DETECT)) { |
3538 | tp->link_config.flowctrl == tp->link_config.active_flowctrl) { | ||
3539 | /* do nothing, just check for link up at the end */ | 3553 | /* do nothing, just check for link up at the end */ |
3540 | } else if (tp->link_config.autoneg == AUTONEG_ENABLE) { | 3554 | } else if (tp->link_config.autoneg == AUTONEG_ENABLE) { |
3541 | u32 adv, new_adv; | 3555 | u32 adv, new_adv; |
@@ -9008,7 +9022,7 @@ static int tg3_set_settings(struct net_device *dev, struct ethtool_cmd *cmd) | |||
9008 | (cmd->speed == SPEED_1000)) | 9022 | (cmd->speed == SPEED_1000)) |
9009 | return -EINVAL; | 9023 | return -EINVAL; |
9010 | else if ((cmd->speed == SPEED_1000) && | 9024 | else if ((cmd->speed == SPEED_1000) && |
9011 | (tp->tg3_flags2 & TG3_FLAG_10_100_ONLY)) | 9025 | (tp->tg3_flags & TG3_FLAG_10_100_ONLY)) |
9012 | return -EINVAL; | 9026 | return -EINVAL; |
9013 | 9027 | ||
9014 | tg3_full_lock(tp, 0); | 9028 | tg3_full_lock(tp, 0); |
@@ -12275,6 +12289,15 @@ static int __devinit tg3_get_invariants(struct tg3 *tp) | |||
12275 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755) | 12289 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755) |
12276 | tp->grc_local_ctrl |= GRC_LCLCTRL_GPIO_UART_SEL; | 12290 | tp->grc_local_ctrl |= GRC_LCLCTRL_GPIO_UART_SEL; |
12277 | 12291 | ||
12292 | if (tp->pdev->device == PCI_DEVICE_ID_TIGON3_5761) { | ||
12293 | /* Turn off the debug UART. */ | ||
12294 | tp->grc_local_ctrl |= GRC_LCLCTRL_GPIO_UART_SEL; | ||
12295 | if (tp->tg3_flags2 & TG3_FLG2_IS_NIC) | ||
12296 | /* Keep VMain power. */ | ||
12297 | tp->grc_local_ctrl |= GRC_LCLCTRL_GPIO_OE0 | | ||
12298 | GRC_LCLCTRL_GPIO_OUTPUT0; | ||
12299 | } | ||
12300 | |||
12278 | /* Force the chip into D0. */ | 12301 | /* Force the chip into D0. */ |
12279 | err = tg3_set_power_state(tp, PCI_D0); | 12302 | err = tg3_set_power_state(tp, PCI_D0); |
12280 | if (err) { | 12303 | if (err) { |