aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-11-15 14:33:05 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2008-11-15 14:33:05 -0500
commitfa0cfc202c4969ceed567b1567c2e5effe7fd28b (patch)
treea6b23ec91fdf7f140f72cfc6aaf9b5cab342ae7b /drivers
parent8141c7f3e7aee618312fa1c15109e1219de784a7 (diff)
parent6a6b97d360702b98c02c7fca4c4e088dcf3a2985 (diff)
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev: libata: improve phantom device detection
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ata/libata-sff.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
index 4b4739486327..9033d164c4ec 100644
--- a/drivers/ata/libata-sff.c
+++ b/drivers/ata/libata-sff.c
@@ -1227,10 +1227,19 @@ fsm_start:
1227 /* ATA PIO protocol */ 1227 /* ATA PIO protocol */
1228 if (unlikely((status & ATA_DRQ) == 0)) { 1228 if (unlikely((status & ATA_DRQ) == 0)) {
1229 /* handle BSY=0, DRQ=0 as error */ 1229 /* handle BSY=0, DRQ=0 as error */
1230 if (likely(status & (ATA_ERR | ATA_DF))) 1230 if (likely(status & (ATA_ERR | ATA_DF))) {
1231 /* device stops HSM for abort/error */ 1231 /* device stops HSM for abort/error */
1232 qc->err_mask |= AC_ERR_DEV; 1232 qc->err_mask |= AC_ERR_DEV;
1233 else { 1233
1234 /* If diagnostic failed and this is
1235 * IDENTIFY, it's likely a phantom
1236 * device. Mark hint.
1237 */
1238 if (qc->dev->horkage &
1239 ATA_HORKAGE_DIAGNOSTIC)
1240 qc->err_mask |=
1241 AC_ERR_NODEV_HINT;
1242 } else {
1234 /* HSM violation. Let EH handle this. 1243 /* HSM violation. Let EH handle this.
1235 * Phantom devices also trigger this 1244 * Phantom devices also trigger this
1236 * condition. Mark hint. 1245 * condition. Mark hint.