[SCSI] isci: Fix a race condition in the SSP task management path
authorJeff Skirvin <jeffrey.d.skirvin@intel.com>
Fri, 12 Jul 2013 00:18:58 +0000 (17:18 -0700)
committerJames Bottomley <JBottomley@Parallels.com>
Tue, 23 Jul 2013 14:16:57 +0000 (07:16 -0700)
commit96f15f29038e58e1b0a96483e2b369ff446becf1
treea6ad8d41ad4f0f3f783890dd35951d9ac23662f7
parentecb2cf1a6b63825a258ff4fe0d7f3070fbe4676b
[SCSI] isci: Fix a race condition in the SSP task management path

This commit fixes a race condition in the isci driver abort task and SSP
device task management path.  The race is caused when an I/O termination
in the SCU hardware is necessary because of an SSP target timeout condition,
and the check of the I/O end state races against the HW-termination-driven
end state.  The failure of the race meant that no TMF was sent to the device
to clean-up the pending I/O.

Signed-off-by: Jeff Skirvin <jeffrey.d.skirvin@intel.com>
Reviewed-by: Lukasz Dorau <lukasz.dorau@intel.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/isci/task.c