From: <vl...@us...> - 2008-06-13 10:31:55
|
Revision: 412 http://scst.svn.sourceforge.net/scst/?rev=412&view=rev Author: vlnb Date: 2008-06-13 03:31:50 -0700 (Fri, 13 Jun 2008) Log Message: ----------- - Complete the fix for broken REQUEST SENSE - Cleanup: cleanup_lock shouldn't be IRQ Modified Paths: -------------- trunk/scst/src/dev_handlers/scst_user.c trunk/scst/src/scst_targ.c Modified: trunk/scst/src/dev_handlers/scst_user.c =================================================================== --- trunk/scst/src/dev_handlers/scst_user.c 2008-06-12 18:55:13 UTC (rev 411) +++ trunk/scst/src/dev_handlers/scst_user.c 2008-06-13 10:31:50 UTC (rev 412) @@ -2716,9 +2716,9 @@ down_write(&dev->dev_rwsem); - spin_lock_irq(&cleanup_lock); + spin_lock(&cleanup_lock); list_add_tail(&dev->cleanup_list_entry, &cleanup_list); - spin_unlock_irq(&cleanup_lock); + spin_unlock(&cleanup_lock); wake_up(&cleanup_list_waitQ); wake_up(&dev->cmd_lists.cmd_list_waitQ); @@ -2823,7 +2823,7 @@ current->flags |= PF_NOFREEZE; - spin_lock_irq(&cleanup_lock); + spin_lock(&cleanup_lock); while (!kthread_should_stop()) { wait_queue_t wait; init_waitqueue_entry(&wait, current); @@ -2834,9 +2834,9 @@ set_current_state(TASK_INTERRUPTIBLE); if (test_cleanup_list()) break; - spin_unlock_irq(&cleanup_lock); + spin_unlock(&cleanup_lock); schedule(); - spin_lock_irq(&cleanup_lock); + spin_lock(&cleanup_lock); } set_current_state(TASK_RUNNING); remove_wait_queue(&cleanup_list_waitQ, &wait); @@ -2859,9 +2859,9 @@ typeof(*dev), cleanup_list_entry); list_del(&dev->cleanup_list_entry); - spin_unlock_irq(&cleanup_lock); + spin_unlock(&cleanup_lock); rc = dev_user_process_cleanup(dev); - spin_lock_irq(&cleanup_lock); + spin_lock(&cleanup_lock); if (rc != 0) list_add_tail(&dev->cleanup_list_entry, @@ -2871,9 +2871,9 @@ if (list_empty(&cl_devs)) break; - spin_unlock_irq(&cleanup_lock); + spin_unlock(&cleanup_lock); msleep(100); - spin_lock_irq(&cleanup_lock); + spin_lock(&cleanup_lock); while (!list_empty(&cl_devs)) { dev = list_entry(cl_devs.next, typeof(*dev), @@ -2883,7 +2883,7 @@ } } } - spin_unlock_irq(&cleanup_lock); + spin_unlock(&cleanup_lock); /* * If kthread_should_stop() is true, we are guaranteed to be Modified: trunk/scst/src/scst_targ.c =================================================================== --- trunk/scst/src/scst_targ.c 2008-06-12 18:55:13 UTC (rev 411) +++ trunk/scst/src/scst_targ.c 2008-06-13 10:31:50 UTC (rev 412) @@ -2319,17 +2319,17 @@ return res; } -static int scst_pre_dev_done(struct scst_cmd *cmd) +static int scst_pre_dev_done(struct scst_cmd **pcmd) { int res = SCST_CMD_STATE_RES_CONT_SAME, rc; TRACE_ENTRY(); - rc = scst_done_cmd_check(&cmd, &res); + rc = scst_done_cmd_check(pcmd, &res); if (rc) goto out; - cmd->state = SCST_CMD_STATE_DEV_DONE; + (*pcmd)->state = SCST_CMD_STATE_DEV_DONE; out: TRACE_EXIT_HRES(res); @@ -3153,7 +3153,7 @@ break; case SCST_CMD_STATE_PRE_DEV_DONE: - res = scst_pre_dev_done(cmd); + res = scst_pre_dev_done(&cmd); EXTRACHECKS_BUG_ON(res == SCST_CMD_STATE_RES_NEED_THREAD); break; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |