From: Swapnil Nagle Date: Tue, 14 Jul 2015 20:00:43 +0000 (-0400) Subject: qla2xxx: cleanup cmd in qla workqueue before processing TMR X-Git-Tag: omap-for-v4.3/fixes-merge-window~171^2~11 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8b2f5ff3d05c2c48b722c3cc67b8226f1601042b;p=pandora-kernel.git qla2xxx: cleanup cmd in qla workqueue before processing TMR Since cmds go into qla_tgt_wq and TMRs don't, it's possible that TMR like TASK_ABORT can be queued over the cmd for which it was meant. To avoid this race, use a per-port list to keep track of cmds that are enqueued to qla_tgt_wq but not yet processed. When a TMR arrives, iterate through this list and remove any cmds that match the TMR. This patch supports TASK_ABORT and LUN_RESET. Cc: # v3.18+ Signed-off-by: Swapnil Nagle Signed-off-by: Alexei Potashnik Acked-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Nicholas Bellinger --- Reading git-diff-tree failed