diff options
author | Nishanth Aravamudan <nacc@us.ibm.com> | 2005-06-20 23:53:40 +0200 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-06-26 23:48:38 -0400 |
commit | 4f2ad81104a18946c64215adffce50c2a659fddd (patch) | |
tree | 64e11d55cfc41222edab10189fbf0bd8d352f113 /drivers/net/tokenring | |
parent | f17697a37ccd2128f37250d2e7715c59931dc458 (diff) | |
download | blackbird-op-linux-4f2ad81104a18946c64215adffce50c2a659fddd.tar.gz blackbird-op-linux-4f2ad81104a18946c64215adffce50c2a659fddd.zip |
[PATCH] net/lanstreamer: replace schedule_timeout() with ssleep()/msleep_interruptible()
Use ssleep() / msleep_interruptible() [as appropriate]
instead of schedule_timeout() to guarantee the task delays as expected.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Maximilian Attems <janitor@sternwelten.at>
Signed-off-by: Domen Puncer <domen@coderock.org>
Diffstat (limited to 'drivers/net/tokenring')
-rw-r--r-- | drivers/net/tokenring/lanstreamer.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/tokenring/lanstreamer.c b/drivers/net/tokenring/lanstreamer.c index 6e5ade99a38f..97712c3c4e07 100644 --- a/drivers/net/tokenring/lanstreamer.c +++ b/drivers/net/tokenring/lanstreamer.c @@ -455,8 +455,7 @@ static int streamer_reset(struct net_device *dev) writew(readw(streamer_mmio + BCTL) | BCTL_SOFTRESET, streamer_mmio + BCTL); t = jiffies; /* Hold soft reset bit for a while */ - current->state = TASK_UNINTERRUPTIBLE; - schedule_timeout(HZ); + ssleep(1); writew(readw(streamer_mmio + BCTL) & ~BCTL_SOFTRESET, streamer_mmio + BCTL); @@ -512,8 +511,7 @@ static int streamer_reset(struct net_device *dev) writew(SISR_MI, streamer_mmio + SISR_MASK_SUM); while (!((readw(streamer_mmio + SISR)) & SISR_SRB_REPLY)) { - current->state = TASK_INTERRUPTIBLE; - schedule_timeout(HZ/10); + msleep_interruptible(100); if (jiffies - t > 40 * HZ) { printk(KERN_ERR "IBM PCI tokenring card not responding\n"); |