* [PATCH 1/11][TG3]: Fix TSO bugs.
@ 2007-05-05 0:51 Michael Chan
2007-05-05 18:50 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Michael Chan @ 2007-05-05 0:51 UTC (permalink / raw)
To: davem, netdev
[TG3]: Fix TSO bugs.
1. Remove the check for skb->len greater than MTU when doing TSO.
When the destination has a smaller MSS than the source, a TSO packet
may be smaller than the MTU and we still need to process it as a TSO
packet.
2. On 5705A3 devices with TSO enabled, the DMA engine can hang due to a
hardware bug. This patch avoids the hanging condition by reducing the
DMA burst size.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 9488f49..b8141be 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -3895,8 +3895,7 @@ static int tg3_start_xmit(struct sk_buff *skb, struct net_device *dev)
entry = tp->tx_prod;
base_flags = 0;
mss = 0;
- if (skb->len > (tp->dev->mtu + ETH_HLEN) &&
- (mss = skb_shinfo(skb)->gso_size) != 0) {
+ if ((mss = skb_shinfo(skb)->gso_size) != 0) {
int tcp_opt_len, ip_tcp_len;
if (skb_header_cloned(skb) &&
@@ -4053,8 +4052,7 @@ static int tg3_start_xmit_dma_bug(struct sk_buff *skb, struct net_device *dev)
if (skb->ip_summed == CHECKSUM_PARTIAL)
base_flags |= TXD_FLAG_TCPUDP_CSUM;
mss = 0;
- if (skb->len > (tp->dev->mtu + ETH_HLEN) &&
- (mss = skb_shinfo(skb)->gso_size) != 0) {
+ if ((mss = skb_shinfo(skb)->gso_size) != 0) {
struct iphdr *iph;
int tcp_opt_len, ip_tcp_len, hdr_len;
@@ -6346,8 +6344,7 @@ static int tg3_reset_hw(struct tg3 *tp, int reset_phy)
tp->pci_chip_rev_id != CHIPREV_ID_5705_A0) ||
(GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750)) {
if (tp->tg3_flags2 & TG3_FLG2_TSO_CAPABLE &&
- (tp->pci_chip_rev_id == CHIPREV_ID_5705_A1 ||
- tp->pci_chip_rev_id == CHIPREV_ID_5705_A2)) {
+ GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) {
rdmac_mode |= RDMAC_MODE_FIFO_SIZE_128;
} else if (!(tr32(TG3PCI_PCISTATE) & PCISTATE_BUS_SPEED_HIGH) &&
!(tp->tg3_flags2 & TG3_FLG2_IS_5788)) {
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH 1/11][TG3]: Fix TSO bugs.
2007-05-05 0:51 [PATCH 1/11][TG3]: Fix TSO bugs Michael Chan
@ 2007-05-05 18:50 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2007-05-05 18:50 UTC (permalink / raw)
To: mchan; +Cc: netdev
From: "Michael Chan" <mchan@broadcom.com>
Date: Fri, 04 May 2007 17:51:48 -0700
> [TG3]: Fix TSO bugs.
>
> 1. Remove the check for skb->len greater than MTU when doing TSO.
> When the destination has a smaller MSS than the source, a TSO packet
> may be smaller than the MTU and we still need to process it as a TSO
> packet.
>
> 2. On 5705A3 devices with TSO enabled, the DMA engine can hang due to a
> hardware bug. This patch avoids the hanging condition by reducing the
> DMA burst size.
>
> Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
> Signed-off-by: Michael Chan <mchan@broadcom.com>
I had a suspicion that TG3 had the same bug BNX2 did. :)
Applied, thanks a lot.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-05-05 18:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-05 0:51 [PATCH 1/11][TG3]: Fix TSO bugs Michael Chan
2007-05-05 18:50 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).