scsi/qla_os: replace schedule_timeout()
Subsystems (3)
PATCH 1/1 scsi/qla_os: replace schedule_timeout()
I would appreciate any comments from the janitors list.
Applys-to: 2.6.7
Description: Use msleep() instead of schedule_timeout() to guarantee the task delays for the desired time.
Signed-off-by Nishanth Aravamudan <[email protected]>
drivers/scsi/qla2xxx/qla_os.c +13 -26
@@ -917,8 +917,7 @@ qla2x00_eh_wait_on_command(scsi_qla_hostspin_unlock_irq (ha->host->host_lock); -set_current_state (TASK_UNINTERRUPTIBLE ); -schedule_timeout (2 *HZ ); +msleep (2000 );spin_lock_irq (ha->host->host_lock);
@@ -965,8 +964,7 @@ qla2x00_wait_for_hba_online(scsi_qla_hos test_bit(ISP_ABORT_RETRY, &ha->dpc_flags)) && time_before(jiffies, wait_online)) { -set_current_state (TASK_UNINTERRUPTIBLE ); -schedule_timeout (HZ ); +msleep (1000 ); }if (ha->flags.online == TRUE) return_status =QLA_SUCCESS ;
@@ -1008,8 +1006,7 @@ qla2x00_wait_for_loop_ready(scsi_qla_hos atomic_read(&ha->loop_state) == LOOP_DOWN) || test_bit(CFG_ACTIVE, &ha->cfg_flags) || atomic_read(&ha->loop_state) != LOOP_READY) { -set_current_state (TASK_UNINTERRUPTIBLE ); -schedule_timeout (HZ ); +msleep (1000 );if (time_after_eq (jiffies, loop_timeout)) { return_status =QLA_FUNCTION_FAILED ;break ;
@@ -2133,8 +2130,7 @@ int qla2x00_probe_one(struct pci_dev *pdqla2x00_check_fabric_devices (ha); -set_current_state (TASK_UNINTERRUPTIBLE ); -schedule_timeout (HZ /100 ); +msleep (10 ); }pci_set_drvdata (pdev, ha);
@@ -2870,8 +2866,7 @@ qla2x00_mem_alloc(scsi_qla_host_t *ha) "Memory Allocation failed - request_ring\n");qla2x00_mem_free (ha); -set_current_state (TASK_UNINTERRUPTIBLE ); -schedule_timeout (HZ /10 ); +msleep (100 );continue ; }
@@ -2884,8 +2879,7 @@ qla2x00_mem_alloc(scsi_qla_host_t *ha) "Memory Allocation failed - response_ring\n");qla2x00_mem_free (ha); -set_current_state (TASK_UNINTERRUPTIBLE ); -schedule_timeout (HZ /10 ); +msleep (100 );continue ; }
@@ -2898,8 +2892,7 @@ qla2x00_mem_alloc(scsi_qla_host_t *ha) "Memory Allocation failed - init_cb\n");qla2x00_mem_free (ha); -set_current_state (TASK_UNINTERRUPTIBLE ); -schedule_timeout (HZ /10 ); +msleep (100 );continue ; }
@@ -2911,8 +2904,7 @@ qla2x00_mem_alloc(scsi_qla_host_t *ha) "Memory Allocation failed - ioctl_mem\n");qla2x00_mem_free (ha); -set_current_state (TASK_UNINTERRUPTIBLE ); -schedule_timeout (HZ /10 ); +msleep (100 );continue ; }
@@ -2923,8 +2915,7 @@ qla2x00_mem_alloc(scsi_qla_host_t *ha) "qla2x00_allocate_sp_pool()\n");qla2x00_mem_free (ha); -set_current_state (TASK_UNINTERRUPTIBLE ); -schedule_timeout (HZ /10 ); +msleep (100 );continue ; }
@@ -2940,8 +2931,7 @@ qla2x00_mem_alloc(scsi_qla_host_t *ha) "Memory Allocation failed - sns_cmd\n");qla2x00_mem_free (ha); -set_current_state (TASK_UNINTERRUPTIBLE ); -schedule_timeout (HZ /10 ); +msleep (100 );continue ; }
@@ -2956,8 +2946,7 @@ qla2x00_mem_alloc(scsi_qla_host_t *ha) "Memory Allocation failed - ms_iocb\n");qla2x00_mem_free (ha); -set_current_state (TASK_UNINTERRUPTIBLE ); -schedule_timeout (HZ /10 ); +msleep (100 );continue ; }
@@ -2975,8 +2964,7 @@ qla2x00_mem_alloc(scsi_qla_host_t *ha) "Memory Allocation failed - ct_sns\n");qla2x00_mem_free (ha); -set_current_state (TASK_UNINTERRUPTIBLE ); -schedule_timeout (HZ /10 ); +msleep (100 );continue ; }
@@ -2992,8 +2980,7 @@ qla2x00_mem_alloc(scsi_qla_host_t *ha) "Memory Allocation failed - iodesc_pd\n");qla2x00_mem_free (ha); -set_current_state (TASK_UNINTERRUPTIBLE ); -schedule_timeout (HZ /10 ); +msleep (100 );continue ; }
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors