Skip to contentSkip to conversation

net/lanstreamer: replace

PATCH In review Nishanth Aravamudan 1 participant 1 message Sep 23, 2004

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 21/38 net/lanstreamer: replace

Any comments would be appreciated.

Description: Use ssleep() / msleep_interruptible() [as appropriate] instead of schedule_timeout() to guarantee the task delays as expected.

drivers/net/tokenring/lanstreamer.c +2 -4
@@ -455,8 +455,7 @@ static int streamer_reset(struct net_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_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");

_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors