Commit d830cf18 authored by Chas Williams's avatar Chas Williams Committed by David S. Miller

[ATM]: [drivers] Use msleep() instead of schedule_timeout()

From Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6641c654
...@@ -1704,8 +1704,7 @@ static int __devinit fs_init (struct fs_dev *dev) ...@@ -1704,8 +1704,7 @@ static int __devinit fs_init (struct fs_dev *dev)
} }
/* Try again after 10ms. */ /* Try again after 10ms. */
set_current_state(TASK_UNINTERRUPTIBLE); msleep(10);
schedule_timeout ((HZ+99)/100);
} }
if (!to) { if (!to) {
......
...@@ -2596,9 +2596,8 @@ he_close(struct atm_vcc *vcc) ...@@ -2596,9 +2596,8 @@ he_close(struct atm_vcc *vcc)
while (((tx_inuse = atomic_read(&vcc->sk->sk_wmem_alloc)) > 0) && while (((tx_inuse = atomic_read(&vcc->sk->sk_wmem_alloc)) > 0) &&
(retry < MAX_RETRY)) { (retry < MAX_RETRY)) {
set_current_state(TASK_UNINTERRUPTIBLE); msleep(sleep);
(void) schedule_timeout(sleep); if (sleep < 250)
if (sleep < HZ)
sleep = sleep * 2; sleep = sleep * 2;
++retry; ++retry;
......
...@@ -2516,7 +2516,7 @@ idt77252_close(struct atm_vcc *vcc) ...@@ -2516,7 +2516,7 @@ idt77252_close(struct atm_vcc *vcc)
struct vc_map *vc = vcc->dev_data; struct vc_map *vc = vcc->dev_data;
unsigned long flags; unsigned long flags;
unsigned long addr; unsigned long addr;
int timeout; unsigned long timeout;
down(&card->mutex); down(&card->mutex);
...@@ -2566,9 +2566,9 @@ idt77252_close(struct atm_vcc *vcc) ...@@ -2566,9 +2566,9 @@ idt77252_close(struct atm_vcc *vcc)
} }
spin_unlock_irqrestore(&vc->lock, flags); spin_unlock_irqrestore(&vc->lock, flags);
timeout = 5 * HZ; timeout = 5 * 1000;
while (atomic_read(&vc->scq->used) > 0) { while (atomic_read(&vc->scq->used) > 0) {
timeout = schedule_timeout(timeout); timeout = msleep_interruptible(timeout);
if (!timeout) if (!timeout)
break; break;
} }
......
...@@ -813,7 +813,7 @@ static void lanai_shutdown_tx_vci(struct lanai_dev *lanai, ...@@ -813,7 +813,7 @@ static void lanai_shutdown_tx_vci(struct lanai_dev *lanai,
DPRINTK("read, write = %d, %d\n", read, write); DPRINTK("read, write = %d, %d\n", read, write);
break; break;
} }
schedule_timeout(HZ / 25); msleep(4);
} }
/* 15.2.2 - clear out all tx registers */ /* 15.2.2 - clear out all tx registers */
cardvcc_write(lvcc, 0, vcc_txreadptr); cardvcc_write(lvcc, 0, vcc_txreadptr);
......
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