From: Bhanu Gollapudi Date: Tue, 22 Mar 2011 01:51:13 +0000 (-0700) Subject: [SCSI] bnx2fc: IO completion not processed due to missed wakeup X-Git-Tag: v2.6.39-rc1~52^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fee787129d4d6a5e967a69ea3dea3e38ba556b3d;p=pandora-kernel.git [SCSI] bnx2fc: IO completion not processed due to missed wakeup Driver does not detect a new CQE (completion queue entry) if a thread receives the wakup when it is in TASK_RUNNING state. Fix is to set the state to TASK_INTERRUPTIBLE while holding the fp_work_lock. Also, Use __set_current_task() since it is now set inside a spinlock with synchronization. Two other related optimizations: 1. After we exit the while (!kthread_should_stop()) loop, use __set_current_state() since synchronization is no longer needed. 2. Remove set_current_state(TASK_RUNNING) after schedule() since it should always be TASK_RUNNING after schedule(). Reviewed-by: Michael Chan Signed-off-by: Bhanu Prakash Gollapudi Signed-off-by: James Bottomley --- Reading git-diff-tree failed