aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tokenring
diff options
context:
space:
mode:
authorNishanth Aravamudan <nacc@us.ibm.com>2005-09-11 05:09:55 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-09-14 08:33:24 -0400
commit3173c8907ffb2c64456142da3df2bd0500bd59e0 (patch)
treedcd3700a2c37e24a2b5911bb5429aee715684926 /drivers/net/tokenring
parent343c686c04eec556645f251f7d6c9b3d7335dae0 (diff)
[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: Nishanth Aravamudan <nacc@us.ibm.com> Cc: Jeff Garzik <jgarzik@pobox.com> Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/net/tokenring')
-rw-r--r--drivers/net/tokenring/ibmtr.c9
-rw-r--r--drivers/net/tokenring/olympic.c2
-rw-r--r--drivers/net/tokenring/tms380tr.c3
3 files changed, 6 insertions, 8 deletions
diff --git a/drivers/net/tokenring/ibmtr.c b/drivers/net/tokenring/ibmtr.c
index e7b001017b9a..8154bbbb7792 100644
--- a/drivers/net/tokenring/ibmtr.c
+++ b/drivers/net/tokenring/ibmtr.c
@@ -318,7 +318,7 @@ static void ibmtr_cleanup_card(struct net_device *dev)
318 if (dev->base_addr) { 318 if (dev->base_addr) {
319 outb(0,dev->base_addr+ADAPTRESET); 319 outb(0,dev->base_addr+ADAPTRESET);
320 320
321 schedule_timeout(TR_RST_TIME); /* wait 50ms */ 321 schedule_timeout_uninterruptible(TR_RST_TIME); /* wait 50ms */
322 322
323 outb(0,dev->base_addr+ADAPTRESETREL); 323 outb(0,dev->base_addr+ADAPTRESETREL);
324 } 324 }
@@ -859,8 +859,7 @@ static int tok_init_card(struct net_device *dev)
859 writeb(~INT_ENABLE, ti->mmio + ACA_OFFSET + ACA_RESET + ISRP_EVEN); 859 writeb(~INT_ENABLE, ti->mmio + ACA_OFFSET + ACA_RESET + ISRP_EVEN);
860 outb(0, PIOaddr + ADAPTRESET); 860 outb(0, PIOaddr + ADAPTRESET);
861 861
862 current->state=TASK_UNINTERRUPTIBLE; 862 schedule_timeout_uninterruptible(TR_RST_TIME); /* wait 50ms */
863 schedule_timeout(TR_RST_TIME); /* wait 50ms */
864 863
865 outb(0, PIOaddr + ADAPTRESETREL); 864 outb(0, PIOaddr + ADAPTRESETREL);
866#ifdef ENABLE_PAGING 865#ifdef ENABLE_PAGING
@@ -908,8 +907,8 @@ static int tok_open(struct net_device *dev)
908 DPRINTK("Adapter is up and running\n"); 907 DPRINTK("Adapter is up and running\n");
909 return 0; 908 return 0;
910 } 909 }
911 current->state=TASK_INTERRUPTIBLE; 910 i=schedule_timeout_interruptible(TR_RETRY_INTERVAL);
912 i=schedule_timeout(TR_RETRY_INTERVAL); /* wait 30 seconds */ 911 /* wait 30 seconds */
913 if(i!=0) break; /*prob. a signal, like the i>24*HZ case above */ 912 if(i!=0) break; /*prob. a signal, like the i>24*HZ case above */
914 } 913 }
915 outb(0, dev->base_addr + ADAPTRESET);/* kill pending interrupts*/ 914 outb(0, dev->base_addr + ADAPTRESET);/* kill pending interrupts*/
diff --git a/drivers/net/tokenring/olympic.c b/drivers/net/tokenring/olympic.c
index 9e7923192a49..05477d24fd49 100644
--- a/drivers/net/tokenring/olympic.c
+++ b/drivers/net/tokenring/olympic.c
@@ -1101,7 +1101,7 @@ static int olympic_close(struct net_device *dev)
1101 1101
1102 while(olympic_priv->srb_queued) { 1102 while(olympic_priv->srb_queued) {
1103 1103
1104 t = schedule_timeout(60*HZ); 1104 t = schedule_timeout_interruptible(60*HZ);
1105 1105
1106 if(signal_pending(current)) { 1106 if(signal_pending(current)) {
1107 printk(KERN_WARNING "%s: SRB timed out.\n",dev->name); 1107 printk(KERN_WARNING "%s: SRB timed out.\n",dev->name);
diff --git a/drivers/net/tokenring/tms380tr.c b/drivers/net/tokenring/tms380tr.c
index 2e39bf1f7462..c1925590a0e1 100644
--- a/drivers/net/tokenring/tms380tr.c
+++ b/drivers/net/tokenring/tms380tr.c
@@ -1243,8 +1243,7 @@ void tms380tr_wait(unsigned long time)
1243 1243
1244 tmp = jiffies + time/(1000000/HZ); 1244 tmp = jiffies + time/(1000000/HZ);
1245 do { 1245 do {
1246 current->state = TASK_INTERRUPTIBLE; 1246 tmp = schedule_timeout_interruptible(tmp);
1247 tmp = schedule_timeout(tmp);
1248 } while(time_after(tmp, jiffies)); 1247 } while(time_after(tmp, jiffies));
1249#else 1248#else
1250 udelay(time); 1249 udelay(time);