diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-05-26 21:40:19 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-05-26 21:40:19 -0400 |
commit | f35c69b736e4f910d7447346980145212c283570 (patch) | |
tree | 824b90cd870e6de07bbba19d761c1c74cf1fb4a7 /drivers/net/ethernet/broadcom | |
parent | cd4373984a5903276f52777a6003425e023eaa7e (diff) | |
parent | e4aa937ec75df0eea0bee03bffa3303ad36c986b (diff) |
Merge 3.10-rc3 into char-misc-next
We want the changes in here.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/net/ethernet/broadcom')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 9 | ||||
-rw-r--r-- | drivers/net/ethernet/broadcom/tg3.c | 61 |
2 files changed, 56 insertions, 14 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c index b8fbe266ab68..be59ec4b2c30 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | |||
@@ -3313,6 +3313,7 @@ static void bnx2x_set_pbd_gso_e2(struct sk_buff *skb, u32 *parsing_data, | |||
3313 | */ | 3313 | */ |
3314 | static void bnx2x_set_pbd_gso(struct sk_buff *skb, | 3314 | static void bnx2x_set_pbd_gso(struct sk_buff *skb, |
3315 | struct eth_tx_parse_bd_e1x *pbd, | 3315 | struct eth_tx_parse_bd_e1x *pbd, |
3316 | struct eth_tx_start_bd *tx_start_bd, | ||
3316 | u32 xmit_type) | 3317 | u32 xmit_type) |
3317 | { | 3318 | { |
3318 | pbd->lso_mss = cpu_to_le16(skb_shinfo(skb)->gso_size); | 3319 | pbd->lso_mss = cpu_to_le16(skb_shinfo(skb)->gso_size); |
@@ -3326,11 +3327,14 @@ static void bnx2x_set_pbd_gso(struct sk_buff *skb, | |||
3326 | ip_hdr(skb)->daddr, | 3327 | ip_hdr(skb)->daddr, |
3327 | 0, IPPROTO_TCP, 0)); | 3328 | 0, IPPROTO_TCP, 0)); |
3328 | 3329 | ||
3329 | } else | 3330 | /* GSO on 57710/57711 needs FW to calculate IP checksum */ |
3331 | tx_start_bd->bd_flags.as_bitfield |= ETH_TX_BD_FLAGS_IP_CSUM; | ||
3332 | } else { | ||
3330 | pbd->tcp_pseudo_csum = | 3333 | pbd->tcp_pseudo_csum = |
3331 | bswab16(~csum_ipv6_magic(&ipv6_hdr(skb)->saddr, | 3334 | bswab16(~csum_ipv6_magic(&ipv6_hdr(skb)->saddr, |
3332 | &ipv6_hdr(skb)->daddr, | 3335 | &ipv6_hdr(skb)->daddr, |
3333 | 0, IPPROTO_TCP, 0)); | 3336 | 0, IPPROTO_TCP, 0)); |
3337 | } | ||
3334 | 3338 | ||
3335 | pbd->global_data |= | 3339 | pbd->global_data |= |
3336 | cpu_to_le16(ETH_TX_PARSE_BD_E1X_PSEUDO_CS_WITHOUT_LEN); | 3340 | cpu_to_le16(ETH_TX_PARSE_BD_E1X_PSEUDO_CS_WITHOUT_LEN); |
@@ -3814,7 +3818,8 @@ netdev_tx_t bnx2x_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
3814 | bnx2x_set_pbd_gso_e2(skb, &pbd_e2_parsing_data, | 3818 | bnx2x_set_pbd_gso_e2(skb, &pbd_e2_parsing_data, |
3815 | xmit_type); | 3819 | xmit_type); |
3816 | else | 3820 | else |
3817 | bnx2x_set_pbd_gso(skb, pbd_e1x, xmit_type); | 3821 | bnx2x_set_pbd_gso(skb, pbd_e1x, tx_start_bd, |
3822 | xmit_type); | ||
3818 | } | 3823 | } |
3819 | 3824 | ||
3820 | /* Set the PBD's parsing_data field if not zero | 3825 | /* Set the PBD's parsing_data field if not zero |
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c index 728d42ab2a76..1f2dd928888a 100644 --- a/drivers/net/ethernet/broadcom/tg3.c +++ b/drivers/net/ethernet/broadcom/tg3.c | |||
@@ -94,10 +94,10 @@ static inline void _tg3_flag_clear(enum TG3_FLAGS flag, unsigned long *bits) | |||
94 | 94 | ||
95 | #define DRV_MODULE_NAME "tg3" | 95 | #define DRV_MODULE_NAME "tg3" |
96 | #define TG3_MAJ_NUM 3 | 96 | #define TG3_MAJ_NUM 3 |
97 | #define TG3_MIN_NUM 131 | 97 | #define TG3_MIN_NUM 132 |
98 | #define DRV_MODULE_VERSION \ | 98 | #define DRV_MODULE_VERSION \ |
99 | __stringify(TG3_MAJ_NUM) "." __stringify(TG3_MIN_NUM) | 99 | __stringify(TG3_MAJ_NUM) "." __stringify(TG3_MIN_NUM) |
100 | #define DRV_MODULE_RELDATE "April 09, 2013" | 100 | #define DRV_MODULE_RELDATE "May 21, 2013" |
101 | 101 | ||
102 | #define RESET_KIND_SHUTDOWN 0 | 102 | #define RESET_KIND_SHUTDOWN 0 |
103 | #define RESET_KIND_INIT 1 | 103 | #define RESET_KIND_INIT 1 |
@@ -2957,6 +2957,31 @@ static int tg3_5700_link_polarity(struct tg3 *tp, u32 speed) | |||
2957 | return 0; | 2957 | return 0; |
2958 | } | 2958 | } |
2959 | 2959 | ||
2960 | static bool tg3_phy_power_bug(struct tg3 *tp) | ||
2961 | { | ||
2962 | switch (tg3_asic_rev(tp)) { | ||
2963 | case ASIC_REV_5700: | ||
2964 | case ASIC_REV_5704: | ||
2965 | return true; | ||
2966 | case ASIC_REV_5780: | ||
2967 | if (tp->phy_flags & TG3_PHYFLG_MII_SERDES) | ||
2968 | return true; | ||
2969 | return false; | ||
2970 | case ASIC_REV_5717: | ||
2971 | if (!tp->pci_fn) | ||
2972 | return true; | ||
2973 | return false; | ||
2974 | case ASIC_REV_5719: | ||
2975 | case ASIC_REV_5720: | ||
2976 | if ((tp->phy_flags & TG3_PHYFLG_PHY_SERDES) && | ||
2977 | !tp->pci_fn) | ||
2978 | return true; | ||
2979 | return false; | ||
2980 | } | ||
2981 | |||
2982 | return false; | ||
2983 | } | ||
2984 | |||
2960 | static void tg3_power_down_phy(struct tg3 *tp, bool do_low_power) | 2985 | static void tg3_power_down_phy(struct tg3 *tp, bool do_low_power) |
2961 | { | 2986 | { |
2962 | u32 val; | 2987 | u32 val; |
@@ -3016,12 +3041,7 @@ static void tg3_power_down_phy(struct tg3 *tp, bool do_low_power) | |||
3016 | /* The PHY should not be powered down on some chips because | 3041 | /* The PHY should not be powered down on some chips because |
3017 | * of bugs. | 3042 | * of bugs. |
3018 | */ | 3043 | */ |
3019 | if (tg3_asic_rev(tp) == ASIC_REV_5700 || | 3044 | if (tg3_phy_power_bug(tp)) |
3020 | tg3_asic_rev(tp) == ASIC_REV_5704 || | ||
3021 | (tg3_asic_rev(tp) == ASIC_REV_5780 && | ||
3022 | (tp->phy_flags & TG3_PHYFLG_MII_SERDES)) || | ||
3023 | (tg3_asic_rev(tp) == ASIC_REV_5717 && | ||
3024 | !tp->pci_fn)) | ||
3025 | return; | 3045 | return; |
3026 | 3046 | ||
3027 | if (tg3_chip_rev(tp) == CHIPREV_5784_AX || | 3047 | if (tg3_chip_rev(tp) == CHIPREV_5784_AX || |
@@ -7428,6 +7448,20 @@ static inline int tg3_4g_overflow_test(dma_addr_t mapping, int len) | |||
7428 | return (base > 0xffffdcc0) && (base + len + 8 < base); | 7448 | return (base > 0xffffdcc0) && (base + len + 8 < base); |
7429 | } | 7449 | } |
7430 | 7450 | ||
7451 | /* Test for TSO DMA buffers that cross into regions which are within MSS bytes | ||
7452 | * of any 4GB boundaries: 4G, 8G, etc | ||
7453 | */ | ||
7454 | static inline int tg3_4g_tso_overflow_test(struct tg3 *tp, dma_addr_t mapping, | ||
7455 | u32 len, u32 mss) | ||
7456 | { | ||
7457 | if (tg3_asic_rev(tp) == ASIC_REV_5762 && mss) { | ||
7458 | u32 base = (u32) mapping & 0xffffffff; | ||
7459 | |||
7460 | return ((base + len + (mss & 0x3fff)) < base); | ||
7461 | } | ||
7462 | return 0; | ||
7463 | } | ||
7464 | |||
7431 | /* Test for DMA addresses > 40-bit */ | 7465 | /* Test for DMA addresses > 40-bit */ |
7432 | static inline int tg3_40bit_overflow_test(struct tg3 *tp, dma_addr_t mapping, | 7466 | static inline int tg3_40bit_overflow_test(struct tg3 *tp, dma_addr_t mapping, |
7433 | int len) | 7467 | int len) |
@@ -7464,6 +7498,9 @@ static bool tg3_tx_frag_set(struct tg3_napi *tnapi, u32 *entry, u32 *budget, | |||
7464 | if (tg3_4g_overflow_test(map, len)) | 7498 | if (tg3_4g_overflow_test(map, len)) |
7465 | hwbug = true; | 7499 | hwbug = true; |
7466 | 7500 | ||
7501 | if (tg3_4g_tso_overflow_test(tp, map, len, mss)) | ||
7502 | hwbug = true; | ||
7503 | |||
7467 | if (tg3_40bit_overflow_test(tp, map, len)) | 7504 | if (tg3_40bit_overflow_test(tp, map, len)) |
7468 | hwbug = true; | 7505 | hwbug = true; |
7469 | 7506 | ||
@@ -8874,6 +8911,10 @@ static int tg3_chip_reset(struct tg3 *tp) | |||
8874 | tg3_halt_cpu(tp, RX_CPU_BASE); | 8911 | tg3_halt_cpu(tp, RX_CPU_BASE); |
8875 | } | 8912 | } |
8876 | 8913 | ||
8914 | err = tg3_poll_fw(tp); | ||
8915 | if (err) | ||
8916 | return err; | ||
8917 | |||
8877 | tw32(GRC_MODE, tp->grc_mode); | 8918 | tw32(GRC_MODE, tp->grc_mode); |
8878 | 8919 | ||
8879 | if (tg3_chip_rev_id(tp) == CHIPREV_ID_5705_A0) { | 8920 | if (tg3_chip_rev_id(tp) == CHIPREV_ID_5705_A0) { |
@@ -8904,10 +8945,6 @@ static int tg3_chip_reset(struct tg3 *tp) | |||
8904 | 8945 | ||
8905 | tg3_ape_unlock(tp, TG3_APE_LOCK_GRC); | 8946 | tg3_ape_unlock(tp, TG3_APE_LOCK_GRC); |
8906 | 8947 | ||
8907 | err = tg3_poll_fw(tp); | ||
8908 | if (err) | ||
8909 | return err; | ||
8910 | |||
8911 | tg3_mdio_start(tp); | 8948 | tg3_mdio_start(tp); |
8912 | 8949 | ||
8913 | if (tg3_flag(tp, PCI_EXPRESS) && | 8950 | if (tg3_flag(tp, PCI_EXPRESS) && |