diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/sky2.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index 00bc65a0aac9..fc3803316970 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c | |||
@@ -65,8 +65,8 @@ | |||
65 | #define RX_DEF_PENDING RX_MAX_PENDING | 65 | #define RX_DEF_PENDING RX_MAX_PENDING |
66 | 66 | ||
67 | /* This is the worst case number of transmit list elements for a single skb: | 67 | /* This is the worst case number of transmit list elements for a single skb: |
68 | VLAN + TSO + CKSUM + Data + skb_frags * DMA */ | 68 | VLAN:GSO + CKSUM + Data + skb_frags * DMA */ |
69 | #define MAX_SKB_TX_LE (4 + (sizeof(dma_addr_t)/sizeof(u32))*MAX_SKB_FRAGS) | 69 | #define MAX_SKB_TX_LE (2 + (sizeof(dma_addr_t)/sizeof(u32))*(MAX_SKB_FRAGS+1)) |
70 | #define TX_MIN_PENDING (MAX_SKB_TX_LE+1) | 70 | #define TX_MIN_PENDING (MAX_SKB_TX_LE+1) |
71 | #define TX_MAX_PENDING 4096 | 71 | #define TX_MAX_PENDING 4096 |
72 | #define TX_DEF_PENDING 127 | 72 | #define TX_DEF_PENDING 127 |
@@ -1567,11 +1567,13 @@ static unsigned tx_le_req(const struct sk_buff *skb) | |||
1567 | { | 1567 | { |
1568 | unsigned count; | 1568 | unsigned count; |
1569 | 1569 | ||
1570 | count = sizeof(dma_addr_t) / sizeof(u32); | 1570 | count = (skb_shinfo(skb)->nr_frags + 1) |
1571 | count += skb_shinfo(skb)->nr_frags * count; | 1571 | * (sizeof(dma_addr_t) / sizeof(u32)); |
1572 | 1572 | ||
1573 | if (skb_is_gso(skb)) | 1573 | if (skb_is_gso(skb)) |
1574 | ++count; | 1574 | ++count; |
1575 | else if (sizeof(dma_addr_t) == sizeof(u32)) | ||
1576 | ++count; /* possible vlan */ | ||
1575 | 1577 | ||
1576 | if (skb->ip_summed == CHECKSUM_PARTIAL) | 1578 | if (skb->ip_summed == CHECKSUM_PARTIAL) |
1577 | ++count; | 1579 | ++count; |