diff options
Diffstat (limited to 'drivers/net/stmmac')
-rw-r--r-- | drivers/net/stmmac/enh_desc.c | 2 | ||||
-rw-r--r-- | drivers/net/stmmac/norm_desc.c | 17 |
2 files changed, 2 insertions, 17 deletions
diff --git a/drivers/net/stmmac/enh_desc.c b/drivers/net/stmmac/enh_desc.c index 77ff88c3958b..5d1471d8f8f6 100644 --- a/drivers/net/stmmac/enh_desc.c +++ b/drivers/net/stmmac/enh_desc.c | |||
@@ -284,7 +284,7 @@ static void enh_desc_release_tx_desc(struct dma_desc *p) | |||
284 | { | 284 | { |
285 | int ter = p->des01.etx.end_ring; | 285 | int ter = p->des01.etx.end_ring; |
286 | 286 | ||
287 | memset(p, 0, sizeof(struct dma_desc)); | 287 | memset(p, 0, offsetof(struct dma_desc, des2)); |
288 | p->des01.etx.end_ring = ter; | 288 | p->des01.etx.end_ring = ter; |
289 | } | 289 | } |
290 | 290 | ||
diff --git a/drivers/net/stmmac/norm_desc.c b/drivers/net/stmmac/norm_desc.c index 51f4440ab98b..0dce90cb8124 100644 --- a/drivers/net/stmmac/norm_desc.c +++ b/drivers/net/stmmac/norm_desc.c | |||
@@ -174,22 +174,7 @@ static void ndesc_release_tx_desc(struct dma_desc *p) | |||
174 | { | 174 | { |
175 | int ter = p->des01.tx.end_ring; | 175 | int ter = p->des01.tx.end_ring; |
176 | 176 | ||
177 | /* clean field used within the xmit */ | 177 | memset(p, 0, offsetof(struct dma_desc, des2)); |
178 | p->des01.tx.first_segment = 0; | ||
179 | p->des01.tx.last_segment = 0; | ||
180 | p->des01.tx.buffer1_size = 0; | ||
181 | |||
182 | /* clean status reported */ | ||
183 | p->des01.tx.error_summary = 0; | ||
184 | p->des01.tx.underflow_error = 0; | ||
185 | p->des01.tx.no_carrier = 0; | ||
186 | p->des01.tx.loss_carrier = 0; | ||
187 | p->des01.tx.excessive_deferral = 0; | ||
188 | p->des01.tx.excessive_collisions = 0; | ||
189 | p->des01.tx.late_collision = 0; | ||
190 | p->des01.tx.heartbeat_fail = 0; | ||
191 | p->des01.tx.deferred = 0; | ||
192 | |||
193 | /* set termination field */ | 178 | /* set termination field */ |
194 | p->des01.tx.end_ring = ter; | 179 | p->des01.tx.end_ring = ter; |
195 | } | 180 | } |