Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 171119
b: refs/heads/master
c: 92c6b8d
h: refs/heads/master
i:
  171117: 740e5cd
  171115: 5e3a4d6
  171111: 7798766
  171103: 765f465
v: v3
  • Loading branch information
Matt Carlson authored and David S. Miller committed Nov 3, 2009
1 parent 682f3c1 commit ed6fa04
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0e1406dd404ce55dbe8d68b4b5e2aed7e5c75fdb
refs/heads/master: 92c6b8d16a36df3f28b2537bed2a56491fb08f11
26 changes: 19 additions & 7 deletions trunk/drivers/net/tg3.c
Original file line number Diff line number Diff line change
Expand Up @@ -5393,7 +5393,7 @@ static netdev_tx_t tg3_start_xmit_dma_bug(struct sk_buff *skb,
mss = 0;
if ((mss = skb_shinfo(skb)->gso_size) != 0) {
struct iphdr *iph;
int tcp_opt_len, ip_tcp_len, hdr_len;
u32 tcp_opt_len, ip_tcp_len, hdr_len;

if (skb_header_cloned(skb) &&
pskb_expand_head(skb, 0, 0, GFP_ATOMIC)) {
Expand Down Expand Up @@ -5424,8 +5424,10 @@ static netdev_tx_t tg3_start_xmit_dma_bug(struct sk_buff *skb,
IPPROTO_TCP,
0);

if ((tp->tg3_flags2 & TG3_FLG2_HW_TSO) ||
(GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705)) {
if (tp->tg3_flags2 & TG3_FLG2_HW_TSO_2)
mss |= hdr_len << 9;
else if ((tp->tg3_flags2 & TG3_FLG2_HW_TSO_1) ||
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) {
if (tcp_opt_len || iph->ihl > 5) {
int tsflags;

Expand Down Expand Up @@ -5460,6 +5462,9 @@ static netdev_tx_t tg3_start_xmit_dma_bug(struct sk_buff *skb,

would_hit_hwbug = 0;

if ((tp->tg3_flags3 & TG3_FLG3_SHORT_DMA_BUG) && len <= 8)
would_hit_hwbug = 1;

if ((tp->tg3_flags3 & TG3_FLG3_4G_DMA_BNDRY_BUG) &&
tg3_4g_overflow_test(mapping, len))
would_hit_hwbug = 1;
Expand Down Expand Up @@ -5489,6 +5494,10 @@ static netdev_tx_t tg3_start_xmit_dma_bug(struct sk_buff *skb,

tnapi->tx_buffers[entry].skb = NULL;

if ((tp->tg3_flags3 & TG3_FLG3_SHORT_DMA_BUG) &&
len <= 8)
would_hit_hwbug = 1;

if ((tp->tg3_flags3 & TG3_FLG3_4G_DMA_BNDRY_BUG) &&
tg3_4g_overflow_test(mapping, len))
would_hit_hwbug = 1;
Expand Down Expand Up @@ -12625,8 +12634,12 @@ static int __devinit tg3_get_invariants(struct tg3 *tp)
}

if (!(tp->tg3_flags3 & TG3_FLG3_5755_PLUS)) {
tp->tg3_flags3 |= TG3_FLG3_4G_DMA_BNDRY_BUG;
tp->tg3_flags3 |= TG3_FLG3_40BIT_DMA_LIMIT_BUG;
if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906)
tp->tg3_flags3 |= TG3_FLG3_SHORT_DMA_BUG;
else {
tp->tg3_flags3 |= TG3_FLG3_4G_DMA_BNDRY_BUG;
tp->tg3_flags3 |= TG3_FLG3_40BIT_DMA_LIMIT_BUG;
}
}

if (!(tp->tg3_flags2 & TG3_FLG2_5705_PLUS) ||
Expand Down Expand Up @@ -13987,8 +14000,7 @@ static int __devinit tg3_init_one(struct pci_dev *pdev,
goto err_out_iounmap;
}

if ((tp->tg3_flags3 & TG3_FLG3_5755_PLUS) ||
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906)
if (tp->tg3_flags3 & TG3_FLG3_5755_PLUS)
dev->netdev_ops = &tg3_netdev_ops;
else
dev->netdev_ops = &tg3_netdev_ops_dma_bug;
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/tg3.h
Original file line number Diff line number Diff line change
Expand Up @@ -2761,6 +2761,7 @@ struct tg3 {
#define TG3_FLG3_ENABLE_RSS 0x00020000
#define TG3_FLG3_4G_DMA_BNDRY_BUG 0x00080000
#define TG3_FLG3_40BIT_DMA_LIMIT_BUG 0x00100000
#define TG3_FLG3_SHORT_DMA_BUG 0x00200000

struct timer_list timer;
u16 timer_counter;
Expand Down

0 comments on commit ed6fa04

Please sign in to comment.