From: Matt Carlson Date: Mon, 13 Jun 2011 13:38:57 +0000 (+0000) Subject: tg3: Remove 4G_DMA_BNDRY_BUG flag X-Git-Tag: v2.6.39-400.9.0~423^2~19^2~11^2~714 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=21e0a4f29b4f2ba6dd0936543bdaca2c03cbf440;p=users%2Fjedix%2Flinux-maple.git 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: Matt Carlson Reviewed-by: Michael Chan Reviewed-by: Benjamin Li Signed-off-by: David S. Miller (cherry picked from commit eb69d564a3f34df602bd9b0fae94e14fad23de2d) Signed-off-by: Joe Jin --- diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 58a98a9b851d..525e9346c583 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -5828,8 +5828,7 @@ static int tigon3_dma_hwbug_workaround(struct tg3_napi *tnapi, /* Make sure new skb does not cross any 4G boundaries. * Drop the packet if it does. */ - } else if (tg3_flag(tp, 4G_DMA_BNDRY_BUG) && - tg3_4g_overflow_test(new_addr, new_skb->len)) { + } else if (tg3_4g_overflow_test(new_addr, new_skb->len)) { pci_unmap_single(tp->pdev, new_addr, new_skb->len, PCI_DMA_TODEVICE); ret = -1; @@ -6024,8 +6023,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) would_hit_hwbug = 1; - if (tg3_flag(tp, 4G_DMA_BNDRY_BUG) && - tg3_4g_overflow_test(mapping, len)) + if (tg3_4g_overflow_test(mapping, len)) would_hit_hwbug = 1; if (tg3_40bit_overflow_test(tp, mapping, len)) @@ -6061,8 +6059,7 @@ static netdev_tx_t tg3_start_xmit(struct sk_buff *skb, struct net_device *dev) len <= 8) would_hit_hwbug = 1; - if (tg3_flag(tp, 4G_DMA_BNDRY_BUG) && - tg3_4g_overflow_test(mapping, len)) + if (tg3_4g_overflow_test(mapping, len)) would_hit_hwbug = 1; if (tg3_40bit_overflow_test(tp, mapping, len)) @@ -13671,11 +13668,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)) tg3_flag_set(tp, SHORT_DMA_BUG); diff --git a/drivers/net/tg3.h b/drivers/net/tg3.h index 34072a3f471f..c667e458564e 100644 --- a/drivers/net/tg3.h +++ b/drivers/net/tg3.h @@ -2893,7 +2893,6 @@ enum TG3_FLAGS { TG3_FLAG_NO_NVRAM, TG3_FLAG_ENABLE_RSS, TG3_FLAG_ENABLE_TSS, - TG3_FLAG_4G_DMA_BNDRY_BUG, TG3_FLAG_SHORT_DMA_BUG, TG3_FLAG_USE_JUMBO_BDFLAG, TG3_FLAG_L1PLLPD_EN,