* [PATCH][ATM]: [drivers] use msleep() instead of schedule_timeout() (from Nishanth Aravamudan <nacc@us.ibm.com>)
@ 2004-09-21 20:29 chas williams (contractor)
2004-09-21 22:18 ` David S. Miller
2004-09-23 16:07 ` Nishanth Aravamudan
0 siblings, 2 replies; 5+ messages in thread
From: chas williams (contractor) @ 2004-09-21 20:29 UTC (permalink / raw)
To: netdev; +Cc: davem, Nishanth Aravamudan, kernel-janitors
dave,
this patch (from nacc@us.ibm.com) replaces assorted schedule_timeout()'s
with msleep()'s. please apply to 2.6.
thanks!
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2004/09/17 20:30:30-04:00 chas@relax.cmf.nrl.navy.mil
# [ATM]: [drivers] use msleep() instead of schedule_timeout() (from Nishanth Aravamudan <nacc@us.ibm.com>)
#
diff -Nru a/drivers/atm/firestream.c b/drivers/atm/firestream.c
--- a/drivers/atm/firestream.c 2004-09-21 12:48:17 -04:00
+++ b/drivers/atm/firestream.c 2004-09-21 12:48:17 -04:00
@@ -1704,8 +1704,7 @@
}
/* Try again after 10ms. */
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout ((HZ+99)/100);
+ msleep(10);
}
if (!to) {
diff -Nru a/drivers/atm/he.c b/drivers/atm/he.c
--- a/drivers/atm/he.c 2004-09-21 12:48:17 -04:00
+++ b/drivers/atm/he.c 2004-09-21 12:48:17 -04:00
@@ -2596,9 +2596,8 @@
while (((tx_inuse = atomic_read(&vcc->sk->sk_wmem_alloc)) > 0) &&
(retry < MAX_RETRY)) {
- set_current_state(TASK_UNINTERRUPTIBLE);
- (void) schedule_timeout(sleep);
- if (sleep < HZ)
+ msleep(sleep);
+ if (sleep < 250)
sleep = sleep * 2;
++retry;
diff -Nru a/drivers/atm/idt77252.c b/drivers/atm/idt77252.c
--- a/drivers/atm/idt77252.c 2004-09-21 12:48:17 -04:00
+++ b/drivers/atm/idt77252.c 2004-09-21 12:48:17 -04:00
@@ -2516,7 +2516,7 @@
struct vc_map *vc = vcc->dev_data;
unsigned long flags;
unsigned long addr;
- int timeout;
+ unsigned long timeout;
down(&card->mutex);
@@ -2566,9 +2566,9 @@
}
spin_unlock_irqrestore(&vc->lock, flags);
- timeout = 5 * HZ;
+ timeout = 5 * 1000;
while (atomic_read(&vc->scq->used) > 0) {
- timeout = schedule_timeout(timeout);
+ timeout = msleep_interruptible(timeout);
if (!timeout)
break;
}
diff -Nru a/drivers/atm/lanai.c b/drivers/atm/lanai.c
--- a/drivers/atm/lanai.c 2004-09-21 12:48:17 -04:00
+++ b/drivers/atm/lanai.c 2004-09-21 12:48:17 -04:00
@@ -813,7 +813,7 @@
DPRINTK("read, write = %d, %d\n", read, write);
break;
}
- schedule_timeout(HZ / 25);
+ msleep(4);
}
/* 15.2.2 - clear out all tx registers */
cardvcc_write(lvcc, 0, vcc_txreadptr);
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH][ATM]: [drivers] use msleep() instead of schedule_timeout() (from Nishanth Aravamudan <nacc@us.ibm.com>)
2004-09-21 20:29 [PATCH][ATM]: [drivers] use msleep() instead of schedule_timeout() (from Nishanth Aravamudan <nacc@us.ibm.com>) chas williams (contractor)
@ 2004-09-21 22:18 ` David S. Miller
2004-09-23 16:07 ` Nishanth Aravamudan
1 sibling, 0 replies; 5+ messages in thread
From: David S. Miller @ 2004-09-21 22:18 UTC (permalink / raw)
To: chas3; +Cc: chas, netdev, davem, nacc, kernel-janitors
On Tue, 21 Sep 2004 16:29:19 -0400
"chas williams (contractor)" <chas@cmf.nrl.navy.mil> wrote:
> this patch (from nacc@us.ibm.com) replaces assorted schedule_timeout()'s
> with msleep()'s. please apply to 2.6.
Applied, thanks Chas and Nishanth.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH][ATM]: [drivers] use msleep() instead of schedule_timeout() (from Nishanth Aravamudan <nacc@us.ibm.com>)
2004-09-21 20:29 [PATCH][ATM]: [drivers] use msleep() instead of schedule_timeout() (from Nishanth Aravamudan <nacc@us.ibm.com>) chas williams (contractor)
2004-09-21 22:18 ` David S. Miller
@ 2004-09-23 16:07 ` Nishanth Aravamudan
2004-09-23 16:26 ` chas williams (contractor)
1 sibling, 1 reply; 5+ messages in thread
From: Nishanth Aravamudan @ 2004-09-23 16:07 UTC (permalink / raw)
To: chas3; +Cc: netdev, davem, kernel-janitors
On Tue, Sep 21, 2004 at 04:29:19PM -0400, chas williams (contractor) wrote:
<snip>
> diff -Nru a/drivers/atm/lanai.c b/drivers/atm/lanai.c
> --- a/drivers/atm/lanai.c 2004-09-21 12:48:17 -04:00
> +++ b/drivers/atm/lanai.c 2004-09-21 12:48:17 -04:00
> @@ -813,7 +813,7 @@
> DPRINTK("read, write = %d, %d\n", read, write);
> break;
> }
> - schedule_timeout(HZ / 25);
> + msleep(4);
Somehow this got changed for msleep(40); to msleep(4); !! :) The patch I
sent on 15 September had msleep(40); in it, at least. If you could make
the change in your bk, that would be great!
-Nish
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH][ATM]: [drivers] use msleep() instead of schedule_timeout() (from Nishanth Aravamudan <nacc@us.ibm.com>)
2004-09-23 16:07 ` Nishanth Aravamudan
@ 2004-09-23 16:26 ` chas williams (contractor)
2004-09-23 20:30 ` David S. Miller
0 siblings, 1 reply; 5+ messages in thread
From: chas williams (contractor) @ 2004-09-23 16:26 UTC (permalink / raw)
To: Nishanth Aravamudan; +Cc: netdev, davem, kernel-janitors
oops. sorry about that. dave, please apply the following patch.
thanks!
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2004/09/23 12:24:28-04:00 chas@relax.cmf.nrl.navy.mil
# [ATM]: [lanai] get sleep interval right
#
# drivers/atm/lanai.c
# 2004/09/23 12:24:12-04:00 chas@relax.cmf.nrl.navy.mil +1 -1
# [ATM]: [lanai] get sleep interval right
#
diff -Nru a/drivers/atm/lanai.c b/drivers/atm/lanai.c
--- a/drivers/atm/lanai.c 2004-09-23 12:25:36 -04:00
+++ b/drivers/atm/lanai.c 2004-09-23 12:25:36 -04:00
@@ -813,7 +813,7 @@
DPRINTK("read, write = %d, %d\n", read, write);
break;
}
- msleep(4);
+ msleep(40);
}
/* 15.2.2 - clear out all tx registers */
cardvcc_write(lvcc, 0, vcc_txreadptr);
In message <20040923160710.GB1699@us.ibm.com>,Nishanth Aravamudan writes:
>On Tue, Sep 21, 2004 at 04:29:19PM -0400, chas williams (contractor) wrote:
>
><snip>
>> diff -Nru a/drivers/atm/lanai.c b/drivers/atm/lanai.c
>> --- a/drivers/atm/lanai.c 2004-09-21 12:48:17 -04:00
>> +++ b/drivers/atm/lanai.c 2004-09-21 12:48:17 -04:00
>> @@ -813,7 +813,7 @@
>> DPRINTK("read, write = %d, %d\n", read, write);
>> break;
>> }
>> - schedule_timeout(HZ / 25);
>> + msleep(4);
>
>Somehow this got changed for msleep(40); to msleep(4); !! :) The patch I
>sent on 15 September had msleep(40); in it, at least. If you could make
>the change in your bk, that would be great!
>
>-Nish
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH][ATM]: [drivers] use msleep() instead of schedule_timeout() (from Nishanth Aravamudan <nacc@us.ibm.com>)
2004-09-23 16:26 ` chas williams (contractor)
@ 2004-09-23 20:30 ` David S. Miller
0 siblings, 0 replies; 5+ messages in thread
From: David S. Miller @ 2004-09-23 20:30 UTC (permalink / raw)
To: chas williams (contractor); +Cc: nacc, netdev, davem, kernel-janitors
On Thu, 23 Sep 2004 12:26:05 -0400
"chas williams (contractor)" <chas@cmf.nrl.navy.mil> wrote:
> # ChangeSet
> # 2004/09/23 12:24:28-04:00 chas@relax.cmf.nrl.navy.mil
> # [ATM]: [lanai] get sleep interval right
Applied, thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-09-23 20:30 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-21 20:29 [PATCH][ATM]: [drivers] use msleep() instead of schedule_timeout() (from Nishanth Aravamudan <nacc@us.ibm.com>) chas williams (contractor)
2004-09-21 22:18 ` David S. Miller
2004-09-23 16:07 ` Nishanth Aravamudan
2004-09-23 16:26 ` chas williams (contractor)
2004-09-23 20:30 ` David S. Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).