[SCSI] aic94xx: fix TMF ascb handling to prevent sequencer panic
This is a particularly nasty bug. The problem is that if any internal ascb times out, currently we free it even though it's pending at the sequencer. This results in the sequencer getting terminally confused and the error message: BUG:sequencer:dl:no ascb Being returned when it comes back. The way to fix this is to manage freeing the ascb from the tasklet completion routine, so that we only free it when the sequencer actually returns it. The code is also altered to use on stack completions and transfer variables. Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
This commit is contained in:
@@ -343,11 +343,13 @@ Again:
|
||||
task->task_state_flags &= ~SAS_TASK_AT_INITIATOR;
|
||||
task->task_state_flags |= SAS_TASK_STATE_DONE;
|
||||
if (unlikely((task->task_state_flags & SAS_TASK_STATE_ABORTED))) {
|
||||
struct completion *completion = ascb->completion;
|
||||
spin_unlock_irqrestore(&task->task_state_lock, flags);
|
||||
ASD_DPRINTK("task 0x%p done with opcode 0x%x resp 0x%x "
|
||||
"stat 0x%x but aborted by upper layer!\n",
|
||||
task, opcode, ts->resp, ts->stat);
|
||||
complete(&ascb->completion);
|
||||
if (completion)
|
||||
complete(completion);
|
||||
} else {
|
||||
spin_unlock_irqrestore(&task->task_state_lock, flags);
|
||||
task->lldd_task = NULL;
|
||||
|
Reference in New Issue
Block a user