diff options
author | Anton Vorontsov <avorontsov@ru.mvista.com> | 2008-12-23 01:59:25 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-12-26 04:28:43 -0500 |
commit | fdb614c28487df41f7bf2c98e85f29f31885561e (patch) | |
tree | ce56491da727d14d109f4664d931f39a86a843ba /drivers | |
parent | 9c54004ea717116a10886e254e26502ffb1136e9 (diff) |
ucc_geth: Eliminate the need for forward references
This patch simply reorders some functions to eliminate the need for
forward references. No other changes than that.
Suggested-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ucc_geth.c | 81 |
1 files changed, 39 insertions, 42 deletions
diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c index 78a2ede19c5e..7d5a1303e30d 100644 --- a/drivers/net/ucc_geth.c +++ b/drivers/net/ucc_geth.c | |||
@@ -3072,48 +3072,6 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth) | |||
3072 | return 0; | 3072 | return 0; |
3073 | } | 3073 | } |
3074 | 3074 | ||
3075 | static int ucc_geth_close(struct net_device *dev); | ||
3076 | static int ucc_geth_open(struct net_device *dev); | ||
3077 | |||
3078 | /* Reopen device. This will reset the MAC and PHY. */ | ||
3079 | static void ucc_geth_timeout_work(struct work_struct *work) | ||
3080 | { | ||
3081 | struct ucc_geth_private *ugeth; | ||
3082 | struct net_device *dev; | ||
3083 | |||
3084 | ugeth = container_of(work, struct ucc_geth_private, timeout_work); | ||
3085 | dev = ugeth->dev; | ||
3086 | |||
3087 | ugeth_vdbg("%s: IN", __func__); | ||
3088 | |||
3089 | dev->stats.tx_errors++; | ||
3090 | |||
3091 | ugeth_dump_regs(ugeth); | ||
3092 | |||
3093 | if (dev->flags & IFF_UP) { | ||
3094 | /* | ||
3095 | * Must reset MAC *and* PHY. This is done by reopening | ||
3096 | * the device. | ||
3097 | */ | ||
3098 | ucc_geth_close(dev); | ||
3099 | ucc_geth_open(dev); | ||
3100 | } | ||
3101 | |||
3102 | netif_tx_schedule_all(dev); | ||
3103 | } | ||
3104 | |||
3105 | /* | ||
3106 | * ucc_geth_timeout gets called when a packet has not been | ||
3107 | * transmitted after a set amount of time. | ||
3108 | */ | ||
3109 | static void ucc_geth_timeout(struct net_device *dev) | ||
3110 | { | ||
3111 | struct ucc_geth_private *ugeth = netdev_priv(dev); | ||
3112 | |||
3113 | netif_carrier_off(dev); | ||
3114 | schedule_work(&ugeth->timeout_work); | ||
3115 | } | ||
3116 | |||
3117 | /* This is called by the kernel when a frame is ready for transmission. */ | 3075 | /* This is called by the kernel when a frame is ready for transmission. */ |
3118 | /* It is pointed to by the dev->hard_start_xmit function pointer */ | 3076 | /* It is pointed to by the dev->hard_start_xmit function pointer */ |
3119 | static int ucc_geth_start_xmit(struct sk_buff *skb, struct net_device *dev) | 3077 | static int ucc_geth_start_xmit(struct sk_buff *skb, struct net_device *dev) |
@@ -3524,6 +3482,45 @@ static int ucc_geth_close(struct net_device *dev) | |||
3524 | return 0; | 3482 | return 0; |
3525 | } | 3483 | } |
3526 | 3484 | ||
3485 | /* Reopen device. This will reset the MAC and PHY. */ | ||
3486 | static void ucc_geth_timeout_work(struct work_struct *work) | ||
3487 | { | ||
3488 | struct ucc_geth_private *ugeth; | ||
3489 | struct net_device *dev; | ||
3490 | |||
3491 | ugeth = container_of(work, struct ucc_geth_private, timeout_work); | ||
3492 | dev = ugeth->dev; | ||
3493 | |||
3494 | ugeth_vdbg("%s: IN", __func__); | ||
3495 | |||
3496 | dev->stats.tx_errors++; | ||
3497 | |||
3498 | ugeth_dump_regs(ugeth); | ||
3499 | |||
3500 | if (dev->flags & IFF_UP) { | ||
3501 | /* | ||
3502 | * Must reset MAC *and* PHY. This is done by reopening | ||
3503 | * the device. | ||
3504 | */ | ||
3505 | ucc_geth_close(dev); | ||
3506 | ucc_geth_open(dev); | ||
3507 | } | ||
3508 | |||
3509 | netif_tx_schedule_all(dev); | ||
3510 | } | ||
3511 | |||
3512 | /* | ||
3513 | * ucc_geth_timeout gets called when a packet has not been | ||
3514 | * transmitted after a set amount of time. | ||
3515 | */ | ||
3516 | static void ucc_geth_timeout(struct net_device *dev) | ||
3517 | { | ||
3518 | struct ucc_geth_private *ugeth = netdev_priv(dev); | ||
3519 | |||
3520 | netif_carrier_off(dev); | ||
3521 | schedule_work(&ugeth->timeout_work); | ||
3522 | } | ||
3523 | |||
3527 | static phy_interface_t to_phy_interface(const char *phy_connection_type) | 3524 | static phy_interface_t to_phy_interface(const char *phy_connection_type) |
3528 | { | 3525 | { |
3529 | if (strcasecmp(phy_connection_type, "mii") == 0) | 3526 | if (strcasecmp(phy_connection_type, "mii") == 0) |