Gentoo Archives: gentoo-commits

From: "Mike Pagano (mpagano)" <mpagano@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] linux-patches r1665 - genpatches-2.6/trunk/2.6.32
Date: Wed, 10 Feb 2010 20:01:49
Message-Id: E1NfIks-0005hE-BN@stork.gentoo.org
1 Author: mpagano
2 Date: 2010-02-10 20:01:46 +0000 (Wed, 10 Feb 2010)
3 New Revision: 1665
4
5 Removed:
6 genpatches-2.6/trunk/2.6.32/2400_5906-transmit-hang-fix.patch
7 Log:
8 Removing 5906 transmit fix due to bug #304265
9
10 Deleted: genpatches-2.6/trunk/2.6.32/2400_5906-transmit-hang-fix.patch
11 ===================================================================
12 --- genpatches-2.6/trunk/2.6.32/2400_5906-transmit-hang-fix.patch 2010-02-09 15:42:16 UTC (rev 1664)
13 +++ genpatches-2.6/trunk/2.6.32/2400_5906-transmit-hang-fix.patch 2010-02-10 20:01:46 UTC (rev 1665)
14 @@ -1,100 +0,0 @@
15 -This is a backport of commit 92c6b8d16a36df3f28b2537bed2a56491fb08f11 to kernel version 2.6.32. The gentoo bug report can be found at https://bugs.gentoo.org/show_bug.cgi?id=301091. Thanks to Matt Carlson for his assistance. The original description is as follows:
16 -
17 -The 5906 has trouble with fragments that are less than 8 bytes in size.
18 -This patch works around the problem by pivoting the 5906's transmit routine to tg3_start_xmit_dma_bug() and introducing a new SHORT_DMA_BUG flag that enables code to detect and react to the problematic condition.
19 -
20 -Signed-off-by: Mike Pagano <mpagano@g.o>
21 ----
22 ---- a/drivers/net/tg3.c 2010-02-02 11:09:54.000000000 -0500
23 -+++ b/drivers/net/tg3.c 2010-02-02 11:51:24.000000000 -0500
24 -@@ -5392,7 +5392,7 @@ static netdev_tx_t tg3_start_xmit_dma_bu
25 - mss = 0;
26 - if ((mss = skb_shinfo(skb)->gso_size) != 0) {
27 - struct iphdr *iph;
28 -- int tcp_opt_len, ip_tcp_len, hdr_len;
29 -+ u32 tcp_opt_len, ip_tcp_len, hdr_len;
30 -
31 - if (skb_header_cloned(skb) &&
32 - pskb_expand_head(skb, 0, 0, GFP_ATOMIC)) {
33 -@@ -5423,8 +5423,10 @@ static netdev_tx_t tg3_start_xmit_dma_bu
34 - IPPROTO_TCP,
35 - 0);
36 -
37 -- if ((tp->tg3_flags2 & TG3_FLG2_HW_TSO) ||
38 -- (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705)) {
39 -+ if (tp->tg3_flags2 & TG3_FLG2_HW_TSO_2)
40 -+ mss |= hdr_len << 9;
41 -+ else if ((tp->tg3_flags2 & TG3_FLG2_HW_TSO_1) ||
42 -+ GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) {
43 - if (tcp_opt_len || iph->ihl > 5) {
44 - int tsflags;
45 -
46 -@@ -5459,6 +5461,9 @@ static netdev_tx_t tg3_start_xmit_dma_bu
47 -
48 - would_hit_hwbug = 0;
49 -
50 -+ if ((tp->tg3_flags3 & TG3_FLG3_SHORT_DMA_BUG) && len <= 8)
51 -+ would_hit_hwbug = 1;
52 -+
53 - if (tp->tg3_flags3 & TG3_FLG3_5701_DMA_BUG)
54 - would_hit_hwbug = 1;
55 - else if (tg3_4g_overflow_test(mapping, len))
56 -@@ -5482,6 +5487,10 @@ static netdev_tx_t tg3_start_xmit_dma_bu
57 -
58 - tnapi->tx_buffers[entry].skb = NULL;
59 -
60 -+ if ((tp->tg3_flags3 & TG3_FLG3_SHORT_DMA_BUG) &&
61 -+ len <= 8)
62 -+ would_hit_hwbug = 1;
63 -+
64 - if (tg3_4g_overflow_test(mapping, len))
65 - would_hit_hwbug = 1;
66 -
67 -@@ -12594,18 +12603,13 @@ static int __devinit tg3_get_invariants(
68 - tp->pci_chip_rev_id <= CHIPREV_ID_5714_A2 &&
69 - tp->pdev_peer == tp->pdev))
70 - tp->tg3_flags &= ~TG3_FLAG_SUPPORT_MSI;
71 -+ }
72 -
73 -- if ((tp->tg3_flags3 & TG3_FLG3_5755_PLUS) ||
74 -- GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906) {
75 -- tp->tg3_flags2 |= TG3_FLG2_HW_TSO_2;
76 -- tp->tg3_flags2 |= TG3_FLG2_1SHOT_MSI;
77 -- } else {
78 -- tp->tg3_flags2 |= TG3_FLG2_HW_TSO_1 | TG3_FLG2_TSO_BUG;
79 -- if (GET_ASIC_REV(tp->pci_chip_rev_id) ==
80 -- ASIC_REV_5750 &&
81 -- tp->pci_chip_rev_id >= CHIPREV_ID_5750_C2)
82 -- tp->tg3_flags2 &= ~TG3_FLG2_TSO_BUG;
83 -- }
84 -+ if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906)
85 -+ tp->tg3_flags3 |= TG3_FLG3_SHORT_DMA_BUG;
86 -+ else if (!(tp->tg3_flags3 & TG3_FLG3_5755_PLUS)) {
87 -+ tp->tg3_flags3 |= TG3_FLG3_4G_DMA_BNDRY_BUG;
88 -+ tp->tg3_flags3 |= TG3_FLG3_40BIT_DMA_LIMIT_BUG;
89 - }
90 -
91 - tp->irq_max = 1;
92 -@@ -13975,8 +13979,7 @@ static int __devinit tg3_init_one(struct
93 - goto err_out_iounmap;
94 - }
95 -
96 -- if ((tp->tg3_flags3 & TG3_FLG3_5755_PLUS) ||
97 -- GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906)
98 -+ if (tp->tg3_flags3 & TG3_FLG3_5755_PLUS)
99 - dev->netdev_ops = &tg3_netdev_ops;
100 - else
101 - dev->netdev_ops = &tg3_netdev_ops_dma_bug;
102 ---- a/drivers/net/tg3.h 2010-01-30 15:59:47.000000000 -0500
103 -+++ b/drivers/net/tg3.h 2010-01-31 14:02:59.000000000 -0500
104 -@@ -2759,6 +2759,9 @@ struct tg3 {
105 - #define TG3_FLG3_TOGGLE_10_100_L1PLLPD 0x00008000
106 - #define TG3_FLG3_PHY_IS_FET 0x00010000
107 - #define TG3_FLG3_ENABLE_RSS 0x00020000
108 -+#define TG3_FLG3_4G_DMA_BNDRY_BUG 0x00080000
109 -+#define TG3_FLG3_40BIT_DMA_LIMIT_BUG 0x00100000
110 -+#define TG3_FLG3_SHORT_DMA_BUG 0x00200000
111 -
112 - struct timer_list timer;
113 - u16 timer_counter;
114 -