Fixed freeing transmit socket buffers.
--- a/devices/e100-2.6.20-ethercat.c Tue Sep 30 11:51:23 2008 +0000
+++ b/devices/e100-2.6.20-ethercat.c Tue Sep 30 12:30:18 2008 +0000
@@ -1748,10 +1748,9 @@
le32_to_cpu(cb->u.tcb.tbd.buf_addr),
le16_to_cpu(cb->u.tcb.tbd.size),
PCI_DMA_TODEVICE);
- if (!nic->ecdev) {
- dev_kfree_skb_any(cb->skb);
- cb->skb = NULL;
- }
+ if (!nic->ecdev)
+ dev_kfree_skb_any(cb->skb);
+ cb->skb = NULL;
tx_cleaned = 1;
}
cb->status = 0;
@@ -1779,7 +1778,8 @@
le32_to_cpu(cb->u.tcb.tbd.buf_addr),
le16_to_cpu(cb->u.tcb.tbd.size),
PCI_DMA_TODEVICE);
- dev_kfree_skb(cb->skb);
+ if (!nic->ecdev)
+ dev_kfree_skb(cb->skb);
}
nic->cb_to_clean = nic->cb_to_clean->next;
nic->cbs_avail++;