netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 11/18]  net/pcnet32: replace  schedule_timeout() with msleep_interruptible()
@ 2004-10-30 22:42 janitor
  2004-10-31 11:05 ` Jeff Garzik
  0 siblings, 1 reply; 3+ messages in thread
From: janitor @ 2004-10-30 22:42 UTC (permalink / raw)
  To: jgarzik; +Cc: netdev, janitor, nacc




Any comments would be appreciated.

Description: Use msleep_interruptible() 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>

---

 linux-2.6.10-rc1-max/drivers/net/pcnet32.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -puN drivers/net/pcnet32.c~msleep_interruptible-drivers_net_pcnet32 drivers/net/pcnet32.c
--- linux-2.6.10-rc1/drivers/net/pcnet32.c~msleep_interruptible-drivers_net_pcnet32	2004-10-24 17:05:14.000000000 +0200
+++ linux-2.6.10-rc1-max/drivers/net/pcnet32.c	2004-10-24 17:05:14.000000000 +0200
@@ -847,7 +847,7 @@ static int pcnet32_phys_id(struct net_de
     if ((!data) || (data > (u32)(MAX_SCHEDULE_TIMEOUT / HZ)))
     data = (u32)(MAX_SCHEDULE_TIMEOUT / HZ);
 
-    schedule_timeout(data * HZ);
+    msleep_interruptible(data * 1000);
     del_timer_sync(&lp->blink_timer);
 
     /* Restore the original value of the bcrs */
_

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch 11/18]  net/pcnet32: replace  schedule_timeout() with msleep_interruptible()
  2004-10-30 22:42 [patch 11/18] net/pcnet32: replace schedule_timeout() with msleep_interruptible() janitor
@ 2004-10-31 11:05 ` Jeff Garzik
  2004-11-01 22:10   ` [KJ] [PATCH] net/pcnet32: replace schedule_timeout() with ssleep_interruptible() Nishanth Aravamudan
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff Garzik @ 2004-10-31 11:05 UTC (permalink / raw)
  To: janitor; +Cc: netdev, nacc

janitor@sternwelten.at wrote:
> diff -puN drivers/net/pcnet32.c~msleep_interruptible-drivers_net_pcnet32 drivers/net/pcnet32.c
> --- linux-2.6.10-rc1/drivers/net/pcnet32.c~msleep_interruptible-drivers_net_pcnet32	2004-10-24 17:05:14.000000000 +0200
> +++ linux-2.6.10-rc1-max/drivers/net/pcnet32.c	2004-10-24 17:05:14.000000000 +0200
> @@ -847,7 +847,7 @@ static int pcnet32_phys_id(struct net_de
>      if ((!data) || (data > (u32)(MAX_SCHEDULE_TIMEOUT / HZ)))
>      data = (u32)(MAX_SCHEDULE_TIMEOUT / HZ);
>  
> -    schedule_timeout(data * HZ);
> +    msleep_interruptible(data * 1000);


clearly and obviously ssleep()

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [KJ] [PATCH] net/pcnet32: replace schedule_timeout() with ssleep_interruptible()
  2004-10-31 11:05 ` Jeff Garzik
@ 2004-11-01 22:10   ` Nishanth Aravamudan
  0 siblings, 0 replies; 3+ messages in thread
From: Nishanth Aravamudan @ 2004-11-01 22:10 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: kernel-janitors, netdev

[-- Attachment #1: Type: text/plain, Size: 1399 bytes --]

On Sun, Oct 31, 2004 at 06:05:37AM -0500, Jeff Garzik wrote:
> janitor@sternwelten.at wrote:
> >diff -puN drivers/net/pcnet32.c~msleep_interruptible-drivers_net_pcnet32 
> >drivers/net/pcnet32.c
> >--- 
> >linux-2.6.10-rc1/drivers/net/pcnet32.c~msleep_interruptible-drivers_net_pcnet32	2004-10-24 17:05:14.000000000 +0200
> >+++ linux-2.6.10-rc1-max/drivers/net/pcnet32.c	2004-10-24 
> >17:05:14.000000000 +0200
> >@@ -847,7 +847,7 @@ static int pcnet32_phys_id(struct net_de
> >     if ((!data) || (data > (u32)(MAX_SCHEDULE_TIMEOUT / HZ)))
> >     data = (u32)(MAX_SCHEDULE_TIMEOUT / HZ);
> > 
> >-    schedule_timeout(data * HZ);
> >+    msleep_interruptible(data * 1000);
> 
> 
> clearly and obviously ssleep()

Here is the corrected patch.

Description: Use ssleep_interruptible() instead of schedule_timeout()
to guarantee the task delays as expected.

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>


--- 2.6.10-rc1-vanilla/drivers/net/pcnet32.c	2004-10-30 15:33:28.000000000 -0700
+++ 2.6.10-rc1/drivers/net/pcnet32.c	2004-11-01 14:08:10.000000000 -0800
@@ -847,7 +847,7 @@ static int pcnet32_phys_id(struct net_de
     if ((!data) || (data > (u32)(MAX_SCHEDULE_TIMEOUT / HZ)))
     data = (u32)(MAX_SCHEDULE_TIMEOUT / HZ);
 
-    schedule_timeout(data * HZ);
+    ssleep_interruptible(data);
     del_timer_sync(&lp->blink_timer);
 
     /* Restore the original value of the bcrs */


[-- Attachment #2: Type: text/plain, Size: 167 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-11-01 22:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-30 22:42 [patch 11/18] net/pcnet32: replace schedule_timeout() with msleep_interruptible() janitor
2004-10-31 11:05 ` Jeff Garzik
2004-11-01 22:10   ` [KJ] [PATCH] net/pcnet32: replace schedule_timeout() with ssleep_interruptible() Nishanth Aravamudan

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).