diff options
Diffstat (limited to 'drivers/net/ethernet/stmicro/stmmac/stmmac_main.c')
| -rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index a5156739e1e1..50f7a7a26821 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | |||
| @@ -1195,41 +1195,41 @@ static int alloc_dma_desc_resources(struct stmmac_priv *priv) | |||
| 1195 | goto err_tx_skbuff; | 1195 | goto err_tx_skbuff; |
| 1196 | 1196 | ||
| 1197 | if (priv->extend_desc) { | 1197 | if (priv->extend_desc) { |
| 1198 | priv->dma_erx = dma_alloc_coherent(priv->device, rxsize * | 1198 | priv->dma_erx = dma_zalloc_coherent(priv->device, rxsize * |
| 1199 | sizeof(struct | 1199 | sizeof(struct |
| 1200 | dma_extended_desc), | 1200 | dma_extended_desc), |
| 1201 | &priv->dma_rx_phy, | 1201 | &priv->dma_rx_phy, |
| 1202 | GFP_KERNEL); | 1202 | GFP_KERNEL); |
| 1203 | if (!priv->dma_erx) | 1203 | if (!priv->dma_erx) |
| 1204 | goto err_dma; | 1204 | goto err_dma; |
| 1205 | 1205 | ||
| 1206 | priv->dma_etx = dma_alloc_coherent(priv->device, txsize * | 1206 | priv->dma_etx = dma_zalloc_coherent(priv->device, txsize * |
| 1207 | sizeof(struct | 1207 | sizeof(struct |
| 1208 | dma_extended_desc), | 1208 | dma_extended_desc), |
| 1209 | &priv->dma_tx_phy, | 1209 | &priv->dma_tx_phy, |
| 1210 | GFP_KERNEL); | 1210 | GFP_KERNEL); |
| 1211 | if (!priv->dma_etx) { | 1211 | if (!priv->dma_etx) { |
| 1212 | dma_free_coherent(priv->device, priv->dma_rx_size * | 1212 | dma_free_coherent(priv->device, priv->dma_rx_size * |
| 1213 | sizeof(struct dma_extended_desc), | 1213 | sizeof(struct dma_extended_desc), |
| 1214 | priv->dma_erx, priv->dma_rx_phy); | 1214 | priv->dma_erx, priv->dma_rx_phy); |
| 1215 | goto err_dma; | 1215 | goto err_dma; |
| 1216 | } | 1216 | } |
| 1217 | } else { | 1217 | } else { |
| 1218 | priv->dma_rx = dma_alloc_coherent(priv->device, rxsize * | 1218 | priv->dma_rx = dma_zalloc_coherent(priv->device, rxsize * |
| 1219 | sizeof(struct dma_desc), | 1219 | sizeof(struct dma_desc), |
| 1220 | &priv->dma_rx_phy, | 1220 | &priv->dma_rx_phy, |
| 1221 | GFP_KERNEL); | 1221 | GFP_KERNEL); |
| 1222 | if (!priv->dma_rx) | 1222 | if (!priv->dma_rx) |
| 1223 | goto err_dma; | 1223 | goto err_dma; |
| 1224 | 1224 | ||
| 1225 | priv->dma_tx = dma_alloc_coherent(priv->device, txsize * | 1225 | priv->dma_tx = dma_zalloc_coherent(priv->device, txsize * |
| 1226 | sizeof(struct dma_desc), | 1226 | sizeof(struct dma_desc), |
| 1227 | &priv->dma_tx_phy, | 1227 | &priv->dma_tx_phy, |
| 1228 | GFP_KERNEL); | 1228 | GFP_KERNEL); |
| 1229 | if (!priv->dma_tx) { | 1229 | if (!priv->dma_tx) { |
| 1230 | dma_free_coherent(priv->device, priv->dma_rx_size * | 1230 | dma_free_coherent(priv->device, priv->dma_rx_size * |
| 1231 | sizeof(struct dma_desc), | 1231 | sizeof(struct dma_desc), |
| 1232 | priv->dma_rx, priv->dma_rx_phy); | 1232 | priv->dma_rx, priv->dma_rx_phy); |
| 1233 | goto err_dma; | 1233 | goto err_dma; |
| 1234 | } | 1234 | } |
| 1235 | } | 1235 | } |
