aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgb
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ixgb')
-rw-r--r--drivers/net/ixgb/ixgb_main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c
index 960b44b5b02b..a5da48a1fca0 100644
--- a/drivers/net/ixgb/ixgb_main.c
+++ b/drivers/net/ixgb/ixgb_main.c
@@ -1174,6 +1174,7 @@ ixgb_tso(struct ixgb_adapter *adapter, struct sk_buff *skb)
1174 int err; 1174 int err;
1175 1175
1176 if (likely(skb_is_gso(skb))) { 1176 if (likely(skb_is_gso(skb))) {
1177 struct ixgb_buffer *buffer_info;
1177 if (skb_header_cloned(skb)) { 1178 if (skb_header_cloned(skb)) {
1178 err = pskb_expand_head(skb, 0, 0, GFP_ATOMIC); 1179 err = pskb_expand_head(skb, 0, 0, GFP_ATOMIC);
1179 if (err) 1180 if (err)
@@ -1196,6 +1197,8 @@ ixgb_tso(struct ixgb_adapter *adapter, struct sk_buff *skb)
1196 1197
1197 i = adapter->tx_ring.next_to_use; 1198 i = adapter->tx_ring.next_to_use;
1198 context_desc = IXGB_CONTEXT_DESC(adapter->tx_ring, i); 1199 context_desc = IXGB_CONTEXT_DESC(adapter->tx_ring, i);
1200 buffer_info = &adapter->tx_ring.buffer_info[i];
1201 WARN_ON(buffer_info->dma != 0);
1199 1202
1200 context_desc->ipcss = ipcss; 1203 context_desc->ipcss = ipcss;
1201 context_desc->ipcso = ipcso; 1204 context_desc->ipcso = ipcso;
@@ -1233,11 +1236,14 @@ ixgb_tx_csum(struct ixgb_adapter *adapter, struct sk_buff *skb)
1233 uint8_t css, cso; 1236 uint8_t css, cso;
1234 1237
1235 if(likely(skb->ip_summed == CHECKSUM_HW)) { 1238 if(likely(skb->ip_summed == CHECKSUM_HW)) {
1239 struct ixgb_buffer *buffer_info;
1236 css = skb->h.raw - skb->data; 1240 css = skb->h.raw - skb->data;
1237 cso = (skb->h.raw + skb->csum) - skb->data; 1241 cso = (skb->h.raw + skb->csum) - skb->data;
1238 1242
1239 i = adapter->tx_ring.next_to_use; 1243 i = adapter->tx_ring.next_to_use;
1240 context_desc = IXGB_CONTEXT_DESC(adapter->tx_ring, i); 1244 context_desc = IXGB_CONTEXT_DESC(adapter->tx_ring, i);
1245 buffer_info = &adapter->tx_ring.buffer_info[i];
1246 WARN_ON(buffer_info->dma != 0);
1241 1247
1242 context_desc->tucss = css; 1248 context_desc->tucss = css;
1243 context_desc->tucso = cso; 1249 context_desc->tucso = cso;
@@ -1283,6 +1289,7 @@ ixgb_tx_map(struct ixgb_adapter *adapter, struct sk_buff *skb,
1283 buffer_info = &tx_ring->buffer_info[i]; 1289 buffer_info = &tx_ring->buffer_info[i];
1284 size = min(len, IXGB_MAX_DATA_PER_TXD); 1290 size = min(len, IXGB_MAX_DATA_PER_TXD);
1285 buffer_info->length = size; 1291 buffer_info->length = size;
1292 WARN_ON(buffer_info->dma != 0);
1286 buffer_info->dma = 1293 buffer_info->dma =
1287 pci_map_single(adapter->pdev, 1294 pci_map_single(adapter->pdev,
1288 skb->data + offset, 1295 skb->data + offset,