Skip to contentSkip to conversation

isdn/isdnloop: add

PATCH New Nishanth Aravamudan 1 participant 2 messages Sep 17, 2004 – Sep 27, 2004

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

PATCH 15/16 isdn/isdnloop: add

Any comments would be appreciated. This is a re-push of a patch submitted a few months ago which has not been merged as of 2.6.9-rc1-mm5 / 2.6.9-rc2.

Description: Use set_current_state() before schedule_timeout() so that the task delays as expected. Without the change, schedule_timeout() returns immediately.

drivers/isdn/isdnloop/isdnloop.c +3 -0
@@ -13,6 +13,7 @@
 #include <linux/module.h>
 #include <linux/interrupt.h>
 #include <linux/init.h>
+#include <linux/sched.h>
 #include "isdnloop.h"
 
 static char *revision = "$Revision: 1.11.6.7 $";
@@ -1161,8 +1162,10 @@ isdnloop_command(isdn_ctrl * c, isdnloop
 						if (!card->leased) {
 							card->leased = 1;
 							while (card->ptype == ISDN_PTYPE_UNKNOWN) {
+								set_current_state(TASK_INTERRUPTIBLE);
 								schedule_timeout(10);
 							}
+							set_current_state(TASK_INTERRUPTIBLE);
 							schedule_timeout(10);
 							sprintf(cbuf, "00;FV2ON\n01;EAZ1\n02;EAZ2\n");
 							i = isdnloop_writecmd(cbuf, strlen(cbuf), 0, card);

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

#1 lore raw

PATCH 15/16 scsi/st: replace

Any comments would be appreciated.

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

drivers/scsi/st.c +1 -2
@@ -757,8 +757,7 @@ static int test_ready(Scsi_Tape *STp, in
 
 			if (scode == NOT_READY) {
 				if (waits < max_wait) {
-					set_current_state(TASK_INTERRUPTIBLE);
-					schedule_timeout(HZ);
+					msleep_interruptible(1000);
 					if (signal_pending(current)) {
 						retval = (-EINTR);
 						break;

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