scsi/qla_os: replace schedule_timeout() with ssleep()
Subsystems (2)
PATCH 4/7 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.
---
kj-domen/drivers/scsi/qla2xxx/qla_os.c | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-)
drivers/scsi/qla2xxx/qla_os.c renamed from drivers/scsi/qla2xxx/qla_os.c~ssleep-drivers_scsi_qla2xxx_qla_os +3 -4
@@ -885,8 +885,8 @@ qla2x00_queuecommand(struct scsi_cmnd *cstatic 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 ;
@@ -923,8 +923,7 @@ qla2x00_eh_wait_on_command(scsi_qla_hostspin_unlock_irq (ha->host->host_lock); -set_current_state (TASK_UNINTERRUPTIBLE ); -schedule_timeout (ABORT_POLLING_PERIOD ); +msleep (ABORT_POLLING_PERIOD );spin_lock_irq (ha->host->host_lock);
_
Quoted 1 line · On Wed, 2005-01-12 at 00:22 +0100, [email protected] wrote:
Description: Use
ssleep()instead ofschedule_timeout()to guarantee the
[...]
drivers/scsi/qla2xxx/qla_os.c qla2x00_eh_wait_on_command(scsi_qla_host · line 926
Quoted 3 lines
drivers/scsi/qla2xxx/qla_os.c renamed from drivers/scsi/qla2xxx/qla_os.c~ssleep-drivers_scsi_qla2xxx_qla_os +1
-2-set_current_state (TASK_UNINTERRUPTIBLE ); -schedule_timeout (ABORT_POLLING_PERIOD ); +msleep (ABORT_POLLING_PERIOD );
The description doesn't match the code.
Also, the qla driver is maintained. You should cc [email protected] (I know they don't make it easy, like having an entry in the MAINTAINERS file or even an email address in the code).
James
Quoted 9 lines · James Bottomley
Quoted 1 line · On Wed, 2005-01-12 at 00:22 +0100, [email protected] wrote:
Description: Use
ssleep()instead ofschedule_timeout()to guarantee the[...]
Review
Quoted 3 lines
(quoted diff) +1
-2- set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(ABORT_POLLING_PERIOD); + msleep(ABORT_POLLING_PERIOD);The description doesn't match the code.
Quoted 3 lines
Also, the qla driver is maintained. You should cc [email protected] (I know they don't make it easy, like having an entry in the
MAINTAINERSfile or even an email address in the code).
Please find the corrected Description with this patch (and the appropriate CC). Thanks!
-Nish
Description: Use msleep() 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.
---
kj-domen/drivers/scsi/qla2xxx/qla_os.c | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-)
drivers/scsi/qla2xxx/qla_os.c renamed from drivers/scsi/qla2xxx/qla_os.c~ssleep-drivers_scsi_qla2xxx_qla_os +3 -4
@@ -885,8 +885,8 @@ qla2x00_queuecommand(struct scsi_cmnd *cstatic 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 ;
@@ -923,8 +923,7 @@ qla2x00_eh_wait_on_command(scsi_qla_hostspin_unlock_irq (ha->host->host_lock); -set_current_state (TASK_UNINTERRUPTIBLE ); -schedule_timeout (ABORT_POLLING_PERIOD ); +msleep (ABORT_POLLING_PERIOD );spin_lock_irq (ha->host->host_lock);
Quoted 19 lines · Nishanth Aravamudan
Quoted 9 lines · James Bottomley
Quoted 1 line · On Wed, 2005-01-12 at 00:22 +0100, [email protected] wrote:
Description: Use
ssleep()instead ofschedule_timeout()to guarantee the[...]
drivers/scsi/qla2xxx/qla_os.c qla2x00_eh_wait_on_command(scsi_qla_host · line 926
Quoted 3 lines
drivers/scsi/qla2xxx/qla_os.c renamed from drivers/scsi/qla2xxx/qla_os.c~ssleep-drivers_scsi_qla2xxx_qla_os +1
-2-set_current_state (TASK_UNINTERRUPTIBLE ); -schedule_timeout (ABORT_POLLING_PERIOD ); +msleep (ABORT_POLLING_PERIOD );The description doesn't match the code.
Quoted 3 lines
Also, the qla driver is maintained. You should cc [email protected] (I know they don't make it easy, like having an entry in the
MAINTAINERSfile or even an email address in the code).Please find the corrected Description with this patch (and the appropriate CC). Thanks!
-Nish
Quoted 7 lines
Description: Use
msleep()instead ofschedule_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.Signed-off-by Nishanth Aravamudan <[email protected]>Signed-off-by Domen Puncer <[email protected]>
ACK.
James, please add to your tree.
I'll forward over a diff to add an entry to the MAINTAINERS file in another email.
Thanks,
Andrew Vasquez