Commit 3a353fb0 authored by Andrew Vasquez's avatar Andrew Vasquez Committed by James Bottomley

[PATCH] qla2xxx set current state fixes

- always set_current_state(TASK_UNINTERRUBTIBLE) unless we explicitly
  check for signals.

- make all timeouts take HZ based values.
parent 8ceb54e2
...@@ -946,7 +946,7 @@ qla2x00_fw_ready(scsi_qla_host_t *ha) ...@@ -946,7 +946,7 @@ qla2x00_fw_ready(scsi_qla_host_t *ha)
break; break;
/* Delay for a while */ /* Delay for a while */
set_current_state(TASK_INTERRUPTIBLE); set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(HZ / 2); schedule_timeout(HZ / 2);
DEBUG3(printk("scsi(%ld): fw_state=%x curr time=%lx.\n", DEBUG3(printk("scsi(%ld): fw_state=%x curr time=%lx.\n",
......
...@@ -914,7 +914,7 @@ qla2x00_eh_wait_on_command(scsi_qla_host_t *ha, struct scsi_cmnd *cmd) ...@@ -914,7 +914,7 @@ qla2x00_eh_wait_on_command(scsi_qla_host_t *ha, struct scsi_cmnd *cmd)
spin_unlock_irq(ha->host->host_lock); spin_unlock_irq(ha->host->host_lock);
set_current_state(TASK_INTERRUPTIBLE); set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(2*HZ); schedule_timeout(2*HZ);
spin_lock_irq(ha->host->host_lock); spin_lock_irq(ha->host->host_lock);
...@@ -962,7 +962,7 @@ qla2x00_wait_for_hba_online(scsi_qla_host_t *ha) ...@@ -962,7 +962,7 @@ qla2x00_wait_for_hba_online(scsi_qla_host_t *ha)
test_bit(ISP_ABORT_RETRY, &ha->dpc_flags)) && test_bit(ISP_ABORT_RETRY, &ha->dpc_flags)) &&
time_before(jiffies, wait_online)) { time_before(jiffies, wait_online)) {
set_current_state(TASK_INTERRUPTIBLE); set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(HZ); schedule_timeout(HZ);
} }
if (ha->flags.online == TRUE) if (ha->flags.online == TRUE)
...@@ -1005,7 +1005,7 @@ qla2x00_wait_for_loop_ready(scsi_qla_host_t *ha) ...@@ -1005,7 +1005,7 @@ qla2x00_wait_for_loop_ready(scsi_qla_host_t *ha)
atomic_read(&ha->loop_state) == LOOP_DOWN) || atomic_read(&ha->loop_state) == LOOP_DOWN) ||
test_bit(CFG_ACTIVE, &ha->cfg_flags) || test_bit(CFG_ACTIVE, &ha->cfg_flags) ||
atomic_read(&ha->loop_state) != LOOP_READY) { atomic_read(&ha->loop_state) != LOOP_READY) {
set_current_state(TASK_INTERRUPTIBLE); set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(HZ); schedule_timeout(HZ);
if (time_after_eq(jiffies, loop_timeout)) { if (time_after_eq(jiffies, loop_timeout)) {
return_status = QLA_FUNCTION_FAILED; return_status = QLA_FUNCTION_FAILED;
...@@ -2125,8 +2125,8 @@ int qla2x00_probe_one(struct pci_dev *pdev, struct qla_board_info *brd_info) ...@@ -2125,8 +2125,8 @@ int qla2x00_probe_one(struct pci_dev *pdev, struct qla_board_info *brd_info)
qla2x00_check_fabric_devices(ha); qla2x00_check_fabric_devices(ha);
set_current_state(TASK_INTERRUPTIBLE); set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(5); schedule_timeout(HZ/100);
} }
pci_set_drvdata(pdev, ha); pci_set_drvdata(pdev, ha);
...@@ -2868,7 +2868,7 @@ qla2x00_mem_alloc(scsi_qla_host_t *ha) ...@@ -2868,7 +2868,7 @@ qla2x00_mem_alloc(scsi_qla_host_t *ha)
"Memory Allocation failed - request_ring\n"); "Memory Allocation failed - request_ring\n");
qla2x00_mem_free(ha); qla2x00_mem_free(ha);
set_current_state(TASK_INTERRUPTIBLE); set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(HZ/10); schedule_timeout(HZ/10);
continue; continue;
...@@ -2882,7 +2882,7 @@ qla2x00_mem_alloc(scsi_qla_host_t *ha) ...@@ -2882,7 +2882,7 @@ qla2x00_mem_alloc(scsi_qla_host_t *ha)
"Memory Allocation failed - response_ring\n"); "Memory Allocation failed - response_ring\n");
qla2x00_mem_free(ha); qla2x00_mem_free(ha);
set_current_state(TASK_INTERRUPTIBLE); set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(HZ/10); schedule_timeout(HZ/10);
continue; continue;
...@@ -2896,7 +2896,7 @@ qla2x00_mem_alloc(scsi_qla_host_t *ha) ...@@ -2896,7 +2896,7 @@ qla2x00_mem_alloc(scsi_qla_host_t *ha)
"Memory Allocation failed - init_cb\n"); "Memory Allocation failed - init_cb\n");
qla2x00_mem_free(ha); qla2x00_mem_free(ha);
set_current_state(TASK_INTERRUPTIBLE); set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(HZ/10); schedule_timeout(HZ/10);
continue; continue;
...@@ -2909,7 +2909,7 @@ qla2x00_mem_alloc(scsi_qla_host_t *ha) ...@@ -2909,7 +2909,7 @@ qla2x00_mem_alloc(scsi_qla_host_t *ha)
"Memory Allocation failed - ioctl_mem\n"); "Memory Allocation failed - ioctl_mem\n");
qla2x00_mem_free(ha); qla2x00_mem_free(ha);
set_current_state(TASK_INTERRUPTIBLE); set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(HZ/10); schedule_timeout(HZ/10);
continue; continue;
...@@ -2921,7 +2921,7 @@ qla2x00_mem_alloc(scsi_qla_host_t *ha) ...@@ -2921,7 +2921,7 @@ qla2x00_mem_alloc(scsi_qla_host_t *ha)
"qla2x00_allocate_sp_pool()\n"); "qla2x00_allocate_sp_pool()\n");
qla2x00_mem_free(ha); qla2x00_mem_free(ha);
set_current_state(TASK_INTERRUPTIBLE); set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(HZ/10); schedule_timeout(HZ/10);
continue; continue;
...@@ -2938,7 +2938,7 @@ qla2x00_mem_alloc(scsi_qla_host_t *ha) ...@@ -2938,7 +2938,7 @@ qla2x00_mem_alloc(scsi_qla_host_t *ha)
"Memory Allocation failed - sns_cmd\n"); "Memory Allocation failed - sns_cmd\n");
qla2x00_mem_free(ha); qla2x00_mem_free(ha);
set_current_state(TASK_INTERRUPTIBLE); set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(HZ/10); schedule_timeout(HZ/10);
continue; continue;
...@@ -2954,7 +2954,7 @@ qla2x00_mem_alloc(scsi_qla_host_t *ha) ...@@ -2954,7 +2954,7 @@ qla2x00_mem_alloc(scsi_qla_host_t *ha)
"Memory Allocation failed - ms_iocb\n"); "Memory Allocation failed - ms_iocb\n");
qla2x00_mem_free(ha); qla2x00_mem_free(ha);
set_current_state(TASK_INTERRUPTIBLE); set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(HZ/10); schedule_timeout(HZ/10);
continue; continue;
...@@ -2973,7 +2973,7 @@ qla2x00_mem_alloc(scsi_qla_host_t *ha) ...@@ -2973,7 +2973,7 @@ qla2x00_mem_alloc(scsi_qla_host_t *ha)
"Memory Allocation failed - ct_sns\n"); "Memory Allocation failed - ct_sns\n");
qla2x00_mem_free(ha); qla2x00_mem_free(ha);
set_current_state(TASK_INTERRUPTIBLE); set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(HZ/10); schedule_timeout(HZ/10);
continue; continue;
...@@ -2990,7 +2990,7 @@ qla2x00_mem_alloc(scsi_qla_host_t *ha) ...@@ -2990,7 +2990,7 @@ qla2x00_mem_alloc(scsi_qla_host_t *ha)
"Memory Allocation failed - iodesc_pd\n"); "Memory Allocation failed - iodesc_pd\n");
qla2x00_mem_free(ha); qla2x00_mem_free(ha);
set_current_state(TASK_INTERRUPTIBLE); set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(HZ/10); schedule_timeout(HZ/10);
continue; continue;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment