Commit 3173c890 authored by Nishanth Aravamudan's avatar Nishanth Aravamudan Committed by Jeff Garzik

[PATCH] drivers/net: fix-up schedule_timeout() usage

Use schedule_timeout_interruptible() instead of
set_current_state()/schedule_timeout() to reduce kernel size.
Signed-off-by: default avatarNishanth Aravamudan <nacc@us.ibm.com>
Cc: Jeff Garzik <jgarzik@pobox.com>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarJeff Garzik <jgarzik@pobox.com>
parent 343c686c
...@@ -1029,8 +1029,7 @@ static void cp_reset_hw (struct cp_private *cp) ...@@ -1029,8 +1029,7 @@ static void cp_reset_hw (struct cp_private *cp)
if (!(cpr8(Cmd) & CmdReset)) if (!(cpr8(Cmd) & CmdReset))
return; return;
set_current_state(TASK_UNINTERRUPTIBLE); schedule_timeout_uninterruptible(10);
schedule_timeout(10);
} }
printk(KERN_ERR "%s: hardware reset timeout\n", cp->dev->name); printk(KERN_ERR "%s: hardware reset timeout\n", cp->dev->name);
......
...@@ -2517,10 +2517,8 @@ static int hp100_down_vg_link(struct net_device *dev) ...@@ -2517,10 +2517,8 @@ static int hp100_down_vg_link(struct net_device *dev)
do { do {
if (hp100_inb(VG_LAN_CFG_1) & HP100_LINK_CABLE_ST) if (hp100_inb(VG_LAN_CFG_1) & HP100_LINK_CABLE_ST)
break; break;
if (!in_interrupt()) { if (!in_interrupt())
set_current_state(TASK_INTERRUPTIBLE); schedule_timeout_interruptible(1);
schedule_timeout(1);
}
} while (time_after(time, jiffies)); } while (time_after(time, jiffies));
if (time_after_eq(jiffies, time)) /* no signal->no logout */ if (time_after_eq(jiffies, time)) /* no signal->no logout */
...@@ -2536,10 +2534,8 @@ static int hp100_down_vg_link(struct net_device *dev) ...@@ -2536,10 +2534,8 @@ static int hp100_down_vg_link(struct net_device *dev)
do { do {
if (!(hp100_inb(VG_LAN_CFG_1) & HP100_LINK_UP_ST)) if (!(hp100_inb(VG_LAN_CFG_1) & HP100_LINK_UP_ST))
break; break;
if (!in_interrupt()) { if (!in_interrupt())
set_current_state(TASK_INTERRUPTIBLE); schedule_timeout_interruptible(1);
schedule_timeout(1);
}
} while (time_after(time, jiffies)); } while (time_after(time, jiffies));
#ifdef HP100_DEBUG #ifdef HP100_DEBUG
...@@ -2577,10 +2573,8 @@ static int hp100_down_vg_link(struct net_device *dev) ...@@ -2577,10 +2573,8 @@ static int hp100_down_vg_link(struct net_device *dev)
do { do {
if (!(hp100_inb(MAC_CFG_4) & HP100_MAC_SEL_ST)) if (!(hp100_inb(MAC_CFG_4) & HP100_MAC_SEL_ST))
break; break;
if (!in_interrupt()) { if (!in_interrupt())
set_current_state(TASK_INTERRUPTIBLE); schedule_timeout_interruptible(1);
schedule_timeout(1);
}
} while (time_after(time, jiffies)); } while (time_after(time, jiffies));
hp100_orb(HP100_AUTO_MODE, MAC_CFG_3); /* Autosel back on */ hp100_orb(HP100_AUTO_MODE, MAC_CFG_3); /* Autosel back on */
...@@ -2591,10 +2585,8 @@ static int hp100_down_vg_link(struct net_device *dev) ...@@ -2591,10 +2585,8 @@ static int hp100_down_vg_link(struct net_device *dev)
do { do {
if ((hp100_inb(VG_LAN_CFG_1) & HP100_LINK_CABLE_ST) == 0) if ((hp100_inb(VG_LAN_CFG_1) & HP100_LINK_CABLE_ST) == 0)
break; break;
if (!in_interrupt()) { if (!in_interrupt())
set_current_state(TASK_INTERRUPTIBLE); schedule_timeout_interruptible(1);
schedule_timeout(1);
}
} while (time_after(time, jiffies)); } while (time_after(time, jiffies));
if (time_before_eq(time, jiffies)) { if (time_before_eq(time, jiffies)) {
...@@ -2606,10 +2598,8 @@ static int hp100_down_vg_link(struct net_device *dev) ...@@ -2606,10 +2598,8 @@ static int hp100_down_vg_link(struct net_device *dev)
time = jiffies + (2 * HZ); /* This seems to take a while.... */ time = jiffies + (2 * HZ); /* This seems to take a while.... */
do { do {
if (!in_interrupt()) { if (!in_interrupt())
set_current_state(TASK_INTERRUPTIBLE); schedule_timeout_interruptible(1);
schedule_timeout(1);
}
} while (time_after(time, jiffies)); } while (time_after(time, jiffies));
return 0; return 0;
...@@ -2659,10 +2649,8 @@ static int hp100_login_to_vg_hub(struct net_device *dev, u_short force_relogin) ...@@ -2659,10 +2649,8 @@ static int hp100_login_to_vg_hub(struct net_device *dev, u_short force_relogin)
do { do {
if (~(hp100_inb(VG_LAN_CFG_1) & HP100_LINK_UP_ST)) if (~(hp100_inb(VG_LAN_CFG_1) & HP100_LINK_UP_ST))
break; break;
if (!in_interrupt()) { if (!in_interrupt())
set_current_state(TASK_INTERRUPTIBLE); schedule_timeout_interruptible(1);
schedule_timeout(1);
}
} while (time_after(time, jiffies)); } while (time_after(time, jiffies));
/* Start an addressed training and optionally request promiscuous port */ /* Start an addressed training and optionally request promiscuous port */
...@@ -2697,10 +2685,8 @@ static int hp100_login_to_vg_hub(struct net_device *dev, u_short force_relogin) ...@@ -2697,10 +2685,8 @@ static int hp100_login_to_vg_hub(struct net_device *dev, u_short force_relogin)
do { do {
if (hp100_inb(VG_LAN_CFG_1) & HP100_LINK_CABLE_ST) if (hp100_inb(VG_LAN_CFG_1) & HP100_LINK_CABLE_ST)
break; break;
if (!in_interrupt()) { if (!in_interrupt())
set_current_state(TASK_INTERRUPTIBLE); schedule_timeout_interruptible(1);
schedule_timeout(1);
}
} while (time_before(jiffies, time)); } while (time_before(jiffies, time));
if (time_after_eq(jiffies, time)) { if (time_after_eq(jiffies, time)) {
...@@ -2723,10 +2709,8 @@ static int hp100_login_to_vg_hub(struct net_device *dev, u_short force_relogin) ...@@ -2723,10 +2709,8 @@ static int hp100_login_to_vg_hub(struct net_device *dev, u_short force_relogin)
#endif #endif
break; break;
} }
if (!in_interrupt()) { if (!in_interrupt())
set_current_state(TASK_INTERRUPTIBLE); schedule_timeout_interruptible(1);
schedule_timeout(1);
}
} while (time_after(time, jiffies)); } while (time_after(time, jiffies));
} }
......
...@@ -678,10 +678,9 @@ static void turnaround_delay(const struct stir_cb *stir, long us) ...@@ -678,10 +678,9 @@ static void turnaround_delay(const struct stir_cb *stir, long us)
return; return;
ticks = us / (1000000 / HZ); ticks = us / (1000000 / HZ);
if (ticks > 0) { if (ticks > 0)
current->state = TASK_INTERRUPTIBLE; schedule_timeout_interruptible(1 + ticks);
schedule_timeout(1 + ticks); else
} else
udelay(us); udelay(us);
} }
......
...@@ -645,11 +645,10 @@ ixgb_phys_id(struct net_device *netdev, uint32_t data) ...@@ -645,11 +645,10 @@ ixgb_phys_id(struct net_device *netdev, uint32_t data)
mod_timer(&adapter->blink_timer, jiffies); mod_timer(&adapter->blink_timer, jiffies);
set_current_state(TASK_INTERRUPTIBLE); if (data)
if(data) schedule_timeout_interruptible(data * HZ);
schedule_timeout(data * HZ);
else else
schedule_timeout(MAX_SCHEDULE_TIMEOUT); schedule_timeout_interruptible(MAX_SCHEDULE_TIMEOUT);
del_timer_sync(&adapter->blink_timer); del_timer_sync(&adapter->blink_timer);
ixgb_led_off(&adapter->hw); ixgb_led_off(&adapter->hw);
......
...@@ -1632,8 +1632,7 @@ static void ns83820_run_bist(struct net_device *ndev, const char *name, u32 enab ...@@ -1632,8 +1632,7 @@ static void ns83820_run_bist(struct net_device *ndev, const char *name, u32 enab
timed_out = 1; timed_out = 1;
break; break;
} }
set_current_state(TASK_UNINTERRUPTIBLE); schedule_timeout_uninterruptible(1);
schedule_timeout(1);
} }
if (status & fail) if (status & fail)
......
...@@ -318,7 +318,7 @@ static void ibmtr_cleanup_card(struct net_device *dev) ...@@ -318,7 +318,7 @@ static void ibmtr_cleanup_card(struct net_device *dev)
if (dev->base_addr) { if (dev->base_addr) {
outb(0,dev->base_addr+ADAPTRESET); outb(0,dev->base_addr+ADAPTRESET);
schedule_timeout(TR_RST_TIME); /* wait 50ms */ schedule_timeout_uninterruptible(TR_RST_TIME); /* wait 50ms */
outb(0,dev->base_addr+ADAPTRESETREL); outb(0,dev->base_addr+ADAPTRESETREL);
} }
...@@ -859,8 +859,7 @@ static int tok_init_card(struct net_device *dev) ...@@ -859,8 +859,7 @@ static int tok_init_card(struct net_device *dev)
writeb(~INT_ENABLE, ti->mmio + ACA_OFFSET + ACA_RESET + ISRP_EVEN); writeb(~INT_ENABLE, ti->mmio + ACA_OFFSET + ACA_RESET + ISRP_EVEN);
outb(0, PIOaddr + ADAPTRESET); outb(0, PIOaddr + ADAPTRESET);
current->state=TASK_UNINTERRUPTIBLE; schedule_timeout_uninterruptible(TR_RST_TIME); /* wait 50ms */
schedule_timeout(TR_RST_TIME); /* wait 50ms */
outb(0, PIOaddr + ADAPTRESETREL); outb(0, PIOaddr + ADAPTRESETREL);
#ifdef ENABLE_PAGING #ifdef ENABLE_PAGING
...@@ -908,8 +907,8 @@ static int tok_open(struct net_device *dev) ...@@ -908,8 +907,8 @@ static int tok_open(struct net_device *dev)
DPRINTK("Adapter is up and running\n"); DPRINTK("Adapter is up and running\n");
return 0; return 0;
} }
current->state=TASK_INTERRUPTIBLE; i=schedule_timeout_interruptible(TR_RETRY_INTERVAL);
i=schedule_timeout(TR_RETRY_INTERVAL); /* wait 30 seconds */ /* wait 30 seconds */
if(i!=0) break; /*prob. a signal, like the i>24*HZ case above */ if(i!=0) break; /*prob. a signal, like the i>24*HZ case above */
} }
outb(0, dev->base_addr + ADAPTRESET);/* kill pending interrupts*/ outb(0, dev->base_addr + ADAPTRESET);/* kill pending interrupts*/
......
...@@ -1101,7 +1101,7 @@ static int olympic_close(struct net_device *dev) ...@@ -1101,7 +1101,7 @@ static int olympic_close(struct net_device *dev)
while(olympic_priv->srb_queued) { while(olympic_priv->srb_queued) {
t = schedule_timeout(60*HZ); t = schedule_timeout_interruptible(60*HZ);
if(signal_pending(current)) { if(signal_pending(current)) {
printk(KERN_WARNING "%s: SRB timed out.\n",dev->name); printk(KERN_WARNING "%s: SRB timed out.\n",dev->name);
......
...@@ -1243,8 +1243,7 @@ void tms380tr_wait(unsigned long time) ...@@ -1243,8 +1243,7 @@ void tms380tr_wait(unsigned long time)
tmp = jiffies + time/(1000000/HZ); tmp = jiffies + time/(1000000/HZ);
do { do {
current->state = TASK_INTERRUPTIBLE; tmp = schedule_timeout_interruptible(tmp);
tmp = schedule_timeout(tmp);
} while(time_after(tmp, jiffies)); } while(time_after(tmp, jiffies));
#else #else
udelay(time); udelay(time);
......
...@@ -419,10 +419,9 @@ typhoon_reset(void __iomem *ioaddr, int wait_type) ...@@ -419,10 +419,9 @@ typhoon_reset(void __iomem *ioaddr, int wait_type)
TYPHOON_STATUS_WAITING_FOR_HOST) TYPHOON_STATUS_WAITING_FOR_HOST)
goto out; goto out;
if(wait_type == WaitSleep) { if(wait_type == WaitSleep)
set_current_state(TASK_UNINTERRUPTIBLE); schedule_timeout_uninterruptible(1);
schedule_timeout(1); else
} else
udelay(TYPHOON_UDELAY); udelay(TYPHOON_UDELAY);
} }
......
...@@ -1617,8 +1617,7 @@ static int get_wait_data(struct cosa_data *cosa) ...@@ -1617,8 +1617,7 @@ static int get_wait_data(struct cosa_data *cosa)
return r; return r;
} }
/* sleep if not ready to read */ /* sleep if not ready to read */
set_current_state(TASK_INTERRUPTIBLE); schedule_timeout_interruptible(1);
schedule_timeout(1);
} }
printk(KERN_INFO "cosa: timeout in get_wait_data (status 0x%x)\n", printk(KERN_INFO "cosa: timeout in get_wait_data (status 0x%x)\n",
cosa_getstatus(cosa)); cosa_getstatus(cosa));
...@@ -1644,8 +1643,7 @@ static int put_wait_data(struct cosa_data *cosa, int data) ...@@ -1644,8 +1643,7 @@ static int put_wait_data(struct cosa_data *cosa, int data)
} }
#if 0 #if 0
/* sleep if not ready to read */ /* sleep if not ready to read */
current->state = TASK_INTERRUPTIBLE; schedule_timeout_interruptible(1);
schedule_timeout(1);
#endif #endif
} }
printk(KERN_INFO "cosa%d: timeout in put_wait_data (status 0x%x)\n", printk(KERN_INFO "cosa%d: timeout in put_wait_data (status 0x%x)\n",
......
...@@ -542,8 +542,7 @@ static int dscc4_wait_ack_cec(struct dscc4_dev_priv *dpriv, ...@@ -542,8 +542,7 @@ static int dscc4_wait_ack_cec(struct dscc4_dev_priv *dpriv,
msg, i); msg, i);
goto done; goto done;
} }
set_current_state(TASK_UNINTERRUPTIBLE); schedule_timeout_uninterruptible(10);
schedule_timeout(10);
rmb(); rmb();
} while (++i > 0); } while (++i > 0);
printk(KERN_ERR "%s: %s timeout\n", dev->name, msg); printk(KERN_ERR "%s: %s timeout\n", dev->name, msg);
...@@ -588,8 +587,7 @@ static inline int dscc4_xpr_ack(struct dscc4_dev_priv *dpriv) ...@@ -588,8 +587,7 @@ static inline int dscc4_xpr_ack(struct dscc4_dev_priv *dpriv)
(dpriv->iqtx[cur] & Xpr)) (dpriv->iqtx[cur] & Xpr))
break; break;
smp_rmb(); smp_rmb();
set_current_state(TASK_UNINTERRUPTIBLE); schedule_timeout_uninterruptible(10);
schedule_timeout(10);
} while (++i > 0); } while (++i > 0);
return (i >= 0 ) ? i : -EAGAIN; return (i >= 0 ) ? i : -EAGAIN;
...@@ -1035,8 +1033,7 @@ static void dscc4_pci_reset(struct pci_dev *pdev, void __iomem *ioaddr) ...@@ -1035,8 +1033,7 @@ static void dscc4_pci_reset(struct pci_dev *pdev, void __iomem *ioaddr)
/* Flush posted writes */ /* Flush posted writes */
readl(ioaddr + GSTAR); readl(ioaddr + GSTAR);
set_current_state(TASK_UNINTERRUPTIBLE); schedule_timeout_uninterruptible(10);
schedule_timeout(10);
for (i = 0; i < 16; i++) for (i = 0; i < 16; i++)
pci_write_config_dword(pdev, i << 2, dscc4_pci_config_store[i]); pci_write_config_dword(pdev, i << 2, dscc4_pci_config_store[i]);
......
...@@ -980,8 +980,7 @@ fst_issue_cmd(struct fst_port_info *port, unsigned short cmd) ...@@ -980,8 +980,7 @@ fst_issue_cmd(struct fst_port_info *port, unsigned short cmd)
/* Wait for any previous command to complete */ /* Wait for any previous command to complete */
while (mbval > NAK) { while (mbval > NAK) {
spin_unlock_irqrestore(&card->card_lock, flags); spin_unlock_irqrestore(&card->card_lock, flags);
set_current_state(TASK_UNINTERRUPTIBLE); schedule_timeout_uninterruptible(1);
schedule_timeout(1);
spin_lock_irqsave(&card->card_lock, flags); spin_lock_irqsave(&card->card_lock, flags);
if (++safety > 2000) { if (++safety > 2000) {
......
...@@ -800,8 +800,7 @@ static int ipw2100_hw_send_command(struct ipw2100_priv *priv, ...@@ -800,8 +800,7 @@ static int ipw2100_hw_send_command(struct ipw2100_priv *priv,
* doesn't seem to have as many firmware restart cycles... * doesn't seem to have as many firmware restart cycles...
* *
* As a test, we're sticking in a 1/100s delay here */ * As a test, we're sticking in a 1/100s delay here */
set_current_state(TASK_UNINTERRUPTIBLE); schedule_timeout_uninterruptible(msecs_to_jiffies(10));
schedule_timeout(HZ / 100);
return 0; return 0;
...@@ -1256,8 +1255,7 @@ static int ipw2100_start_adapter(struct ipw2100_priv *priv) ...@@ -1256,8 +1255,7 @@ static int ipw2100_start_adapter(struct ipw2100_priv *priv)
IPW_DEBUG_FW("Waiting for f/w initialization to complete...\n"); IPW_DEBUG_FW("Waiting for f/w initialization to complete...\n");
i = 5000; i = 5000;
do { do {
set_current_state(TASK_UNINTERRUPTIBLE); schedule_timeout_uninterruptible(msecs_to_jiffies(40));
schedule_timeout(40 * HZ / 1000);
/* Todo... wait for sync command ... */ /* Todo... wait for sync command ... */
read_register(priv->net_dev, IPW_REG_INTA, &inta); read_register(priv->net_dev, IPW_REG_INTA, &inta);
...@@ -1411,8 +1409,7 @@ static int ipw2100_hw_phy_off(struct ipw2100_priv *priv) ...@@ -1411,8 +1409,7 @@ static int ipw2100_hw_phy_off(struct ipw2100_priv *priv)
(val2 & IPW2100_COMMAND_PHY_OFF)) (val2 & IPW2100_COMMAND_PHY_OFF))
return 0; return 0;
set_current_state(TASK_UNINTERRUPTIBLE); schedule_timeout_uninterruptible(HW_PHY_OFF_LOOP_DELAY);
schedule_timeout(HW_PHY_OFF_LOOP_DELAY);
} }
return -EIO; return -EIO;
...@@ -1466,7 +1463,7 @@ fail_up: ...@@ -1466,7 +1463,7 @@ fail_up:
static int ipw2100_hw_stop_adapter(struct ipw2100_priv *priv) static int ipw2100_hw_stop_adapter(struct ipw2100_priv *priv)
{ {
#define HW_POWER_DOWN_DELAY (HZ / 10) #define HW_POWER_DOWN_DELAY (msecs_to_jiffies(100))
struct host_command cmd = { struct host_command cmd = {
.host_command = HOST_PRE_POWER_DOWN, .host_command = HOST_PRE_POWER_DOWN,
...@@ -1520,10 +1517,8 @@ static int ipw2100_hw_stop_adapter(struct ipw2100_priv *priv) ...@@ -1520,10 +1517,8 @@ static int ipw2100_hw_stop_adapter(struct ipw2100_priv *priv)
printk(KERN_WARNING DRV_NAME ": " printk(KERN_WARNING DRV_NAME ": "
"%s: Power down command failed: Error %d\n", "%s: Power down command failed: Error %d\n",
priv->net_dev->name, err); priv->net_dev->name, err);
else { else
set_current_state(TASK_UNINTERRUPTIBLE); schedule_timeout_uninterruptible(HW_POWER_DOWN_DELAY);
schedule_timeout(HW_POWER_DOWN_DELAY);
}
} }
priv->status &= ~STATUS_ENABLED; priv->status &= ~STATUS_ENABLED;
......
...@@ -439,8 +439,7 @@ prism54_bring_down(islpci_private *priv) ...@@ -439,8 +439,7 @@ prism54_bring_down(islpci_private *priv)
wmb(); wmb();
/* wait a while for the device to reset */ /* wait a while for the device to reset */
set_current_state(TASK_UNINTERRUPTIBLE); schedule_timeout_uninterruptible(msecs_to_jiffies(50));
schedule_timeout(50*HZ/1000);
return 0; return 0;
} }
...@@ -491,8 +490,7 @@ islpci_reset_if(islpci_private *priv) ...@@ -491,8 +490,7 @@ islpci_reset_if(islpci_private *priv)
/* The software reset acknowledge needs about 220 msec here. /* The software reset acknowledge needs about 220 msec here.
* Be conservative and wait for up to one second. */ * Be conservative and wait for up to one second. */
set_current_state(TASK_UNINTERRUPTIBLE); remaining = schedule_timeout_uninterruptible(HZ);
remaining = schedule_timeout(HZ);
if(remaining > 0) { if(remaining > 0) {
result = 0; result = 0;
......
...@@ -455,7 +455,7 @@ islpci_mgt_transaction(struct net_device *ndev, ...@@ -455,7 +455,7 @@ islpci_mgt_transaction(struct net_device *ndev,
struct islpci_mgmtframe **recvframe) struct islpci_mgmtframe **recvframe)
{ {
islpci_private *priv = netdev_priv(ndev); islpci_private *priv = netdev_priv(ndev);
const long wait_cycle_jiffies = (ISL38XX_WAIT_CYCLE * 10 * HZ) / 1000; const long wait_cycle_jiffies = msecs_to_jiffies(ISL38XX_WAIT_CYCLE * 10);
long timeout_left = ISL38XX_MAX_WAIT_CYCLES * wait_cycle_jiffies; long timeout_left = ISL38XX_MAX_WAIT_CYCLES * wait_cycle_jiffies;
int err; int err;
DEFINE_WAIT(wait); DEFINE_WAIT(wait);
...@@ -475,8 +475,7 @@ islpci_mgt_transaction(struct net_device *ndev, ...@@ -475,8 +475,7 @@ islpci_mgt_transaction(struct net_device *ndev,
int timeleft; int timeleft;
struct islpci_mgmtframe *frame; struct islpci_mgmtframe *frame;
set_current_state(TASK_UNINTERRUPTIBLE); timeleft = schedule_timeout_uninterruptible(wait_cycle_jiffies);
timeleft = schedule_timeout(wait_cycle_jiffies);
frame = xchg(&priv->mgmt_received, NULL); frame = xchg(&priv->mgmt_received, NULL);
if (frame) { if (frame) {
if (frame->header->oid == oid) { if (frame->header->oid == oid) {
......
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
/* ported to the Alpha architecture 02/20/96 (just used the HZ macro) */ /* ported to the Alpha architecture 02/20/96 (just used the HZ macro) */
#define TR_RETRY_INTERVAL (30*HZ) /* 500 on PC = 5 s */ #define TR_RETRY_INTERVAL (30*HZ) /* 500 on PC = 5 s */
#define TR_RST_TIME (HZ/20) /* 5 on PC = 50 ms */ #define TR_RST_TIME (msecs_to_jiffies(50)) /* 5 on PC = 50 ms */
#define TR_BUSY_INTERVAL (HZ/5) /* 5 on PC = 200 ms */ #define TR_BUSY_INTERVAL (msecs_to_jiffies(200)) /* 5 on PC = 200 ms */
#define TR_SPIN_INTERVAL (3*HZ) /* 3 seconds before init timeout */ #define TR_SPIN_INTERVAL (3*HZ) /* 3 seconds before init timeout */
#define TR_ISA 1 #define TR_ISA 1
......
...@@ -852,11 +852,9 @@ static inline void netif_rx_complete(struct net_device *dev) ...@@ -852,11 +852,9 @@ static inline void netif_rx_complete(struct net_device *dev)
static inline void netif_poll_disable(struct net_device *dev) static inline void netif_poll_disable(struct net_device *dev)
{ {
while (test_and_set_bit(__LINK_STATE_RX_SCHED, &dev->state)) { while (test_and_set_bit(__LINK_STATE_RX_SCHED, &dev->state))
/* No hurry. */ /* No hurry. */
current->state = TASK_INTERRUPTIBLE; schedule_timeout_interruptible(1);
schedule_timeout(1);
}
} }
static inline void netif_poll_enable(struct net_device *dev) static inline void netif_poll_enable(struct net_device *dev)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment