diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-02-04 10:43:36 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-02-04 10:43:36 -0500 |
commit | a2e4e108c511738fb3bc2bb2fedd593da9913764 (patch) | |
tree | 49e4084a383ed43e2d86a36176e197f6b7412a45 /drivers/net/ucc_geth.c | |
parent | a6cc48eeea438b9d9e05943beebc31c52e76d32f (diff) | |
parent | a80f509f4a4f41ea8693733124470ad63a12664a (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (77 commits)
[IPV6]: Reorg struct ifmcaddr6 to save some bytes
[INET_TIMEWAIT_SOCK]: Reorganize struct inet_timewait_sock to save some bytes
[DCCP]: Reorganize struct dccp_sock to save 8 bytes
[INET6]: Reorganize struct inet6_dev to save 8 bytes
[SOCK] proto: Add hashinfo member to struct proto
EMAC driver: Fix bug: The clock divisor is set to all ones at reset.
EMAC driver: fix bug - invalidate data cache of new_skb->data range when cache is WB
EMAC driver: add power down mode
EMAC driver: ADSP-BF52x arch/mach support
EMAC driver: use simpler comment headers and strip out information that is maintained in the scm's log
EMAC driver: bf537 MAC multicast hash filtering patch
EMAC driver: define MDC_CLK=2.5MHz and caculate mdc_div according to SCLK.
EMAC driver: shorten the mdelay value to solve netperf performance issue
[netdrvr] sis190: build fix
sky2: fix Wake On Lan interaction with BIOS
sky2: restore multicast addresses after recovery
pci-skeleton: Misc fixes to build neatly
phylib: Add Realtek 821x eth PHY support
natsemi: Update locking documentation
PHYLIB: Locking fixes for PHY I/O potentially sleeping
...
Diffstat (limited to 'drivers/net/ucc_geth.c')
-rw-r--r-- | drivers/net/ucc_geth.c | 37 |
1 files changed, 30 insertions, 7 deletions
diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c index 4ffd8739f8b7..fba0811d2608 100644 --- a/drivers/net/ucc_geth.c +++ b/drivers/net/ucc_geth.c | |||
@@ -2084,8 +2084,10 @@ static void ucc_geth_memclean(struct ucc_geth_private *ugeth) | |||
2084 | if (!ugeth) | 2084 | if (!ugeth) |
2085 | return; | 2085 | return; |
2086 | 2086 | ||
2087 | if (ugeth->uccf) | 2087 | if (ugeth->uccf) { |
2088 | ucc_fast_free(ugeth->uccf); | 2088 | ucc_fast_free(ugeth->uccf); |
2089 | ugeth->uccf = NULL; | ||
2090 | } | ||
2089 | 2091 | ||
2090 | if (ugeth->p_thread_data_tx) { | 2092 | if (ugeth->p_thread_data_tx) { |
2091 | qe_muram_free(ugeth->thread_dat_tx_offset); | 2093 | qe_muram_free(ugeth->thread_dat_tx_offset); |
@@ -2305,10 +2307,6 @@ static int ucc_struct_init(struct ucc_geth_private *ugeth) | |||
2305 | ug_info = ugeth->ug_info; | 2307 | ug_info = ugeth->ug_info; |
2306 | uf_info = &ug_info->uf_info; | 2308 | uf_info = &ug_info->uf_info; |
2307 | 2309 | ||
2308 | /* Create CQs for hash tables */ | ||
2309 | INIT_LIST_HEAD(&ugeth->group_hash_q); | ||
2310 | INIT_LIST_HEAD(&ugeth->ind_hash_q); | ||
2311 | |||
2312 | if (!((uf_info->bd_mem_part == MEM_PART_SYSTEM) || | 2310 | if (!((uf_info->bd_mem_part == MEM_PART_SYSTEM) || |
2313 | (uf_info->bd_mem_part == MEM_PART_MURAM))) { | 2311 | (uf_info->bd_mem_part == MEM_PART_MURAM))) { |
2314 | if (netif_msg_probe(ugeth)) | 2312 | if (netif_msg_probe(ugeth)) |
@@ -3668,6 +3666,23 @@ static irqreturn_t ucc_geth_irq_handler(int irq, void *info) | |||
3668 | return IRQ_HANDLED; | 3666 | return IRQ_HANDLED; |
3669 | } | 3667 | } |
3670 | 3668 | ||
3669 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
3670 | /* | ||
3671 | * Polling 'interrupt' - used by things like netconsole to send skbs | ||
3672 | * without having to re-enable interrupts. It's not called while | ||
3673 | * the interrupt routine is executing. | ||
3674 | */ | ||
3675 | static void ucc_netpoll(struct net_device *dev) | ||
3676 | { | ||
3677 | struct ucc_geth_private *ugeth = netdev_priv(dev); | ||
3678 | int irq = ugeth->ug_info->uf_info.irq; | ||
3679 | |||
3680 | disable_irq(irq); | ||
3681 | ucc_geth_irq_handler(irq, dev); | ||
3682 | enable_irq(irq); | ||
3683 | } | ||
3684 | #endif /* CONFIG_NET_POLL_CONTROLLER */ | ||
3685 | |||
3671 | /* Called when something needs to use the ethernet device */ | 3686 | /* Called when something needs to use the ethernet device */ |
3672 | /* Returns 0 for success. */ | 3687 | /* Returns 0 for success. */ |
3673 | static int ucc_geth_open(struct net_device *dev) | 3688 | static int ucc_geth_open(struct net_device *dev) |
@@ -3990,6 +4005,10 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma | |||
3990 | ugeth = netdev_priv(dev); | 4005 | ugeth = netdev_priv(dev); |
3991 | spin_lock_init(&ugeth->lock); | 4006 | spin_lock_init(&ugeth->lock); |
3992 | 4007 | ||
4008 | /* Create CQs for hash tables */ | ||
4009 | INIT_LIST_HEAD(&ugeth->group_hash_q); | ||
4010 | INIT_LIST_HEAD(&ugeth->ind_hash_q); | ||
4011 | |||
3993 | dev_set_drvdata(device, dev); | 4012 | dev_set_drvdata(device, dev); |
3994 | 4013 | ||
3995 | /* Set the dev->base_addr to the gfar reg region */ | 4014 | /* Set the dev->base_addr to the gfar reg region */ |
@@ -4006,6 +4025,9 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma | |||
4006 | #ifdef CONFIG_UGETH_NAPI | 4025 | #ifdef CONFIG_UGETH_NAPI |
4007 | netif_napi_add(dev, &ugeth->napi, ucc_geth_poll, UCC_GETH_DEV_WEIGHT); | 4026 | netif_napi_add(dev, &ugeth->napi, ucc_geth_poll, UCC_GETH_DEV_WEIGHT); |
4008 | #endif /* CONFIG_UGETH_NAPI */ | 4027 | #endif /* CONFIG_UGETH_NAPI */ |
4028 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
4029 | dev->poll_controller = ucc_netpoll; | ||
4030 | #endif | ||
4009 | dev->stop = ucc_geth_close; | 4031 | dev->stop = ucc_geth_close; |
4010 | // dev->change_mtu = ucc_geth_change_mtu; | 4032 | // dev->change_mtu = ucc_geth_change_mtu; |
4011 | dev->mtu = 1500; | 4033 | dev->mtu = 1500; |
@@ -4040,9 +4062,10 @@ static int ucc_geth_remove(struct of_device* ofdev) | |||
4040 | struct net_device *dev = dev_get_drvdata(device); | 4062 | struct net_device *dev = dev_get_drvdata(device); |
4041 | struct ucc_geth_private *ugeth = netdev_priv(dev); | 4063 | struct ucc_geth_private *ugeth = netdev_priv(dev); |
4042 | 4064 | ||
4043 | dev_set_drvdata(device, NULL); | 4065 | unregister_netdev(dev); |
4044 | ucc_geth_memclean(ugeth); | ||
4045 | free_netdev(dev); | 4066 | free_netdev(dev); |
4067 | ucc_geth_memclean(ugeth); | ||
4068 | dev_set_drvdata(device, NULL); | ||
4046 | 4069 | ||
4047 | return 0; | 4070 | return 0; |
4048 | } | 4071 | } |