Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 82636
b: refs/heads/master
c: 80a9fad
h: refs/heads/master
v: v3
  • Loading branch information
Anton Vorontsov authored and David S. Miller committed Feb 3, 2008
1 parent 32e824f commit cf2d15b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f67c6275185216b47ee50c8c122adee3c562bce7
refs/heads/master: 80a9fad8e89a23c31bab9c228a88a391c4f8d698
17 changes: 10 additions & 7 deletions trunk/drivers/net/ucc_geth.c
Original file line number Diff line number Diff line change
Expand Up @@ -2084,8 +2084,10 @@ static void ucc_geth_memclean(struct ucc_geth_private *ugeth)
if (!ugeth)
return;

if (ugeth->uccf)
if (ugeth->uccf) {
ucc_fast_free(ugeth->uccf);
ugeth->uccf = NULL;
}

if (ugeth->p_thread_data_tx) {
qe_muram_free(ugeth->thread_dat_tx_offset);
Expand Down Expand Up @@ -2305,10 +2307,6 @@ static int ucc_struct_init(struct ucc_geth_private *ugeth)
ug_info = ugeth->ug_info;
uf_info = &ug_info->uf_info;

/* Create CQs for hash tables */
INIT_LIST_HEAD(&ugeth->group_hash_q);
INIT_LIST_HEAD(&ugeth->ind_hash_q);

if (!((uf_info->bd_mem_part == MEM_PART_SYSTEM) ||
(uf_info->bd_mem_part == MEM_PART_MURAM))) {
if (netif_msg_probe(ugeth))
Expand Down Expand Up @@ -3990,6 +3988,10 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma
ugeth = netdev_priv(dev);
spin_lock_init(&ugeth->lock);

/* Create CQs for hash tables */
INIT_LIST_HEAD(&ugeth->group_hash_q);
INIT_LIST_HEAD(&ugeth->ind_hash_q);

dev_set_drvdata(device, dev);

/* Set the dev->base_addr to the gfar reg region */
Expand Down Expand Up @@ -4040,9 +4042,10 @@ static int ucc_geth_remove(struct of_device* ofdev)
struct net_device *dev = dev_get_drvdata(device);
struct ucc_geth_private *ugeth = netdev_priv(dev);

dev_set_drvdata(device, NULL);
ucc_geth_memclean(ugeth);
unregister_netdev(dev);
free_netdev(dev);
ucc_geth_memclean(ugeth);
dev_set_drvdata(device, NULL);

return 0;
}
Expand Down

0 comments on commit cf2d15b

Please sign in to comment.