aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ucc_geth.c
diff options
context:
space:
mode:
authorFrancois Romieu <romieu@fr.zoreil.com>2008-07-10 18:34:40 -0400
committerJeff Garzik <jgarzik@redhat.com>2008-07-11 01:11:45 -0400
commit1a342d224afb03196e3df28a271f3ddf3787e8f4 (patch)
tree5eba76aed2b61bdd01031e49c3df67aacd139643 /drivers/net/ucc_geth.c
parent0aa1538f4e4bab366023f4c414555e4ed25994e6 (diff)
ucc_geth: delete non NAPI code from the driver.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/ucc_geth.c')
-rw-r--r--drivers/net/ucc_geth.c29
1 files changed, 2 insertions, 27 deletions
diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c
index fb0b918e5ccb..07933f71b86d 100644
--- a/drivers/net/ucc_geth.c
+++ b/drivers/net/ucc_geth.c
@@ -3500,11 +3500,7 @@ static int ucc_geth_rx(struct ucc_geth_private *ugeth, u8 rxQ, int rx_work_limit
3500 3500
3501 dev->stats.rx_bytes += length; 3501 dev->stats.rx_bytes += length;
3502 /* Send the packet up the stack */ 3502 /* Send the packet up the stack */
3503#ifdef CONFIG_UGETH_NAPI
3504 netif_receive_skb(skb); 3503 netif_receive_skb(skb);
3505#else
3506 netif_rx(skb);
3507#endif /* CONFIG_UGETH_NAPI */
3508 } 3504 }
3509 3505
3510 ugeth->dev->last_rx = jiffies; 3506 ugeth->dev->last_rx = jiffies;
@@ -3580,7 +3576,6 @@ static int ucc_geth_tx(struct net_device *dev, u8 txQ)
3580 return 0; 3576 return 0;
3581} 3577}
3582 3578
3583#ifdef CONFIG_UGETH_NAPI
3584static int ucc_geth_poll(struct napi_struct *napi, int budget) 3579static int ucc_geth_poll(struct napi_struct *napi, int budget)
3585{ 3580{
3586 struct ucc_geth_private *ugeth = container_of(napi, struct ucc_geth_private, napi); 3581 struct ucc_geth_private *ugeth = container_of(napi, struct ucc_geth_private, napi);
@@ -3607,7 +3602,6 @@ static int ucc_geth_poll(struct napi_struct *napi, int budget)
3607 3602
3608 return howmany; 3603 return howmany;
3609} 3604}
3610#endif /* CONFIG_UGETH_NAPI */
3611 3605
3612static irqreturn_t ucc_geth_irq_handler(int irq, void *info) 3606static irqreturn_t ucc_geth_irq_handler(int irq, void *info)
3613{ 3607{
@@ -3617,9 +3611,6 @@ static irqreturn_t ucc_geth_irq_handler(int irq, void *info)
3617 struct ucc_geth_info *ug_info; 3611 struct ucc_geth_info *ug_info;
3618 register u32 ucce; 3612 register u32 ucce;
3619 register u32 uccm; 3613 register u32 uccm;
3620#ifndef CONFIG_UGETH_NAPI
3621 register u32 rx_mask;
3622#endif
3623 register u32 tx_mask; 3614 register u32 tx_mask;
3624 u8 i; 3615 u8 i;
3625 3616
@@ -3636,21 +3627,11 @@ static irqreturn_t ucc_geth_irq_handler(int irq, void *info)
3636 3627
3637 /* check for receive events that require processing */ 3628 /* check for receive events that require processing */
3638 if (ucce & UCCE_RX_EVENTS) { 3629 if (ucce & UCCE_RX_EVENTS) {
3639#ifdef CONFIG_UGETH_NAPI
3640 if (netif_rx_schedule_prep(dev, &ugeth->napi)) { 3630 if (netif_rx_schedule_prep(dev, &ugeth->napi)) {
3641 uccm &= ~UCCE_RX_EVENTS; 3631 uccm &= ~UCCE_RX_EVENTS;
3642 out_be32(uccf->p_uccm, uccm); 3632 out_be32(uccf->p_uccm, uccm);
3643 __netif_rx_schedule(dev, &ugeth->napi); 3633 __netif_rx_schedule(dev, &ugeth->napi);
3644 } 3634 }
3645#else
3646 rx_mask = UCCE_RXBF_SINGLE_MASK;
3647 for (i = 0; i < ug_info->numQueuesRx; i++) {
3648 if (ucce & rx_mask)
3649 ucc_geth_rx(ugeth, i, (int)ugeth->ug_info->bdRingLenRx[i]);
3650 ucce &= ~rx_mask;
3651 rx_mask <<= 1;
3652 }
3653#endif /* CONFIG_UGETH_NAPI */
3654 } 3635 }
3655 3636
3656 /* Tx event processing */ 3637 /* Tx event processing */
@@ -3720,9 +3701,8 @@ static int ucc_geth_open(struct net_device *dev)
3720 return err; 3701 return err;
3721 } 3702 }
3722 3703
3723#ifdef CONFIG_UGETH_NAPI
3724 napi_enable(&ugeth->napi); 3704 napi_enable(&ugeth->napi);
3725#endif 3705
3726 err = ucc_geth_startup(ugeth); 3706 err = ucc_geth_startup(ugeth);
3727 if (err) { 3707 if (err) {
3728 if (netif_msg_ifup(ugeth)) 3708 if (netif_msg_ifup(ugeth))
@@ -3783,9 +3763,8 @@ static int ucc_geth_open(struct net_device *dev)
3783 return err; 3763 return err;
3784 3764
3785out_err: 3765out_err:
3786#ifdef CONFIG_UGETH_NAPI
3787 napi_disable(&ugeth->napi); 3766 napi_disable(&ugeth->napi);
3788#endif 3767
3789 return err; 3768 return err;
3790} 3769}
3791 3770
@@ -3796,9 +3775,7 @@ static int ucc_geth_close(struct net_device *dev)
3796 3775
3797 ugeth_vdbg("%s: IN", __FUNCTION__); 3776 ugeth_vdbg("%s: IN", __FUNCTION__);
3798 3777
3799#ifdef CONFIG_UGETH_NAPI
3800 napi_disable(&ugeth->napi); 3778 napi_disable(&ugeth->napi);
3801#endif
3802 3779
3803 ucc_geth_stop(ugeth); 3780 ucc_geth_stop(ugeth);
3804 3781
@@ -4050,9 +4027,7 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma
4050 dev->hard_start_xmit = ucc_geth_start_xmit; 4027 dev->hard_start_xmit = ucc_geth_start_xmit;
4051 dev->tx_timeout = ucc_geth_timeout; 4028 dev->tx_timeout = ucc_geth_timeout;
4052 dev->watchdog_timeo = TX_TIMEOUT; 4029 dev->watchdog_timeo = TX_TIMEOUT;
4053#ifdef CONFIG_UGETH_NAPI
4054 netif_napi_add(dev, &ugeth->napi, ucc_geth_poll, UCC_GETH_DEV_WEIGHT); 4030 netif_napi_add(dev, &ugeth->napi, ucc_geth_poll, UCC_GETH_DEV_WEIGHT);
4055#endif /* CONFIG_UGETH_NAPI */
4056#ifdef CONFIG_NET_POLL_CONTROLLER 4031#ifdef CONFIG_NET_POLL_CONTROLLER
4057 dev->poll_controller = ucc_netpoll; 4032 dev->poll_controller = ucc_netpoll;
4058#endif 4033#endif