提交 eb69d564 编写于 作者: M Matt Carlson 提交者: David S. Miller

tg3: Remove 4G_DMA_BNDRY_BUG flag

Now that all chips have this bug, the flag checks become useless code.
This patch removes the flag.
Signed-off-by: NMatt Carlson <mcarlson@broadcom.com>
Reviewed-by: NMichael Chan <mchan@broadcom.com>
Reviewed-by: NBenjamin Li <benli@broadcom.com>
Signed-off-by: NDavid S. Miller <davem@conan.davemloft.net>
上级 daf9a553
...@@ -5822,8 +5822,7 @@ static int tigon3_dma_hwbug_workaround(struct tg3_napi *tnapi, ...@@ -5822,8 +5822,7 @@ static int tigon3_dma_hwbug_workaround(struct tg3_napi *tnapi,
/* Make sure new skb does not cross any 4G boundaries. /* Make sure new skb does not cross any 4G boundaries.
* Drop the packet if it does. * Drop the packet if it does.
*/ */
} else if (tg3_flag(tp, 4G_DMA_BNDRY_BUG) && } else if (tg3_4g_overflow_test(new_addr, new_skb->len)) {
tg3_4g_overflow_test(new_addr, new_skb->len)) {
pci_unmap_single(tp->pdev, new_addr, new_skb->len, pci_unmap_single(tp->pdev, new_addr, new_skb->len,
PCI_DMA_TODEVICE); PCI_DMA_TODEVICE);
ret = -1; ret = -1;
...@@ -6018,8 +6017,7 @@ static netdev_tx_t tg3_start_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -6018,8 +6017,7 @@ static netdev_tx_t tg3_start_xmit(struct sk_buff *skb, struct net_device *dev)
if (tg3_flag(tp, SHORT_DMA_BUG) && len <= 8) if (tg3_flag(tp, SHORT_DMA_BUG) && len <= 8)
would_hit_hwbug = 1; would_hit_hwbug = 1;
if (tg3_flag(tp, 4G_DMA_BNDRY_BUG) && if (tg3_4g_overflow_test(mapping, len))
tg3_4g_overflow_test(mapping, len))
would_hit_hwbug = 1; would_hit_hwbug = 1;
if (tg3_40bit_overflow_test(tp, mapping, len)) if (tg3_40bit_overflow_test(tp, mapping, len))
...@@ -6055,8 +6053,7 @@ static netdev_tx_t tg3_start_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -6055,8 +6053,7 @@ static netdev_tx_t tg3_start_xmit(struct sk_buff *skb, struct net_device *dev)
len <= 8) len <= 8)
would_hit_hwbug = 1; would_hit_hwbug = 1;
if (tg3_flag(tp, 4G_DMA_BNDRY_BUG) && if (tg3_4g_overflow_test(mapping, len))
tg3_4g_overflow_test(mapping, len))
would_hit_hwbug = 1; would_hit_hwbug = 1;
if (tg3_40bit_overflow_test(tp, mapping, len)) if (tg3_40bit_overflow_test(tp, mapping, len))
...@@ -13703,11 +13700,6 @@ static int __devinit tg3_get_invariants(struct tg3 *tp) ...@@ -13703,11 +13700,6 @@ static int __devinit tg3_get_invariants(struct tg3 *tp)
} }
} }
/* All chips can get confused if TX buffers
* straddle the 4GB address boundary.
*/
tg3_flag_set(tp, 4G_DMA_BNDRY_BUG);
if (tg3_flag(tp, 5755_PLUS)) if (tg3_flag(tp, 5755_PLUS))
tg3_flag_set(tp, SHORT_DMA_BUG); tg3_flag_set(tp, SHORT_DMA_BUG);
......
...@@ -2896,7 +2896,6 @@ enum TG3_FLAGS { ...@@ -2896,7 +2896,6 @@ enum TG3_FLAGS {
TG3_FLAG_NO_NVRAM, TG3_FLAG_NO_NVRAM,
TG3_FLAG_ENABLE_RSS, TG3_FLAG_ENABLE_RSS,
TG3_FLAG_ENABLE_TSS, TG3_FLAG_ENABLE_TSS,
TG3_FLAG_4G_DMA_BNDRY_BUG,
TG3_FLAG_SHORT_DMA_BUG, TG3_FLAG_SHORT_DMA_BUG,
TG3_FLAG_USE_JUMBO_BDFLAG, TG3_FLAG_USE_JUMBO_BDFLAG,
TG3_FLAG_L1PLLPD_EN, TG3_FLAG_L1PLLPD_EN,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册