diff options
Diffstat (limited to 'drivers/net/netxen/netxen_nic_init.c')
-rw-r--r-- | drivers/net/netxen/netxen_nic_init.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/netxen/netxen_nic_init.c b/drivers/net/netxen/netxen_nic_init.c index 95fe552aa279..f946de23fe76 100644 --- a/drivers/net/netxen/netxen_nic_init.c +++ b/drivers/net/netxen/netxen_nic_init.c | |||
@@ -214,13 +214,12 @@ int netxen_alloc_sw_resources(struct netxen_adapter *adapter) | |||
214 | tx_ring->num_desc = adapter->num_txd; | 214 | tx_ring->num_desc = adapter->num_txd; |
215 | tx_ring->txq = netdev_get_tx_queue(netdev, 0); | 215 | tx_ring->txq = netdev_get_tx_queue(netdev, 0); |
216 | 216 | ||
217 | cmd_buf_arr = vmalloc(TX_BUFF_RINGSIZE(tx_ring)); | 217 | cmd_buf_arr = vzalloc(TX_BUFF_RINGSIZE(tx_ring)); |
218 | if (cmd_buf_arr == NULL) { | 218 | if (cmd_buf_arr == NULL) { |
219 | dev_err(&pdev->dev, "%s: failed to allocate cmd buffer ring\n", | 219 | dev_err(&pdev->dev, "%s: failed to allocate cmd buffer ring\n", |
220 | netdev->name); | 220 | netdev->name); |
221 | goto err_out; | 221 | goto err_out; |
222 | } | 222 | } |
223 | memset(cmd_buf_arr, 0, TX_BUFF_RINGSIZE(tx_ring)); | ||
224 | tx_ring->cmd_buf_arr = cmd_buf_arr; | 223 | tx_ring->cmd_buf_arr = cmd_buf_arr; |
225 | 224 | ||
226 | recv_ctx = &adapter->recv_ctx; | 225 | recv_ctx = &adapter->recv_ctx; |
@@ -280,7 +279,7 @@ int netxen_alloc_sw_resources(struct netxen_adapter *adapter) | |||
280 | 279 | ||
281 | } | 280 | } |
282 | rds_ring->rx_buf_arr = (struct netxen_rx_buffer *) | 281 | rds_ring->rx_buf_arr = (struct netxen_rx_buffer *) |
283 | vmalloc(RCV_BUFF_RINGSIZE(rds_ring)); | 282 | vzalloc(RCV_BUFF_RINGSIZE(rds_ring)); |
284 | if (rds_ring->rx_buf_arr == NULL) { | 283 | if (rds_ring->rx_buf_arr == NULL) { |
285 | printk(KERN_ERR "%s: Failed to allocate " | 284 | printk(KERN_ERR "%s: Failed to allocate " |
286 | "rx buffer ring %d\n", | 285 | "rx buffer ring %d\n", |
@@ -288,7 +287,6 @@ int netxen_alloc_sw_resources(struct netxen_adapter *adapter) | |||
288 | /* free whatever was already allocated */ | 287 | /* free whatever was already allocated */ |
289 | goto err_out; | 288 | goto err_out; |
290 | } | 289 | } |
291 | memset(rds_ring->rx_buf_arr, 0, RCV_BUFF_RINGSIZE(rds_ring)); | ||
292 | INIT_LIST_HEAD(&rds_ring->free_list); | 290 | INIT_LIST_HEAD(&rds_ring->free_list); |
293 | /* | 291 | /* |
294 | * Now go through all of them, set reference handles | 292 | * Now go through all of them, set reference handles |