[PATCH] libata: check if port is disabled after internal command
[PATCH] libata: check if port is disabled after internal command

libata core is being changed to disallow port/device disable on lower
layers.  However, some LLDDs (sata_mv) directly disable port on
command failure.  This patch makes ata_exec_internal() check whether a
port got disabled after an internal command.  If it is, AC_ERR_SYSTEM
is added to err_mask and the port gets re-enabled.

As internal command failure results in device disable for drivers
which don't implement newer reset/EH callbacks, this change results in
no behavior change for single device per port controllers.  For
slave-possible LLDDs which disable port on command failure, (1) such
drivers don't exist currently, (2) issuing command to the other device
of once-disabled port shouldn't result in catastrophe even if such
driver exists.  So, this should be enough as a temporary measure.

Signed-off-by: Tejun Heo <ccfba69985e72fbcd9ba8bbb6db43d42971ad06d@gmail.com>
Signed-off-by: Jeff Garzik <f3e731dfa293c7a83119d8aacfa41b5d2d780be9@garzik.org>

KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,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