Commit ec42dc41 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by James Bottomley

[PATCH] remove sleep_on_timeout usage in megaraid

megaraid does sleep_on_timeout on a stack waitq - use msleep instead.
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 8a617db5
...@@ -4068,7 +4068,6 @@ mega_support_ext_cdb(adapter_t *adapter) ...@@ -4068,7 +4068,6 @@ mega_support_ext_cdb(adapter_t *adapter)
static int static int
mega_del_logdrv(adapter_t *adapter, int logdrv) mega_del_logdrv(adapter_t *adapter, int logdrv)
{ {
DECLARE_WAIT_QUEUE_HEAD(wq);
unsigned long flags; unsigned long flags;
scb_t *scb; scb_t *scb;
int rval; int rval;
...@@ -4083,11 +4082,9 @@ mega_del_logdrv(adapter_t *adapter, int logdrv) ...@@ -4083,11 +4082,9 @@ mega_del_logdrv(adapter_t *adapter, int logdrv)
* Wait till all the issued commands are complete and there are no * Wait till all the issued commands are complete and there are no
* commands in the pending queue * commands in the pending queue
*/ */
while( atomic_read(&adapter->pend_cmds) > 0 || while (atomic_read(&adapter->pend_cmds) > 0 ||
!list_empty(&adapter->pending_list) ) { !list_empty(&adapter->pending_list))
msleep(1000); /* sleep for 1s */
sleep_on_timeout( &wq, 1*HZ ); /* sleep for 1s */
}
rval = mega_do_del_logdrv(adapter, logdrv); rval = mega_do_del_logdrv(adapter, logdrv);
......
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