aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e100.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/e100.c')
-rw-r--r--drivers/net/e100.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/e100.c b/drivers/net/e100.c
index 929701ca07d3..839fb2b136d3 100644
--- a/drivers/net/e100.c
+++ b/drivers/net/e100.c
@@ -1829,6 +1829,7 @@ static int e100_alloc_cbs(struct nic *nic)
1829 &nic->cbs_dma_addr); 1829 &nic->cbs_dma_addr);
1830 if (!nic->cbs) 1830 if (!nic->cbs)
1831 return -ENOMEM; 1831 return -ENOMEM;
1832 memset(nic->cbs, 0, count * sizeof(struct cb));
1832 1833
1833 for (cb = nic->cbs, i = 0; i < count; cb++, i++) { 1834 for (cb = nic->cbs, i = 0; i < count; cb++, i++) {
1834 cb->next = (i + 1 < count) ? cb + 1 : nic->cbs; 1835 cb->next = (i + 1 < count) ? cb + 1 : nic->cbs;
@@ -1837,7 +1838,6 @@ static int e100_alloc_cbs(struct nic *nic)
1837 cb->dma_addr = nic->cbs_dma_addr + i * sizeof(struct cb); 1838 cb->dma_addr = nic->cbs_dma_addr + i * sizeof(struct cb);
1838 cb->link = cpu_to_le32(nic->cbs_dma_addr + 1839 cb->link = cpu_to_le32(nic->cbs_dma_addr +
1839 ((i+1) % count) * sizeof(struct cb)); 1840 ((i+1) % count) * sizeof(struct cb));
1840 cb->skb = NULL;
1841 } 1841 }
1842 1842
1843 nic->cb_to_use = nic->cb_to_send = nic->cb_to_clean = nic->cbs; 1843 nic->cb_to_use = nic->cb_to_send = nic->cb_to_clean = nic->cbs;