Skip to contentSkip to conversation

scsi/qla_os: replace schedule_timeout() with ssleep()

PATCH Applied Nishanth Aravamudan 2 participants 2 messages Oct 22, 2004 – Oct 24, 2004

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

PATCH 1/1 scsi/qla_os: replace schedule_timeout() with ssleep()

Any comments would be, as always, appreciated.

-Nish

Description: Use ssleep() instead of schedule_timeout() to guarantee the task delays as expected. Change the values of the constants being used appropriately. I left the arithmetic there as it was before, even though it could be easily simplified away.

drivers/scsi/qla2xxx/qla_os.c +3 -4
@@ -888,8 +888,8 @@ qla2x00_queuecommand(struct scsi_cmnd *c
 static int
 qla2x00_eh_wait_on_command(scsi_qla_host_t *ha, struct scsi_cmnd *cmd)
 {
-#define ABORT_POLLING_PERIOD	HZ
-#define ABORT_WAIT_TIME		((10 * HZ) / (ABORT_POLLING_PERIOD))
+#define ABORT_POLLING_PERIOD	1000
+#define ABORT_WAIT_TIME		((10 * 1000) / ABORT_POLLING_PERIOD)
 
 	int		found = 0;
 	int		done = 0;
@@ -926,8 +926,7 @@ qla2x00_eh_wait_on_command(scsi_qla_host
 
 		spin_unlock_irq(ha->host->host_lock);
 
-		set_current_state(TASK_UNINTERRUPTIBLE);
-		schedule_timeout(ABORT_POLLING_PERIOD);
+		ssleep(ABORT_POLLING_PERIOD / 1000);
 
 		spin_lock_irq(ha->host->host_lock);
 

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

#1 lore raw
Quoted 10 lines · Nishanth Aravamudan

Any comments would be, as always, appreciated.

-Nish

Description: Use ssleep() instead of schedule_timeout() to guarantee the task delays as expected. Change the values of the constants being used appropriately. I left the arithmetic there as it was before, even though it could be easily simplified away.

applied to kjt,
to get further testing and to be shure it gets upstream.

thanks

--
maks
kernel janitor http://janitor.kernelnewbies.org/

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