aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/8139too.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2006-11-22 09:57:56 -0500
committerDavid Howells <dhowells@redhat.com>2006-11-22 09:57:56 -0500
commitc4028958b6ecad064b1a6303a6a5906d4fe48d73 (patch)
tree1c4c89652c62a75da09f9b9442012007e4ac6250 /drivers/net/8139too.c
parent65f27f38446e1976cc98fd3004b110fedcddd189 (diff)
WorkStruct: make allyesconfig
Fix up for make allyesconfig. Signed-Off-By: David Howells <dhowells@redhat.com>
Diffstat (limited to 'drivers/net/8139too.c')
-rw-r--r--drivers/net/8139too.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/drivers/net/8139too.c b/drivers/net/8139too.c
index d02ed51abfcc..931028f672de 100644
--- a/drivers/net/8139too.c
+++ b/drivers/net/8139too.c
@@ -594,7 +594,7 @@ struct rtl8139_private {
594 u32 rx_config; 594 u32 rx_config;
595 struct rtl_extra_stats xstats; 595 struct rtl_extra_stats xstats;
596 596
597 struct work_struct thread; 597 struct delayed_work thread;
598 598
599 struct mii_if_info mii; 599 struct mii_if_info mii;
600 unsigned int regs_len; 600 unsigned int regs_len;
@@ -636,8 +636,8 @@ static struct net_device_stats *rtl8139_get_stats (struct net_device *dev);
636static void rtl8139_set_rx_mode (struct net_device *dev); 636static void rtl8139_set_rx_mode (struct net_device *dev);
637static void __set_rx_mode (struct net_device *dev); 637static void __set_rx_mode (struct net_device *dev);
638static void rtl8139_hw_start (struct net_device *dev); 638static void rtl8139_hw_start (struct net_device *dev);
639static void rtl8139_thread (void *_data); 639static void rtl8139_thread (struct work_struct *work);
640static void rtl8139_tx_timeout_task(void *_data); 640static void rtl8139_tx_timeout_task(struct work_struct *work);
641static const struct ethtool_ops rtl8139_ethtool_ops; 641static const struct ethtool_ops rtl8139_ethtool_ops;
642 642
643/* write MMIO register, with flush */ 643/* write MMIO register, with flush */
@@ -1010,7 +1010,7 @@ static int __devinit rtl8139_init_one (struct pci_dev *pdev,
1010 (debug < 0 ? RTL8139_DEF_MSG_ENABLE : ((1 << debug) - 1)); 1010 (debug < 0 ? RTL8139_DEF_MSG_ENABLE : ((1 << debug) - 1));
1011 spin_lock_init (&tp->lock); 1011 spin_lock_init (&tp->lock);
1012 spin_lock_init (&tp->rx_lock); 1012 spin_lock_init (&tp->rx_lock);
1013 INIT_WORK(&tp->thread, rtl8139_thread, dev); 1013 INIT_DELAYED_WORK(&tp->thread, rtl8139_thread);
1014 tp->mii.dev = dev; 1014 tp->mii.dev = dev;
1015 tp->mii.mdio_read = mdio_read; 1015 tp->mii.mdio_read = mdio_read;
1016 tp->mii.mdio_write = mdio_write; 1016 tp->mii.mdio_write = mdio_write;
@@ -1596,15 +1596,16 @@ static inline void rtl8139_thread_iter (struct net_device *dev,
1596 RTL_R8 (Config1)); 1596 RTL_R8 (Config1));
1597} 1597}
1598 1598
1599static void rtl8139_thread (void *_data) 1599static void rtl8139_thread (struct work_struct *work)
1600{ 1600{
1601 struct net_device *dev = _data; 1601 struct rtl8139_private *tp =
1602 struct rtl8139_private *tp = netdev_priv(dev); 1602 container_of(work, struct rtl8139_private, thread.work);
1603 struct net_device *dev = tp->mii.dev;
1603 unsigned long thr_delay = next_tick; 1604 unsigned long thr_delay = next_tick;
1604 1605
1605 if (tp->watchdog_fired) { 1606 if (tp->watchdog_fired) {
1606 tp->watchdog_fired = 0; 1607 tp->watchdog_fired = 0;
1607 rtl8139_tx_timeout_task(_data); 1608 rtl8139_tx_timeout_task(work);
1608 } else if (rtnl_trylock()) { 1609 } else if (rtnl_trylock()) {
1609 rtl8139_thread_iter (dev, tp, tp->mmio_addr); 1610 rtl8139_thread_iter (dev, tp, tp->mmio_addr);
1610 rtnl_unlock (); 1611 rtnl_unlock ();
@@ -1646,10 +1647,11 @@ static inline void rtl8139_tx_clear (struct rtl8139_private *tp)
1646 /* XXX account for unsent Tx packets in tp->stats.tx_dropped */ 1647 /* XXX account for unsent Tx packets in tp->stats.tx_dropped */
1647} 1648}
1648 1649
1649static void rtl8139_tx_timeout_task (void *_data) 1650static void rtl8139_tx_timeout_task (struct work_struct *work)
1650{ 1651{
1651 struct net_device *dev = _data; 1652 struct rtl8139_private *tp =
1652 struct rtl8139_private *tp = netdev_priv(dev); 1653 container_of(work, struct rtl8139_private, thread.work);
1654 struct net_device *dev = tp->mii.dev;
1653 void __iomem *ioaddr = tp->mmio_addr; 1655 void __iomem *ioaddr = tp->mmio_addr;
1654 int i; 1656 int i;
1655 u8 tmp8; 1657 u8 tmp8;
@@ -1695,7 +1697,7 @@ static void rtl8139_tx_timeout (struct net_device *dev)
1695 struct rtl8139_private *tp = netdev_priv(dev); 1697 struct rtl8139_private *tp = netdev_priv(dev);
1696 1698
1697 if (!tp->have_thread) { 1699 if (!tp->have_thread) {
1698 INIT_WORK(&tp->thread, rtl8139_tx_timeout_task, dev); 1700 INIT_DELAYED_WORK(&tp->thread, rtl8139_tx_timeout_task);
1699 schedule_delayed_work(&tp->thread, next_tick); 1701 schedule_delayed_work(&tp->thread, next_tick);
1700 } else 1702 } else
1701 tp->watchdog_fired = 1; 1703 tp->watchdog_fired = 1;