[SCSI] mpt fusion: fix for mounted raid volume filesytem that goes read-only
[SCSI] mpt fusion: fix for mounted raid volume filesytem that goes read-only

If there is IO going to the volume while a hidden disk is being torn down,
there is a case where we would return a DID_NO_CONNECT for IO sent to the
volume. The end result is the volume goes read-only. This problem is due to the
fact the firmware mapped target ids saved in per device object is phys_disk_num
for hidden  raid components, and target_id for the volume. There is a single
case when both phys_disk_num and target_id are equal, so enters this issue. We
fix this issue by checking the tflags when the device is torned down,
insuring the IO being completed is meant for hidden raid component, not the
volume.  In addition to this fix, there are a couple other cases to address
hidden raid components. For instance task_abort and device reset are not
supported by mpt fw for hidden raid components, a bus reset would be required
or target reset to volume.

Signed-off-by: Eric Moore <344239f1cb9b558e1db669512422521a73d26db0@lsi.com>
Signed-off-by: James Bottomley <407b36959ca09543ccda8f8e06721c791bc53435@SteelEye.com>

TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs